1
1

Compare commits

...

10284 Commits

Author SHA1 Message Date
a78b3ee53a Merge remote-tracking branch 'origin/master' into openvdb 2017-10-16 10:22:35 +01:00
49f4ac17bf Edit Mesh/Curve: Median center for click extrude
Was using bound-box center which depends on rotation.
2017-10-14 19:27:21 +11:00
f4b5d0ba3a Add some basic 4K render presets.
This difinition is becomming rather common now, time to add it to our
collection imho (requested in T53064).
2017-10-14 10:08:48 +02:00
8fb2e46193 Edit Mesh: click extrude, ensure inverse matrix
Relied on this being set elsewhere which isn't assured.
2017-10-14 19:05:12 +11:00
8bac5ea0c5 Correct bezier curve assert
Bezier curves should have v-points zero'd.
2017-10-14 17:54:43 +11:00
7cd9926fd8 Cleanup: use const for events 2017-10-14 17:30:15 +11:00
Julian Eisel
61fe8e8aca Hide "Confirm on Release" button from transfor redo options
Hide-flag wasn't set so option shows up in keymap editor. But seems like
that flag is ignored there by now anyway.
2017-10-14 01:12:30 +02:00
a51688d0b0 Fix T53052: ID decrement error when deleting a scene, either python or GUI.
User count of scenes was inconsistant, screens only have 'user_one' kind
of owning over scenes, which means they shall never increment or
decrement their real user count. And usually, scenes have no real user
at all.
2017-10-12 15:54:43 +02:00
3b4f6996a8 Fix T52999: floating (popup) panels/menus could jump around screen in some cases.
Would happen during panel's refresh drawing, if drawing code had to adjust
final panel position compared to the initial one computed based on the
mouse coordinates, and user had dragged the floating panel around.

Issue fixed by adjusting stored mouse coordinates once final panel
position is known, such that they would directly generate those
coordinates. that way, the basic offset applied to those stored mouse
coordinates during panel dragging is valid, and recreating panel based
on those won't make it jump in screen.

Note that panel will still jump in case user dragged it partially out of
view - we could prevent that, but imho it's better to keep that
behavior, since redraw can generate a popup of different size, which
could end up with a totally out-of-view one...

Hopefully this fix does not break anything else!
2017-10-12 14:50:18 +02:00
b29e37ed81 Docs: add note for bmesh face_split_edgenet 2017-10-12 23:36:42 +11:00
5ea729845d Fix T53048: OSL Volume is broken in Blender 2.79
Was a mistake in optimization commit which was disconnecting closures and nodes
which does not make sense for volume output.

OSL script we can't ignore and can't currently know in advance if it's a proper
volume shader or not. So we never disconnect OSL nodes from volume output.

This is a good candidate for corrective release.
2017-10-11 15:22:40 +05:00
4fce3c7ac0 Cycles: Speedup up tangent space calculation
This patch goes away form using C++ RNA during tangent space calculation which
avoids quite a bit of overhead. Now all calculation is done using data which
already exists in ccl::Mesh. This means, tangent space is now calculated from
triangles, which doesn't seem to be any different (at least as far as regression
tests are concerned).

One of the positive sides is that this change makes it possible to move tangent
space calculation from blender/ to render/ so we will have Cycles standalone
supporting tangent space.

Reviewers: brecht, lukasstockner97, campbellbarton

Differential Revision: https://developer.blender.org/D2810
2017-10-11 13:19:15 +05:00
a421607569 Cycles: Add utility function to calculate triangle's normal 2017-10-11 13:18:59 +05:00
552d15c976 Cycles: Add utility function to remove given attribute 2017-10-11 13:18:59 +05:00
4782000fd5 Cycles: Fix possible race condition when initializing devices list 2017-10-11 12:48:19 +05:00
d83bcf7071 Cycles tests: Don't proint braces for empty status 2017-10-11 12:36:18 +05:00
99eb13d3f7 Fix T53040: Vertex paint, texure & symmetry fail
Removed old logic for brush texture which was being applied twice.
2017-10-10 23:31:07 +11:00
d2326e888a Vertex Paint: add back missing VertProjHandle free
Also avoid passing large struct as value.
2017-10-10 22:32:30 +11:00
0592ac09ff Correct logic for vertex paint smear
Swapping gave values from the state before the last.
Thanks to @angavrilov for spotting.
2017-10-10 20:38:52 +11:00
582fbda18f Fix Sculpt 2D falloff, missing brush caused crash 2017-10-10 19:52:11 +11:00
8d73ba58b6 Cycles: Fix compilation of sm_20 and sm_21 kernels
Was broken since the bicubic commit for GPU support.
2017-10-10 12:26:02 +05:00
caba67c2fa Recent check for navigation missed NULL check 2017-10-10 02:43:56 +11:00
e9d06f0866 UI: VSE strip menu reorganization
Add Inputs and Transform submenus.
2017-10-09 13:59:49 +11:00
e360d003ea Cycles: schedule more work for non-display and compute preemption CUDA cards.
This change affects CUDA GPUs not connected to a display or connected to a
display but supporting compute preemption so that the display does not
freeze. I couldn't find an official list, but compute preemption seems to be
only supported with GTX 1070+ and Linux (not GTX 1060- or Windows).

This helps improve small tile rendering performance further if there are
sufficient samples x number of pixels in a single tile to keep the GPU busy.
2017-10-08 21:12:16 +02:00
Mathieu Menuet
5aa08eb3cc Fix T53017: Cycles not detecting AMD GPU when there is an NVidia GPU too.
Best guess is that cuInit() somehow interferes with the AMD graphics driver
on Windows, and switching the initialization order to do OpenCL first seems
to solve the issue.
2017-10-08 18:36:02 +02:00
9ea2a7c02d Fix potential string buffer overruns.
Note that our library path handling is still rather dodgy on this
regards, shall take some time at some point to seriously sanitize it...
2017-10-08 16:08:00 +02:00
cdb0b3b1dc Code refactor: use DeviceInfo to enable QBVH and decoupled volume shading. 2017-10-08 13:17:33 +02:00
4b3e6cb728 Cleanup: --help text
Sync with manual
2017-10-08 18:49:58 +11:00
c3d3483223 CMake: Re-order PYTHON_VERSION check
Missing paths would error first.
2017-10-08 14:05:22 +11:00
f61c340bc1 Cycles: OpenCL bicubic and tricubic texture interpolation support. 2017-10-08 02:55:44 +02:00
c040dedc12 Fix incorrect MIS with principled BSDF and specular roughness 0. 2017-10-07 22:10:02 +02:00
c921c3bcd0 [cmake] Add minimum python version check to cmake to prevent later build errors. 2017-10-07 07:58:54 -06:00
d7eabc6765 Code cleanup: simplify cmake kernel install. 2017-10-07 15:32:20 +02:00
2d92988f6b Cycles: CUDA bicubic and tricubic texture interpolation support.
While cubic interpolation is quite expensive on the CPU compared to linear
interpolation, the difference on the GPU is quite small.
2017-10-07 15:30:57 +02:00
23098cda99 Code refactor: make texture code more consistent between devices.
* Use common TextureInfo struct for all devices, except CUDA fermi.
* Move image sampling code to kernels/*/kernel_*_image.h files.
* Use arrays for data textures on Fermi too, so device_vector<Struct> works.
2017-10-07 14:53:14 +02:00
d013b56dde Actually force accumulate mode for the Smear brush in weight/vertex paint.
Just removing the checkbox from UI isn't enough for proper behavior.
2017-10-07 13:53:54 +03:00
6b8abefcc6 Make weight paint blur thread safe, and fix smear ignoring mirror.
Instead of trying to be clever with swaps and lazy updating the weight
data, simply recalculate one single array. To improve performance, use
threading for that.
2017-10-07 12:45:21 +03:00
83ce02879f Cycles: Fix possible race condition when generating Beckmann table
Two issues here:

- Checking table size to be non-zero is not a proper way to go here. This is
  because we first resize the table and then fill it in. So it was possible that
  non-initialized table was used.

  Trickery with using temporary memory and then doing table.swap() might work,
  but we can not guarantee that table size will be set after the data pointer.

- Mutex guard was useless, because every thread was using own mutex. Need to
  make mutex guard static so all threads are using same mutex.
2017-10-06 21:06:15 +05:00
837383ac78 Cycles: Cleanup, indendation 2017-10-06 19:33:59 +05:00
a950af8e24 Fix T53012: Shadow catcher creates artifacts on contact area
The issue was caused by light sample being evaluated to nan at some point.
This is root of the cause which is to be fixed, but is very hard to trace down
especially via ssh (the issue only happens on AVX2 release build). Will give it
a closer look when back to my AVX2 machine.

For until then this is a good check to have anyway, it corresponds to what's
happening in regular radiance sum.
2017-10-06 17:27:34 +05:00
0d3c8d0701 Cycles: Cleanup, indentation and wrapping 2017-10-06 16:54:37 +05:00
3df139c530 Cleanup: Math lib naming (use v3 suffix) 2017-10-06 21:06:38 +11:00
70aa33f069 Sequencer: Cleanup, use more BLI utilities where possible 2017-10-06 15:00:22 +05:00
00eac066f3 Sequencer: Use BLI math functions where possible 2017-10-06 14:36:41 +05:00
d56f835bff Sequencer: Avoid re-calculation index offset multiple times 2017-10-06 14:36:41 +05:00
5bbe818aeb Sequencer: Use funciton instead of macr oto avoid argument re-evaluation 2017-10-06 14:36:41 +05:00
c756787694 Fix T52940: VSE Glow Effect Strip on transparent images has no blur 2017-10-06 14:36:41 +05:00
55b7adb9e5 Error in falloff_angle range in last commit 2017-10-06 20:20:15 +11:00
471be7e7f5 Vertex Paint: move normal falloff into the brush
All related settings are already in the brush,
so it's inconvenient to switch panels to change this one option.
2017-10-06 20:15:28 +11:00
6c43490616 Vertex Paint: use view normal w/ 2D falloff
When projecting to the view, cull faces pointing
away from the view normal.
2017-10-06 19:10:33 +11:00
8ef757df3d Vertex Paint: use brush front-face setting
Follow sculpt mode more closely by using the brush front-face option.
2017-10-06 18:57:37 +11:00
082987ec74 Sculpt: use tube falloff when calculating normals
Also apply 2D clamping for other tools when the option is set.
2017-10-06 18:34:05 +11:00
3282218983 Sculpt: clamp normal to plane w/ projected falloff
Allows for editing outlines w/o pushing geometry towards/away from
the view.
2017-10-06 17:38:56 +11:00
327bb6e543 Fix ruler access from search pop-up
D2831 by @1xundoredo
2017-10-06 17:13:44 +11:00
c454d816a9 Cleanup: style 2017-10-06 16:56:41 +11:00
c82efd3276 Fix T52514: don't clear filename when dropping directory path in file browser. 2017-10-06 00:18:57 +02:00
64f8cc3e7d Fix T52998: disabled menu entries responding to key shortcuts. 2017-10-05 19:12:05 +02:00
63482a5f2e Fix T53002: Batch-Generate Previews generate empty or none image for large objects.
Camera clipping was left to default values, which won't work well for
very large (or small) objects. Now recompute valid clipping start/end
based on boundingbox of rendered data, and final location of camera.
2017-10-05 18:13:30 +02:00
4537e85584 Fix T53001: more workarounds for crash in AMD compiler with recent drivers. 2017-10-05 17:57:58 +02:00
fb99ea79f8 Code refactor: split displace/background into separate kernels, remove luma. 2017-10-05 17:57:58 +02:00
d8509b349d Sculpt Mode: 2D falloff option
This makes brush influence into a tube instead of a sphere.
It can be used along the outline of a mesh to adjust it's silhouette.

Note that all this takes advantage of changes from vertex paint,
from testing this seems useful so exposing from the brush options.
2017-10-06 01:20:31 +11:00
56a07ba706 Vertex Paint: apply when cursor isn't over faces
This behavior makes more sense for sculpt, less so for painting.
Restores non PBVH behavior, adding `BKE_pbvh_find_nearest_to_ray` -
similar to ray-cast except it finds the closest point on the surface.
2017-10-05 21:21:01 +11:00
0badb6c804 Cleanup: rename dist -> depth
Prepare to add code that stores distance to the ray, avoid confusion.
2017-10-05 21:09:12 +11:00
21d91de8e7 Cleanup: remove unused struct member
Merged with soc-2016-pbvh-painting, no longer needed.
2017-10-05 17:52:05 +11:00
82d6a30015 Disable cursor drawing while navigating
Was performing ray-casts in sculpt mode on every update.
2017-10-05 17:35:46 +11:00
775c773cf4 Fix sculpt secondary color missing some brushes
D2841 by @uvwxyz w/ edits
2017-10-05 12:59:22 +11:00
3c67efbbc5 Cleanup: use bool for brush checks 2017-10-05 12:59:18 +11:00
974053f7e9 Fix brush reset (missing notifier)
D2843 by @uvwxyz
2017-10-05 12:32:24 +11:00
57a93b4678 CMake: use restrict w/ gcc, not clang 2017-10-05 12:10:34 +11:00
96477be3b6 PyAPI: fast keyword parsing for bpy modules
No functional changes.
2017-10-05 10:52:18 +11:00
7cc952ac5d CMake: add -Wrestrict for GCC 2017-10-05 10:50:51 +11:00
d27ca066e7 Fix passing the same argument twice to BLI_strncpy 2017-10-05 10:50:51 +11:00
ffb190244c Fix setting the operator name in Py operator API 2017-10-05 10:50:51 +11:00
49199963bf Fix incorrect CUDA remaining time estimate after previous commit. 2017-10-04 23:25:51 +02:00
6da6f8d33f Cycles: CUDA faster rendering of small tiles, using multiple samples like OpenCL.
The work size is still very conservative, and this doesn't help for progressive
refine. For that we will need to render multiple tiles at the same time. But this
should already help for denoising renders that require too much memory with big
tiles, and just generally soften the performance dropoff with small tiles.

Differential Revision: https://developer.blender.org/D2856
2017-10-04 21:58:47 +02:00
77f300e2a9 Fix use of uninitialized memory in Cycles normal baking. 2017-10-04 21:11:14 +02:00
5bb677e592 Code refactor: zero render buffers outside of kernel.
This was originally done with the first sample in the kernel for better
performance, but it doesn't work anymore with atomics. Any benefit was
very minor anyway, too small to measure it seems.
2017-10-04 21:11:14 +02:00
12f4538205 Code refactor: use split variance calculation for mega kernels too.
There is no significant difference in denoised benchmark scenes and
denoising ctests, so might as well make it all consistent.
2017-10-04 21:11:14 +02:00
e3e16cecc4 Code refactor: remove rng_state buffer and compute hash on the fly.
A little faster on some benchmark scenes, a little slower on others, seems
about performance neutral on average and saves a little memory.
2017-10-04 21:11:14 +02:00
5b7d6ea54b Code refactor: add WorkTile struct for passing work to kernel.
This makes sharing some code between mega/split in following commits a bit
easier, and also paves the way for rendering multiple tiles later.
2017-10-04 21:11:14 +02:00
660e8e59e7 Fix T52645, T52645: AMD OpenCL compiler crash with recent drivers.
Work around the bug by reshuffling code.
2017-10-04 21:00:46 +02:00
754f5d39c5 installdeps: Fix building numpy with newer py system...
Many thanks to Jens Verwiebe for investigating and finding this fix.
2017-10-04 20:16:39 +02:00
57d7e5b6ee Fix T42489 and T52936: Loading blend with minimized window results in crash or empty screen on windows.
Reviewed By: @brecht , @sergey

Differential Revision: http://developer.blender.org/D2866
2017-10-04 11:44:22 -06:00
296757804c Fix error copying smoke modifier uv layer 2017-10-05 02:44:02 +11:00
9609828000 Tssst, we use USA english, not Oxford one... :P 2017-10-04 12:42:33 +02:00
a22af1a84b Fix i18n messages extraction script, and a few more UI messages... 2017-10-04 12:39:06 +02:00
b22b2c783d Fix T52982: Join operator with context override crashes Blender 2.79 2017-10-04 15:00:05 +05:00
d1dfed206b Fix T52923: Circle diameter is in fact radius 2017-10-04 18:01:53 +11:00
08f728a3e9 Cleanup: redundant casts 2017-10-04 16:52:55 +11:00
d3f0fa1277 Docs: remove outdated PyAPI guide 2017-10-04 15:57:43 +11:00
92272f56e6 PyAPI: fast keyword parsing for __import__
No functional changes.
2017-10-04 15:54:41 +11:00
728cffa9ce PyAPI: fast keyword parsing for bpy.props
No functional changes.
2017-10-04 15:13:52 +11:00
ad22d29dac Some UI/messages fixes. 2017-10-03 21:32:46 +02:00
239b38cd64 CMake: avoid naming collision 2017-10-04 01:35:24 +11:00
cbe07d980c Python: bump minimum version to 3.6 2017-10-03 23:50:34 +11:00
7ae02c2ddb Cleanup: remove unused vpaint projection handle 2017-10-03 23:43:30 +11:00
a4721c0504 Weight Paint: blend smear tool 2017-10-03 23:35:30 +11:00
6a7dc3348a Vertex Paint: fix feedback loop w/ smear tool
Was reading and writing from same array,
this also makes smear thread-safe.
2017-10-03 23:07:13 +11:00
314d93838e Fix bplayer (c) 2017-10-03 12:31:51 +02:00
61d5c5a64f Fix T52981: 2D Curve shapes do not render untill extruded
Regression since 9298c53.
2017-10-03 15:29:39 +05:00
Alexander Gavrilov
7c2d5eaacb Change weigth paint accumulate mechanics to fix problems with mirroring.
Restoring weights is problematic when the stroke overlaps its mirror.
It's better to simply compute the new weight based on the saved data
rather than restoring things, and check that the change is monotonic.

This way is also closer to how things worked before the merge.
2017-10-03 12:41:37 +03:00
975ed05edb Vertex Paint: smear got wrong last-location 2017-10-03 20:19:59 +11:00
7640d5e92a Error in last commit, weight must be set for non-accumulate 2017-10-03 19:24:02 +11:00
f4b1f9b925 Vertex Paint: remove accumulate (soc-2017-vertex_paint)
This secondary accumulation option accumulated brush falloff.
The same option in image painting accumulates color
as vertex paiht 'Spray' does.

Giving this option different behavior for vertex paint seems strange.
Also this is basically increasing falloff over time.

Remove the new code, expose existing 'Spray' as 'Accumulate'
to match other paint modes.
2017-10-03 19:09:28 +11:00
515e69999e Weight Paint: don't set weight w/ average brush
Also use 'const' for brush.
2017-10-03 18:43:18 +11:00
2b3ff61d80 Correct int division in last commit 2017-10-03 17:36:55 +11:00
6092ded127 Weight Paint: add some color blending modes
While these mostly make sense for color,
there is no harm in supporting.
2017-10-03 17:24:29 +11:00
9f8bb5813b Buildbot: Re-enable cuda binaries, those should work 2017-10-02 20:24:58 +05:00
Alexander Gavrilov
88dd45e1e1 Disable multithreaded weight paint when mirroring is enabled.
Mirroring writes to the mirror vertex within the direct vertex
draw function, which violates assumptions required for processing
vertices in parallel.
2017-10-02 17:33:51 +03:00
64afba0244 Remove brush versioning (again!)
Causes crash, see c133927bb

Merging soc-2017-vertex_paint brought this back by accident.
2017-10-03 00:56:45 +11:00
64c1a48c50 Fix T52927: Compositor wrong scale when scale size input is connected to complex node
The issue here is that we can not read scale from socket when determining
dependent area of interest. This area will depend on current pixel. Now fall
back to more stupid but reliable thing: if scale size input is connected to some
nodes, we use the whole frame as area of interest.
2017-10-02 15:55:52 +05:00
b2a10fa615 Vertex Paint: projection options
This makes vertex paint match image painting more closely.

- Add falloff shape option sphere/circle
  where sphere uses a 3D radius around the cursor and
  circle uses a 2D radius (projected), like previous releases.
- Add normal angle option so you can control the falloff.
- Add Cull option, to paint onto faces pointing away.

Disabling normals, culling and using circle falloff
allows you to paint through the mesh.
2017-10-02 22:07:58 +11:00
9d34ae6048 Sculpt: calculate plane instead of point,normal
No functional changes.
2017-10-02 22:07:57 +11:00
1cfee60419 Cleanup: add 'sphere' to sculpt test function name 2017-10-02 22:07:57 +11:00
2a744a9f2e Cleanup: indentation, whitespace 2017-10-02 22:07:57 +11:00
deb16defd5 Math Lib: distance to AABB
Original code by @mano-wii, modified for general use.
2017-10-02 22:07:39 +11:00
ff0938870f Compositor: Fix strict compilation warnings when debug is enabled 2017-10-02 15:18:10 +05:00
f06a60c25d Compositor: Fix compilation error with debug enabled 2017-10-02 15:12:04 +05:00
04704297d2 Fix T52920: Saving Tiff Files type Blender crashes
Was only happening for 3 and 1 channel sources.
2017-10-02 13:44:13 +05:00
864a53e276 Fix gradient tool crash with recent changes
Having gesture automatic free memory isn't practical if this
has it's own allocations.

Add option not to free userdata.
2017-10-02 01:34:51 +11:00
9a6aba2a94 Vertex Paint: use squared distance test
Avoids sqrt for verts that are later ignored
2017-10-02 00:44:04 +11:00
f1e7891588 Vertex Paint: respect 'normal' option
Recent changes ignored this option.
2017-10-01 23:53:24 +11:00
f55735e533 CMake: support CUDA 9 toolkit, and automatically disable sm_2x binaries.
Fermi cards (GTX 4xx and 5xx) are no longer supported with this version, so
we can keep supporting both CUDA 8 and 9 for a while.
2017-10-01 14:14:53 +02:00
22ecea9e38 Weight Paint: restore non-spray functionality
When painting with spray disabled - we need to re-apply
on top of the original each time.

Applying the soc-2016-pbvh-painting branch removed this.
While I'd added back a simple previous weight array,
this won't work when multiple groups are painted at once.
2017-10-01 21:21:24 +11:00
9139532dc8 Buildbot: Use latest master config from buildbot 2017-10-01 10:34:04 +02:00
29ed5f301d Buildbot: Extra tweaks to packing rules 2017-10-01 10:01:45 +02:00
ca3f7021de Buildbot: Tweaks to current macOS config
Also disable CUDA binaries for now, those would need some extra work.
2017-10-01 10:00:42 +02:00
88a08ef8ad Fix weight paint Blur, Smear and Average breakage in multi-paint mode.
This is most pronounced in Auto-Normalize + Multi-Paint. Unlike
vertex paint, the weights being painted on in weight paint mode
don't necessarily correspond to the weight actually stored in
any one vertex group, and may instead be a computed aggregate.

This restores original code behavior lost in rB4f616c93f7cb.
2017-10-01 10:00:34 +03:00
e249dfd0f6 Cleanup: Remove some old pre 2.5 IPO code 2017-09-30 16:38:53 -04:00
49c81e234a Fix vertex paint w/ subsurf drawing
Only use alpha blending when in vertex paint mode.
2017-09-30 19:24:45 +10:00
e3546a5097 Vertex Paint minor improvement w/ smear
Note that this tool seems like it might need to be rewritten
since results are quite strange.

Projecting on the view vector gives a small improvement though.
2017-09-30 02:58:37 +10:00
a270e61b82 Fix vertex paint smear tool
Checking surrounding verts wasn't working properly.
2017-09-30 02:56:31 +10:00
41e2dbaea9 Weight Paint: accumulate support
- Clamp accumulate so it doesn't exceed brush strength.
- Was multiplying by brush strength twice.
2017-09-30 01:36:41 +10:00
d4f8e4e30c Cleanup: de-duplicate copied code w/ vertex paint 2017-09-29 23:28:54 +10:00
9298c53e4c Fix T52943: don't export curves objects with no faces to Cycles.
Also skip any objects with zero ray visibility and meshes with
zero faces.
2017-09-29 14:54:34 +02:00
d2bbd41b4e Fix Cycles OpenCL compiler error after recent changes. 2017-09-29 14:54:10 +02:00
5553037be7 Cleanup: split out tools & utils from vertex paint
paint_vertex.c was getting too big, move all code unrelated to
mode switching and modal painting into their own files.

Also replace vertex-color operators region redraw tag /w notifiers.
2017-09-29 22:26:11 +10:00
5a1954a5cb Drop platform support for Solaris & AIX
These platforms didn't see maintenance in years.
This commit just removes ifdef's & cmake check.
2017-09-29 19:16:34 +10:00
04e8a09662 GNUmakefile: add back 'git pull'
Seems this was removed by accident.
2017-09-29 19:02:20 +10:00
9cba119051 Collada: export vertex-color alpha 2017-09-29 18:12:14 +10:00
823bcf1689 RNA: expose mesh vertex alpha
Note that some import/export scripts will need updating
2017-09-29 18:10:25 +10:00
288b2d0aa6 Vertex Paint: Alpha Support
GSOC 2017 by Darshan Kadu, see: D2859.

This is a partial merge of some of the features from
the soc-2017-vertex_paint branch.

- Alpha painting & drawing.
- 10 new color blending modes.
- Support for vertex select in vertex paint mode.
2017-09-29 18:06:52 +10:00
97eefc1fd9 Code cleanup: remove unnecessary buildbot code after macOS library upgrade. 2017-09-28 23:37:57 +02:00
c10ac1bb5c macOS: officially upgrade to 10.9 libraries from lib/darwin.
This removes a bunch of code that is no longer needed, and running
"make update" will now automatically download the new libraries.

Differential Revision: https://developer.blender.org/D2861
2017-09-28 20:53:06 +02:00
Kim Christensen
2a36ee16c1 Fix T52574: make Cycles rendered tile counter more clear.
Differential Revision: https://developer.blender.org/D2853
2017-09-28 15:18:53 +02:00
400e6f37b8 Cycles: reduce subsurface stack memory usage.
This is done by storing only a subset of PathRadiance, and by storing
direct light immediately in the main PathRadiance. Saves about 10% of
CUDA stack memory, and simplifies subsurface indirect ray code.
2017-09-28 15:18:43 +02:00
9ddee885ae Fix T52086: Graph editor "normalize" drag errors for integers 2017-09-28 17:08:43 +05:00
3801f76b7b Fix T52932: Driver with target of custom property from scene fails to update
Note that this is only supported in new depsgraph.
2017-09-28 16:13:28 +05:00
75e8e3779b Curves: Fix wrong bitset being checked against CYCLIC bit flag
Based on report from Talos Security Advisory.
2017-09-28 14:33:59 +05:00
0ae1a1ed48 CMake: move MSVC warnings to central location 2017-09-28 13:41:54 +10:00
1f18523edf Cleanup: switch fall-through warning 2017-09-28 13:41:54 +10:00
c133927bb8 Adding paint brushes crashes w/ linked libs
While we could skip this for linked files,
convention so far is to only update startup.
2017-09-28 13:41:53 +10:00
5c6e3ff497 bgl module: extend gl_buffer_type_from_py_format_char function to work with more string formats
Only basic types of character codes were being used
2017-09-27 16:07:06 -03:00
5d23448290 [build_deps.cmd] Turn down logging verbosity to normal. 2017-09-27 10:54:27 -06:00
58f3f9c246 [msvc] treat C4133 as error instead of a warning to mimic gcc's -Werror=incompatible-pointer-types
as requested by @campbellbarton and @mano-wii
2017-09-27 10:11:00 -06:00
6c98859b77 Cleanup: warning 2017-09-28 02:04:58 +10:00
4f616c93f7 Vertex/Weight Paint: Use PBVH for painting
2016 GSOC project by @nathanvollmer, see D2150

- Mirrored painting and radial symmetry, like in sculpt mode.
- Volume based splash prevention,
  which avoids painting vertices far away from the 3D brush location.
- Normal based splash prevention,
  which avoids painting vertices with normals opposite the normal
  at the 3D brush location.
- Blur mode now uses a nearest neighbor average.
- Average mode, which averages the color/weight
  of the vertices within the brush
- Smudge mode, which pulls the colors/weights
  along the direction of the brush
- RGB^2 color blending, which gives a more accurate
  blend between two colors
- multithreading support. (PBVH leaves are painted in parallel.)
- Foreground/background color picker in vertex paint
2017-09-28 01:47:37 +10:00
2de5e14f53 bgl module: Interpret a buffer as a bgl.Buffer
Differential Revision: https://developer.blender.org/D2857
2017-09-27 11:20:00 -03:00
88520dd5b6 Code refactor: simplify CUDA context push/pop.
Makes it possible to call a function like mem_alloc() when the context is
already active. Also fixes some missing pops in case of errors.
2017-09-27 13:43:21 +02:00
43b4913051 Math Lib: Add non-clamped round_* functions
Replace iroundf with round_fl_to_int, add other types
2017-09-27 11:13:03 +10:00
870dfb1b5a Cleanup: indentation 2017-09-27 00:17:28 +10:00
482b665e02 Cleanup: remove bounds runtime data from scene 2017-09-26 22:33:25 +10:00
aba2f8ea67 Beauty fill was skipping small faces 2017-09-26 12:59:23 +10:00
e40e29cd38 Fix T52871: beauty fill error
Only lock tri's facing different directions.
Needed because scanfill creates zero area faces.
2017-09-26 12:14:46 +10:00
293dc4e084 Revert "Fix T52871: BLI_polyfill_beautify_quad_rotate_calc_ex was mistakenly considering the state as degenerated"
This reverts commit a8f11f5422.

Result is no longer symmetrical, will investigate a different fix.
2017-09-26 12:14:04 +10:00
262ddbfda0 Add missing header 2017-09-26 12:14:04 +10:00
96e84d002a Fix T52901: New Depsgraph - Driver using "self" needs reloading file to work 2017-09-26 13:29:48 +13:00
b0ccf2322b Fix: When transforming GP strokes in "Local" mode, the strokes would get obscured
by the transform constraint lines

Ported over e7395c75d5 from the
greasepencil-object branch. I should've fixed this ages ago, but
couldn't figure out why at the time.
2017-09-26 13:00:38 +13:00
e8a0812a3b deps libs: fix xiph library support on sndfile on macOS 2017-09-26 02:17:39 +03:00
675cef0a16 Fix T52835: When driven IK influence change, ik animation have 1 frame delay 2017-09-25 18:48:55 +05:00
ce54d25fa9 Fix T52865: Improve wording of error message when saving packed images fails
Make it clear that the packed file could not be saved back out to disk
at the specified path (e.g. destination directory doesn't exist).
2017-09-26 01:25:18 +13:00
0d4e519b74 OpenVDB: Fix compilation error against OpenVDB 4
One crucial thing here: OpenVDB shoudl be compiled WITHOUT
OPENVDB_ENABLE_3_ABI_COMPATIBLE flag. This is how OpenVDB's Makefile is
configured and it's not really possible to detect this for a compiled library.

If we ever want to support that option, we need to add extra CMake argument and
use old version 3 API everywhere.
2017-09-25 14:44:17 +05:00
1d8aebaa09 Add an 'atomic cas' wrapper for pointers.
Avoids having to repeat obfuscating castings everywhere...
2017-09-25 10:40:50 +02:00
01a3c6b204 Tweak to fix for thread concurency in looptri generation.
Even if pointer assignment may be atomic, it does not prevent reordering
and other nifty compiler tricks, we need a memory barrier to ensure not
only that transferring pointer from wip array to final one is atomic,
but also that all previous writing to memory are “flushed” to
(visible by) all CPUs...

Thanks @sergey for finding the potential (though quite unlikely) issue.
2017-09-25 09:56:02 +02:00
cb6f07f59e Cycles: Cleanup, indentation 2017-09-25 11:15:54 +05:00
1c5f5fb95f Mirror Modifier: option to offset UV's
Useful for baking, so UV's can be moved outside the image
and not used to bake pixels (but still used for display).

D2801 by @Zuorion
2017-09-25 14:11:27 +10:00
4e15eddb52 Fix T52890: Crash unlinking sequencer sound 2017-09-25 10:28:17 +10:00
a8f11f5422 Fix T52871: BLI_polyfill_beautify_quad_rotate_calc_ex was mistakenly considering the state as degenerated 2017-09-23 12:59:02 -03:00
c0480bc972 Cycles: Fix compilation error of OpenCL megakernel on Apple 2017-09-23 17:07:19 +05:00
b460b8fb4a Cycles: Fix compilation error of megakernel on NVidia device
It is more readable to explicitly compare to NULL anyway.
2017-09-23 17:03:02 +05:00
874062b6ab Tracking: Followup to previous fix, need to remap frame number for sequence tracking 2017-09-23 16:18:27 +05:00
92aff05a7c Tracking: Cleanup, reuse existing variable 2017-09-23 16:16:22 +05:00
d430c462a3 Fix T52851: Per-frame traking is broken when sequence doesn't start at frame 1 2017-09-23 16:13:23 +05:00
840cce840e Tracking: Fix crash when tracking failed
Was a dangling pointer to a freed memory left behind.
2017-09-23 16:07:32 +05:00
dc86b7a4b5 Remove remaining qtcodecdata
This fixes a mistake in rBefd5e3c25401b43cbd7f909418835bb570db1ab3
2017-09-22 17:13:46 -04:00
efd5e3c254 Remove quicktime support
It has been deprecated since at least macOS 10.9 and fully removed in 10.12.

I am unsure if we should remove it only in 2.8. But you cannot build blender with it supported when using a modern xcode version anyway so I would tend towards just removing it also for 2.79 if that ever happens.

Reviewers: mont29, dfelinto, juicyfruit, brecht

Reviewed By: mont29, brecht

Subscribers: Blendify, brecht

Maniphest Tasks: T52807

Differential Revision: https://developer.blender.org/D2333
2017-09-22 16:40:05 -04:00
0e802fabb4 [cmake/deps_builder] update openjpeg to 1.5.2 to match the version in master/extern , add support for openjpeg in oiio. Mark webp as an optional component. 2017-09-22 13:57:21 -06:00
925f2c8b9d Fix T52875: install_deps.sh - numpy-1.13.1.tar.gz - 404 Not Found. 2017-09-22 18:56:37 +02:00
f320d0e0a8 Fix T52840: New Depsgraph - Mask editor not working correctly 2017-09-22 13:23:21 +05:00
b3b3c6d8ae build deps: add support for multiple xcode installs 2017-09-21 23:54:17 +03:00
07ec0effb6 Code cleanup: simplify kernel side work stealing code. 2017-09-21 22:29:18 +02:00
01dfaac77b [cmake_deps/msvc] Move llvm/clang harvest to their individual cmake files. 2017-09-21 13:10:55 -06:00
78345a46c1 deps build: add openjpeg to OIIO 2017-09-21 22:09:52 +03:00
9775c4d68b [cmake_deps/msvc] Move boost harvest to boost.cmake 2017-09-21 11:16:52 -06:00
15ab0e6ddc [cmake/builddeps] update for site-packages on windows to support the new requests version. 2017-09-21 10:16:40 -06:00
4808c488c5 CMake: Add extra requests dependencies
Apparently, we already had some code to deal with this. So for now just
added some extra dependencies needed for latest requests.
2017-09-21 18:53:02 +05:00
0c82a6fec8 Cleanup: unused define 2017-09-22 07:23:03 +10:00
f5aa50853c 3D Text: Make Ctrl Backspace/Del delete words
Matches text-editor, console & text-button.
2017-09-21 20:43:49 +10:00
806bc55a34 Fix T52860: 3D Text crashes w/ Ctrl Backspace 2017-09-21 19:14:04 +10:00
50b9d1d019 Install_deps: Raise python and numpy versions (to 3.6.2 and 1.13.1 respectively). 2017-09-21 09:59:07 +02:00
e0f68e5d22 deps build: use pip to install requests 2.18.4 and it's deps 2017-09-21 09:33:00 +03:00
0c019a3ffc Fix T50450: Breakdowner doesn't work in Tweak Mode on translated NLA Strips 2017-09-21 17:38:30 +12:00
fde45132de Fix T52861: Keymap editor filter doesn't show shortcuts using "+" 2017-09-21 16:35:47 +12:00
26f98446b1 fix T52831 removed enforcement of matrix decomposition when animations are exported 2017-09-21 00:06:11 +02:00
a3b8f98913 revert commit c0a7e9b631 because it did not work as expected 2017-09-21 00:04:10 +02:00
c0a7e9b631 D2777: allow blank lines and lines with spaces/tabs in cut/paste 2017-09-20 22:48:38 +02:00
78c2242db5 Revert "Fix T52792: Typo in UI label of a HairInfo node socket."
This reverts commit 8ad479a322.
2017-09-20 22:06:23 +02:00
Stefan Werner
ee30a4381f Added extra "const" to satisfy the strict clang version in Xcode 9 2017-09-20 21:47:45 +02:00
8ad479a322 Fix T52792: Typo in UI label of a HairInfo node socket. 2017-09-20 21:06:33 +02:00
692631551f [cmake/msvc] Update python to 3.6 + numpy to 1.13.1 2017-09-20 12:51:36 -06:00
25f28d348f Fix T52852: Assert in looptri calculation after recent changes.
Wrong condition in asserts...
2017-09-20 20:46:51 +02:00
c5491ba874 [cmake/depsbuilder/msvc] Update to python 3.6 / numpy 1.13.1
-No more hardcoded python35/36 tokens in the scripts
-disabled python module for boost, was not used
-Updated patches for python to support building with msvc2013
2017-09-20 12:31:40 -06:00
98d797b67c Fix missing ID remapping in Action editor callback.
Spotted by Joshua Leung (@aligorith), thanks!

Should probably be backported to 2.79a should we do it.
2017-09-20 20:26:40 +02:00
18a353dd24 Fix T52368: Cycles OSL trace() failing on Windows 32 bit. 2017-09-20 19:38:08 +02:00
14223357e5 Fix T52853: harmless Cycles test failure in debug mode. 2017-09-20 19:38:08 +02:00
90d4b823d7 Cycles: use defensive sampling for picking BSDFs and BSSRDFs.
For the first bounce we now give each BSDF or BSSRDF a minimum sample weight,
which helps reduce noise for a typical case where you have a glossy BSDF with
a small weight due to Fresnel, but not necessarily small contribution relative
to a diffuse or transmission BSDF below.

We can probably find a better heuristic that also enables this on further
bounces, for example when looking through a perfect mirror, but I wasn't able
to find a robust one so far.
2017-09-20 19:38:08 +02:00
095a01a73a Cycles: slightly improve BSDF sample stratification for path tracing.
Similar to what we did for area lights previously, this should help
preserve stratification when using multiple BSDFs in theory. Improvements
are not easily noticeable in practice though, because the number of BSDFs
is usually low. Still nice to eliminate one sampling dimension.
2017-09-20 19:38:08 +02:00
b3afc8917c Code cleanup: refactor BSSRDF closure sampling, for next commit. 2017-09-20 19:38:08 +02:00
d029399e6b Code cleanup: remove SOBOL_SKIP hack, seems no longer needed. 2017-09-20 19:38:08 +02:00
d750d182e5 Code cleanup: remove hack to avoid seeing transparent objects in noise.
Previously the Sobol pattern suffered from some correlation issues that
made the outline of objects like a smoke domain visible. This helps
simplify the code and also makes some other optimizations possible.
2017-09-20 19:38:08 +02:00
8289b47e3a Fix Cycles test report not closing files properly. 2017-09-20 19:12:26 +02:00
f54f680a26 Fix T52842: Incorrect description for bpy.types.MeshTextureFace.uv
Tweak rna_info module to generate valid info also for multi-dimensional arrays.
2017-09-20 16:40:11 +02:00
942c5997c1 Expose multi-dimensional array data in properties' introspection data.
Required to generate valid doc for such arrays!
2017-09-20 16:40:11 +02:00
c4bbf1e4b0 Fix rna_info.py module, broken by recent changes in bpy.types presumably.
Hope fix is OK, seems to work with API generation script at least.
2017-09-20 16:40:11 +02:00
adb647fb92 UI: fullstop at end of tooltips
Allows for multiple sentences not to look strange.
Convention not to include in RNA remains.
2017-09-20 23:59:26 +10:00
99c9f17098 deps build: correct sndfile fix 2017-09-20 13:20:23 +03:00
a2d246c5c0 BLI_polyfill2d_test: script to generate test data 2017-09-20 13:40:30 +10:00
77dccbf481 deps build: fix sndfile building on macOS 2017-09-20 00:08:32 +03:00
46300a541d macOS: use python version 3.6 when building blender 2017-09-20 00:07:56 +03:00
c87c1ec1da deps build: bump Python to 3.6.2 and Numpy to 1.13.1 2017-09-20 00:04:23 +03:00
f680e42a4c Correct test ifdef in polyfill 2017-09-20 04:57:48 +10:00
16355d545b Fix T52834: Polyfill2D fails with co-linear edges 2017-09-20 04:29:04 +10:00
c4235356c9 BLI_polyfill2d_test: add test for T52834
Commented since it currently fails.
2017-09-20 03:40:13 +10:00
e00bb4d22c BLI_polyfill2d_test: Try flipped x/y axis
In T52834 this makes a difference.
2017-09-20 03:35:06 +10:00
98ea79cfde transform_snap_object: simplify IGNORE_BEHIND_RAY
`depth_get` is called in most of the time. So not worth going through so many conditions
2017-09-19 13:57:59 -03:00
b31faac17e Depsgraph: Fix wrong flag being assigned 2017-09-19 20:55:15 +05:00
96ce50449c Fix T52733 Percent mode for Bevel sometimes had nans.
Forgot some initialization.
2017-09-19 09:39:11 -04:00
3241905f40 Fix T52818: Tangent space calculation is really slow for high-density mesh with degenerated topology
Now we replace O(N^2) computational complexity with O(N) extra memory penalty.
Memory is much cheaper than CPU time. Keep in mind, memory penalty is like
4 megabytes per 1M vertices.
2017-09-19 17:50:09 +05:00
2dab6f499c Mikkspace: Cleanup, reduce indentation level 2017-09-19 17:50:09 +05:00
9591b5f618 Fix T52816: regression can't open file in 2.79 (crash).
Tentative fix, since I cannot reproduce thenissue for some reason here
on linux.

Core of the problem is pretty clear though, thanks to Germano Cavalcante
(@mano-wii): another thread could try to use looptris data after worker
one had allocated it, but before it had actually computed looptris.

So now, we use a temp 'wip' pointer to store looptris being computed
(since this is protected by a mutex, other threads will have to wait on
it, no possibility for them to double-compute the looptris here).

This should probably be backported to 2.79a if done.
2017-09-19 14:00:49 +02:00
1a4442b3db Fix T52823: New Depsgraph - Shrinkwrap crashes blender
The issue was caused by threading conflict around looptris: it was possible
that DM will return non-NULL but non-initialized array of looptris.

Thanks Campbell for second pair of eyes!
2017-09-19 16:12:05 +05:00
495d3c8dd7 CMake: update for renamed headers 2017-09-19 20:26:07 +10:00
7b95243240 BLI_utildefines_iter: Use for iteration helpers 2017-09-19 20:22:24 +10:00
60956397ca Cleanup: BLI_utildefines prefix for header-only libs
This allows to have different macro headers without them sharing
similar names to regular C modules.
2017-09-19 20:16:05 +10:00
215651af1b Boolean Modifier: add debug options
Only show & use when running in debug mode.
2017-09-19 18:29:52 +10:00
7177e0ac3e Fix T52811: At any framerate selected, video exported with 1000fps 2017-09-19 11:31:03 +05:00
36f5972ed0 Avoid bias when calculating quad split direction
Some error checks weren't being done in both directions
when calculating the best split direction for a quad.
2017-09-19 15:10:52 +10:00
9a2f7dd77b Correct recent error in boolean quad split check 2017-09-19 14:25:37 +10:00
bb4a12914f Add some security checks against future bad float UIprecision values.
This commit and previous one should be backported to 2.79a should we
release it.
2017-09-18 20:04:27 +02:00
785e96a11d Fix (irc-reported by @sergey) invalid precision value in a float RNA property.
Maximum allowed UI float precision value is 6 (which means 7 digits).

Will change code checking on that in next commit.
2017-09-18 20:04:27 +02:00
d486b17088 [cmake/dependencies] Update libsndfile to 1.0.28 2017-09-18 10:54:37 -06:00
d0344d7b7d Cleanup: use clamped rounding functions 2017-09-18 23:55:41 +10:00
c4fc9c4a8e Math Lib: clamped rounding utility functions 2017-09-18 23:55:41 +10:00
a6b156bf57 Color management: When look is applied, we can not consider spaces to match
This should fix T52812 after merge to blender2.8.
2017-09-18 18:09:53 +05:00
d0d9360a66 Fix T52800: fix UI flickering with Mesa on Linux.
Use triple buffer by default now on all platforms, remaing ones where:
* Mesa: seems to have been working well for a long time now, and not using
  it gives issues with the latest Mesa 17.2.0.
* Windows software OpenGL: no longer supported since OpenGL 2.1 requirement
  was introduced.
* OS X with thousands of colors: this option was removed in OS X 10.6, and
  that's our minimum requirement.
2017-09-18 13:19:48 +02:00
ab9079f459 Fix Cycles adaptive compile without volumes broken after recent changes.
Differential Revision: https://developer.blender.org/D2847
2017-09-18 12:52:32 +02:00
6bf3dfbcdb Fix T52801: reload scripts causes Cycles viewport render crash. 2017-09-18 12:52:32 +02:00
c622533fa0 Fix T52432: Blender crashes while using Ghost (new depsgraph) 2017-09-18 15:50:27 +05:00
a0e7dbc66d BMesh: move bridge tools stepping logic into macro
Also use floor division since regular division was giving a bias
on negative error values.
2017-09-18 13:18:54 +10:00
990515a5a7 Math Lib: add divide_floor_i
Integer division that floors on negative output (like Python's).
2017-09-18 13:18:50 +10:00
9134529b9e UI: avoid int cast before clamping number input
Values outside int range would overflow.
2017-09-17 18:00:13 +10:00
d7204aed95 Cleanup: SGI format, remove unused struct members 2017-09-17 18:00:08 +10:00
829916f4e5 Fix SGI foramt reader CVE-2017-2901
Integer Overflow Code Execution Vulnerability.

Reader no longer crashes on corrupt images (from own fuzz testing).
2017-09-17 16:30:34 +10:00
b884188f8a Cleanup: SGI format, avoid overflow
Harmless but causes warnings
2017-09-17 16:30:34 +10:00
a72e609204 Cleanup: SGI format, use uint/short/char types 2017-09-17 16:30:34 +10:00
Hristo Gueorguiev
6798a061b7 Cycles: Fix compilation error with OpenCL split kernel 2017-09-16 12:33:03 +02:00
a850d74312 Fix T51074: Boolean modifier inverts operation
Support for negative scaled objects.
2017-09-16 18:12:24 +10:00
d09c429e30 Fix writing Iris images w/ invalid header
Regression in e142ae77ca
2017-09-16 16:09:02 +10:00
7c8e87fc52 Fix T52384: Bridge pair result depends on other loops
When 2x loops have different number of vertices,
the distribution for vertices fan-fill depended on the loop order
and was often lop-sided.

This caused noticeable inconstancies depending on the input
since edge-loops are flipped to match each others winding order.
2017-09-16 05:15:09 +10:00
14eadf55fd RNA: expose RegionView3D clip planes 2017-09-15 13:55:52 -03:00
378b74f025 Docs: only show versions in changelog side-bar 2017-09-15 22:20:14 +10:00
ec784b06ee Docs: update API changelog to 2.79 2017-09-15 22:06:23 +10:00
1a9217e222 Fix T52763: Boolean problem with vertex group 2017-09-15 16:33:52 +05:00
d120780fed BMesh: use less involved check for edge rotation
Was using function for edge rotation which was doing unnecessary checks
Use the face normal and BLI_polyfill_beautify_quad_rotate_calc directly.
2017-09-15 18:19:04 +10:00
c594087488 Polyfill Beautify: option to rotate out of degenerate state
Needed for 3D iterative edge-rotation to avoid flipping when projected
from different angles,
but could keep zero area faces in 2D polygons.
2017-09-15 18:14:17 +10:00
fdb8e17936 Fix error in recent boolean changes w/ quad split 2017-09-15 18:08:24 +10:00
8b3ad25862 Transform: Enable recursion dependency check for new depsgraph 2017-09-15 12:25:57 +05:00
95a8e73d40 Fix copy-paste error in recent particles fix
Was intersecting same triangle twice.
2017-09-15 11:35:24 +05:00
2aa2bec43a Fix T52442: bl_app_templates_system not working
Portable builds LOCAL files need to be
treated as system instead of using as a fallback to USER templates.
2017-09-15 05:57:37 +10:00
909da553e3 Fix bpy.utils.resource_path('SYSTEM') output
Would return the test path for developer builds:
{blender-dirname/release}

Now return an empty string when no path is found.
2017-09-15 05:47:23 +10:00
c75bd25cd8 Fix T52732: Particle system volume grid particles out of volume
Use more watertight and robust intersection test.

It uses now ray to triangle intersection, but it's all fine because segment was
covering the whole bounding box anyway.
2017-09-14 19:50:02 +05:00
3c1c3b64c5 Fix T52729: Decimals not showing over 100m or 100 feet
Use same 5 digits precision as we already use for e.g. Object's
location, for Object's dimensions too.

To be backported to 2.79a, should we do it.
2017-09-14 16:35:28 +02:00
a22590a62c Fix T52537: Dyntopo "detail flood fill" doesn't work in some cases
Mainly when object origin is not at the geometry bounding box center.

Seems to be straightforward to fix, hopefully it doesn't break some obscure case
where this was a desired behavior.
2017-09-14 18:56:16 +05:00
fc7ac0bc49 Correct error in last commit 2017-09-14 23:04:01 +10:00
8c21003248 Fix T52748: Select shortest face path fails 2017-09-14 23:01:07 +10:00
7aafa32c09 Fix T51416: Blender Crashes while moving Sliders
The issue here was that removing datablock from main database will poke editors
update, which includes buttons context to free users of texture. Since Cycles
will free datablocks from job thread, it might crash Blender since main thread
might be in the middle of drawing.

Solved by exposing extra arguments to bpy.data.foo.remove() which indicates
whether we want to perform ID user count and interface updates. While scripts
shouldn't be using those normally, this is the only way to allow Cycles to skip
interface update when removing datablock.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2840
2017-09-14 17:03:40 +05:00
ff79406404 Fix T52653: Render output of linked scenes conflicts with other scenes with the same name
The issue was caused by render result identifier only consist of scene name,
which could indeed cause conflicts.

On the one hand, there are quite some areas in Blender where we need identifier
to be unique to properly address things. Usually this is required for sub-data
of IDs, like bones. On another hand, it's not that hard to support this
particular case and avoid possible frustration.

The idea is, we add library name to render identifier for linked scenes. We use
library name and not pointer so we preserve render results through undo stack.

Reviewers: campbellbarton, mont29, brecht

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2836
2017-09-14 16:50:19 +05:00
09c6c6c486 Fix T52749: New Depsgraph - Render View Mask is not initialized correctly 2017-09-14 16:12:01 +05:00
3573f49bfd Masks: Split layer evaluation into separate function
This way we can easily re-use bits of code for new dependency graph.

Currently should be no functional changes.
2017-09-14 16:09:06 +05:00
8140b51aa4 Fix T52739: Crash loading corrupted video files
Affects both "normal" open as a video file and thumbnail generation.
2017-09-14 14:56:25 +05:00
c57636f060 Fix failure in our UI code that could allow search button without search callbacks, leading to crash.
Related to (exposed by) T52735, fixes the reported crash but not the
underlying issue.

To be backported to 2.79a should we do one.
2017-09-14 10:58:47 +02:00
d827186c17 Fix T52723: Reset UV layers failed 2017-09-14 17:46:03 +10:00
f7163a7d0a Fix T52741: Follow track with depth object crashes Blender with new depsgraph 2017-09-14 12:31:54 +05:00
bd1f946413 Recent action-bake used Py3.6 syntax 2017-09-14 17:04:41 +10:00
892d304ded Fix T52291: Boolean fails w/ co-linear edged ngons
This means boolean tessellation wont match viewport tessellation
however it's needed to avoid zero area triangles causing problems.
2017-09-14 16:08:03 +10:00
6f633dec5d Fix T52299: X resolution of 4 causes nodes to collapse
Was caused by numeric overflow when calculating preview dimensions.
Now we try to avoid really insance preview resolutions by fitting
aspect into square.
2017-09-13 18:31:36 +05:00
32449e1b21 Code cleanup: store branch factor in PathState. 2017-09-13 15:24:14 +02:00
9e258fc641 Code cleanup: avoid used of uninitialized value in case of precision issue. 2017-09-13 15:24:14 +02:00
37d9e65ddf Code cleanup: abstract shadow catcher logic more into accumulation code. 2017-09-13 15:24:14 +02:00
f77cdd1d59 Code cleanup: deduplicate some branched and split kernel code.
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for
bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-13 15:24:14 +02:00
c4c450045d Code cleanup: tweak inlining for 2% better CUDA performance with hair. 2017-09-13 15:24:14 +02:00
76e7c039ec Fix T52140: Align objects centers using origin for text
The issue was caused by operator redo which frees all object's evaluated data,
including bounding box. This bounding box can not be reconstructed properly
without full curve evaluation (need to at least convert font to nurbs, which is
not cheap already).
2017-09-13 17:40:11 +05:00
43858c4197 Cleanup: avoid right-shifted args in RNA register 2017-09-13 21:52:57 +10:00
29a7ad8b1a Node UI: scale cross by pixelsize
Draws a little smaller to fit with 2.8x manipulator.
2017-09-13 21:48:51 +10:00
04800ed434 Fix T52113: Compositor doesnt mix unrendered render layers well
Compositor was always defaulting to all-zero s output for missing passes.

This was broken in 4cf7fc3.
2017-09-13 15:46:19 +05:00
f472aea922 Compositor: Cleanup, get rid of nested ternary operators
Having single switch statement is much more readable.
2017-09-13 15:46:19 +05:00
17a117c7a0 Compositor: Cleanup, de-duplicate some code 2017-09-13 15:46:19 +05:00
4fde0910d5 Compositor: Cleanup, reduce indentation level in render layer node
There is absolute no reason to have such an indentation level, it only causes
readability and maintainability issues. It is really simple to make code more
"streamlined".
2017-09-13 15:46:19 +05:00
Mathieu Menuet
659ba012b0 Cycles: change AO bounces approximation to do more glossy and transmission.
Rather than treating all ray types equally, we now always render 1 glossy
bounce and unlimited transmission bounces. This makes it possible to get
good looking results with low AO bounces settings, making it useful to
speed up interior renders for example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2818
2017-09-12 15:37:35 +02:00
d2202117fe T50354: Action length calculation added unnecessary padding if some F-Curves
only contained a single key (on the last real frame of the action).
2017-09-13 00:53:50 +12:00
a704a66914 Adding some verbose documentation
I thought this was already clear enough, but apparently not.
2017-09-13 00:53:46 +12:00
fadc079740 Fix T52573: Cycles baking artifacts
Synchronize condition for faces split between Cycles itself and baking API.
2017-09-12 16:33:42 +05:00
e7b5bbae6a Cycles tests: Add baking features tests 2017-09-12 16:22:02 +05:00
4aee701f00 Fix T52679: Hole in bake normal
In fact, any type of baking might have caused holes in mesh.

The issue was caused by zspan_scanconvert() attempting to get order of traversal
'a-priori', which might have failed if check happens at the "tip" of span where
`zspan->span1[sn1] == zspan->span2[sn1]`.

Didn't see anything bad on making it a check when iterating over scanlines and
pick minimal span based on current scanline. It's slower, but unlikely to cause
measurable difference. Quality should stay the same unless i'm missing something.

Reviewers: brecht, dfelinto

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2837
2017-09-12 16:20:41 +05:00
de6ecc82ed Fix rare firefly in volume equiangular sampling when sampling short distance. 2017-09-12 12:50:44 +02:00
28532f1867 Cycles tests: add environment variable to update references renders.
This will copy new renders over references renders:
CYCLESTEST_UPDATE=1 ctest -R cycles
2017-09-12 12:50:44 +02:00
cd6c9e9e5f Cycles: improve sample stratification on area lights for path tracing.
Previously we used a 1D sequence to select a light, and another 2D sequence
to sample a point on the light. For multiple lights this meant each light
would get a random subset of a 2D stratified sequence, which is not
guaranteed to be stratified anymore.

Now we use only a 2D sequence, split into segments along the X axis, one for
each light. The samples that fall within a segment then each are a stratified
sequence, at least in the limit. So for example for two lights, we split up
the unit square into two segments [0,0.5[ x [0,1[ and [0.5,1[ x [0,1[.

This doesn't make much difference in most scenes, mainly helps if you have a
few large area lights or some types of HDR backgrounds.
2017-09-12 12:45:29 +02:00
d454a44e96 Fix Cycles bug in RR termination, probability should never be > 1.0.
This causes render differences in some scenes, for example fishy_cat
and pabellon scenes render brighter in a few spots. This is an old
bug, not due to recent RR changes.
2017-09-12 12:43:26 +02:00
467d92b8f1 Cycles: Tweaks to avoid compilation error of megakernel
Also moved code out of deep-inside ifdef block, otherwise it was quite confusing.
2017-09-12 13:33:46 +05:00
b07ee4e3a5 Update tgz script, remove deprecated GZIP use 2017-09-12 16:25:19 +10:00
35ee9ff7a0 Fix T52682: When hair number=faces number, particles/face = 1 , actually some hair is overlap.
Just using same code for distribution for face/volume as the one
changed/used for vertices since some months.

Note that this change is breacking compatibility, in that distribution
of particles over faces/volume may not be exactly the same as
previously.
2017-09-11 12:38:17 +02:00
f56fea3d6b Fix T52701: Mesh shortest path fails at boundaries 2017-09-11 16:45:19 +10:00
7e56879772 Fix T52696: Sculpt - Brush spacing pressure artifacts
Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

Thanks for the report!
2017-09-11 18:24:39 +12:00
6d2cd1719b Bake Action: operate on selected objects
Previously only the active object was used.

Use coroutines to support baking frames for multiple objects at once,
without having to playback the animation multiple times.
2017-09-10 17:16:47 +10:00
a4a59d578c PyAPI: Add object argument to bake_action
Avoids having to set the scene's active object first.
2017-09-10 14:30:03 +10:00
11a9434c2d Resolve T52687: Add node label shows as 'Unknown'
Add type access method, need to extend to other types
for now just get node UI working properly again.
2017-09-09 22:56:58 +10:00
3c3d0898b0 PyAPI: Fix mathutils freeze allowing owned data 2017-09-09 11:08:38 +10:00
30d8829780 Docs: mathutils docstrings 2017-09-09 11:02:26 +10:00
90eb93791f Cleanup: mathutils vector comments
Use doxy markup & correct outdated info.
2017-09-09 10:50:40 +10:00
3930e46e37 Correct last commit 2017-09-09 10:15:16 +10:00
002cc6aef3 Cleanup: Simplify SWIZZLE macro
- Use indices instead of character args.
- Use numbered macros instead of variadic args.

Parsing using rtags used over 11gb of memory. While this should be
resolved upstream (report as #1053), the extra complexity didn't give
any real advantage.
2017-09-09 10:10:05 +10:00
4265d85f8b [msvc/make.bat] mention the msvc-2017 option in the make.bat help text. 2017-09-08 14:24:02 -06:00
ae41a08288 Cycles: Attempt to work around compilation of sm_20 and sm_21
Disabled forceinline for those architectures, which seems to be compiling
successfully more often.

There might be ~3% slowdown based on quick tests, but better be rendering
something rather than failing to compile kernels again and again.

Those architectures will be doomed for abandon once we'll switch to toolkit 9.
2017-09-08 18:37:54 +02:00
5d1a5001f4 Fix T52628: own error in string duplication
Error in 636baa598a
2017-09-09 02:08:58 +10:00
ce1f2e271d Cycles: disable fast math flags, only use a subset.
Empty BVH nodes are set to NaN which must be preserved all the way to the
tnear <= tfar test which can then give false for empty nodes. This needs
strict semantices and careful argument ordering for min() and max(), so
the second argument is used if either of the arguments is NaN.

Fixes T52635: crash in BVH traversal with SSE4.1.

Differential Revision: https://developer.blender.org/D2828
2017-09-08 15:12:37 +02:00
b02ab2e7d9 Fix: Grease Pencil pie menu keymaps were broken after the menus got renamed 2017-09-09 01:03:15 +12:00
c9afc41cfd Fix T52650:Grease pencil selection its not automatically updating in Clip Editor 2017-09-08 11:21:49 +02:00
2a3a747ca2 Fix T52678: Crash editing gpencil w/ frame-lock 2017-09-08 18:51:47 +10:00
60020f57d7 Correct function name in argument parsing 2017-09-08 00:59:27 +10:00
daf7aed849 PyAPI: use bl_rna_get_subclass for node API
Returns a default value instead of an error when the type isn't defined.
2017-09-08 00:03:01 +10:00
e44bf43f6c PyAPI: add function to get an RNA subclass
This is inconvenient in regular Python, add a class-method
to perform the operation, eg:

bpy.types.Node.bl_rna_find_subclass("CustomNodeType")
2017-09-08 00:02:09 +10:00
accc94dd73 Cleanup: remove goto's 2017-09-07 22:53:46 +10:00
f4d46916fa UI: fix memory leak when copy-to-selected failed 2017-09-07 22:15:12 +10:00
3f8aaec6bd Weight Smooth: remove source option
Use current selection mode instead of an operator option.
2017-09-07 14:14:42 +10:00
5f7de54243 Fix T52639: Weight paint smooth tool crash 2017-09-07 13:20:39 +10:00
c3322603eb Cleanup: custom nodes template
- Use conventional (pep8) prop names
- Simplify class registration
2017-09-07 05:20:29 +10:00
5d65aee07a Workaround node types not being exposed
We might want to have a utility function for this,
for now just keep it working.
2017-09-07 05:17:02 +10:00
8172e8e528 Node UI: Add square and diamond socked draw styles
Currently not used by Blender's node trees

D2814 by @charlie
2017-09-07 04:45:38 +10:00
c10ea88420 Fix T52660: CUDA volume texture rendering not working on Fermi GPUs. 2017-09-06 18:12:45 +02:00
82ede9de48 Fix mistake in previous fix for T52640. 2017-09-06 17:22:38 +02:00
16fbb47c88 Use normalized project functions 2017-09-07 01:20:59 +10:00
4d8980a690 Fix T52640: crash when opening image file browser in some cases.
There was some invalid state in the screen here, some areas had
sa->full set even though no screen was maximized, which then caused
a restore from the wrong (empty) area, which then led to spacedata
being empty and a crash.

This fix properly clears the sa->full after restore, and also fixes
existing .blend files in such an invalid state.
2017-09-06 16:17:18 +02:00
584523e0ad Screw Modifier: remove doubles option
Vertices on the axis can be optionally merged,
nice for creating objects which close at the end-points.
2017-09-07 00:12:43 +10:00
6e0fd239e3 Math Lib: normalized vector project functions 2017-09-07 00:12:43 +10:00
2d407fc288 Fix T52661: mesh light shader using backfacing not working, after new sampling. 2017-09-06 13:51:48 +02:00
dd8016f708 Fix T52652: Cycles image box mapping has flipped textures.
This breaks backwards compatibility some in that 3 sides will be mapped
differently now, but difficult to avoid and can be considered a bugfix.
2017-09-06 13:51:45 +02:00
56ff14ea63 View3D Remap: skip defmaterial
This isn't library data.
2017-09-06 20:57:25 +10:00
e54caf76cb Fix T52663: Remap used invalid local-view data
Only the camera from View3D.localvd is used,
other pointers may be invalid.

Longer term we should probably clear these to ensure no accidents.
For now just follow the rest of Blender's code and don't access.
2017-09-06 20:52:49 +10:00
47b7f06d0e Fix error in high bit-depth image tile drawing
From @1xundoredo in D2824
2017-09-06 16:11:19 +10:00
0fd31c53ee Rigidbody: Fix regression introduced in ee3fadd
Baking rigid body cache was broken if some cached frames already
existed.

This is just a band aid for release, the logic need to be looked into
further.
2017-09-05 19:59:46 +02:00
4ad5df8858 Fix T52374: Changes of rigid body related settings during simulation will break the simulation
Revert 9cd6b03, 3edc8c1, b87d10d and do a better fix for T50230.
2017-09-05 19:59:46 +02:00
6c66e1bc83 Fix T52251: Knife cur displaces surface 2017-09-06 01:50:36 +10:00
750e38a526 Cycles: Fix compilation error with CUDA after recent changes 2017-09-05 16:52:45 +02:00
704f6a5184 Buildbot: Fix paths to sndfile and flac
Need this in 2.79 branch as well, since build rules are based on this files.
2017-09-05 16:17:48 +02:00
f01e43fac3 Fix T52433: Volume Absorption color tint
Need to exit the volume stack when shadow ray laves the medium.

Thanks Brecht for review and help in troubleshooting!
2017-09-05 15:48:34 +02:00
4d85396fe4 Cleanup: use const
Also use assert w/ rotate_m4.
2017-09-05 22:45:44 +10:00
b0bbb5f34f Cycles: Cleanup, style 2017-09-05 12:43:02 +02:00
6859695055 Fix T52649: missing custom (split) normals from FBX exporter.
Own mistake in recent rB25c5928b2b6 (this DOES NOT affect 2.79 release).
2017-09-04 21:04:19 +02:00
4a744727be Fix T52531: Blender 2D stabilisation node issue when autoscale is selected
Threading conflict, should be safe for 2.79.
2017-09-04 16:41:28 +02:00
b07e983b61 PyAPI: Add bpy.utils.register_classes_factory
Avoids having boiler plate register/unregister functions.
2017-09-05 00:24:29 +10:00
71f0c32dad Fix T52522: VSE renders with alpha transparent PNG image incorrectly
Need some extra checks and should be probably end up in 2.79 since that's a regression.
2017-09-04 14:46:17 +02:00
885c0a5f90 Cycles: Fix compilation warning 2017-09-04 13:28:15 +02:00
33249f6987 Fix T52533: Blender shuts down when rendering duplicated smoke domain 2017-09-04 13:14:54 +02:00
3789ab4166 PyAPI: fix rna_info for changes in type access 2017-09-04 16:39:13 +10:00
30d7fbd7a0 PyDoc: update context_type_map 2017-09-04 16:19:27 +10:00
f4fb329808 RNA/PyAPI: Expose Py classes in bpy.types
Operators and their properties are two different types

Previously both operators and their properties are added
causing C operators to access the properties, Python the classes.

Favor consistency in this case so only Python classes are added.
2017-09-04 14:49:27 +10:00
85d53620aa Cleanup: avoid confusing assignment 2017-09-04 14:35:35 +10:00
718af8e8b3 T52534: Compositor artifacts when scaling
Increased the maxx and maxy area of interest when scaling in this case.
2017-09-03 16:47:39 +02:00
4d148471b6 Fix T52634: EditMesh Remove doubles could hang
A single diagonal axis was used for sorting coordinates,
the algorithm relied on users not having vertices axis aligned.

Use BLI_kdtree to remove doubles instead.

Overall speed varies, it's more predictable than the previous method.
Some typical tests gave speedup of ~1.4x - 1.7x.
2017-09-03 23:52:10 +10:00
459d76ec51 BLI_kdtree: utility function to remove doubles 2017-09-03 23:43:14 +10:00
9c1cc35be2 CMake: use Blender's glew by default
Use since it's always bundled to avoid any issues caused
by version mis-match.
2017-09-03 16:36:17 +10:00
b227a3388d Fix: Deleting GPencil keyframes in DopeSheet didn't redraw the view 2017-09-03 12:49:17 +12:00
4f6196a041 Fix: Border select for GPencil keyframes was including those in the "datablock" channels even though those weren't visible
This meant that it was easy to accidentally select too many keyframes
2017-09-03 12:49:16 +12:00
c671973092 Fix: GPencil Sequence Interpolation for thickness/strength was inverted
For example, if you have two keyframes:
  k1 = 1px, k2 = 10px

it was doing:
  1px, 9px, 8px, ..., 3px, 2px, 10px
instead of:
  1px, 2px, 3px, ..., 8px, 9px, 10px
2017-09-03 12:49:15 +12:00
53ec0e5166 Fix T52227: Time Slide tool doesn't take NLA mapping into account
To be backported to 2.79
2017-09-03 12:49:15 +12:00
fcd7ac1451 [deps/msvc] Debug flags for optimized debug libs were inverted for cxx. 2017-09-02 17:14:42 -06:00
32e36a1782 Correct own error simplifying matrix checks 2017-09-03 00:05:11 +10:00
3750389ce3 Cleanup: use title caps for labels
Also consistent quoting (single quotes for enums, text uses double).
2017-09-02 16:13:33 +10:00
2ca1f29748 BMesh: use predictable order for remove-doubles
Each qsort implementation may give different results when values match.

Now fallback to sorting by index.
2017-09-02 03:30:09 +10:00
8d207cdc3b Fix T52472: VSE Audio Volume not set immediately
Audio mixing is done with volume interpolation. A new handle started at
volume 1, now starting at volume 0 for a smooth fade in.
2017-09-01 12:27:21 +02:00
94b7bf3ec2 RNA: demote non-strict class naming to warning
This stops a lot of add-ons from registering,
while this must be resolved but there no need to force error just now.
2017-09-01 17:06:14 +10:00
18b7f05480 Cycles: follow strict class naming convention 2017-09-01 16:08:25 +10:00
0bbae3f3f6 RNA: strict naming for types in bpy.types
Blender scripts already do this, some addons will need updating.
2017-09-01 01:00:57 +10:00
217fddcb8e Cleanup: strict naming conventions 2017-09-01 01:00:56 +10:00
Dalai Felinto
44e10a5c66 Increase max/min frame range to over a million
For some specific pipelines (e.g., holographic rendering) you can easily
need over a million frames (1k * 1k view angles).

It seems a corner case, but there is no real reason not to allow users
doing that.

That said we do loose subframe precision in the highest frame range. Which can
affect motionblur. The current maximum sub-frame precision we have is 16.
While the previous limit of 500k frames has a precision of 32.

Thanks to Campbell Barton for the help here.

To be backported to 2.79
2017-08-31 16:13:04 +02:00
636baa598a RNA: Limit which classes struct-map contains
Only add subclasses of: Menu, Panel, Header, UIList, Operator

This helps avoid unnecessary naming collisions,

See T52599 for details
2017-08-31 23:49:50 +10:00
018137f762 Cycles: Cleanup, indentation and trailing whitespace 2017-08-31 14:47:49 +02:00
8b9e1707a1 Cycles: Fix typo in comment 2017-08-31 13:24:32 +02:00
a35aae9e49 Correct last commit 2017-08-31 19:12:55 +10:00
732f70a151 RNA: existing type check used wrong identifier
Own error in recent type checks, in many cases the 'idname'
is used for the struct identifier, not the 'identifier'
which is the Python class name in this context.
2017-08-31 18:45:00 +10:00
4f1b510d75 Cycles: Add tangent attribute tests 2017-08-30 17:42:00 +02:00
29b2a47a8a Fix T52588: Shape key value driver variables of duplicated object sets refer to old objects.
Regression since 2.78, to be backported to 2.79.
2017-08-30 17:24:06 +02:00
25c5928b2b Refactor 'split faces' mesh code.
Previous version was trying to do a quick and simple process in the case
we were only considering smooth/flat status of faces.

Thing is, even then, the algorithm was not actually working in all
possible situations, e.g. two smooth faces having a single vertex in
common, but no common edges, would not have split that vertex, leading
to incorrect shading etc.

So now, tweaked slightly our split normals code to be able to generate
lnor spaces even when autosmooth is disabled, and we always go that way
when splitting faces.

Using smooth fans from clnor spaces is not only the only way to get 100%
correct results, it also makes face split code simpler.
2017-08-30 16:52:47 +02:00
Stefan Werner
68dfa0f1b7 Fixing T52477 - switching from custom ray/triangle intersection code to the one from util_intersection.h. This fixes the bug and makes the code more readable and maintainable. 2017-08-30 11:48:49 +02:00
124ffb45a6 Cycles: Fix build with networking enabled 2017-08-30 00:19:44 -04:00
1457e5ea73 Fix Cycles Windows render errors with BVH2 CPU rendering.
One problem is that it was always using __mm_blendv_ps emulation even if the
instruction was supported. The other that the emulation function was wrong.

Thanks a lot to Ray Molenkamp for tracking this one down.
2017-08-29 22:55:35 +02:00
696f4dc85f Alembic: Fix T52579: crash when replacing slightly different alembic files
Apparently with Maya in a certain configuration, it's possible to have an
Alembic object without schema in the Alembic file. This is now handled
properly, instead of crashing on a null pointer.
2017-08-29 16:58:13 +02:00
Alexander Gavrilov
735e287271 Fix T48079: Maintain Volume constraint overcompensates.
The coefficient has been wrong since introduction for some reason.

Not backwards compatible, should not be merged to 2.7*.
2017-08-29 15:23:47 +03:00
01bdb0c76e Support Copy To Selected and Alt-Click for F-Curves in the curve editor.
This affects the curve display color setting, but is really intended
for future per-curve options.

The id_data reference in the created rna pointers refers to the object
even if the curve is actually owned by its action, which is somewhat
inconsistent, but the same problem can be found in existing code.
Fixing it requires changes in animdata filter API.
2017-08-29 14:30:44 +03:00
c7f106cbe2 View2D: function to get view to region matrix 2017-08-29 19:36:40 +10:00
1c92ffa149 Transform: scale center override by aspect
Needed for image space.
2017-08-29 16:01:16 +10:00
b4b1397ad9 Depsgraph: Don't cast ID_Type to short 2017-08-28 11:43:36 +02:00
2e71927622 Make GS macro return proper IDType type
Previously it was returning short, which was really easy to (a) compare against
non-ID type value (b) forget to handle some specific value in switch statement.

Both issues happened in the nearest past, so it's time to tighten some nuts
here.

Most of the change related on silencing strict compiler warning now, but there
is also one tricky aspect: ID_NLA is not in the IDType enum. So there is still
cast to short to handle that switch. If someone has better ideas how to deal
with this please go ahead :)
2017-08-28 11:21:55 +02:00
f4b3678646 Atomics: Use system headers directly, without bad level dependency to BLI
This will make it easier to re-use library as-is in other projects,
such as Cycles standalone repo for example.
2017-08-28 11:06:15 +02:00
b11b5b273e Buildbot: Tweak nightly schedule of builds
Basically, schedule linux 64 earlier on, so builds are ready for nightly benchmarks.
2017-08-28 09:12:53 +02:00
a520e7c85c Transform: center override
Hidden option to override transform center.
Needed for manipulators that define their own center.
2017-08-28 16:00:28 +10:00
1261a29fc0 EditMesh: set edge-rin subdiv minimum to 1
This only made sense for bridge tool.

D2785 by @mbjorkegren
2017-08-28 13:01:11 +10:00
cb7f1f8160 Docs: BMesh.from_mesh behavior w/ multiple calls 2017-08-28 12:40:36 +10:00
0b5cabdca5 Fix T51400: Pasting hex code fails
The # prefix is supported,
the button didn't give enough space to paste it.

D2812 by @candreacchio
2017-08-28 12:18:39 +10:00
dcebad773f Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.

Should be safe enough for 2.79.
2017-08-27 12:20:21 +02:00
c90452e111 BLI_rect: Function to calculate a matrix from 2 rctf's 2017-08-27 16:19:34 +10:00
b1f2b69884 Missing from last commit 2017-08-27 15:24:41 +10:00
6178cf8353 Cleanup: use stubs for eigen gtest 2017-08-27 15:21:09 +10:00
b07dcb8fb0 Missed last commit 2017-08-27 03:51:25 +10:00
b6b27b0671 Fix T52515: Crash on BMesh.to_mesh() 2017-08-27 02:44:15 +10:00
7e43210edb WM: move theme check out of ED_view3d_draw_select_loop
In 2.8x this needs to be in view3d_opengl_select,
so simplest to make in master too.
2017-08-27 00:48:52 +10:00
fa365d5f2f Fix minor Mesh -> BMesh conversion issues
- Vertex only meshes never restored their selection history.
- Select history was cleared on the source instead of the target.

Simple Optimizations:
- Avoid O(n^2) linked list looping that checked the entire list before
  adding elements (NULL values in the source array to prevent dupes).
- Re-use vert & edge lookup tables instead of allocating new ones.
2017-08-26 23:14:18 +10:00
fe71c86888 Fix T52478: Error report "Shrinkwrap: out of memory" on invisible target.
Shrinkwrap must check it does have valid target data.

Safe for 2.79 release.
2017-08-26 14:48:00 +02:00
5c4fc93f67 Fix T52538: Outliner crash when displaying groups and using Show Active on editmode bone not in any groups
There's no guaranty that given ID is found in current outliner tree...

Safe for 2.79, though not a regression.
2017-08-26 12:28:21 +02:00
58d92cefbd [cycles/ctest] fix failing tests when output folder doesn't exist yet. 2017-08-25 17:17:49 -06:00
5121dacf9d Fix for fix (tm): Residue of the debug code 2017-08-25 21:33:44 +02:00
90110d3732 Fix mistake in previous tangent space optimization 2017-08-25 21:30:20 +02:00
12f627cd9f Cycles: Cleanup, naming of variable
Always use b_ prefix for C++ RNA data.
2017-08-25 21:30:20 +02:00
ee61a97632 Cycles: Add assert to catch possibly wrong logic 2017-08-25 21:30:20 +02:00
f9a3d01452 Cycles: Mark pixels with negative values as outliers
If a pixel has negative components, something already went wrong, so the best option is to just ignore it.

Should be good for 2.79.
2017-08-25 17:46:15 +02:00
e2ffad7823 Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.
Issue was nasty hidden one, the dual status (mix of local and linked)
of proxies striking again.

Here, remapping process was considering obdata pointer of proxies as
indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer.
That would make savetoblend code not store any 'lib placeholder' for
obdata data-block, which was hence lost on next file read.

Another (probably better) solution here would be to actually consider
obdata of proxies are fully indirect usage, and simply reassign proxies
from their linked object's obdata on file read...

However, that change shall be safer for now, probably good for 2.79 too.
2017-08-25 16:16:32 +02:00
d79fa8dc4d Another optimization of tangent space calculation
Don't use quick sort for small arrays, bubble sort works way faster for small
arrays due to cache coherency. This is what qsort() from libc is doing actually.
We can also experiment unrolling some extra small arrays, for example 3 and 4
element arrays.

This reduces tangent space calculation for dragon from 3.1sec to 2.9sec.
2017-08-25 14:54:44 +02:00
49717d4971 Optimize tangent space calculation by inlining functions
Brings tangent space calculation from 4.6sec to 3.1sec for dragon model in BI.
Cycles is also somewhat faster, but it has other bottlenecks.

Funny thing, using simple `static inline` already gives a lot of speedup here.
That's just answering question whether it's OK to leave decision on what to
inline up to a compiler..
2017-08-25 14:50:04 +02:00
90299e4216 Cycles: Add utility function to query current value of scoped timer 2017-08-25 14:27:34 +02:00
12d527f327 Cycles: Correct logging of sued CPU intrisics 2017-08-25 14:27:34 +02:00
dfae3de6bd Cycles: Fix stack overflow during traversal caused by floating overflow
Would be nice to be able to catch this with assert as well, will see what would
be the best way to do this/.\

Need to verify with Mai that this solves crash for her and maybe consider
porting this to 2.79.
2017-08-25 14:27:34 +02:00
de669c3b60 WM: ensure 3D view theme is used in select-loop
Yet another case where theme could be used uninitialized.
2017-08-25 22:10:27 +10:00
16377abda8 WM: initialize WM and deps before handling events
This avoids obscure bugs where operators could run from
events that happen before the UI and depsgraph have been initialized.

See: D2809 for details.
2017-08-25 20:26:52 +10:00
2d5935a9c0 This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult foundation@blender.org
https://www.blender.org/support/faq/
2017-08-25 11:11:19 +02:00
738d942d29 Correct error in recent use of PyC_Long_*
Regression in 46cf33bf0
2017-08-25 02:09:23 +10:00
9662803833 Fix error using wrong theme settings w/ depth draw
Clicks events before first draw would assert,
unlikely to cause user visible errors but
would assert in UI_ThemeGetColorPtr.
2017-08-24 23:22:55 +10:00
a679457263 Fix T51907: New Depsgraph - Camera constraint is not evaluated properly
This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.
2017-08-24 14:35:48 +02:00
436d1b4e90 Cycles: FIx issue with -0 being considered a non-finite value 2017-08-24 14:32:56 +02:00
Dalai Felinto
1fb2637006 Cycles Bake: Fix overflow when using hundreds of images
We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.

Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).
2017-08-24 10:34:56 +02:00
76b74a93a8 Fix Cycles CUDA transparent shadow error after recent fix in c22b52c.
Fishy cat benchmark was rendering with wrong shadows. Cause is unclear,
adding printf or rearranging code seems to avoid this issue, possibly a
compiler bug. This reverts the fix and solves the OSL bug elsewhere.
2017-08-24 03:43:02 +02:00
b85d36d811 Code cleanup: remove shader context.
This was needed when we accessed OSL closure memory after shader evaluation,
which could get overwritten by another shader evaluation. But all closures
are immediatley converted to ShaderClosure now, so no longer needed.
2017-08-24 03:43:02 +02:00
e476298084 Docs: rename var and comment how it's used
switch_from_camera wasn't right since it was used for auto-perspective.
2017-08-24 02:11:31 +10:00
0b5b464e82 Correction to last fix 2017-08-24 01:05:20 +10:00
76d695f761 Fix T52490: NDOF orbit doesn't lock in ortho view
Regression in af3f7db caused by own fix for T51324
2017-08-24 00:51:25 +10:00
520ea73ad0 Fix bplayer (c) 2017-08-23 16:43:10 +02:00
3277bd4031 Fix T52396: Crash loading template w/o config dir 2017-08-23 22:06:42 +10:00
579edb1510 Cycles: Add maximum depth stat to bvh builder 2017-08-23 06:54:26 -04:00
2540741dee Fix implementation of atomic update max and move to a central location
While unlikely to have had any serious effects because of limited use, the
previous implementation was not actually atomic due to a data race and
incorrectly coded CAS loop. We also had duplicates of this code in a few
places, it's now been moved to a single location with all other atomic
operations.
2017-08-23 06:54:25 -04:00
5c60721c9e Fix T51805: Overlapping volumes renders incorrect on AMD GPU
We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.

Should be safe for 2.79 after extra eyes.
2017-08-23 12:35:23 +02:00
b9513706cb Cleanup: mark VA_NARGS_COUNT as public
Was already used in two other headers, remove underscore prefix.
2017-08-23 20:16:17 +10:00
37cfa44222 Cleanup: move variadic defines to their own header
So we can use in headers without pulling in many other defines.
2017-08-23 20:16:17 +10:00
1a76bc7aeb Fix T52218: Missing update when reconnecting node
If node was connected to output, we tag tree for update no matter where
the node was re-plugged to.

Should be safe for 2.79.
2017-08-23 11:49:20 +02:00
cf8d35edc8 RNA: use string-join to simplify operator register
Also sanity check macro-operator ID's.
2017-08-23 19:18:22 +10:00
81c0e643a0 BLI_string_utils: string joining utility functions
Includes a version that takes a separator and macros for convenience.
2017-08-23 19:17:27 +10:00
55861cb234 PyAPI: avoid instantiating args twice in macro
Would cause problems if args included function calls.
2017-08-23 18:48:32 +10:00
b8d77c44f1 Cleanup: remove space from filenames 2017-08-23 15:50:44 +10:00
46b9f89f5e Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
2017-08-23 15:36:39 +10:00
1e60ac3394 RNA: report error on struct naming collision
Fixes T52463, error instead of crash.
2017-08-23 15:02:21 +10:00
4761dea573 RNA: keep structs_map valid w/ ID duplicate & free 2017-08-23 14:14:55 +10:00
8899ac1550 GHash: BLI_ghash_reinsert_key utility function
Useful when ghash keys are reallocated.
2017-08-23 13:03:35 +10:00
980a8646d8 Fix T52466: Silence search for button_context menu type.
We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.

To be backported to 2.79
2017-08-22 21:35:09 +02:00
f09dee5aed Fix error in PointerProperty argument list
Regression in a7b3047
2017-08-23 02:14:33 +10:00
4d8e3b649b Fix T52483: Fill is incorrect for interpolated strokes
The recalc flag must be enabled for new interpolated strokes.
2017-08-22 17:43:20 +02:00
9f40153094 Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent 2017-08-22 16:27:33 +02:00
f3e02eb32e Depsgraph: Cleanup, make code friendlier to be edited in columns 2017-08-22 16:24:58 +02:00
c80ab62aee Depsgraph: Remove placeholder for path evaluation
Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.
2017-08-22 16:12:01 +02:00
4699799288 Fix threading conflict when doing Cycles background render
It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.

Need more testing and port this to 2.79.
2017-08-22 15:50:05 +02:00
1155fc94fd Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Most likely needs in 2.79 final release.
2017-08-22 12:53:34 +02:00
691ed21842 PyAPI: replace PyC_FromArray with typed functions
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.

Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
2017-08-22 18:10:57 +10:00
049932c4c3 Fix panorama render crash with split kernel, due to incorrect buffer pointer.
Also some refactoring to clarify variable usage scope.
2017-08-22 00:41:07 +02:00
296d74c4b1 Cycles: reorganize Performance panel layout, move viewport BVH type to debug. 2017-08-21 19:05:17 +02:00
81a76469ca Fix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet. 2017-08-21 19:05:17 +02:00
37a5fe2d4d Fix T52479: Regression: Motion Tracking no longer works 2017-08-21 17:23:42 +02:00
0033f0e161 Cleanup: uneven/double indentation 2017-08-21 15:38:11 +10:00
592dd9dea6 Modify menu from last commit
Also correct tool-tip.
2017-08-21 15:24:40 +10:00
361c7cbbc5 Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
2017-08-21 15:19:08 +10:00
43a6cf1504 Cycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.
I don't know if this will actually work, needs testing. Ref T52064.
2017-08-20 23:18:25 +02:00
fc890cdae2 Fix Windows build error after recent Python changes in a10a7f42. 2017-08-20 23:15:43 +02:00
47d1f67eab Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Please backport this to 2.79.
2017-08-21 00:09:16 +02:00
41e6068c76 Revert "Cycles: remove square samples option."
This reverts commit 757c24b6bc.

We'll revisit this when doing deeper sampling changes.
2017-08-20 23:46:05 +02:00
1d1ddd48db Fix T52470: cycles OpenCL hair rendering not working after recent changes. 2017-08-20 23:32:20 +02:00
ce0fce2207 Code cleanup: deduplicate some bsdf node methods. 2017-08-20 17:37:22 +02:00
146b0c6b04 Fix T52439: Crash after adjusting lenght of hair particles.
Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles
before.

To be backported to 2.79.
2017-08-20 17:18:48 +02:00
b5f8063fb9 Cycles: support baking normals plugged into BSDFs, averaged with closure weight. 2017-08-20 16:51:53 +02:00
0b07c2c8a2 Code cleanup: remove copy of shader graph for bump, no longer needed. 2017-08-20 14:27:51 +02:00
e27a59d411 Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Recent inclusion caused build error with the BGE.
2017-08-20 21:14:33 +10:00
f6825d333b Fix bpy library load: invalid function signature 2017-08-20 19:04:16 +10:00
46cf33bf01 PyAPI: Make use of PyC_LongAs... API
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
a10a7f42de PyAPI: Integer conversion functions
Python's C-API doesn't provide functions to get
int's at specific integer sizes.

Leaving the caller to check for overflow,
which ended up being ignored in practice.

Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.
2017-08-20 15:39:08 +10:00
2ff9c8a3bc PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
2017-08-20 15:30:14 +10:00
07ca9860e2 [windows/make.bat] add option to automatically download libs.
The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .

When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them

if svn is not installed, or the user chooses 'no' the current error message is shown.

Reviewers: Blendify, sergey, juicyfruit

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2782
2017-08-19 12:00:45 -06:00
c22b52cd36 Fix T52452: OSL trace broken after shadow catcher recent changes.
We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.
2017-08-19 18:14:16 +02:00
4218b9367e Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.
2017-08-19 18:14:16 +02:00
cfa8b762e2 Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.
2017-08-19 18:14:16 +02:00
1cc4033df8 PyAPI: expose matrix parsing function 2017-08-19 21:36:50 +10:00
4d428d14af Fix T52443: Cycles OpenCL build error after recent mesh lights changes. 2017-08-19 01:02:55 +02:00
d282dc04ef Cycles tests: add light type tests. 2017-08-18 17:09:12 +02:00
5cf36c0f05 Cycles tests: make page less wide, use relative URLs for serving through http. 2017-08-18 17:09:08 +02:00
4e468ceb71 PyAPI: Fix memory leak w/ empty, allocated enums 2017-08-18 18:29:27 +10:00
ac28a4fba7 Fix leak in Python BGE filter & image types 2017-08-18 00:55:16 +10:00
Stefan Werner
7a4696197d Cycles: Fix for a division by zero that could happen with solid angle triangle light sampling 2017-08-17 15:07:59 +02:00
743bacaa6f Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
2017-08-18 01:03:28 +12:00
Stefan Werner
8141eac2f8 Improved triangle sampling for mesh lights
This implements Arvo's "Stratified sampling of spherical triangles". Similar to how we sample rectangular area lights, this is sampling triangles over their solid angle. It does significantly improve sampling close to the triangle, but doesn't do much for more distant triangles. So I added a simple heuristic to switch between the two methods. Unfortunately, I expect this to add render time in any case, even when it does not make any difference whatsoever. It'll take some benchmarking with various scenes and hardware to estimate how severe the impact is and if it is worth the change.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: Vega-core, brecht, SteffenD

Tags: #cycles

Differential Revision: https://developer.blender.org/D2730
2017-08-17 12:44:32 +02:00
5492d2cb67 Cycles: Calculate correct remaining time when using a larger pixel size 2017-08-17 02:00:44 +02:00
9b1e0f5af6 Remove unnecessary #include "ED_transform.h" 2017-08-16 19:08:52 -03:00
85169de54d Transform: remove unused function 2017-08-16 18:55:55 -03:00
916b9b311f Transform: Move enum SnapSelect to ED_transform_snap_object_context 2017-08-16 14:16:30 -03:00
a773ac4bda Support MSVSC 2017 15.3.0 (compiler 19.11)
The compiler version has changed in the last VS2017 update to 1911 and the old 1910 version is not working anymore.
2017-08-16 09:45:08 -06:00
1f3724f7f4 Fix T52414: Blender 2.79 crash on object duplication via menu.
Caused by own recent changes in handling of verts/edges/etc. arrays storage
for raycasting (rBe324172d9ca6690e8).

Issue was actually even weirder - there is absolutely no reason at all to
release DM here, those finaldm are stored in Object or EditMesh structs and
handled by general update system, other code shall never try to release them!
2017-08-16 10:52:49 +02:00
535e83687d macOS build: simplify python install for new 10.9 libraries.
We stop using the .zip file and just have all files now in
lib/darwin/python/lib, along with numpy, numpy headers and requests.
This makes it consistent with Linux and simplifies code.

For old libraries the .zip stays, code for that gets removed when we
fully switch to new libraries.
2017-08-15 17:40:27 +02:00
477ee3a9de Fix Cycles presets after recent removal of some settings. 2017-08-15 17:40:27 +02:00
f20d7bed14 Alembic import: report object name in face color index out of bounds error 2017-08-15 12:43:17 +02:00
ac88a3942e Alembic import: fix crash when face color index is out of bounds.
This can happen with Alembic files exported from Maya. I'm unsure as to the
root cause, but at least this fixes the crash itself.

Thanks to @looch for reporting this with a test file. The test file has to
remain confidential, though, so it's on my workstation only.
2017-08-15 12:35:33 +02:00
caefe4943b [deps_build/macOS] Fix FFMPEG & VPX configure command
FFMPEG & VPX don't handle target with --build parameter, so we need to make sure use of plain configure command

Reviewed by: Brecht Van Lommel
Differential Revision: http://developer.blender.org/D2791
2017-08-15 12:26:33 +03:00
66c1b23aa1 Cycles/BI: Add a pixel size option for speeding up viewport rendering
This patch adds "Pixel Size" to the performance options, which allows to render
in a smaller resolution, which is especially useful for displays with high DPI.

Reviewers: Severin, dingto, sergey, brecht

Reviewed By: brecht

Subscribers: Severin, venomgfx, eyecandy, brecht

Differential Revision: https://developer.blender.org/D1619
2017-08-15 01:22:40 +02:00
a8eaaa21e0 [build_deps/Windows] Add numpy headers to the python include folder on windows, required for D2716 2017-08-14 15:21:36 -06:00
e79db3b2f8 [depsbuilder] fix outdated python patch on windows. 2017-08-14 15:11:44 -06:00
30e0100813 [depsbuilder] Fix broken osl flags on windows. 2017-08-14 15:11:05 -06:00
Stefan Werner
86eb8980d3 Cycles: Fixed broken camera motion blur when motion was not set to center on frame
Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2787
2017-08-14 20:24:30 +02:00
595cfd2a81 Fix T52331: Motion blur shutter length not keyable
The only reason shutter time was marked as non-animatable is because Blender
Internal render does not support such animation. But this is something what
users are keeping asking for and now Blender Internal is on it's way out.

Enabled animation of this property, but noted in tooltip that Blender Internal
does not support animation of this property.
2017-08-14 16:38:50 +02:00
3cd51c0379 Fix T52391: Crash on duplicating material.
Bug in new ID copying code, thanks once again to stupid nodetrees, we
ended up wrongly remapping MA node->id pointers to NodeTree when copying
materials using node trees...
2017-08-14 15:40:54 +02:00
03a02cd109 Cleanup: confusing naming in BKE_node_tree_copy_data(). 2017-08-14 15:40:11 +02:00
04f034abad New ID Copying code: fix node_tree_copy_data still potentially increasing usercount of its gpencil pointer.
_copy_data() functions of datablocks shall never handle that, it's done
by generic calling code in library.c.
2017-08-14 15:17:23 +02:00
4e6324dd59 Cycles: Guard memcpy to potentially re-allocating memory with lock
Basically, make re-alloc and memcpy from the same lock, otherwise one
thread might be re-allocating thread while another one is trying to
copy data there.

Reported by Mohamed Sakr in IRC, thanks!
2017-08-14 14:55:47 +02:00
f0c2f4fa91 Tracking: Fix missing checks in operator poll functions
Reported by Vuk Gardašević (lijenstina) in IRC, thanks!
2017-08-14 11:46:00 +02:00
a850235a44 Fix T51850: Motion tracking - poor performance with keyframe matching on large video
Enabled cache for frame accessor and tweaked policy so we guarantee keyframed
images to be always in the cache. The logic might fail in some real corner case
(for example, when doing multiple tracks at once on a system where we can not
fit 2 clip frames in cache) but things are much better now for regular use.
2017-08-14 11:43:19 +02:00
ba84eb0f19 Tracking: Make frame accessor cache safe for threading 2017-08-14 11:43:19 +02:00
d36579bb96 Tracking: Cleanup, newlines and comments 2017-08-14 11:43:19 +02:00
ae561855cc Tracking: Cleanup, de-duplicate code 2017-08-14 11:43:19 +02:00
725a577327 Trackign: Add some basic logging about caching in frame accessor 2017-08-14 11:43:19 +02:00
4ac019cc07 Tracking: Make frame access cache aware of region
Cache is still kept disabled, need to think of a policy for cache cleanup.
2017-08-14 11:43:19 +02:00
7dfc1ad6c1 Tracking: Correct comparison in cache keys
This code wasn't uses, but the key comparison was totally wrong.
2017-08-14 11:43:19 +02:00
87e05c152a Tracking: Cleanup and some comments 2017-08-14 11:43:19 +02:00
51643056b0 Move back master to BCon1 (aka alpha) status.
Forgot to do that the other week, master is no more 2.79 RC!
2017-08-14 10:44:19 +02:00
a8fbe991cd [build_deps/Windows] Prevent writing of any files into the source tree. 2017-08-13 13:02:15 -06:00
dc7fcebb33 Code cleanup: make L_transparent part of PathRadiance. 2017-08-13 01:19:07 +02:00
7542282c06 Code cleanup: make DebugData part of PathRadiance. 2017-08-13 01:19:07 +02:00
fce405059f Code cleanup: make it easier to test only Sobol, CMJ or Pseudorandom. 2017-08-13 01:19:07 +02:00
8f97108353 Cycles: optimize CPU split kernel data init. 2017-08-12 20:43:34 +02:00
601f94a3c2 Code cleanup: remove unused Cycles random number code. 2017-08-12 20:40:38 +02:00
6919393a51 Fix T52372: CUDA build error after recent changes. 2017-08-12 20:37:06 +02:00
b500f42700 WM: load UI for new file, even when pref disabled
Loading startup file always loads the UI now.
2017-08-13 01:09:48 +10:00
d7639d57dc Fix T52368: OSL trace() crash after recent changes. 2017-08-12 14:32:52 +02:00
60ab0b8418 Fix T52298: hidden lamps still compute shadow buffers in viewport. 2017-08-12 13:22:26 +02:00
85ad248c36 Code cleanup: fix warning and improve terminology. 2017-08-12 13:18:05 +02:00
a4bcdf5fb1 Fix T52329: Boolean with aligned shapes failed
Creating ngons with multiple axis aligned shapes in the middle of a
single face would fail in some cases.

This exposed multiple problems in BM_face_split_edgenet_connect_islands

- Islands needed to be sorted on Y axis when X was aligned.
- Checking edge intersections needed increased endpoint bias.
- BVH epsilon needed to be increased.
2017-08-12 18:35:47 +10:00
091ae0ea71 Math Lib: add isect_seg_seg_v2_point_ex
This exposes end-point bias argument, needed in rare cases.
2017-08-12 18:35:47 +10:00
b5cd89bab9 Fix width estimation for buttons with short labels in pie menus
Differential Revision: https://developer.blender.org/D2781

To be backported to 2.79 branch
2017-08-12 11:00:19 +03:00
ccb8e78d6c Cleanup: whitespace 2017-08-12 13:43:40 +10:00
4a1762f769 iFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.
'OpenGL Preview' checkbox was redundant now, just use seq_prev_type
value only.

Might be OK for 2.79, but should be double-checked first...
2017-08-11 18:02:54 +02:00
00cb352790 Fix T52149: LoopTriArray computation was not correctly protected against concurrency.
Note: this commit seems to work as expected (also with transform
snapping etc.). However, it is rather unsafe - not enough for 2.79 at
least, unless we get much more testing on it. It also depends on three
previous ones.

Note that using a global lock here is far from ideal, we should rather
have a lock per DM, but that will do for now, whole DM thing is doomed
to oblivion anyway in 2.8.

Also, we may need a `DM_DIRTY_LOOPTRIS` dirty flag at some point. Looks
like we can survive without it for now though... Probably because cached
looptris are never copied accross DM's?
2017-08-11 17:08:41 +02:00
c034193821 Cleanup: remove useless DM_ensure_looptri().
That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...
2017-08-11 17:08:41 +02:00
e324172d9c Fix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again from DM.
This was... horribly wrong, CDDM will often *not* need to allocate
anything to return arrays of mesh items! Just check whether array
pointer is NULL.

Also, remove `DM_get_looptri_array`, that one is useless currently,
`dm->getLoopTriArray` will always return cached array (computing it if
needed).
2017-08-11 17:08:41 +02:00
e9cbc700ef Cleanup: deduplicate DM's getLoopTriArray() callback.
All three functions were doing exactly the same thing, simpler to only
have one in that case!
2017-08-11 17:08:41 +02:00
e6da7bb75c Fix T52346: Alt-I (Delete Keyframes) on a NlaStrip's Extrapolate property would crash 2017-08-12 01:52:51 +12:00
b6fda7fa43 Fix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from Selected Channels
The tweakmode flag and the selected-channels flag accidentally
used the same value, due to confusion over where these flags were
supposed to be set. The selected-channels flag has now been moved
to use a different value, so that there shouldn't be any further
conflicts.

To be ported to 2.79.
2017-08-12 01:41:22 +12:00
b2392afc50 Fix bevel clamping bugs T51247 and T50819.
Old bevel 'Clamp overlap' code was very naive: just limit amount
to half edge length. This uses more accurate (but not perfect)
calculations for the max amount before (many) geometry collisions
happen. This is not a backward compatible change - meshes that
have modifiers with 'Clamp overlap' will likely have larger allowed
bevel widths now. But that can be fixed by turning off clamp overlap
and setting the amount to the desired value.
2017-08-11 09:13:27 -04:00
30e83d58ff Object Apply Transform: option to apply properties
In some cases users may want to disable this option
to avoid changing other properties besides vertex locations.
2017-08-11 22:32:07 +10:00
31be0a6e52 Fix T52344: Softbody on Text.
Own previous fix (rBd5d626df236b) was not valid, curves are actually
supported by SoftBodies. It was rather a mere UI bug, which was not
including Surfaces and Font obect types in those valid for softbody UI.

Thanks to @brecht for the head up!

Also, fix safe for 2.79, btw.
2017-08-11 14:27:34 +02:00
2e25754ecd Cycles: Clarify new argument in PathRadiance 2017-08-11 13:49:50 +02:00
596ee4b505 Cycles tests: Draw images on top of checkerboard
This way it's easier to see alpha-channel only images, such as shadow catcher
images on transparent film.
2017-08-11 13:49:50 +02:00
bd069a89aa Fix T52229: Shadow Catcher artifacts when under transparency
Added some extra tirckery to avoid background being tinted dark with transparent
surface. Maybe a bit hacky, but seems to work fine.
2017-08-11 13:49:50 +02:00
59a52fef6c Pie menu's sub-rows ignore 'EXPAND' flag
Regression, to be backported in 2.79.
2017-08-11 13:18:30 +03:00
daa834bc11 RNA: Operators were excluded from struct map
Recent changes meant structs that were registered without a name
wouldn't get added to the map.
Now assigning identifiers manages the struct-map.
2017-08-11 20:11:01 +10:00
58ee738310 GHash: note that 'deprecated' is used for private 2017-08-11 19:10:19 +10:00
bc88ee3292 Error in last commit, problems with unregister
We can't free the identifier before its used when
removing from the ghash.
2017-08-11 19:10:19 +10:00
d5d626df23 Fix T52344: Softbody on Text.
For some reasons (c) softbody modifier was marked as compatible with
curves... Would need much more work though, so for now just removing
that flag!
2017-08-11 10:24:57 +02:00
91d882a8c9 RNA: Use hash lookups for structs
Adding structs was checking for duplicates
causing approx 75k string comparisons on startup.

While overall speedup is minimal,
Python access to `bpy.types` will now use a hash lookup
instead of a full linked list search.

See D2774
2017-08-11 18:11:25 +10:00
0398ee10a1 WM: don't load preferences on 'File -> New'
User preferences are now only loaded on...

- Initial startup.
- Factory-settings.
- Setting app-templates.
2017-08-11 09:40:28 +10:00
757c24b6bc Cycles: remove square samples option.
It doesn't seem that useful in practice, was mostly added to match some
other renderers but also seems to be causing user confusing and accidental
long render times. So let's just keep the UI simple and remove this.

Differential Revision: https://developer.blender.org/D2768
2017-08-11 01:10:56 +02:00
8a7c207f0b Cycles: change defaults for filter glossy, clamp and branched path AA.
We're adding some bias by default, which now I think is the right thing
to do from a usability point of view since you really need to use those
options anyway to get clean renders in a practical time.

Differential Revision: https://developer.blender.org/D2769
2017-08-11 01:10:50 +02:00
977e7b68cb Cycles: add denoising tests, keep new image even if no reference exists. 2017-08-11 01:09:35 +02:00
267e75158a Fix T52322: denoiser broken on Windows after recent changes.
It's not clear why this only happened on Windows, but the code
was wrong and should do a bitcast here instead of conversion.
2017-08-11 01:09:35 +02:00
c31e221d4f Fix crash checking for Blender version 10+
PyAPI could trigger this, for now just truncate.
2017-08-11 09:00:00 +10:00
535a6cde64 Cleanup: redundant 'static' variable
Also use BLI_snprintf.
2017-08-11 08:49:09 +10:00
3d677d9190 Fix OSX duplicate path in Python's sys.path
The '..' in the path caused simple comparisons to fail.

D2780 by @akitula
2017-08-11 08:42:27 +10:00
e5604a2fa4 Cleanup: whitespace 2017-08-11 08:32:05 +10:00
3895c1e57e CMake: only build msgfmt if international is used
Changes to BLI would always rebuild msgfmt.
2017-08-11 08:14:04 +10:00
aa1b35bb60 Fix install_deps usage of patches.
Who in Hell did rename those files and did not update accordingly
install_deps.sh script???
2017-08-10 15:56:13 +02:00
017b7ee273 DPI: add back option to control line width, tweak default width.
Adds thin/default/thick modes to add -1/0/1 to the auto detected line width,
while leaving the overall UI scale unchanged.

Also tweaks the default line width threshold, so thicker lines start from
slightly high UI scales.

Differential Revision: https://developer.blender.org/D2778
2017-08-10 15:54:22 +02:00
e786ea6419 Fix T52334: images with non-color data should not change color space on save. 2017-08-10 15:49:17 +02:00
33ab011ae4 Tweak and extend POV syntax hilghting.
*Changed categories of some keywords
*reordered some longer keywords that didn't appear
*Activated another color (reserved builtins) by Leonid
*added some HGPOV and UberPOV missing keywords

Patch by Maurice Raybaud (@mauriceraybaud). Thanks to Leonid for additions, feedback and Linux testing.
Related diffs: D2754 and D2755.

While not a regression, this is new feature and would be nice to have it
backported to final 2.79.
2017-08-10 15:31:47 +02:00
64a87ee843 Cleanup: make seq dupli scene operands' names match global copying convention.
Followup to rB1037b90cb831b, forgot to save that file :(
2017-08-10 15:06:53 +02:00
05be2a8c45 Cleanup: de-duplicate makefile OS checks 2017-08-10 22:37:35 +10:00
1037b90cb8 Cleanup: make seq dupli scene operands' names match global copying convention. 2017-08-10 13:00:01 +02:00
ca3f601f93 Fix T52332: crash when duplicating sequencer strips.
Bug introduced in recent ID copying refactor.

This commit basically sanitizes seq strip copying behavior, by making
destination scene pointer mandatory (and source one a const one).
Nothing then prevents you from using same pointer as source and
destination!
2017-08-10 12:56:32 +02:00
5b6ead05bd Fix T52324: Metaball disappears when deleting first metaball object.
Lost specific MBall 'need update' case here in last year's refactor.

While technically not a regression, nice to have in 2.79.
2017-08-10 12:32:50 +02:00
cf7a2c93e3 Cleanup & fix potential NULL pointer dereferencing. 2017-08-10 10:28:13 +02:00
a152743ba3 Fix T52314: New ID copy code (rBrB9da7dfa1586d) Breaks node previews in compositor.
"Just" forgot to copy data block's name in 'NO_MAIN' case... *sigh*
2017-08-10 10:28:13 +02:00
422fddab87 Cycles: Fix instanced shadow catcher objects influencing each other 2017-08-10 09:22:33 +02:00
5a618ab737 Cycles: De-duplicate trace-time object visibility calculation
We already have enough files to worry about in BVH builders. no need to add yet
another copy-paste code which is tempting to be running out of sync.
2017-08-10 09:21:02 +02:00
de3c165713 Forgot to change magicnumber of OIIO built lib in previous commit... 2017-08-09 18:21:35 +02:00
6e7e081e3e install_deps: disable PTex in our OIIO building for now, broken on newest systems. 2017-08-09 18:16:21 +02:00
cb02f5250d Fix typo in new ID copying code. 2017-08-09 14:38:24 +02:00
176ad9ecdd Cycles: Remove ulong usage
This is a bit confusing, especially when one mixes OpenCL code where ulong equals
to uint64_t with CPU side code where ulong is expected to be something else from
the naming.

This commit makes it so we use explicit name, common on all platforms.
2017-08-09 14:08:58 +02:00
45d7513f84 Fix T52240: Alembic Not Transferring Materials Per Frame
When a mesh changes its number of vertices during the animation,
Blender rebuilds the DerivedMesh, after which the materials weren't
applied any more (causing the default to the first material slot).
2017-08-09 13:59:58 +02:00
cdfeebd139 Alembic: Renamed variable assigned_name → assigned_mat
The variable is a pointer to a Material, not to a name/string.
2017-08-09 13:59:58 +02:00
422dc1ea1f Typo fix 2017-08-09 13:59:58 +02:00
8cfb9b9535 Fixed Alembic unit test
Commit b6d7cdd3ce changed how the mesh data
is deformed, which wasn't taken into account yet in this unit test.

Instead of directly reading the mesh vertices (which aren't animated any
more), we convert the modified mesh to a new one, and inspect those
vertices instead.
2017-08-09 13:59:58 +02:00
8c488cb97f Fix T52315: Crash on duplicating Scene without world.
Regression from rBa7b3047cefcbf, to be backported to 2.79.

Like... seriously... :|
2017-08-09 10:55:30 +02:00
55d28e604e Cycles: Proper fix for recent OpenCL image crash
Problem was that some code checks to see if device_pointer is null or
not and the new allocator wasn't even setting the pointer to anything
as it tracks memory location separately. Setting the pointer to non
null keeps all users of device_pointer happy.
2017-08-09 04:27:39 -04:00
06bf34227b Revert "Cycles: Fix crash changing image after recent OpenCL changes"
This reverts commit f2809ae0a6.
2017-08-09 04:24:03 -04:00
2190c0c7e5 Modules test: Don't print backtrace for files which are ignored
This could make output really polluted, where it'll be hard to see actual
issues.

It is still possible to have all backtraces printed using BLENDER_VERBOSE
environment variable.
2017-08-09 09:42:03 +02:00
f2728939df Fix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79
As part of the fix for T51587, I removed the Depth output for non-Multilayer
images since it seemed weird that PNGs etc. that don't have a Z pass still get
a socket for it.
However, I forgot about non-multilayer EXRs, which are a special case that can
actually have a Z pass.

Therefore, this commit brings back the Depth output for non-multilayer images
just like it was in 2.78.
2017-08-09 00:29:23 +02:00
99c13519a1 Cycles: More fixes for Windows 32 bit
- Apparently MSVC does not support compound literals
  in C++ (at least by the looks of it).

- Not sure how opencl_device_assert was managing to
  set protected property of the Device class.
2017-08-08 22:32:51 +02:00
c961737d0f Cycles: Fix compilation error of filter kernels on 32 bit Windows
We don't enable global SSE optimizations in regular kernel, and we
keep those disabled on Linux 32bit.

One possible workaround would be to pass arguments by ccl_ref, but
that is quite a few of code which better be done accurately.
2017-08-08 22:01:17 +02:00
b6d7cdd3ce Fix T51701: Alembic cache screws up mesh.
Use same trick as in DataTransfer modifier e.g. to avoid modifying
existing mesh's data.
2017-08-08 18:22:24 +02:00
f2809ae0a6 Cycles: Fix crash changing image after recent OpenCL changes
Steps to reproduce:
- Create shader Image texture -> Diffuse BSDF -> Output. Do NOT select image yet!
- Start viewport render.
- Select image from the ID browser of Image Texture node.

Thing is: with the memory manager we always need to inform device that memory
was freed.
2017-08-08 17:17:04 +02:00
0e57282999 Cycles: Fix compilation error without C++11
Common folks, nobody considered master a C++11 only branch. Such decision is to
be done officially and will involve changes in quite a few infrastructure related
areas.
2017-08-08 17:02:26 +02:00
4fe1bf85af Fix fixed width box layouts
Regression, to be backported in 2.79.
2017-08-08 17:37:51 +03:00
ddfd57c0d2 Cleanup: mostly namings in make_object_duplilist_real code. 2017-08-08 16:09:01 +02:00
a78b596272 Fix T52260: Blender 2.79 Objects made duplicates real still refer armature proxy.
New code was handling correctly ID's internal references to self, but
not references between 'made real' different objects...

Regression, to be backported in 2.79.
2017-08-08 16:09:01 +02:00
90b3dba515 Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself 2017-08-08 15:27:25 +02:00
126830b56c Depsgraph: Cleanup, make it easier to debug on laptop 2017-08-08 15:27:25 +02:00
19d19add1e Cycles: Cleanup, de-duplicate function parameter list
Was only needed to sue const reference on CPU. Now it is done using ccl_ref.
2017-08-08 15:27:25 +02:00
fd397a7d28 Cycles: Add utility macro ccl_ref
It is defined to & for CPU side compilation, and defined to an empty for any GPU
platform. The idea here is to use this macro instead of #ifdef block with bunch
of duplicated lines just to make it so CPU code is efficient.

Eventually we might switch to references on CUDA as well, but that would require
some intensive testing.
2017-08-08 15:27:25 +02:00
01ee88563b Fix T46329: scene_update_{pre,post} doc needs clarification
The documentation for the bpy.app.handlers.scene_update_{pre,post}
handlers states that they're called "on updating the scenes data".
However, they're called even when the data hasn't changed. Of course
such handlers are useful, but the documentation should reflect the
current behaviour.

Reviewers: mont29, sergey

Subscribers: Blendify

Maniphest Tasks: T46329

Differential Revision: https://developer.blender.org/D1535
2017-08-08 15:16:51 +02:00
ed4707be47 Fix width estimation for empty layouts in pie menus 2017-08-08 15:52:14 +03:00
d85af2aa3f Update CUEW to latest version
Previous update pulled too much of system-wide typedefs.
2017-08-08 14:27:28 +02:00
c8a8589d4f Fix T52263: Crash When Splitting and Merging Areas with Header Text Set.
Not a regression, but safe enough to be included in 2.79.
2017-08-08 14:07:34 +02:00
12834fe0f0 Update CUDA wrangler to latest version
Brings new declarations from toolkit version 8.0, also fixes some
pointers used in function declarations.
2017-08-08 13:58:42 +02:00
ec8ae4d5e9 Cycles: Pack kernel textures into buffers for OpenCL
Image textures were being packed into a single buffer for OpenCL, which
limited the amount of memory available for images to the size of one
buffer (usually 4gb on AMD hardware). By packing textures into multiple
buffers that limit is removed, while simultaneously reducing the number
of buffers that need to be passed to each kernel.

Benchmarks were within 2%.

Fixes T51554.

Differential Revision: https://developer.blender.org/D2745
2017-08-08 07:12:04 -04:00
b53e35c655 Fix compilation error when building without Blender
Simply disabled python tests, they can't be run anyway (since blender target is
not enabled) and we don't have any player-related tests in that folder.
2017-08-08 11:32:33 +02:00
6af7d7e05e Cleanup: remove incorrect comment
enum values aren't saved in files.
2017-08-08 11:28:47 +10:00
8f6b5f1f3c Fix CMake dependencies builder issues on Linux with TBB and Python packages. 2017-08-08 02:33:37 +02:00
451ccf7396 Cycles: Cleanup, move curve intersection functions to own file
This way curve file becomes much shorter and it's also easier to write a
benchmark application to check performance before/after future changes.
2017-08-07 20:53:30 +02:00
77a7a7f455 Cycles: Cleanup, trailign whitespace 2017-08-07 20:53:30 +02:00
95fe9b2617 Cycles: Cleanup, remove bvh prefix from curve functions
Those are nothing to do with BVH, and can be used separately.
2017-08-07 20:53:30 +02:00
a4bbce8949 Cycles: Fix compilation error on NVidia OpenCL after recent refactor
Still need to verify this is proper thing to do for AMD OpenCL. At least now
i can compile OpenCL kernel on my laptop with sm21 card.
2017-08-07 20:52:24 +02:00
947040cf2b Fix compilation error when rigid body is disabled 2017-08-07 20:11:19 +02:00
3c14f02eac Build: add scripts to build dependencies for Windows and macOS.
Note these are intended for platform maintainers, we do not intend to
support users making their own builds with these. For that precompiled
libraries from lib/ should be used.

Implemented by Martijn Berger, Ray Molenkamp and Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D2753
2017-08-07 17:54:26 +02:00
fc38276d74 Fix Cycles shadow catcher objects influencing each other.
Since all the shadow catchers are already assumed to be in the footage,
the shadows they cast on each other are already in the footage too. So
don't just let shadow catchers skip self, but all shadow catchers.

Another justification is that it should not matter if the shadow catcher
is modeled as one object or multiple separate objects, the resulting
render should be the same.

Differential Revision: https://developer.blender.org/D2763
2017-08-07 17:54:26 +02:00
dc4d850d10 Fix Windows build errors with recent Cycles SIMD refactoring. 2017-08-07 17:54:26 +02:00
9da7dfa158 Refactor ID copying (and to some extent, ID freeing).
This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).

This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.

It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).

Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!

As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.

Design task : T51804
Phab Diff: D2714
2017-08-07 16:39:55 +02:00
580741b317 Cycles: Cleanup, space after keyword 2017-08-07 14:47:51 +02:00
771e6120c8 Cycles tests: CMake side changes to support recent files split in the SVN repo 2017-08-07 14:33:47 +02:00
0f3f093d3b Cycles: add HTML report to inspect failed test images.
Shows new, reference and diff renders, with mouse hover to flip between
new and ref for easy comparison. This generates a report.html in
build_dir/tests/cycles, stored along with the new and diff images.

Differential Revision: https://developer.blender.org/D2770
2017-08-07 14:01:24 +02:00
ee77c1e917 Code refactor: use float4 instead of intrinsics for CPU denoise filtering.
Differential Revision: https://developer.blender.org/D2764
2017-08-07 14:01:24 +02:00
a24fbf3323 Code refactor: add, remove, optimize various SSE functions.
* Remove some unnecessary SSE emulation defines.
* Use full precision float division so we can enable it.
* Add sqrt(), sqr(), fabs(), shuffle variations, mask().
* Optimize reduce_add(), select().

Differential Revision: https://developer.blender.org/D2764
2017-08-07 14:01:24 +02:00
a8cc0d707e Code refactor: split defines into separate header, changes to SSE type headers.
I need to use some macros defined in util_simd.h for float3/float4, to emulate
SSE4 instructions on SSE2. But due to issues with order of header includes this
was not possible, this does some refactoring to make it work.

Differential Revision: https://developer.blender.org/D2764
2017-08-07 14:01:24 +02:00
5e4bad2c00 Cycles: remove option to disable transparent shadows globally.
We already detect this automatically based on shading nodes and per shader
settings, and performance of this option is ok now all devices.

Differential Revision: https://developer.blender.org/D2767
2017-08-07 14:01:24 +02:00
d1752167a9 Fix T52278: 'Default' application template fails
Own error in 7398b3b7
2017-08-07 21:20:57 +10:00
2a74f36dac Fix Cycles CUDA adaptive megakernel build error. 2017-08-07 00:27:08 +02:00
f5f6f9c9ac Fix broken API doc generation: Partially revert rBa372638a76e0
Making those arrays static remove them from exported symbols, which
breaks API doc generation script.

To be backported to 2.79 branch.
2017-08-06 17:35:41 +02:00
45dcd20ca9 Cycles: CUDA split performance tweaks, still far from megakernel.
On Pabellon, 25.8s mega, 35.4s split before, 32.7s split after.
2017-08-05 14:32:59 +02:00
fa05718f27 View3D: expose normal from depth publicly 2017-08-05 07:30:28 +10:00
cd023b6cec Cycles: remove min bounces, modify RR to terminate less.
Differential Revision: https://developer.blender.org/D2766
2017-08-04 23:11:03 +02:00
1210b47a85 Tracking: Undefine temporary define
Missed this in previous commit.
2017-08-04 21:12:11 +02:00
e6daa161dd Tracking: Remove limit of 50 points of the track history
Was quite stupid reason for this: static size of array.

Now we allocate needed amount of points in heap if requested path length is
getting too big.
2017-08-04 09:11:26 +02:00
0db4dab0c3 Tracking: Cleanup of transform code 2017-08-04 08:13:38 +02:00
0c48a091f9 Tracking: Cleanup, use boolean instead of integer 2017-08-04 07:21:01 +02:00
696599edac CMake: test build configuration support
D2765 by @akitula
2017-08-04 08:11:42 +10:00
0d01cf4488 Cycles: Extra tweaks to performance of header expansion
Two main things here:

1. Replace all unsafe for #line directive characters into a single loop,
   avoiding multiple iterations and multiple temporary strings created.

2. Don't merge token char by char but calculate start and end point and
   then copy all substring at once.

This gives about 15% speedup of source processing time. At this point
(with all previous commits from today) we've shrinked down compiled
sources size from 108 MB down to ~5.5 MB and lowered processing time
from 4.5 sec down to 0.047 sec on my laptop running Linux (this was a
constant time which Blender will always spent first time loading kernel,
even if we've got compiled clbin).
2017-08-03 08:07:06 +02:00
c6c49d90dc Remove volatile, causing issues w/ GCC/ubsan
Was Cygwin workaround, no longer needed.
2017-08-03 07:10:20 +10:00
ba98f06acc mikktspace: minor optimization
Add a safe version of normalize since all uses of normalize
did zero length checks, move this into a function.

Also avoid unnecessary conversion.

Gives minor speedup here (approx 3-5%).
2017-08-03 07:03:59 +10:00
f879cac032 Cycles: Avoid some expensive operations in header expansions
Basically gather lines as-is during traversal, avoiding allocating
memory for all the lines in headers.

Brings additional performance improvement abut 20%.
2017-08-02 20:59:19 +02:00
a280697e77 Cycles: Support "precompiled" headers in include expansion algorithm
The idea here is that it is possible to mark certain include statements
as "precompiled" which means all subsequent includes of that file will
be replaced with an empty string.

This is a way to deal with tricky include pattern happening in single
program OpenCL split kernel which was including bunch of headers about
10 times.

This brings preprocessing time from ~1sec to ~0.1sec on my laptop.
2017-08-02 20:59:19 +02:00
4ad39964fd Cycles: Speed up #include expansion algorithm
The idea is to re-use files which were already processed. Gives about 4x speedup
of processing time (~4.5sec vs 1.0sec) on my laptop for the whole OpenCL kernel.

For users it will mean lower delay before OpenCL rendering might start.
2017-08-02 20:59:19 +02:00
8ff2c14015 Fix T52250: Glitch in UI in the addon panel regression 2017-08-02 17:46:04 +03:00
f934f54b84 2.79 release: new splash, yeah! 2017-08-01 19:23:19 +02:00
ebd51a022a 2.79 release: update version numbers & readfile versionning code. 2017-08-01 19:22:31 +02:00
13d324f26b Tweak multi-units tests to match new precision handling in conversion from raw value to prety-printed one.
Note that new code allows to enable again the '1 million miles' tests.
2017-08-01 16:43:40 +02:00
636289b755 Fix multi-units drawing re precision handling.
This is still far from prefect, but yet much better than what we had so
far (more consistent with inheritent precision available in floats).

Note that this fixes some (currently commented out) units unittests, and
requires adjusting some others, will be done in next commit.
2017-08-01 16:42:35 +02:00
c1e177ad29 BLI_math: add simple helper to get amount of 'integer' digits in a float number. 2017-08-01 16:34:02 +02:00
702e9c556f Cleanup: warnings from last commit 2017-08-01 12:31:19 +10:00
a372638a76 Cleanup: use static vars where appropriate 2017-08-01 09:06:34 +10:00
2b7edb77c9 Fix fcurve color assignment 2017-08-01 08:27:35 +10:00
b425e94381 Correct accidental variable declaration 2017-08-01 07:55:01 +10:00
becb413f29 Fix T52224: auto IK not respecting length, after recent bugfix. 2017-07-31 19:22:03 +02:00
66110c6b98 Code cleanup: fix warning with clang. 2017-07-31 19:07:29 +02:00
f815aa01eb Fix T52232: Crash in RNA_enum_from_value while inspecting compositor image node properties in outliner.
Bug was in RNA nodes code actually, itemf functions shall never, ever
return NULL!

Note that there were other itemf functions there that were potentially
buggy. Also harmonized a bit their code.
2017-07-31 16:51:43 +02:00
b6cb7b2c92 Fix two issues with recent changes to number display while editing them.
* Numbers with units (especially, angles) where not handled correctly
regarding number of significant digits (spotted by @brecht in T52222
comment, thanks).
* Zero value has no valid log, need to take that into account!
2017-07-31 15:43:14 +02:00
09eac0159d Property path generation fixes 2017-07-29 15:23:01 +03:00
fb1cd7648f Cleanup: quiet picky ubsan warnings 2017-07-29 08:42:32 +10:00
393ba0cf16 Cleanup: multistatement-macros warning 2017-07-29 08:18:20 +10:00
214bbd4c02 Replace magic numbers with deprecated names
The names aren't meaningful but means it wont
accidentally use valid names.

Also remove textured-font setting
2017-07-29 06:27:40 +10:00
f3782c0a9e Fix T52195: Sculpt from Python fails
When calling sculpt from Python,
setting 3D 'location' but not 2D 'mouse' stopped working in 2.78.

Now check if the operator is running non-interactively and
skip the mouse-over check.
2017-07-29 06:05:43 +10:00
e2a7e1e494 WM: OP_IS_INVOKE was being incorrectly set
Calling an operator with EXEC_* context would still set the invoke flag.
2017-07-29 05:44:58 +10:00
87d5e34453 Fix T52213: Enum drivers no longer work
Regression in D1812: PyDriver variables as Objects

Taking the Python representation is nice in general
but for enums it would convert them into strings,
breaking some existing drivers.
2017-07-29 02:39:16 +10:00
e038830650 Resolve T45301 by adding option for old behavior
Some users really liked previous behavior,
so making it an option.

Cursor Lock Adjustment can be disabled to give something close to
2.4x behavior of cursor locking.

When lock-adjustment is disabled placing the cursor the view.
This avoids the issue reported in T40353
where the cursor could get *lost*.
2017-07-29 01:37:51 +10:00
2eb2655181 Cleanup: clear deprecated UI flags
Also adds cursor-lock flag, to be used in next commit.
2017-07-29 01:28:58 +10:00
9b22dbcc0d Fix T52156: Hair dynamics broken with density texture
Even strands that were excluded by the density texture were being added
to the DM passed to cloth, but these ended up having some invalid data,
because they were not fully constructed.

This simply excludes `UNEXISTED` particles from the DM generation, as
would be expected.
2017-07-28 15:30:26 +02:00
05f377805b Fix T52148: Point Density Texture ID User decrement error related to the Object field.
Note that fix is not perfect, systematically make refcounting of all IDs
assigned to node's id pointer, which breaks the 'do not refcount
scene/object/text datablocks' principle...

But besides that principle being far from ideal in general, it becomes
pretty much impossible to apply when using //generic// ID pointer,
unless we add some kind of type data to that pointer somehow.

So for now, better to live with that, than having broken usercount.
2017-07-28 12:43:06 +02:00
d41acacc61 Fix T52212: Vgroups doesn't work after Carve Boolean 2017-07-28 11:55:58 +02:00
38eabcb858 Fix potential 'divide-by-zero' in our UI fitting code.
Reported by coverity, better fix even if highly unlikely to happen...
2017-07-28 10:56:41 +02:00
304e5541cb Fix T52208: Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender.
but pointer was not assigned in that case...
2017-07-28 10:38:47 +02:00
c694f6e3fa Cleanup: Remove gitignore for api images 2017-07-27 16:04:42 -04:00
1bd9531fda Fix UI messages... 2017-07-27 15:20:44 +02:00
4003409430 Fix factory setup using user scripts path still 2017-07-27 22:22:26 +10:00
f1d6bad4b6 Fix T51776: Make sure button icons are updated on Ctrl-ScrollWheel 2017-07-27 12:55:17 +02:00
Julian Eisel
920bff5224 Fix button text overlapping with shortcut text in popups
The purpose of the keymap strings is probably for un-embossed menu items
like seen in most pulldowns. I can't see a reason for also adding that
string for regularly drawn buttons within popups, we don't add it
anywhere else in the UI either. So this commit makes sure shortcut
strings are only added to buttons that are drawn like pulldown-menu
items.
2017-07-27 11:49:41 +02:00
Julian Eisel
129c3ac7b3 Minor code style corrections 2017-07-27 11:44:51 +02:00
ec22809025 Fix Label colors in popups 2017-07-27 10:27:29 +03:00
3e8b2288f5 Fix: use click style if a pie was spawned by release or click event 2017-07-27 10:13:40 +03:00
5c963128ea Cleanup: remove check for old GCC&PPC 2017-07-27 07:29:16 +10:00
17230ec11f Cleanup: Py3.7x warning 2017-07-27 07:29:16 +10:00
320fc70cf2 Minor template code patch. (objectHitList =/= hitObjectList)
The Blender text editor's built in python template "Gamelogic" has a reference near the bottom to "objectHitList" as an alleged attribute to the KX_TouchSensor. This name is incorrect, it's correct name is "hitObjectList."

Attempting to access the suggested objectHitList returns error...
```
AttributeError: 'KX_TouchSensor' object has no attribute 'objectHitList'
```

The provided diff corrects this minor error.

Reviewers: kupoman, moguri, campbellbarton, Blendify

Reviewed By: Blendify

Tags: #game_engine, #game_python

Differential Revision: https://developer.blender.org/D2748
2017-07-26 16:05:54 -04:00
66e28a2827 Fix T52176: Bevel doesn't correctly work with default empty Vgroup.
`defvert_array_find_weight_safe()` was confusing 'invalid vgroup' and
'valid but totally empty vgroup' cases.

Note that this also affected at least ShrinkWrap and SimpleDeform
modifiers.
2017-07-26 16:23:24 +02:00
edc6bec9d6 PyAPI: Skip user scripts w/ factory-startup
Adds bpy.app.factory_startup,
used to check if user scripts should be loaded.
2017-07-25 20:52:08 +10:00
35d9f68121 Python module test: Don't cfail the test when import failure happens in preset 2017-07-25 11:39:10 +02:00
d1dc5e0a53 PyAPI: utility for creating register, unregister
This simplifies creation of register, unregister functions that
simply forward calls submodules.
2017-07-25 17:34:34 +10:00
e93804318f Fix T51450: viewport render time keeps increasing after render is done.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2747
2017-07-25 01:47:04 +02:00
Matheus de Sousa Faria
b7fb00f512 Fix compositor Glare node with Simpler Star resulting in uneven rays.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1867
2017-07-25 00:48:34 +02:00
7260a693e1 Cleanup: trailing space 2017-07-25 01:28:15 +10:00
c75f6d9245 Cleanup: remove scons config 2017-07-25 01:28:15 +10:00
7fbd529fb5 Revert "ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces"
This reverts commit 7f09b55d01.
2017-07-24 12:08:23 -03:00
7f09b55d01 ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces
The geometry behind the farther clip_plane is not bypassed
2017-07-24 11:13:33 -03:00
b379f02f20 Fix T50039: texture paint soften strength not working with float images. 2017-07-24 15:02:39 +02:00
James Fulop
c3c0495b30 Fix T51948: pen pressure not detected with some Wacom tablets.
Generalizes current conditions, QT implements it the same way.
2017-07-24 13:54:36 +02:00
f65a8bbdb7 Correct invalid assert use 2017-07-24 17:32:28 +10:00
9e929c911e Fix Cycles multi scatter GGX different render results with Clang and GCC.
The order of evaluation of function arguments is undefined, and the order
was reversed between these compilers. This was causing regressions tests
to give different results between Linux and macOS.
2017-07-23 23:25:12 +02:00
e982ebd6d4 Fix T52152: allow zero roughness for Cycles principled BSDF, don't clamp. 2017-07-22 23:58:51 +02:00
ec831ee7d1 Fix Cycles denoising NaNs with a 1 sample renders.
This was causing different render results with different compilers. We
can't do much useful with 1 sample, but better for debugging.
2017-07-22 23:58:51 +02:00
b4528d8897 Fix use of uninitialized value in Cycles, probably did not cause a bug. 2017-07-22 21:29:10 +02:00
a27b6ae4a9 Transform: remove unused argument 2017-07-21 18:04:05 -03:00
70eac432b7 UI: Add Open Image button to Mask Stencil Image panel
In the future we should make these two buttons on one line
However because we need `gen_context = 'PAINT_STENCIL'`
this is a little hard and we need to find a proper solution.
One might be using `context_pointer_set`

Patch by @craig_jones with edits by @blendify

Differential Revision: https://developer.blender.org/D2710
2017-07-21 16:52:41 -04:00
9e40977c27 UI: Add Open Image button to Mask Stencil Image panel
In the future we should make these two buttons on one line
However because we need `gen_context = 'PAINT_STENCIL'`
this is a little hard and we need to find a proper solution.
One might be using `context_pointer_set`

Patch by @craig_jones with edits by @blendify

Differential Revision: https://developer.blender.org/D2710
2017-07-21 16:46:35 -04:00
34f0250f32 Another solution to bug T38358 and related
Moving the ray_start_local to the new position does not lose as much precision as moving the ray_org_local to the corresponding position.

The problem of inaccuracy is within the functions: `bvhtree_ray_cast_data_precalc` and` fast_ray_nearest_hit`. And not directly in the values of the rays.
2017-07-21 14:02:16 -03:00
11204fce4e Fix strict compiler warning in BGE when linking directly to SDL 2017-07-21 16:07:59 +02:00
4d67034076 Fix T52134: New depsgraph crashes when evaluating several psys on from object 2017-07-21 11:12:34 +02:00
2200e5a280 Fix strict compiler error after recent UI changes 2017-07-21 10:52:36 +02:00
8b17ec0c00 Fix T52136: Blender segfault (stack overflow most certainly) when converting to mesh.
Stupid mistake in own recent refactor.
2017-07-21 10:24:20 +02:00
dc6fcb8ecf UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues.
The way we use it, UI_PRECISION_FLOAT_MAX is actually + 1 to get total
number of digits, and float only has 7 meaningful digits, so that define
shall be at 6.
2017-07-21 10:12:35 +02:00
db8bc1d982 Fix a few harmless maybe uninitialized warnings with GCC 5.4.
GCC seems to detect uninitialized into function calls now, but then isn't
always smart enough to see that it is actually initialized. Disabling this
warning entirely seems a bit too much, so initialize a bit more now.
2017-07-21 00:54:58 +02:00
0d4fd7528f Fix T46560: 2D paint smear and soften brushes not working with alpha.
Interpolate rather than do alpha over mix, matching projection paint.
2017-07-21 00:47:43 +02:00
2b132fc3f7 Fix T52135: Cycles should not keep generated/packed images in memory after render. 2017-07-20 23:47:05 +02:00
a4cd7b7297 Fix potential memory leak in Cycles loading of packed/generated images. 2017-07-20 23:46:58 +02:00
3b12a71972 Fix T52125: principled BSDF missing with macOS OpenCL. 2017-07-20 15:15:43 +02:00
Stefan Werner
c1ca3c8038 Cycles: fixed the SM_2x CUDA kernel build that I broke in my previous commit 2017-07-20 13:28:34 +02:00
Stefan Werner
4bc6faf9c8 Fix T52107: Color management difference when using multiple and different GPUs together
This commit unifies the flattened texture slot names for bindless and regular CUDA textures. Texture indices are now identical across all CUDA architectures, where before Fermi used different indices, which lead to problems when rendering on multi-GPU setups mixing Fermi with newer hardware.
2017-07-20 10:03:27 +02:00
6e90294e08 Fix topology mirror ignoring center verts
Caused select-mirror to fail with edges & faces.
2017-07-20 03:52:53 +10:00
73adf3e27d Fix (unreported) seldom crash when using previews in filebrowser.
Hopefully fix it actually, at least could not reproduce it anymore with
that changen, but Was already quite hard to trigger before.
We need a memory barrier at this allocation, otherwise it might happen
after preview gets added to done queue, so preview could end up being
freed twice, leading to crash.
2017-07-19 12:55:05 +02:00
5376b3eeca Fix T52116: Blender internal BVH build crash in degenerate cases. 2017-07-19 11:06:20 +02:00
3daa641d7f Fix T52092: Crash un-grouping nodes 2017-07-19 14:32:31 +10:00
8b2785bda5 Fix T49498: continuous grab issues on macOS, particularly with gaming mouses.
Change the implementation so it no longer takes over the mouse cursor motion
from the OS, instead only move it when warping, similar to Windows and X11.
Probably the reason it was not done this way originally is that you then get
a 500ms delay after warping, but we can use a trick to avoid that and get much
smoother mouse motion than before.
2017-07-18 16:11:33 +02:00
3cfb248bb6 Fix T52109: Folder search won't work when selecting animation output folder.
Text search would not run in case there was no 'type' enabled in filter
buttons. Now instead consider that no types enabled == all types
enabled.
2017-07-18 16:01:28 +02:00
ecb5b55d7f Fix bad loss of precision when manually editing values in numbuttons.
While drawing nice 'rounded' values is OK also for 'low precision'
editing like dragging and such, it's quite an issue when you type in a
precise value, validate, edit again the value, and find a rounded
version of it instead of what you typed in!

So now, *only when entering textedit of num buttons*, we always get the highest
reasonable precision for floats (and use exponential notation when
values are too low or too high, to avoid tremendous amounts of zero's).
2017-07-18 10:41:00 +02:00
2174a2118b Cleanup: use WM_event prefix for modal_tweak_exit 2017-07-18 18:09:26 +10:00
7784cf30eb WM: move WM_event_is_last_mousemove to the WM API 2017-07-18 18:07:49 +10:00
5f35682f3a Fix T52021: Shadow catcher renders wrong when catcher object is behind transparent object
Tweaked the path radiance summing and alpha to accommodate for possible contribution of
light by transparent surface bounces happening prior to shadow catcher intersection.

This commit will change the way how shadow catcher results looks when was behind semi
transparent object, but the old result seemed to be fully wrong: there were big artifacts
when alpha-overing the result on some actual footage.
2017-07-18 09:46:21 +02:00
d8906f30d3 Cycles: Remove meaningless camera ray check
In branched path tracing main loop is always a camera ray, with varying
number of transparent bounces.
2017-07-18 09:27:36 +02:00
66383ea206 Cleanup: quiet picky warnings 2017-07-18 12:14:18 +10:00
16fc2ad28e Transform: avoid possible uninitialized var 2017-07-18 12:13:41 +10:00
9bbb197d14 Work around small DPI resulting in blurry fonts, clamping auto DPI to minimum 96.
Since we added auto DPI on Linux, on some systems the UI draws smaller than before
due to the monitor reporting DPI values like 88. Blender font drawing gives quite
blurry results for such slightly smaller DPI, apparently because the builtin font
isn't really designed for such small font sizes. As a workaround this clamps the
auto DPI to minimum 96, since the main case we are interested in supporting is
high DPI displays anyway.

Differential Revision: https://developer.blender.org/D2740
2017-07-17 18:31:19 +02:00
d268cad06a Fix T52090: clarify meaning of EnumProperty number when using ENUM_FLAG. 2017-07-17 18:31:19 +02:00
f05f2f0336 Fix T51971: IK non-uniform scale regression.
This is a different fix for the issue from D2088, preserving backwards compatibility
for IK stretching. The main problem with this patch is that this new behavior has
been there for a year, so it may break rigs created since then which rely on the new
IK stretch behavior.

Test file for various cases:
https://developer.blender.org/diffusion/BL/browse/trunk/lib/tests/animation/IK.blend

Reviewers: campbellbarton

Subscribers: maverick, pkrime

Differential Revision: https://developer.blender.org/D2743
2017-07-17 18:31:19 +02:00
9feeb14e91 fix T52065: Joint ID was generated wrong for bone animation exports 2017-07-17 16:39:47 +02:00
06505c5264 Fix T39925: Set Origin to Geometry on a new text object moves the origin away from the object
No need to take into account font size here...
2017-07-17 12:56:12 +02:00
d4246476d0 Py API doc generation: remove reference to "Blender/Python Add-on Tutorial"
That one has been moved to wiki!
2017-07-17 11:36:27 +02:00
d0aa620912 Buildbot: Switch to GCC-7 for Linux build slaves
This is GCC version was used for Testbuild1 and Testbuild2.
2017-07-17 09:32:19 +02:00
bc8a9c47c6 PyDoc: minor change to recent workaround
- Isolate workaround in single string and link to issue.
- Quiet unused file warning (since it's an include).
2017-07-17 13:18:58 +10:00
3d1e5bca88 PyAPI: don't use deprecated PyModule_GetFilename
Allows compiling with newer Python versions.
Also add missing decref when compiling as a py-module.
2017-07-17 12:53:55 +10:00
4e22e24689 BPY API: Fix broken ref link 2017-07-16 18:11:58 -04:00
2d0c9542fe BPY API: Fix usless links leading to compile errors
See https://github.com/sphinx-doc/sphinx/issues/3866 for more information
2017-07-16 17:11:05 -04:00
7021aa245d Fix T52058: Jumping to keyframe causes Blender to freeze indefinitely
Revise the logic here to be more robust when keyframes with
similar-but-different frame numbers (e.g. 70.000000 vs 70.000008)
would cause the search to go into an infinite loop, as the same
keyframe was repeatedly found (and skipped).
2017-07-17 02:26:49 +12:00
5c30bc285c Fix T52034: cell noise renders different.
Tweak the bias from the previous fix a bit to be more backwards compatible in
some scene. In the end which way we round is quite arbitrary, but keeping the
case where the texture coordinate is exactly zero the same seems better.
2017-07-16 01:27:55 +02:00
49c29dc82f Fix T52066: Grid Mesh UV's aren't correct 2017-07-16 00:03:52 +10:00
8009564503 Snap System: Fixed index of objects used to make snap to volume
*note: make a complete test scene
2017-07-14 17:25:16 -03:00
08b59ab7b9 Snap System: Use function that does the interactor instead of Macro
Macro makes debugging difficult. And in that case I was escaping from the style used in Blender
2017-07-14 16:52:31 -03:00
5fb5b74890 Snap System: missing change 2017-07-14 11:20:28 -03:00
c6ddef7359 Snap System: fix rename ob to obj
This would bring problems with dupli objects
2017-07-14 10:41:47 -03:00
0f793ee606 Fix unit test error on Windows 2017-07-14 09:53:27 +02:00
c9817c67fc Snap System: Replace creation and destruction of the object list by a Macro
The macro got a little strange, but it's better than using the MEM_mallocN inside a loop, or repeat the lines
2017-07-13 19:39:17 -03:00
7daae642d8 Cleanup: Fix MSVC warning message
The const key is required by compiler to avoid warning
2017-07-13 17:54:24 +02:00
a651f5da66 Sequence editor: Renamed "Override" to "Overwrite" in "Set Selected Strip Proxies"
The option has always (un)set the "Overwrite" flag on all strips. Calling
it "Override" seems misleading, since even when unchecking it, it overrides
whatever was set on the selected strips. It really just (un)sets the
"Overwrite" flag, and now it is also labeled as such.
2017-07-13 16:26:19 +02:00
248bba81e7 Fix texture paint crash when painting onto stencil 2017-07-13 20:50:02 +10:00
e656dcd365 Revert T44320: UV island overlap considered linked
In the reported example it seemed reasonable to apply this change.
But it causes a much more common case (selecting projections)
to be split into 2x islands.

Resolves T50970
2017-07-13 14:32:04 +10:00
d3f7b04f04 Fix T51100: Vertex pick fails after extrude 2017-07-13 14:13:59 +10:00
2771f602e6 Snap System: remove unused function 2017-07-12 20:43:28 -03:00
457596d4df BMesh: move safe loop-normal-calc to own function
This makes sense when we want to avoid float precision error
for near co-linear edges. OTOH, this is an arbitrary decision,
so keep functions separate.
2017-07-12 23:13:04 +10:00
87164114a3 Cycles: Enable SSS from Principled BSDF only when actually in use
This gives speed up for the split kernel in scenes using the principled BSDF
but without subsurface scattering.
2017-07-12 04:40:24 -04:00
8603424d0a Cleanup: unused vars 2017-07-12 13:58:48 +10:00
1f933c94a7 Cycles: Fix comparison in principled BSDF
Could have lead to black pixels.
2017-07-11 23:41:22 -04:00
29ec0b1162 Fix T52027: OSL getattribute() crash, when optimizer calls it before rendering. 2017-07-11 22:39:51 +02:00
3f39719b5d Fix [T51595]: Snap to edge does not work with high zoom level
That problem occurs because of the imprecision of `short int` (16 bits).
The 3d coordinates are converted to 2d, and when they are off the screen, their values can exceed 32767! (max short int value)

One quick solution is to use float instead of short

The snap code is actually a little tricky. I want to make some arithmetic simplifications in it
2017-07-11 17:03:49 -03:00
b3f62b68a9 Style (remove characters that caused "a binary file") 2017-07-11 14:22:07 -03:00
dd1edb0954 Snap System: Separate raycast functions from nearest2d functions
The only similarity between these functions is that both serve to snap.
However their codes are totally different from one another.
So by separating these functions, it:
- removes the need to put several conditions;
- simplifies and
- optimizes the code
2017-07-11 13:47:28 -03:00
32edfd53d9 Fix T52022 Alembic Inherits transform not taken into account
Alembic's "inherits transform" flag wasn't taken into account when
constructing the parent object relations.
2017-07-11 16:17:27 +02:00
085ed00e42 A bunch of fixes for Pose Library while checking on T51607
* Display a warning above the pose list if the pose library is in an invalid
  state (i.e. when it has keyframes but no pose-markers associated with those
  keyframes). This warning prompts users to run the "Sanitize Pose Library Action"
  operator, which should fix up such issues.

* "Sanitize" operator now creates unique names for each newly create pose
  marker it generates, including the frame on which it found the pose
2017-07-12 01:33:08 +12:00
cd3b3e4a57 Fix: Accidentally left debug print in last commit 2017-07-11 23:39:35 +12:00
fdfcbfd040 Fix T52009: F-Curve "Stepped interpolation" modifier "restrict frame-range" IN and OUT parameters cannot be edited
The problem here was that the "frame_start" and "frame_end" RNA properties of
the Stepped FModifier were shadowing/overriding "frame_start" and "frame_end"
properties of the base FModifier. As a result, when the range() callback
for the In/Out parameters (defined as part of the base FModifier) checked
it's start/end properties, they were always still zero, meaning that the
acceptable range for the In/Out parameters was 0 -> 0 = 0.

Note:
If you've got old files with this problem, you'll need to manually click on
the frame_start/end properties to flush out the old values. It's probably
not worth the effort of applying a version patch for this (given that this
modifier is not one of the most often used ones AFAIK).
2017-07-11 23:33:24 +12:00
b452003015 Fix T51879: NLA Influence can not be autokeyed
As with Strip Time, the updates here would get triggered before the
autokeying had a chance to record the unkeyed values, making it impossible
to autokey.
2017-07-11 23:33:24 +12:00
e26f61a2b5 Cycles: Disable OpenCL clFlush workarounds
This is something which was reported to work fine by Mai, Benjamin and
confirmed by myself. Disabling this workaround gains us some speedup:

                      Before           Now
bmw27                04:28.42        04:07.79
classroom            09:26.48        08:54.53
fishy_cat            08:44.01        08:18.70
koro                 09:17.98        08:57.18
pavillon_barcelone   12:26.64        11:52.81

Test environment is:
- Ubuntu 16.04, with all updates installed
- AMD RX 480 GPU
- amdgpu pro driver version 17.10-450821
2017-07-11 12:16:58 +02:00
36ef6ff66b Theme Flatty Light
Color GraphEditor tabs, brighter 3D viewport gradient
2017-07-11 11:17:36 +02:00
d5d7d453a5 Fix memory leak caused by node clipboard
The issue was caused by combination of following factors:

- Clipboard cleanup function will pass node tree as NULL to node free
  function.

  This is fine on it's own, we don't have tree in clipboard.

- Node free function will call node storage cleanup only when there is
  a non-NULL node tree.

  This is somewhat weird, because storage cleanup does not take node
  tree as argument.

So the solution here: move node storage cleanup outside of check that
node tree is not NULL.
2017-07-11 11:06:36 +02:00
1dfc4be6ab Opensubdiv: Fix compilation error with older Opensubdiv versions 2017-07-11 11:05:39 +02:00
d415a1cbd6 Fix T49034: multi-drag crashes when UI forces exit 2017-07-11 19:10:40 +10:00
218c254e72 Resolve T51745: Mesh extrude keep-orig needs edges
Document to avoid confusion when called from Python.
2017-07-11 14:48:55 +10:00
a247b367b0 Fix T51761: wpaint select depth limit fails
Limit select fails with circle and border select.

Regression in 2.76
2017-07-11 14:05:59 +10:00
8677c76f13 Fix (unreported) broken uvsculpt in Scene's toolsettings' copying.
This was serious bug actually, probably a crasher in case you free
original or copy after duplication...
2017-07-10 21:22:59 +02:00
665288ccd7 Fix (unreported) Scene's copying toolsettings' clone and canvas, and particles' scene and object pointers.
imapaint's clone and canvas are refcounting Image usages.

And particle's editsettings' object and scene seem to be pure runtime
data (they are reset to NULL in readcode), so resetting them to NULL
here as well.
2017-07-10 21:12:42 +02:00
46b9124241 Fix strict compiler warning 2017-07-10 17:43:27 +02:00
806bc4b433 Fix (unreported) Scene copying doing very stupid things with World and LineStyle usercounts.
Really, really, really need to get rid of this usercount handling
everywhere, hopefully incomming ID copying rewrite will help sanitize
that mess. But fix was needed for 2.79 release!
2017-07-10 15:11:58 +02:00
9a4cfc3e77 Partial fix of T51989: Don't set image user offset for movie files
While this is handy for image sequences, it's totally meaningless for movie files.
2017-07-10 14:23:29 +02:00
440c91b1f6 Fix T52011: Border render is incorrect with multiple scenes
The code was somewhat weird: it was first copying border/crop settings from
the "source" scene, then was checking border settings of the current scene
and only then was copying border from "source" scene.

Now we first copy border/crop flags, then copy border from source and then
check whether border is a full-frame.
2017-07-10 12:28:18 +02:00
5b1c1d4d23 Error in last commit 2017-07-10 17:44:49 +10:00
910ab14145 Fix T51998: Anim player uses 100% CPU
The loop running with no events didn't sleep.
Now wait for events when paused.
2017-07-10 17:37:00 +10:00
2c10e8a3cf Fix T51052: CacheFile Open crashes from Python
Note that bpy.data access makes more sense here,
but better not crash when called from Python.
2017-07-10 17:06:25 +10:00
c055536d23 Curve: add assert for invalid next/prev use 2017-07-10 16:29:57 +10:00
004a143760 Fix T51665: No orientation for nurbs, polygons 2017-07-10 16:29:54 +10:00
2acd05b24c Fix T52007: Cancel bezier curve transform fails
Auto & aligned handles wouldn't restore to their correct locations.

Note that a more direct fix for the bug is possible
(storing the handle locations to restore on cancel).

But that still gives some odd behavior, see code-comments for details.
2017-07-10 13:38:28 +10:00
00f3ab2fb2 Fix T51898: missing sequence strip color space validation on load. 2017-07-10 01:10:26 +02:00
ba256b32ee Fix T52001: material draw mode principled BSDF artifacts at some angles.
The default anisotropic tangent computation could fail in some cases,
leading to NaNs and artifacts. Use a simpler formulation that doesn't
suffer from this.
2017-07-08 23:42:20 +02:00
0584c5ba8e Fix T51959: Windows + Intel GPU offset between UI drawing and mouse.
Unfortunately this means disabling the code that ensures the title
bar is properly scaled with DPI, however better to have that as a
cosmetic issue than Blender being unusable with a lot of Intel GPUs.
2017-07-08 22:11:07 +02:00
3361f2107b Fix T51967: OSL crash after rendering finished (mainly on Windows). 2017-07-08 02:46:06 +02:00
dbaaff2e09 Fix build after previous commit. 2017-07-08 02:07:39 +02:00
7dc3ad2287 Fix T51889: new file or load factory settings results in broken UI.
Fix some cases that still assumed there to be a global DPI, instead of a per
window DPI that needs to be set before reading U.dpi.
2017-07-08 00:54:05 +02:00
1e21778261 Fix T51977: New depsgraph removes the grass in victor scene
For now just make new depsgraph do similar updates to the old one.

See bug report for more detailed information about what was going on.
2017-07-07 16:38:56 +02:00
4d4ebc8300 Fix T51991: Disabled for viewport particle system becomes visible after BI render
Move check for psys render data before it is actually requested for creation.
2017-07-07 16:13:50 +02:00
00d476976e Fix T50973: Directional blur node doesn't clamp value if using driver
The issue was caused by combination of following factors:

- Blender Internal viewport render can not distinguish between which parts of
  main database changed, so it does full database re-sync when anything is
  tagged for an update.

  This way, if any NodeTree (including compositor) is changed, Blender Internal
  viewport is tagged for full render database update.

- With old dependency graph, scene-level drivers are evaluated on every
  iteration of scene_update_tagged, even if nothing is tagged for an update.

  This causes compositor drivers be evaluated quite often.

- Driver evaluation checks whether value was changed, and if so it tags
  corresponding ID type as updated (this is what was telling viewport to do
  render database update).

  This check was quite stupid: current property value was checked against the
  one coming from driver expression. This means, if driver value is outside
  of the hard limit range of the property, the property will always be
  considered updated.

The fix is to compare current property value against clamped value from the
driver.
2017-07-07 12:08:14 +02:00
fee7f688c3 Cycles: Fix ambiguity in call of min() function 2017-07-07 10:40:19 +02:00
d25ccf83ad Fix T51978: Setup Tracking Scene after Motion Tracking fails the first time 2017-07-07 09:36:25 +02:00
aaec4ed07d Fix T51980: Motion Tracking - png image files appear in the Blender program directory when using refine
Residue of debug code remained form some older bug fix.
2017-07-07 09:27:24 +02:00
28a9d7ec6e Add option to OpenImage operator not to detect sequences.
Otherwise, there would be no way to load a bunch of pictures with
'sequence pattern' in name in a single operation.

Related to T51778.
2017-07-06 14:52:55 +02:00
a7a5c20fbc Fix T51955: Changing Auto-IK length crashes Blender (with new-depsgraph)
New dependency graph is tacking root bone into account when building the graph.
This is required in order to get proper dependencies between bones. so we can
reliably use bones as targets from the same rig (and even indirect relations
via external objects). This forces us to tag relations for update when we change
root IK chain bone.

Since relations rebuild is not fully trivial operation, we only do it for
the new dependency graph. In the future it'll be nice to avoid whole graph
rebuild for such cases, but that's mentioned as a TODO.
2017-07-06 12:15:30 +02:00
bdd814d87d Fix T51015: Pack all into blend automatically leaves checkbox enabled.
Makes absolutely no sense to forcefully enable that automatic packing option here,
user can do this himself if they likes, from the very same menu...
2017-07-06 11:54:56 +02:00
9c3f1ad003 Cycles: Add artificial memory limit debug option for OpenCL 2017-07-06 05:25:46 -04:00
95b345b2fe Revert "Cycles: use std::min and max for extra overloads"
We already have this in util_algorithm.h

This reverts commit cff172c762.
2017-07-06 04:21:29 -04:00
f9963f29e8 Cycles: Dont allow global size to fall to zero 2017-07-05 20:19:15 -04:00
222b96e5c7 Cycles: Detect out of memory before buffer allocation in OpenCL devices 2017-07-05 20:19:12 -04:00
cff172c762 Cycles: use std::min and max for extra overloads 2017-07-05 19:43:34 -04:00
aea4456101 Better fix for sequencer crash when text strip doesn't have effect data.
This situation happens when a file with a text effect sequencer strip is
loaded in Blender < 2.76 and saved. This destroys the effect data, causing
a crash in Blender ≥ 2.76.

d2f748a222 prevented the crash when opening such a file, but accessing
the strip still caused a crash. This commit fixes that by actually
initialising the invalid strip. Of course this still causes data loss, but
that already happened by opening & overwriting the file in Blender < 2.76.
2017-07-05 22:18:41 +02:00
31f8ca5034 Cycles: Fix compilation error after recent logging changes
This file uses std::ostream for helper << operators, so need to make sure
corresponding header is included.
2017-07-05 20:40:55 +02:00
d2f748a222 Sequencer: Prevent crash when text strip doesn't have effect data. 2017-07-05 20:22:28 +02:00
5e9ad8065a Code comments regarding last commit (forgotten to add before)
Using an arbitrary face as the source of the UV data is mostly fine, as
vertices on seams will generally map to different parts of the texture
that have the same color.

This is regarding fed853ea78
2017-07-05 16:19:41 +02:00
fed853ea78 Fix T51296: UVs not working for hair emitted from vertices 2017-07-05 15:48:54 +02:00
e3bddcb215 Compositor: Fix compilation error and crash when using defocus search
Was just wondering what the option is doing. Not sure yet, but let's fix
couple of issues here.
2017-07-05 15:37:33 +02:00
d37dd97e45 Cycles: Pass string by const reference rather than by value
Some of the functions might have been inlined, but others i don't see
how that was possible (don't think virtual functions can be inlined here).

In any case, better be explicitly optimal in the code.
2017-07-05 12:27:41 +02:00
58c456b12d Cycles: Fix compilation error when building without Glog and no C++11 2017-07-05 12:01:12 +02:00
4d124418b7 Fix T51834: Active Object and Groups color difference imperceptible
16 was not enough here, -32 seems to give OK results.
2017-07-04 16:01:16 +02:00
f86b43e130 Fix T51965: Custom Bone Shape Wireframe setting affects wireframe thickness.
Clearing of custom bones outline's line thickness was not done at proper
point, wireframe drawing never changes line thickness, only solid draw
with outline does...
2017-07-04 13:11:33 +02:00
d1dfd5fa26 Fix T51703: Rigid body with delta transform jumps when transforming
When doing any transformation on a rigid body object that has delta
transforms, the object would be offset by the amount of the delta
transform.
2017-07-04 12:27:21 +02:00
b87d10d4fe Better fix for rigid body not resimulating
Last fix only accounted for direct changes to the RB settings, but
failed for, say, object transformations. This fix accounts for any
change that might invalidate the RB cache.
2017-07-04 10:57:57 +02:00
3edc8c1f9b Fix rigid body not resimulating after cache invalidation
Fix 9cd6b03187 introduced a bug that
prevented simulation after a cache invalidation (for instance when
changing a setting after simulating). This fixes that.
2017-07-04 09:22:42 +02:00
15fd758bd6 Fix T51950: Abnormally long Cycles OpenCL GPU render times with certain panoramic camera settings
The problem here was that when a "invalid" path is generated by the panoramic camera, it was tagged
as RAY_TO_REGENERATE with the intention of generating a new path in kernel_buffer_update.

However, since that state was not handled in kernel_queue_enqueue, kernel_buffer_update did not
process the path which resulted in an infinite loop.
2017-07-03 18:26:19 +02:00
6782a6076c Cycles: Add missing split kernel to CPUDevice 2017-07-03 18:26:18 +02:00
56422ff6c3 Fix T51523: Lattice modifier affecting particles even when disabled
Particles were ignoring the lattice modifier visibility, and
"influence" property.
2017-07-03 18:00:13 +02:00
1fb3075803 Fixed build error on Windows / VS2015 2017-07-03 16:09:19 +02:00
0900914d96 Alembic: fix T51820 for sequence files not loading properly. 2017-07-03 16:08:41 +02:00
7b12957267 Alembic: avoid crashing when doing certain file operations.
Things like missing directories are now properly checked for, rather than
crashing Blender.

This also adds support for relative paths when opening an ABC file.
2017-07-03 15:28:19 +02:00
95a97f79cc Alembic: renamed offset → sequence_offset 2017-07-03 14:21:17 +02:00
44397a7a0a Fix T51883: Wrong matrix computation in "Make Duplicates Real" 2017-07-03 12:51:10 +02:00
d48a9528ca Fix missing return error introduced by last commit
End of non-void function was being reached since
f5535fcb83
2017-07-03 12:12:27 +02:00
f5535fcb83 Fi T51023: MixRGB constant folding not effective with clamp option. 2017-07-03 05:25:27 +02:00
cda24d0853 Fix T51855: Cycles emssive objects with NaN transform break lighting. 2017-07-03 05:04:43 +02:00
46c7d45f77 Fix T51889: broken UI after File > New without a userpref.blend.
BLO_update_defaults_userpref_blend() was being run when no user preferences
were loaded from memory.
2017-07-03 02:24:40 +02:00
0c122d64d2 Fix T51734: batch-generate previews crashes on some materials. 2017-07-02 23:40:53 +02:00
Lucas Veber
405121d613 Fix T51759: fluid simulation particles not remoevd when colliding with outflow objects.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2719
2017-07-02 22:42:08 +02:00
3232d8ec8f Fix T51951: cell noise texture precision issue at unit vertex coordinates.
Solution is to bias the coordinates a little, same as Cycles checker texture.
2017-07-02 22:00:10 +02:00
e3e5ecfaa8 Fix T51746: normal map tangents not working correctly when there are no UV maps.
Patch by Alexander, with some refactoring by Brecht.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2709
2017-07-02 21:28:10 +02:00
eb1532a860 Fix T51772: double undo entry for color picker editing. 2017-07-02 21:27:41 +02:00
29c8c50442 Fix T51956: color noise with principled sss, radius 0 and branched path. 2017-07-02 19:21:08 +02:00
eb420e6b7f Fix T51957: principled BSDF mismatches in GLSL viewport. 2017-07-02 18:37:50 +02:00
52b9516e03 Fix principled BSDF incorrectly missing subsurface component with base color black. 2017-07-02 18:22:24 +02:00
79f27fc8d3 Fix T51947: failure setting sequence.use_proxy/crop/translation to False 2017-07-01 23:20:06 +02:00
5b2b5a4258 Fix ED_OT_undo_redo operator 2017-07-01 10:51:26 +03:00
9cd6b03187 Fix T50230: Rigid Body simulation shouldn't step when time is beyond cached area
This makes the last time (`ltime`) stored in the rigid body world (`rbw`)
only be updated once a simulation step actually occurs, this prevents
another simulation step from being solved unless the current time is
exactly one frame after the last cached frame. Thus this prevents the
formation of gaps in the cache, such as seen in T50230.

Reviewers: mont29, sergey, angavrilov

Tags: #physics

Maniphest Tasks: T50230

Differential Revision: https://developer.blender.org/D2458
2017-06-30 15:58:57 +02:00
76eefa5c0d Better fix for isfinite problem - works in older gcc's too.
Previous fix relying on __cplusplus value didn't fix for older
gcc's on linux, but this fix does.
2017-06-30 09:04:01 -04:00
1938a81e42 Fix compile error after recent 9c2bbfb6 commit.
Older C++ compilers use finite instead of isfinite.
2017-06-30 07:47:37 -04:00
c8fa716c06 Cycles: Use float constants instead of double 2017-06-29 23:07:18 -04:00
56dcfcce05 Cycles: Disable baking in mega kernel when not in use to improve build times 2017-06-29 23:07:18 -04:00
9c2bbfb6ce Fix T50887: Holes in fluid mesh on Windows
D2556 by @chrisr
2017-06-30 11:48:12 +10:00
9210a4faf3 Fix unpredictable trackball rotation
D2729 by @IgorNull

Currently, trackball rotation sequentially applies rotation across x axis and y axis,
which produces a strange/unusable result on diagonal pointer motion.

This change fixes the problem by using a single axis which is orthogonal
and proportional to mouse delta - matching view-port trackball.
2017-06-30 11:10:05 +10:00
eb88f0c321 Workaround T51934: Array's > SHRT_MAX aren't supported 2017-06-30 10:10:22 +10:00
0210c6b9de Fix T51890: Turning off viewport display for array modifier is blocking dupliface in final render
DupliVert/Face were not using render DM at render time.
2017-06-29 15:44:00 +02:00
a57a7975a1 Fix T51926: Selecting pose icon under expanded group in outliner causes crash.
Cannot switch uninstantiated armature to Pose mode...
2017-06-29 10:09:58 +02:00
1f3fd8e60a Fix T51909: Cycles: Uninitialized closure normals for the Hair BSDF
As the title says, the normal wasn't set for the Hair BSDF because it wasn't
needed before. However, the denoiser uses it to store the feature passes, so
it needs to be set now.
2017-06-28 21:32:02 +02:00
b5696f2799 Fix node UI not using translation context correctly.
Now that some node types may have custom context, we need to handle that
in the (convoluted :| ) UI code of nodes as well.

Reported in T43295 by Gabriel Gazzán (@gab3d), thanks.
2017-06-28 20:50:21 +02:00
16eca8f47e Fix own really stupid mistake/typo in previous commit... 2017-06-28 13:21:04 +02:00
2c0ee61f6d Fix T51900: Crash after pressing "F" multiple times.
`BMO_iter_as_array()` may fill less items than requested in given array,
so we have to update number of items to work on from its returned value,
otherwise code might try to use uninitialized memory.
2017-06-28 10:53:52 +02:00
Dalai Felinto
f11bcbed9d Fix T51913: Context tab for textures issue
The original code was doing a sanity check to see if existing index was
out of range. However the comparison was wrong.

So if the previous ct->user (active index of texture node) was larger
than then number of available texture nodes + 1 in the other material,
we would never re-set the index to 0.

Bug introduced on c31f74de6b.

There was an early attempt of fixing this (2b2ac5d3cc) but it was just working
by pure, luck. And failing in cases like the one from this bug report.
2017-06-27 16:56:43 +02:00
bb0e8f1c55 Cleanup: remove unused function 2017-06-27 18:05:44 +10:00
b796ce0f26 CMake: Only set CMAKE_BUILD_TYPE_INIT when not set
Convenience makefile now uses CMAKE_BUILD_TYPE_INIT,
this means you can change the build type of an existing build
and it won't be overwritten when running `make`.

Useful if you want to add debug info to a release build for profiling.
2017-06-27 09:50:35 +10:00
5a1bdf2c3a Add warning that 'purge all' action in Outliner does save to current .blend file.
This is a very important, potentially deadly side-effect of this
operator. If something goes wrong, it can save a broken .blend file.

Ideally we could get rid of that operation anyway, once ID management if
fully renewed, but for now would rather keep it around.

Related to T51902.
2017-06-26 19:00:45 +02:00
d4ca2ec9d5 Fix T51902: Severe problem with relocating linked libraries when using proxies.
Fix is a bit ugly, but cannot think of another solution for now, at
least this **should** not break anything else.

And now I go find myself a very remote, high and lonely mountain, climb
to its top, roar "I hate proxies!" a few times, and relax hearing the echos...
2017-06-26 18:55:30 +02:00
3c2f0466d8 Enable optional jack in install_deps.sh
Based on D2578, now you can install JACK audio server and use it in
Blender build without having to specify the `--with-all` option (that
one still enables also JACK of course).

Reviewers: mont29

Maniphest Tasks: T51033

Differential Revision: https://developer.blender.org/D2578
2017-06-26 16:12:32 +02:00
0172ed8fe5 Building w/o Python works again 2017-06-26 13:26:44 +10:00
b0ee9aaa5d Fix freestyle lineset panels being animatable 2017-06-25 20:03:19 -04:00
957a77c0ba UI: Fix Capitalization Inconsistency 2017-06-25 19:55:05 -04:00
c822b1612f Docs: correct doc-strings 2017-06-26 07:36:29 +10:00
1c053c6a12 Collada: Exporter now only exports either 'Materials' or 'UV Textures as Materials'. This makes the user interface more streight 2017-06-25 22:06:42 +02:00
ad58617bd2 fix: overlooked the RET_ZERO appendix 2017-06-25 17:04:47 +02:00
c9b95c28f6 fix: T51622 The exporter now exports meshes as <Triangles> when all contained polygons are tris 2017-06-25 14:51:51 +02:00
fcb8761966 fix: Collada fprintf needs std::string be converted to char * 2017-06-25 13:18:21 +02:00
1340c7bcdc fix: collada: removed unnecessary extra qualification 2017-06-25 13:10:03 +02:00
d17786b107 fix: adjusted collada declaration after changes in collada module.
@campbell Barton: Why is this declaration needed at all in stubs.c?
Further up the file collada.h is imported and that already decalres
the function and results in a duplicate declaration.
2017-06-25 10:50:19 +02:00
bdacb60a92 Collada: Fix: Geometry exporter did not create all polylist when meshes are only partially textured 2017-06-24 23:33:34 +02:00
ddabe465b5 collada: export UV Textures as materials. Note: the reimport of the exported collada files will have materials assigned instead of UV Face Textures! This is expected behavior 2017-06-24 22:16:47 +02:00
a2a301bdb9 collada: change image export: export either UV Textures or Materials. This
avoids wrong texture data when multiple objects are exported. Note: This
commit might possiblyt not work fully. The full feature is added with the
next commit)
2017-06-24 22:16:47 +02:00
89060babbc Collada: improved Error handling: Avoid shutdown of Blender when the Collada importer finds Syntax errors in import data 2017-06-24 22:16:47 +02:00
0d2b1da3a6 Collada: added new functions for improved material exporter (not used yet) 2017-06-24 22:16:47 +02:00
ce531ed1a1 Fix T50856: crash when minimizing window on AMD / Windows. 2017-06-24 19:20:56 +02:00
f51438aea0 Fix T51792: crash calling bpy.ops.screen.animation_cancel while scrubbing. 2017-06-24 18:02:30 +02:00
Dalai Felinto
c2d285f0ff Grease Pencil: Fix hardcoded DKEY for continous drawing 2017-06-23 10:46:30 +02:00
bddb4de47c Fix T51845 2017-06-23 11:05:54 +03:00
7abed4e433 Fix T51867: Insert Keyframe I - L / I - R / I - S key combos are broken.
Reorder keyingsets registration order, since it also afects order of I
menu options, better show most used ones first, pure alphabetical order
is not great here... Will likely break some muscle memory though. :|

Based on D2720 by Carlo Andreacchio (@candreacchio), thanks.
2017-06-22 10:29:55 +02:00
Dalai Felinto
be4b5551c7 Fix T51863: CompositorNodeSwitchView have the wrong rna API
Although the original report was about the docs, the real issue was in
the API.

My original commit started from a copy-paste from the Switch
Node. However I don't use custom1 for thew Switch View node.

The docs is slightly incomplete since it would be nice to mention the
views here. Or maybe even expose them via Python. But honestly they are
generated depending on the scene multi-view settings.
2017-06-22 10:25:05 +02:00
1979176088 Cycles: Fix excessive sampling weight of glossy Principled BSDF components
If there was any specularity in the Principled BSDF, it would get a sampling
weight of one regardless of its actual impact.

This commit makes Cycles estimate the contribution of the component and adjust
the weighting accordingly, which greatly improves the noise characteristics of
the Principled BSDF in many cases.

Note that this commit might slightly change the brightness of areas when using
MultiGGX and high roughnesses, but the new brightness is more accurate and
closer to the result of Branched Path Tracing. See T51836 for details.

Differential Revision: https://developer.blender.org/D2677
2017-06-22 00:09:56 +02:00
8cb741a598 Fix T51836: Cycles: Fix incorrect PDF approximations of the MultiGGX closures
The PDF of the MultiGGX sampling is approximated by the singlescattering GGX
term as well as a scaled diffuse term that makes up for the energy in the
multiscattering component that's missed by GGX.

However, there were two problems with the glossy terms: The diffuse term missed
a normalization factor, and the singlescattering term was not properly scaled
down based on the albedo estimate.

The glass term was completely wrong and has been rewritten. It uses the fresnel
factor to weight reflection vs. refraction and uses the glossy MultiGGX model
for reflection.
For refraction, the correct singlescattering term is now used, and a new
albedo approximation is used that was derived by evaluating GGX albedo for
roughnesses from 0 to 1 and IORs from 1 to 3 and fitting numerical
approximations to it. The resulting model has a mean relative error of 9e-5,
but could probably be simplified without losing noticable accuracy in the
final render.

The improved PDFs help with glossy highlights (due to better light sampling vs.
closure sampling MIS) and fix the situation described in T51836 where mixing
MultiGGX with other closures (as it happens in e.g. the Principled
BSDF) causes incorrect darkening.
2017-06-22 00:09:56 +02:00
968093ec2f Fix T51862: principled shader GLSL artifacts in ortho mode. 2017-06-21 21:31:08 +02:00
14ea0c5fcc Fix T51849: change Cycles clearcoat gloss to roughness.
This is compatible with UE4 and more consistent with specular and transmission
roughness, even if it deviates from the original Disney BRDF.
2017-06-21 19:55:20 +02:00
Dalai Felinto
22466a5bdf Fix typo in builtbot config 2017-06-21 14:05:23 +02:00
af35455912 Fix T51856: BKE_mesh_new_from_object() would often generate default 'Mesh' named datablock.
This is annoying especially for exporters who do use mesh name, since it
broke any relation with actual Mesh naming in original Blend file.

Unfortunately, we cannot avoid the extra .xxx digits. ;)
2017-06-21 10:30:38 +02:00
9e08019b74 Fix: Icon alignment for scaled pie buttons with no text 2017-06-20 20:15:04 +03:00
e3b1d562a7 Fix (unreported) missing Image usercount increase when copying UVProject modifier. 2017-06-20 13:46:09 +02:00
243b42af49 Alembic tests: make failures a bit easier to diagnose. 2017-06-19 17:55:51 +02:00
81775e1920 Fix T51762: Unit test script_alembic_import is failing.
Implemented workaround for use with the legacy depsgraph.
2017-06-19 17:50:43 +02:00
7461bb3f52 Fixed bl_load_py_modules / script_load_modules unit test
It tried to assert that
addons/io_blend_utils/blender_bam-unpacked.whl/__init__.py was loaded when
the io_blend_utils module was imported. However, this happens only on
demand, and not directly when importing the add-on.
2017-06-19 15:28:52 +02:00
c9291ab2ac Use for/else instead of setting 'ok' variable.
This is more efficient, and this use case is exactly what the else clause
is for.
2017-06-19 15:28:52 +02:00
9af3119c53 Removed trailing spaces 2017-06-19 15:28:52 +02:00
24486513d5 Fix (unreported) bad copying code of Surface Deform modifier. 2017-06-19 14:57:40 +02:00
5347aa40d5 Fix compiler warnings from own recent rB0d5c7e5e36b9. 2017-06-19 14:43:44 +02:00
1addac8e0c Fix (unreported) bad copying of Ocean modifier.
Was needlessly complicated code, forgot to copy a value (foam_fade), and
was utterly leaking memory!
2017-06-19 14:43:15 +02:00
e917bc5ee0 Fix (unreported) bad copying code in Mesh Deform modifier. 2017-06-19 12:55:11 +02:00
0d5c7e5e36 Fix (unreported) Dynamic Paint modifier not increasing ID usercount in copy function.
*Sigh* One more example of why we should keep ID management handling in
as few places as possible! It's impossible to keep more than a few
places in sync regarding which ID pointer is refcounted etc.
2017-06-19 12:25:41 +02:00
e9aaf5ed21 Fix (unreported) memory leak in Fluid modifier copying.
Also generally simplify/sanitize this copy code.
2017-06-19 12:21:14 +02:00
72c9141a7a Cleanup: doxygen comments
Also remove duplicate & mismatching comments from grease-pencil header.
Keep comments close to implementation to avoid getting out of sync.
2017-06-19 10:04:30 +10:00
3190eaf109 Fix T51774: Children particles hair interpolation not correct with textures or dp.
Children where always getting at least one segment of fixed length...

Now fully hidden ones (zero length) get no segment at all.

Note that even very short ones keep getting one 'unit' length segment - would
rather avoid changing that at this point, given how complex children
particles 'length' can get with all kind of modifiers... Think we can
live with that for now anyway.
2017-06-19 00:03:36 +02:00
f158a206f2 Fix T51840: UI redraw in node editor header missing on pointcache bake
Missing a notifier handler in the node editor
2017-06-18 16:31:59 +02:00
cd8c46627f Fix unreported: Copy-pasting nodes crashes when they have an undefined type 2017-06-18 05:14:26 +02:00
b94a433ca3 Docs: Fix file:line links in generated API docs 2017-06-18 02:38:20 +10:00
1ec987f73c Add Cone: tip soft-min should be zero
Default value should be included in range.
2017-06-18 02:07:22 +10:00
8bf108dd48 Guarded allocator: Fix type in macro definition
The crash did not happen yet because we always had proper vmemh defined in
the parent scope.

Patch by Ivan Ivanov (aka obiwanus), thanks!

Differential Revision: https://developer.blender.org/D2715
2017-06-17 16:13:30 +02:00
ed6d88f06a PyAPI: Fix warning about indent 2017-06-16 12:30:18 -04:00
fc4154f857 Fix T51810: Add minimal example of usage of translation API for non-official addons. 2017-06-16 16:43:46 +02:00
34389999b2 Usual i18n/UI messages fixes.
Please do not add useless tooltips! We have enough messages to translate
already...
2017-06-16 12:50:24 +02:00
794311c92b Cycles: Fix race condition happening in progress utility
This is not enough to mutex-guard modification code of integer values,
since this operation is NOT atomic. This is not even safe for a single
byte data types.

For now guarded the getter functions, similar to other functions in
this module.

Ideally we want to switch modification to an atomic operations, so we
wouldn't need any locks in the getters.
2017-06-16 10:22:35 +02:00
18e1c8d9fa PyAPI: Fix changed ref link 2017-06-15 22:03:22 -04:00
a348023196 PyAPI: Add HTML logo and favicon
Differential Revision: https://developer.blender.org/D2621
2017-06-15 22:01:04 -04:00
127a754615 PyAPI: Remove addon tutorial
This page now lives at https://docs.blender.org/manual/en/dev/advanced/scripting/addon_tutorial.html
2017-06-15 22:01:03 -04:00
6b502731a5 CMake: print absolute CMakeCache.txt
Message didn't show the path of the file to remove
which could be confusing.
2017-06-16 07:38:20 +10:00
1d966ca7a1 Math Lib: add angle_on_axis_v3v3_v3
Use for calculating the angle between 2 directions on an axis.

Also signed version and normalized plane projection,
use when input is normalized.
2017-06-16 01:27:58 +10:00
3d03616772 Cleanup: do not use BKE_libblock_free_ex() unless needed! 2017-06-15 16:20:51 +02:00
880e96dd66 Fix/workaround 'convert object' messing up linked data.
'Convert To...' Object operation has very weird effect of actually
working at obdata level, not object level, which means *all* objects
(even unselected/hidden/in other scenes/...) using same obdata will be
converted to new selected type.

IMHO this is very bad behavior, but... not a bug really, so do not
change this for now.

But at least, do not do that when working on some linked data, else it
leaves Blend file in invalid (incoherent) state until next reload.

So workaround for now is to enforce the 'Keep Original' option when some
linked object/obdata is affected by the operation.

Also fixed somewhat broken usercount handling in Curve->Mesh part.
2017-06-15 15:47:16 +02:00
9e0a253ea1 Cleanup: make Group Unlink outliner action use `BKE_libblock_delete() too.
Same as in rB2bd51474a44...
2017-06-15 13:06:31 +02:00
ddb8330571 Cleanup: remove useless call to BKE_screen_free() in screen deletion.
`BKE_libblock_free()` will call it itself.
2017-06-15 13:00:11 +02:00
ee5ed2ae26 Fix dangerous code when deleting Scene.
That one was probably not an actual issue, except maybe in some corner
cases (like deleting a linked scene also used by some other linked scene).

Again, better not try to do smart & complex freeing logic outside of
BKE_library area, let's keep spaghetti nitghmare in a single place!
2017-06-15 12:57:08 +02:00
2bd51474a4 Cleanup: make Group Unlink operator use BKE_libblock_delete(), since that's what it is doing.
Previous code (same as what `BKE_libblock_free_us()` is doing when
usercount reach 0) was probably OK in that specific case, but still not
good idea, and potentially risky.
2017-06-15 12:49:40 +02:00
7853ebc204 Fix collada importer doing own handling of usercount/freeing.
Better use generic `BKE_libblock_free_us()`.
2017-06-15 12:44:15 +02:00
25c0666b90 Fix potentially dnagerous code in doversionning of brush.
Even though in that specific it was probably safe-ish, there is no
guarantee at this point Brush we want to remove are not used somewhere,
better take the slightly slower, much safer `BKE_libblock_delete()` path here.
2017-06-15 12:38:55 +02:00
7a80c34f52 Fix serious bug in 'curve-to-mesh' conversion code.
Eeeeeek!^2 Calling unconditionnaly ID freeing `BKE_libblock_free()` on a
datablock (ob->data, i.e. Curve) that may be used elsewhere...
Veryveryvery bad!
2017-06-15 12:34:12 +02:00
b488988ab1 Fix potential memory leak in Sequencer sound strip creation code. 2017-06-15 12:32:27 +02:00
038b73bab1 Fix compilation error with strict cflags after recent const changes 2017-06-15 10:14:56 +02:00
692ce81d93 Further improvements of text editor for POV-Ray
*tryed "#" as preprocessor used in POV-Ray for language keywords best behaviour was to have it as a punctuation symbol
*moved "finish" to its proper category
*changed order of some POV-Ray ini files keywords to have them work better
*added a few keywords from latest pov version
*Fixed C-style closing of multiline comments (*/)

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D2707
2017-06-15 09:34:38 +02:00
a96030b3da PyAPI: Add toctree link on parent page of submodule 2017-06-15 01:41:28 -04:00
44fd84bcc3 PyAPI: Proper Solution to bpy.app 2017-06-15 00:54:41 -04:00
df7c609fda PYAPI: Fix mathutils doc structure 2017-06-14 16:47:43 -04:00
eeb9e5316a Make whole ID copying code use const source pointer.
Noisy change, but safe, and better do it sooner than later if we are to
rework copying code. Also, previous commit shows this *is* useful to
catch some mistakes.
2017-06-14 22:38:11 +02:00
31437b0d4d Fix three obvious mistakes in brush/mask/cachefile ID copying.
They were modifying some source ID prop, instead of copied version of
it... Found while making all source of ID copying const. ;)
2017-06-14 22:38:11 +02:00
5e485e34e8 PYAPI: fix documention structure of bpy.app 2017-06-14 16:19:05 -04:00
9a0673a5d4 Fix missing toctree for bmesh submodules 2017-06-14 15:22:26 -04:00
e1983adef4 PYAPI: Fix freestyle submodules without tocrees
Fixes 6 compile warnings
Follow up on rBf87ca5f1c314f67353b6111d3647aef159dc07c6
2017-06-14 14:42:44 -04:00
481cf2982b Depsgraph: Cleanup, indentation 2017-06-14 12:01:52 +02:00
20e5052a72 Remove unused bmain argument from BKE_libblock_free_data 2017-06-14 11:16:34 +02:00
97f9f90986 Cleanup: Indentation got broken in previous commit 2017-06-14 10:54:30 +02:00
1e6ad49dca Add utility function to free memory used by a datablock
This function is similar to BKE_libblock_free but does no DEG
tagging or any extra things, just operates on memory.
2017-06-14 10:45:20 +02:00
bbd0d43417 Depsgraph: Remove unused ID node removal 2017-06-14 10:10:52 +02:00
64aa0cff89 Cycles: Fix typo in comment 2017-06-14 09:54:07 +02:00
2462320210 Fix buffer read error w/ 2 pass select queries
Also don't do second pass when the first has no hits.
2017-06-14 17:10:24 +10:00
f02e04f133 Add utility function to get size of given ID type
Optionally it'll also give name used for memory allocation.
2017-06-13 17:42:31 +02:00
6becdf5d00 Depsgraph: Pass function bindings by const reference
Avoids using copy-constructor invoked every time we pass function
to the builder functions.

Should lower number of CPU ticks spent during DEG construction.
2017-06-13 15:10:29 +02:00
90bc882068 Depsgraph: Remove root node concept
Was rather weird and only used for time source. It is simpler to make depsgraph
to keep track of time source directly.

No need to introduce extra entitites without actual need.
2017-06-13 14:13:55 +02:00
Hristo Gueorguiev
6cfa3ecd4d Fix T51791: Point Density doesn't work on GPU 2017-06-13 13:50:27 +02:00
40c04dd649 Cycles: Cleanup, indentation 2017-06-13 10:28:38 +02:00
0aa5431998 Cycles: Fix compilation error of OpenCL mega kernel
Was some mismatch in address space. Seems to be caused by recent additions.

Additionally, moved decoupled ray marching functions under ifdef, so they
don't try to use malloc() functions.

Thanks Mai for testing the patch!
2017-06-13 10:26:45 +02:00
85fafccb4c Depsgraph: Remove residue from partial updates support 2017-06-12 16:55:04 +02:00
d8957e4cce Depsgraph: Use depsgraph from handle rather than from scene
This way the code is more decoupled from the way where depsgraph is stored.
2017-06-12 14:45:43 +02:00
1ba6ef25b6 Depsgraph: Add utility function to get depsgraph from node handle
The idea is to use this function for modifiers' updateDepsgraph functions
instead of doing direct scene->depsgraph access.
2017-06-12 14:41:46 +02:00
987ec1d030 Depsgraph: Remove outdated comment 2017-06-12 14:25:05 +02:00
00c4f49a6d Cleanup: indentation, long lines 2017-06-12 13:38:21 +10:00
5ccaef6d67 Fix T51737: Material properties error
D2706 by @knox
2017-06-12 12:55:47 +10:00
1bd6ed7128 Correct gtest EXPECT use 2017-06-12 10:25:18 +10:00
Hristo Gueorguiev
04530c9383 Cycles: adjust supported driver version for AMD GPUs
On Windows 17.Q1 and 17.Q2 return driver version 2236.10.
2017-06-11 23:17:46 +02:00
Julian Eisel
09eb11363e Use two decimal places for UI scale User Preference option 2017-06-11 22:59:54 +02:00
eb1cde5a81 GTest: initial kdopbvh test
Currently only find-nearest, ray-casting needs to be added.
2017-06-11 19:10:33 +10:00
dfd8b38e0c BLI_kdopbvh: add ifdef's for debugging info
Allow to quickly enable print & tree verify.
2017-06-11 18:56:56 +10:00
558bea2252 Cycles Denoising: Add more failsafes for invalid pixels
Now, when there is no usable neighboring pixel for denoising, the noisy value
is preserved instead of producing a NaN.
Also, negative results are clamped to zero.

Note that there are just workarounds that don't fix the underlying problems,
but these issues are very rare and I'm not sure if it's even possible to fix
the underlying problems without introducing a significant slowdown or quality
decrease in other situations.
Because of that and since 2.79 is happening very soon, I just went for these
workarounds for now.
2017-06-11 01:51:39 +02:00
Julian Eisel
0dd6e5bfee UI: Replace placeholder icons in object-add menu
Replaces the placeholder 'emtpy' icons of "Force Field" and "Group
Instance" entries in object-add menu with proper new ones.

Icons by @zlsa, thanks a lot!

Maniphest task T51291.
2017-06-10 16:47:21 +02:00
e097fc4aa6 Cycles: Selectively include denoising in kernel 2017-06-10 04:45:13 -04:00
eb293f59f2 Cycles: Pass all buffers to each kernel call for OpenCL
Technically not passing all buffers used by a kernel is undefined
behavior. We haven't had any issues with this so far on AMD or
Nvidia, but it's known to be a problem with Intel and we received
a report from AMD that this is a problem on newer hardware, so we
need to make this change at some point.

Unfortunately there a cost to being correct, about 5% for the
benchmark scenes. For low sample counts it's even worse, I've
seen up to 50% slowdown. For the latter case I think adjusting
tile updating logic can help, but not sure what that would look
like yet (it would be just a few lines change however).
2017-06-10 04:08:49 -04:00
6238214159 Cycles: Faster split branched path tracing by sharing samples with inactive threads
Unlike regular path tracing, branched path tracing is usually used with lower
sample counts, at least for primary rays. This means that are less samples for
the GPU to work on in parallel and rendering is slower. As there is less work
overall there is also more inactive threads during rendering with BPT. This
patch makes use of those inactive rays to render branched samples in parallel
with other samples.

Each thread that is preparing for a branched sample will attempt to find an
inactive thread and if one is found the state for the sample is copied to that
thread. Potentially, if there are enough inactive threads, 100s of branched
samples could be generated from the same originating thread and ran in
parallel giving large speed ups.

Gives 70% faster render for pavillion midday scene. 20-60% faster on BMW
with car paint replaced with SSS/volumes.
2017-06-10 04:08:49 -04:00
32299d32e7 Cycles: Modify path_radiance_accum_sample to use atomics for split kernel
Samples ran in parallel need a safe way to accumulate their results
with the results of other threads.
2017-06-10 04:08:02 -04:00
6995b50e41 Cycles: Add function to dequeue a ray 2017-06-10 03:51:18 -04:00
4360e8ce13 Cycles: Add atomic decrement functions to util_atomic.h 2017-06-10 03:51:18 -04:00
ea846a4dfc Cycles: Add kernel to enqueue inactive rays
The queue will be used to make reuse of inactive threads to keep
the GPU more busy.
2017-06-10 03:51:18 -04:00
Hristo Gueorguiev
1f0998baa7 Cycles: Blacklist unsupported OpenCL devices
Due to various driver issues with AMD GCN 1 cards we can no longer support
these GPUs. This patch makes them unavailable to select for Cycles rendering.

GCN cards 2 and higher are still supported. Please use the most recent
drivers available to ensure proper functionality.

See here for a list to check which GPUs are supported:
https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units
2017-06-10 03:51:18 -04:00
c73206acc5 Cycles: Fix denoising passes being written when they're not actually generated 2017-06-09 23:02:56 +02:00
0a898e2405 Cleanup Cycles Denoising platform-specific defines 2017-06-09 22:38:16 +02:00
7dc51f87ed Cycles Denoising: Speedup reconstruction by skipping near-zero weights 2017-06-09 22:38:16 +02:00
f0bbb67e8a UI: Fix some small ui inconsistencies
- Use "..." to indicate non immediate action.
- First letter of words in labels should be capitalized.
2017-06-09 15:25:17 -04:00
e0bc5b533c Cleanup: get rid of some now unused animdata ID management custom functions.
That's the kind of commit that are nice to do - getting rid of
half-working custom pieces of code, now that we have generic tools
to do same thing. ;)
2017-06-09 16:30:59 +02:00
f097e73a2a Fix crash when making local object+obdata with linked armature.
Reported by Andy Goralczyk (@eyecandy) over IRC, thanks!

Simply nuke all that poor broken custom one-by-one handling in
object_relations.c code, and use highly complex but powerful and
well-tested BKE_library_make_local() in all cases of MakeLocal!

ID management, especially related to linking, is very hairy matters,
better to have as few as possible core functions managing all the dirty
details. ;)
2017-06-09 16:30:59 +02:00
d7f33668d6 Math Lib: Add mat3_from_axis_conversion_single
Single axis version of mat3_from_axis_conversion,
when the second axis isn't important (orienting an arrow for eg).
2017-06-09 19:31:27 +10:00
d583af0026 Fix T51756: Fix crash when transforming vertices in edit mode
The issue was caused by under-allocation of UV islands calculation.
2017-06-09 10:46:00 +02:00
ab4b7b5368 Fix T51648: Inconsistent edge collapse point depending on orientation
Edge collapse was using bounding box center as the point to collapse to.
When collapsing multiple adjacent edges together, this caused
inconsistencies in placement of the collapsed point, depending on the
orientation of the edges in relation to the space axis.

This makes edge collapse use the mean point instead.
2017-06-09 10:03:46 +02:00
a46a168705 install_depsh: update OpenCollada to 1.6.51, and OIIO to 1.7.15 2017-06-09 09:44:40 +02:00
58de2164c9 Fix for fix for bplayer (c) :/ 2017-06-09 09:23:54 +02:00
03a5da0a63 Fix bplayer building (c) 2017-06-09 09:13:54 +02:00
705c43be0b Cycles Denoising: Merge outlier heuristic and confidence interval test
The previous outlier heuristic only checked whether the pixel is more than
twice as bright compared to the 75% quantile of the 5x5 neighborhood.
While this detected fireflies robustly, it also incorrectly marked a lot of
legitimate small highlights as outliers and filtered them away.

This commit adds an additional condition for marking a pixel as a firefly:
In addition to being above the reference brightness, the lower end of the
3-sigma confidence interval has to be below it.
Since the lower end approximates how low the true value of the pixel might be,
this test separates pixels that are supposed to be very bright from pixels that
are very bright due to random fireflies.

Also, since there is now a reliable outlier filter as a preprocessing step,
the additional confidence interval test in the reconstruction kernel is no
longer needed.
2017-06-09 03:46:11 +02:00
8a757bf34a RNA: remove static strings from registration
* Static strings aren't needed anymore, use stack memory.
* Fix obscure leak on failed macro registration.
* Use prefix for wrappers exported from bpy module.
2017-06-09 07:20:25 +10:00
46c073e4ac Cleanup: cmake indentation, missing include 2017-06-09 06:45:21 +10:00
c71e160c02 Fix T51733: 3d print toolbox checks report false positives.
Colinear vertices in a same face would not be handled correctly.
2017-06-08 14:05:36 +02:00
6a546fc73e Cycles: Don't leave multiple spaces in the device name 2017-06-08 12:15:24 +02:00
45d3e22204 Cycles: Display optional board name in system info 2017-06-08 12:10:15 +02:00
78c0f09d4f Cycles: Cleanup, indentation 2017-06-08 12:03:08 +02:00
ff6b249046 Simplify Array modifier 'relative offset' handling.
Was looping three times over the source mesh's vertices to get min/max
along all three axes... Nothing critical, but still!
2017-06-08 09:17:08 +02:00
d25ab3fcc4 Fix: GP Clone brush was not correcting color references for pasted strokes either 2017-06-08 03:23:31 +12:00
2bd49785f9 Fix: Pasting GP strokes files between files (or when the original colors were deleted) would crash
The problem was that the strokes in the copy-paste buffer could be keeping
dangling pointers to colors that were already freed. Therefore, this commit
makes it so that when copying the strokes, we now make copies of the colors
and put them in a hashtable beside the stroke buffer. This is convenient,
as it saves us having to look up what colours need to be copied over each
time when pasting.
2017-06-08 03:23:30 +12:00
7667040dd0 GP Copy/Paste Fix: Paste button doesn't update after copying strokes using Ctrl-C 2017-06-08 03:23:29 +12:00
89d4164f54 GPencil Copy/Paste Fix: Copying/Pasting strokes between datablocks would crash
The problem was that newly pasted strokes were still using colours from
the original datablock. As a result, you'd either get an immediate crash,
or if you managed to save the file before it crashed, each stroke would get
reloaded with a dummy colour.

This commit fixes makes it possible to copy/paste strokes between datablocks
again. However, there are still problems when trying to paste across file
boundaries (i.e. copy strokes in one file, paste in another), which the next
commit will address.
2017-06-08 03:23:29 +12:00
ed84388e7d Bevel Op (internal and API) now returns new edges and verts as well as
faces.

This was requested by script writers. Especially needed if beveling
wire edges with vertex_only.
Should be backward compatible as just adds two new keys to returned
dict in python ('edges' and 'verts').
2017-06-07 08:53:10 -04:00
a3bb309275 Depsgraph: Remove modifiers operation code
Was internally a no-op operation, which only caused extra work
to be done during depsgrpah traversal and evaluation, without
making any measurable improvement.
2017-06-07 14:08:11 +02:00
b31e84a4b3 Depsgraph: Remove unused operation codes 2017-06-07 12:53:38 +02:00
8be55193c9 Depsgraph: Remove dead/unused operation codes 2017-06-07 12:47:19 +02:00
5489b40a5a Report OpenSubdiv version Blender is compiled against 2017-06-07 12:16:48 +02:00
3fe73c72d6 Collada: Add search path which is used default by it's SCons build system 2017-06-07 11:38:35 +02:00
Dalai Felinto
29ace10f7e gcc5 has issues with Wconversion
This leads to a crash in 2.8, but commiting here.
Patch by Campbell Barton.
2017-06-07 11:37:28 +02:00
58a434b372 Depsgraph: Only use extern "C" when really needed 2017-06-06 12:14:39 +02:00
1846627ae0 BLI: Use C++ guards for stack header
This is handy to have C++ guards for BLI functions so they
can be easily re-used in C++ code. This matches other headers
from this library as well.
2017-06-06 12:13:45 +02:00
81d7ff8476 PyAPI: is_staticmethod used for classmethods's too
Add note to investigate this, don't change so close to release.
2017-06-05 16:09:39 +10:00
bd8377cb5a PyAPI: correct exception, expect 'staticmethod' 2017-06-05 15:31:05 +10:00
7bff00b522 Fix alembic tests not running with debug build on windows 2017-06-04 17:05:59 -06:00
556942ec07 Fix T51587: Blender fails to interpret a specific layer in OpenEXR multilayer file 2017-06-04 00:58:38 +02:00
nBurn
420d4a70b8 PyAPI: Cleanup "Python API Overview" doc
Reword to clean up some odd grammar (mostly dangling modifiers) and
improve readability.

Differential Revision: https://developer.blender.org/D2699
2017-06-02 17:22:44 -04:00
863f0434ec Fix T51691: Shear cursor input scales w/ zoom
Use relative value from cursor movement.
2017-06-02 20:40:41 +10:00
0d8bf4bf94 Cleanup: style 2017-06-02 15:38:04 +10:00
nBurn
e1910ac6ed PyAPI: update to bpy.types.Operator.5.py
This is a minor update add more information on how Blender handles modal
operators. The existing docs provide a good overview, but might not be
as helpful to those unfamiliar with modal programming. This patch also
corrects a few small grammar issues.
2017-06-01 21:59:51 -04:00
020bbbb046 Remove comment (missed last commit) 2017-06-02 01:10:34 +10:00
3be073807b Fix T51651: translate w/ individual origins fails
Regression in fix for T46892
2017-06-02 01:04:11 +10:00
e5d8b04abe Depsgraph: Cleanup, line wraps after shortening API 2017-06-01 16:22:35 +02:00
df7d38c111 Depsgraph: Remove operation types enum
Was only used to indicate entry/exit operation of component,
which is now done explicitly. No reason to keep something which
is unused and confusing.
2017-06-01 16:22:35 +02:00
a72daea36e Depsgraph: use explicit marking of component entry/exit operations
This isn't used too often, and haivng such API will let us to skip
specifying operation type for all oeprations.
2017-06-01 16:22:35 +02:00
3a7361ec39 Depsgraph: Cleanup, use DEG_NODE_CLASS prefix for node classes 2017-06-01 16:22:35 +02:00
6799fb387d Depsgraph: Cleanup, use DEG_NODE_TYPE prefix for depsgraph node types 2017-06-01 16:22:35 +02:00
5bda458bce Depsgraph: Remove unused argument from time source query 2017-06-01 16:22:35 +02:00
a4925b05a7 Depsgraph: Remove subgraph nodes
Those were never finished nor used. Again, starting from clean
state before we go into more complicated details.
2017-06-01 16:22:35 +02:00
d492ae8893 Depsgraph: Remove dead code
Was never used or worked on in ages, if any of this code is
needed in the future it'll need to be redone anyway.
2017-06-01 16:22:35 +02:00
a13aa12d7c Depsgraph: Remove dead code from add_time_source()
This was never finished or done or used, no reason to keep it.
Better to simplify things before adding complexity of overrides
and copy-on-write.
2017-06-01 16:22:35 +02:00
a6bb98aef9 Depsgraph: Cleanup, get rid of relation type
It was never actually used apart from being stored at a construciton time.
This caused some redundancy and ncertanty about which relation type to use
during construciton (often existing types were not close enough to particular
use case).
2017-06-01 16:22:35 +02:00
d5d7455796 Cleanup: use row() sub-layout to expand enum properties horizontaly 2017-06-01 16:54:45 +03:00
528ae8885e Fix T51687: GPUmat evaluation of shader tree would crash uppon unknown/unsupported socket types.
Made this resilient to unknown types, for now. Supporting specific INT
sockets (through implicit conversion to GPU_FLOAT ones) is considered nice TODO.
2017-06-01 12:18:57 +02:00
e2b1c70b48 Fix bad index use drawing deformed face centers 2017-06-01 15:04:22 +10:00
8b0f968a31 Fix bad handling of 'extra' user for groups at their creation.
Was just keeping the default '1' user from `BKE_libblock_alloc()`,
instead of using correct way to handle extra virtual user needed when we
want to keep unused datablocks around...
2017-05-31 21:24:41 +02:00
f783efd127 Fix T51680: 'Delete Group' from Group view of Outliner does not work.
Do not call invoke ops from outliner's operations menus. Invoke op would
search again for item under mouse coordinates... when it is invoked!
Means often entry menu you would have clicked would not be over target
item, leading to either nothing or operation being applied to wrong item.

Note: about groups, there is another minor annoyance leading to some
assert - groups have an annoying virtual fake user which breaks
usercount, will see whether this is easily fixable. :|
2017-05-31 21:14:08 +02:00
a481908232 Task scheduler: Optimize subsequent pushing bunch of tasks
The idea is to accumulate all new tasks in a thread local queue
first without doing any thread synchronization (aka, locks and
conditional variables) and move those tasks to a scheduler queue
once they are all ready. This way we avoid per-task-pool lock
and only have one lock per bunch of tasks.

This is particularly handy when scheduling new dependency graph
node children. Brings FPS of cached simulation from the linked
below file from ~30 to ~50.

See documentation for BLI_task_pool_delayed_push_{begin, end}
and for TaskThreadLocalStorage::do_delayed_push.

Fixes T50027: Rigidbody playback and simulation performance regression with new depsgraph

Thanks Bastien for the review!
2017-05-31 15:44:08 +02:00
2ae6973936 Cleanup: Easier to read constant name 2017-05-31 14:52:45 +02:00
a51dccc6f3 Fix T51661: Swaping strips does not refresh sequencer 2017-05-31 14:26:04 +02:00
140d9a9b15 Cleanup: Use more clear parenthesis 2017-05-31 14:25:40 +02:00
ec804b1694 Libmv: Re-bundle from upstream to ensure code base is perfectly in sync 2017-05-31 11:43:39 +02:00
Pascal Schoen
c91d2d30df Improve backscatter color of subsurface scattering in Principled BSDF
Differential Revision: https://developer.blender.org/D2685
2017-05-31 07:29:17 +02:00
Dalai Felinto
2cd7b80cae Fix T49570: Cycles baking can't handle materials with no images
If users wanted to bake only a few of the mesh materials, they would
still need to create dummy textures for the other parts.

This commit report (as RPT_INFO) the materials with no texture, but move
on to bake the others materials.
2017-05-30 19:06:39 +02:00
Dalai Felinto
9cae631059 Baking: Add logic to get material from API regardless of Mesh/Object ownership 2017-05-30 19:06:39 +02:00
d1d359b792 Depsgraph: Fix missing relations for objects which are indirectly linked
This is a corresponding part of 7dda3cf.
2017-05-30 17:42:38 +02:00
f92fc950c2 Depsgraph: Remove extra modifiers callback loop
Seems to be a copy-paste error from code above.
2017-05-30 17:38:22 +02:00
03469d90b2 Displace modifier: Pre-fetch all possible images to image pool prior execution
This way we reduce amount of time wasted in spin-lock later on when all threads
are starting to sample texture.
2017-05-30 15:40:14 +02:00
b62a7767a0 Image pool: Use memory pool for allocating elements
Reduces amount of system-wide allocation calls. Will be
mainly visible when using lots of images in texture nodes
or regular BI rendering.
2017-05-30 15:25:12 +02:00
34cb934343 Depsgraph: Fix object being tagged for data update when it shouldn't 2017-05-30 14:36:50 +02:00
be59428877 Depsgraph: Add missing update tag clear for proxy objects
This was causing proxies updates on every frame, even if they
do not really change. Additionally, it was causing second round
of armature update when used from inside dupligroup (viewport
ensures all objects from dupligroup are up to date before draw).
2017-05-30 14:36:50 +02:00
24a0b332e2 Alembic import: fixed bug interpolating between frames. 2017-05-30 13:47:51 +02:00
35f4abcf53 Alembic: simplified sub-frame sampling
It's now less confusing (for example, using nr_of_samples directly,
instead of using 1 / 1 / nr_of_samples). Might also have fixed a bug.

Also added unittests.
2017-05-30 13:47:51 +02:00
4e5440686d Alembic export: normalise the homogeneous component after scaling
The scale matrix must have its homogeneous 'w' (at mat[3][3]) set to the
scale in order to also scale the translations along with it. However, this
also scales the transform matrix's 'w' component, which is not supposed
to happen.
2017-05-30 13:47:51 +02:00
916eca6a1e Alembic export: make the start/end frame default values less reasonable
The old default values (start/end frame = 1) could have been an actually
desired setting (for example when exporting a non-animated model). To
make this worse, this was only interpreted as "start/end of the scene" by
the export operator when running interactively, but not when run from
Python.

By choosing INT_MIN as default it's highly unlikely that the interval
[start, end) was intended as actual export range.
2017-05-30 13:47:51 +02:00
4aeba3b90d Alembic export: avoid create-and-reset of shared pointer
Constructing the shared pointer where the object is actually allocated
makes the code a bit clearer.
2017-05-30 13:47:51 +02:00
cfce8623a8 Alembic export: prevent rounding error buildup in frame sample time 2017-05-30 13:47:51 +02:00
71dcead790 Move GHash/GSet/LinkList iterators to BLI files
Those are not depsgraph or C++ specific and can be used by everyone.
2017-05-30 12:48:06 +02:00
aab3a0fda3 Fix UI message (no points and no phrases in tooltips please!). 2017-05-30 11:42:55 +02:00
31bc9beeac Depsgraph: Use own implementation of stack rather than the one from STL
This way we always have predictable behavior, especially from the
performance point of view. Additionally, if some bottleneck is found
in stack implementation it'll be easier for us to address.
2017-05-30 11:41:29 +02:00
7eceb756e4 Tweak UI messgae checking macro, identifiers are not always available... 2017-05-30 11:40:51 +02:00
47aedb97b6 Silence warning in RNA when building without fluidsim. 2017-05-30 11:35:31 +02:00
15692c8cfe Move hash_combine utility function to a more generic place
This way everyone can benefit from it, not only dependency graph.
2017-05-30 11:09:44 +02:00
fb82948043 Fix strict compiler warning in C++ RNA
Hopefully it is supported by all the compilers.
2017-05-30 10:58:12 +02:00
6c16130356 ImBuf: Fix strict compiler warning in Cineon image IO 2017-05-30 10:58:12 +02:00
2c515df83d Audaspace: Don't use strict flags 2017-05-30 10:58:12 +02:00
46da985c8e Cycles: Cleanup, trailing whitespace 2017-05-30 10:58:12 +02:00
76c97aaff9 Fix T50775: Missing parenthesis on fluid bake button.
Yep, that got reported... Was slightly more involved than UI message
fixing though: RNA string length getter shall return exact lentgh of
string (same as strlen), not size of allocated buffer to contain it!
Otherwise, NULL final char leaks in and...
2017-05-30 09:46:53 +02:00
9b914764a9 Fix T51652: Cycles - Persistant Images not storing images
Denoising was setting session parameters for every frame, which was detected as
a change and therefore caused a resync.

Since the parameter modification change is only needed for viewport rendering
(which doesn't support denoising anyways) and resyncing after a frame change
(which isn't affected by denoising settings), an easy fix is to just ignore
the denoising parameters like it's currently done with the samples.
2017-05-30 06:34:53 +02:00
6757ca8b40 NDOF: clean up after MinGW removal
Follow up to 9f044cb422

These comments described the difference between Microsoft & MinGW's struct definition. Now that we dropped MinGW we don't need to go into these details.
2017-05-29 14:04:46 -04:00
538fe7d48e Fix T50906 and T49361, bevel didn't curve in plane sometimes. 2017-05-29 13:32:57 -04:00
f2d7356f16 Background Fit could set inf zoom 2017-05-30 02:39:07 +10:00
f212bfa3cd Fix T51657: ID user count error when deleting a newly created object with an assigned dupli_group
Stupid RNA accessor was not handling usercount at all on Object.dupli_group...
2017-05-29 17:44:39 +02:00
06ca2c9d03 Fix T51390: Blender 2.78c will freeze or force close when adding particles at random.
DM evaluation code was simply never clearing the `deformedOnly` flag
when evaluating a generative modifier...

Quite astonishing this never got catched before, a lot of particle code
relies on valid value of this flag!!!
2017-05-29 16:05:35 +02:00
08b7955415 Fix T51625: fix impossibility to delete uninstantiated objects from Outliner.
The fact that we can end with uninstantiated objects is not expected
currently, but would rather not start chasing all corner cases that may
lead to that situation.

User shall be able to delete uninstantiated objects from Outliner, though!
2017-05-29 12:27:59 +02:00
2fb56e7157 Fix T51520: Broken vertex weights after two mesh joining.
Take Two, did not detect that dynapaint was also creating named vgroup cdlayer!
2017-05-29 12:06:40 +02:00
be31582e3d Fix T51624: Scene Full Copy ignores shader node links.
Properly remap nodes' pointers to copied IDs in copied ntrees.

Note that this only affects root trees, node groups are not concerned
here, since they are assumed to be reusable chunks and hence *not*
duplicated.
2017-05-29 11:02:27 +02:00
ea147e9a28 UI: Make GP "Add Blank Frame" operator name and description fit its behavior.
The operator is indeed not adding frames but inserting them at the current frame (shifting all subsequent ones). Changed the operator name and description.

Approved by Antonio.
2017-05-29 10:51:20 +02:00
ecf2f1593a Fix T51646: Motion Tracker instantly crashes
Was a mistake in previous changes.

Weirdly enough, frame reading assumes cache_key is always non-NULL..
2017-05-29 09:40:43 +02:00
94a3bc63cc Add some missing VSE tooltips
Part of T51061

Differential Revision: https://developer.blender.org/D2664
2017-05-28 21:45:30 -04:00
5f46374c89 UI correct use of "..." in the VSE 2017-05-28 20:41:23 -04:00
8051f2412e Usual i18n/message tweaks & fixes. 2017-05-28 21:47:16 +02:00
9ba7805a3b Fix T48996, bevel bad for certain in-plane edges. 2017-05-28 14:02:56 -04:00
b947810291 Make 'set offset from cursor' group operator internal.
This operator relies on a rather specific context setup, so it shall not
be exposed to user in 'operator search' menu etc.

Based on D2528 by Vuk Gardašević (lijenstina).
2017-05-28 17:35:24 +02:00
9f044cb422 Remove MinGW support
The Issue
=======

For a long time now MinGW has been unsupported and unmaintained and at this point,
it looks like something that we should just leave behind and move on.


Why Remove
==========

One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based.
However, now that this is no longer true we have basically stopped updating the need CMake files.
Along with the CMake files, there are several patches to the extern libs needed to make this work.  For example, see:
https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch

If we wanted to keep MinGW then we would need to make more custom patches to the external libs and
this is not something our platform maintainers are willing to do.

For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3

Fixes T51301

Differential Revision: https://developer.blender.org/D2648
2017-05-27 15:34:55 -04:00
275e2fb0ff Fix T51637: Mesh Tools - Noise Button Crashes.
Logic behind which mtext to use from material was broken here... Though
ultimately that whole tool could probably be deprecated or reworked!
2017-05-27 14:46:14 +02:00
7df5ed14b1 Release wasn't building, limit debug scope 2017-05-27 20:47:41 +10:00
2eead82ce0 CustomData: assert on bad arguments to free
Assert the index is in-range for the layer type.
2017-05-27 14:05:44 +10:00
19809c8385 Add automated ctest for complex merge in Array modifier.
See also T50851.
2017-05-26 21:58:29 +02:00
4d58080e23 Fix T50851: Array modifier generating invalid geometry.
We had handling of fully duplicated polygons already, but... absolutely
nothing to sanitize partially merged polygons! This were giving us
totally invalid geometry, with duplicated vertices in single poly,
invalid edges, etc.

Now we do check for invalid loops inside polys, and generate new edges
as needed to get only valid polys.

For some reason this was a nightmare to get running fully OK, playing
with old and new indices is really, really mind breaking.
2017-05-26 21:58:29 +02:00
b0015686e2 Fix T50908: Motion Tracker ignored grease pencil mask
This feature got lost with new auto-track API,

Added it back by extending frame accessor class. This isn't really
a frame thing, but we don't have other type of accessor here.

Surely, we can use old-style API here and pass mask via region
tracker options for this particular case, but then it becomes much
less obvious how real auto-tracker will access this mask with old
style API.

So seems we do need an accessor for such data, just matter of
finding better place than frame accessor.
2017-05-26 15:27:49 +02:00
ac66fb193f Fix freeing all custom-data layers
Would crash when the active index was out of range,
since there is no reason to use the active layer when freeing all,
free the first instead.
2017-05-26 23:30:20 +10:00
bddd9d809d Fix integer overflows in meshcache modifier.
Differential Revision: https://developer.blender.org/D2688
2017-05-26 06:26:21 -06:00
bf5e717ef5 Fix T51609: Bake Texture, Margin crashing Blender
Integer overflow in margin filter code.
2017-05-26 11:28:01 +02:00
f78ba0df02 Fix T51350: 2D curve normals flip when deformed
Deforming 2D curves & text with modifiers/shape-keys
could flip the normals.

Now check the back-facing flag instead of `z < 0`.
2017-05-26 19:03:30 +10:00
98df7d778f Fix T51287: Matrix.lerp fails w/ shear
Use interp_m4_m4m4 (wraps Eigen),
`MATH_STANDALONE` will need to be updated to support this.
2017-05-26 17:02:27 +10:00
b5a976ec19 Fix GPencil depth checks
Regression in 195d0fba
2017-05-26 16:16:33 +10:00
4badf67739 Fix T51629: Select w/ object lock fails
Regression in 195d0fba
2017-05-26 16:11:56 +10:00
9158d16219 Cleanup: warning 2017-05-26 14:25:52 +10:00
0021268311 Cycles: Cleanup: Remove semicolons from line endings in Python code 2017-05-26 02:15:09 +02:00
3722ed13cd Cycles: Update compositor when debug or denoising passes are changed 2017-05-26 02:13:21 +02:00
2bc008e8a9 Cycles: Cleanup: b_srlay is always used now, no more need to silence warning 2017-05-26 01:55:32 +02:00
dc23b48101 Cleanup: Typo in colormanagement (ColormnaageCacheData -> ColormanageCacheData) 2017-05-26 01:52:43 +02:00
1358c39455 [MSVC] Fix build error. linker was searching for a mangled version of versionstr 2017-05-25 15:23:45 -06:00
9179797811 Fix blender player python installation on macOS after recent changes. 2017-05-25 22:18:50 +02:00
2580c3cb82 Fix T50112: Sequencer crash w/ missing proxy data 2017-05-25 20:23:31 +10:00
1ddf67382b Docs: Image.has_data clarification
Resolves T51615
2017-05-25 19:54:54 +10:00
24e3a930f1 Fix T51444: Unit tests don't run on Windows 2017-05-25 18:56:00 +10:00
bbce6ce249 Fix macOS python cmake install to work when switching lib directories.
It's a bit ugly but I couldn't find a better way to keep fast installs and
correct handling of switching between master and blender2.8 with different
lib directories.
2017-05-25 02:34:39 +02:00
a033a7bef9 Fix error accessing tessface color in edit-mode
Was checking for loop-color in poly-layer.
2017-05-25 02:46:30 +10:00
55c15ad9de Cycles: Use falltrhough attribute to help catching missing break statements 2017-05-24 17:23:54 +02:00
3de9db9650 Proper fix for crash loading old files with compositor
Now we keep all links around, even for sockets which were
implicitly renamed. And also ensuring new sockets have proper
storage.
2017-05-24 15:39:15 +02:00
f4074ce8d7 Revert "Fix crash opening really old files with compositor"
This commit broke compatibility with newer files: due to rename
of Speed to Vector the links got lost.

This reverts commit 0e46da76b7.
2017-05-24 15:29:14 +02:00
d252ac6b95 Fix possible invalid normal use w/ tangent calc
Was using MFace normals, not MPoly
2017-05-24 21:15:35 +10:00
6715bfee92 Alembic: Export mesh as mesh, even when it has no vertices.
This makes it possible to have an animated / procedurally generated mesh
that starts empty and obtains data in later frames.

Fixes the export of an empty mesh with an Ocean Modifier, as described in
issue T51351.
2017-05-24 12:39:37 +02:00
e921e0f0af Alembic export: consider mesh with animation data as "animated"
This allows you to put any kind of animation data on the mesh, and its
shape will be exported on each timekey. Note that this timekey is unrelated
to the animation data (so we don't export on each keyframe, for example).

A practical example is the addition of an animated custom property to
trigger the export of animated mesh data. The mesh data can then be created
from any source, like Python scripts.

Not only is this useful in itself, it also provides a workaround for one
of the two issues described in T51351.
2017-05-24 12:38:17 +02:00
eafea25c41 Alembic export: write Blender version to Alembic file
This is written in a custom metadata key, so it isn't shown by utilities
like abcecho or abcls. However, it's still something that's useful to
have available.
2017-05-24 11:45:14 +02:00
d5d9d1fe7d CMake: document that WITH_FFTW3 is also used for the ocean sim. 2017-05-24 11:36:41 +02:00
ad27e97ee7 Fix T51586: Regression: Alembic containing animated curves / hair no longer working
Also fixed the same type of error when reading points.
2017-05-24 10:24:25 +02:00
Pascal Schoen
e20a33b89d Fix T51589: Principled Subsurface Scattering, wrong shadow color
Apply mix of subsurface and base color (wrt subsurface) for rays that
have transmitted the surface.
2017-05-24 07:37:02 +02:00
7b25ffb618 Fix T51534: Alembic: added support for face-varying vertex colours
Houdini writes vertex data in a different format than Blender does; Houdini
uses "face-varying scope", which means that the vertex colours are indexed
by an ever-increasing number over all vertices of all faces instead of the
vertex index.

I've also merged the read_custom_data_mcols() and read_mcols() functions,
because the latter was only called from the former, and the changes in this
commit would add yet more function parameters to pass.
2017-05-23 17:27:15 +02:00
cc0cc880de Alembic: reduced code duplication in read_mcols()
A big chunk of code was copied between the if and else bodies. By using
a boolean to store whether the c3f_ptr or c4f_ptr should be used, the
in-loop condition is kept as simple as possible.
2017-05-23 17:27:15 +02:00
96e068d3aa Alembic: split up read_custom_data_ex() into read_custom_data_{mcols,uvs}()
The read_custom_data_ex() function was basically two functions inside
if/else bodies.
2017-05-23 17:27:15 +02:00
c1b321e1b8 Add PovRay file extensions to our 'textual' file filtering. 2017-05-23 17:09:50 +02:00
116e8933a6 Fix some POV keywords not colored correctly.
We need to ensure longer keywords are catched first, when there are
shorter subsets of them in keywords list as well!
2017-05-23 17:09:50 +02:00
49cc78ef18 Fix T48668, bevel mistake on presumed reflex angle.
Note: the angle in bug isn't really reflex - using the vertex normal
for this test isn't always right, but usually is. At any rate,
shouldn't try to put vertex on edge between if a reflex angle.
2017-05-23 07:55:14 -04:00
72d67ba4c2 Make msvc2015 happy again.
Looks like that wanabe compiler does not support more than a few tens of
if/else conditions...
2017-05-23 13:04:58 +02:00
8d26f2c222 Fix T51319: Alembic export crash w/simple child particles if Display value < 100%
This was two-fold.

1) The export used viewport settings to obtain the particle cache, rather
   than render settings.
2) The child hair writer tried to obtain UV-coordinates from the parent
   chair, without checking whether those were available in the first place.
2017-05-23 12:31:39 +02:00
7add6b89bc Fix T51592: Simplify AO Cycles setting remains active while Simplify is disabled 2017-05-23 10:34:03 +02:00
9b29233800 Add PovRay syntax hilghting.
Since we already have a rather advanced PovRay exporter, makes sense to
also nicely display generated 'code'.

Patch by Maurice Raybaud (@mauriceraybaud), thanks!
Cleanup (mostly styling) by @mont29.
2017-05-22 22:08:02 +02:00
8cc4c3da8c Fix T51308: Bright/Contrast Doesn't respect Pre-multiplied Alpha
Brightness/contrast node was changing color but did not modify alpha
or ensured colors are premultiplied on the output. This was giving
artifacts later on unless alpha was manually converted.

Compositor is supposed to work in premultiplied alpha (except of
some really corner cases) so it makes sense to ensure premultiplied
alpha after brightness/contrast node.

This is now done as an option enabled by default, so we:

(a) Keep compatibility with old files.
(b) Have correct behavior for newly created files.

Later on we can get rid of this option.
2017-05-22 17:15:45 +02:00
849e77b1f9 Fix T51318: Non-update of preview when switching from world to lamp panel.
Lamp preview panel is in DATA buttons context...
2017-05-22 17:11:55 +02:00
f08f8a2df2 Enhance vgroup handling when merging meshes.
We were looping over all vgroups in destination mesh and making string
comparison, for every vgroup of every vertex of merged mesh! Crazy!

Now we simply create a temp mapping of vgroup indices, seriously
simplifies things (and gives significant speedup when merging huge meshes
with lots of vgroups, here with quick stupid test went from 120ms in
vgroup merging to less than 5ms, 25 times quicker!).
2017-05-22 16:43:46 +02:00
e3d6321530 Fix T51520: Broken vertex weights after two mesh joining.
Root of the issue here was that two stupid modifiers could create named
vgroup CD layers (vgroup editing ones... shame on me :") ).

Fix that, and added some versionning code to also fix 'corrupted' blend
files created by those so far.
2017-05-22 16:43:46 +02:00
81667b770c Fix wrong comment in BLI_findstringindex (returns 0-based index!). 2017-05-22 16:43:46 +02:00
f5a9f150dc Fix T51577: ColorBalance strip modifier misses some color input
Was a mistake in recent VSE interface change.
2017-05-22 14:56:08 +02:00
9737401688 Fix T51169: Push/pull fails w/ local lock axis 2017-05-22 21:12:43 +10:00
34b689892b Fix T51568: CUDA error in viewport render after fix for for OpenCL
Seems re-loading module invalidates memory pointers by the looks of it,
which gives an error on the next kernel call.

Not sure how to move memory pointer from one CUDA module to another one,
so for now simply disabling kernel re-load for CUDA devices. Not ideal,
but better than failing render.

Feature-selective option for CUDA is not an official feature anyway.
2017-05-22 12:28:21 +02:00
baf788d7cd Fix T51336: Crash on broken file opening.
`screen_findedge()` is not expected to return NULL in that case, but
checking against that does not hurt (we do it in all its other call
cases anyway), better than crashing.
2017-05-22 12:08:03 +02:00
bd09b51379 Fix/workaround GCC bug about -Wno-implicit-fallthrough
For some reason GCC-6 successfully compiles test program with
-Wno-implicit-fallthrough passed via command line. It just
silently ignores the unknown arguments which are starting with
-Wno-.

The issue is, if some other waning happens in the code, then
GCC will complain about unknown -Wno- argument which is not
supported by current GCC version.

This makes some misleading warning prints about unknown
command line argument when any other warning happens in code
from extern/.
2017-05-22 11:08:10 +02:00
f3d9f0c779 [msvc] Use debug nunmpy archive for debug builds 2017-05-21 09:31:55 -06:00
3bf69b26ef Cycles Denoising: Skip feature pass writing for volume-only shaders
Volume shaders without anything connected to the surface output are treated
as if they had a transparent BSDF as the surface shader in Cycles, so the
denoiser should skip feature pass writing for them just as it does with an
actual transparent BSDF.
2017-05-21 05:40:13 +02:00
96769f3b19 Cycles Denoising: Skip confidence interval test for outlier central pixels
If the central pixel is an outlier, the denoiser is supposed to predict its
value from the surrounding pixels. However, in some cases the confidence
interval test would reject every single surrounding pixel, which leaves the
model fitting with no data to work with.
2017-05-21 05:26:13 +02:00
38a2bf665b Cycles: Cleanup, style and unused arguments
- Some arguments were inapproriatry tagged as unused
  using (void)foo semantic.

  Only use such semantic in tricky casses, when something
  needs to be ignored in release builds or something is
  dependent on tricky ifndef policy.

  For rest of the cases just use void foo(int /bar*/)
  semantic, which ensures variable is not used. Solves
  confusion and code running out of sync with later
  development.

- Used proper unused semantic to some arguments.

- Added braces to make code easier to follow, tricky
  indentation with ifdef, uh.
2017-05-20 05:21:27 -07:00
81e584ed17 CMake: Use GCC7's -Wimplicit-fallthrough=5
Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
2017-05-20 14:01:03 +10:00
6cd1d34dc1 Cycles Denoising: Prevent overfitting when using a very low radius
For example, when using a radius of 1, only 9 pixels (due to weighting maybe
even less) will be used, but the transform code may still decide to use a
5-dimensional (or even higher) fit.
This causes severe overfitting and therefore weird pixel values.

To avoid this, this commit limits the amount of dimensions to a third of the
pixel number. For a radius of 3 or more, this doesn't change anything, but
for 1 and 2 it can prevent fireflies and/or negative values being produced.
2017-05-19 23:33:22 +02:00
3dee1f079f Fix T51560: Black pixels on a denoising render
Once again, numerical instabilities causing the Cholesky decomposition to fail.

However, further increasing the diagonal correction just because of a few
pixels in very specific scenes and settings seems unjustified.
Therefore, this commit simply falls back to the basic NLM-filtered pixel
if the more advanced model fails.
2017-05-19 23:31:49 +02:00
177385dc43 Cycles: Reload kernels from Session when requested features change
This fixes T49496.
2017-05-19 16:24:19 -04:00
b6f5e8d9a1 Fix T51524: Instantiated Hair Object which has dupligroup children and hidden orig objects of group crash at render.
Note that this is speculative fix, actually precisely understanding what
happens in this code is... not easy.
2017-05-19 19:40:22 +02:00
8d4aff31ce Cycles: Fix compilation error after recent changes
Spotted by Steffen Dünner, thanks@
2017-05-19 16:48:42 +02:00
0e46da76b7 Fix crash opening really old files with compositor
There was lack of certain sockets do-versaions: namely the ones
which were added in blender versions after the one used to save
the file.
2017-05-19 15:41:26 +02:00
a7c4b6f49c Cleanup: add braces for multi-line blocks 2017-05-19 22:18:54 +10:00
ef549b9e55 Cycles: Cleanup, always use parenthesis
Easier to read/follow, and more robust for the further changes.
2017-05-19 12:57:51 +02:00
908bb8bd82 Cycles: Cleanup, indentation in preprocessor 2017-05-19 12:54:46 +02:00
90a62404cb Cycles: Cleanup, variable names
Don't use camel case for variable names. Leave that for the structures.
2017-05-19 12:52:12 +02:00
3a634524e3 Cycles: Cleanup, useless new lines 2017-05-19 12:45:22 +02:00
de86da521c Cycles: Cleanup, braces after function definition
I wouldn't mind switching fully to Google style, but i am against of
mixing two different styles in same project. So just stick to brace
at the new line after function definition.
2017-05-19 12:43:26 +02:00
803337f3f6 \0;115;0cCycles: Cleanup, use ccl_restrict instead of ccl_restrict_ptr
There were following issues with ccl_restrict_ptr:

- We already had ccl_restrict for all platforms.

- It was secretly adding `const` qualifier to the declaration,
  which is quite weird since non-const pointer can also be
  declared as restricted.

- We never in Blender are using foo_ptr or FooPtr type definitions,
  so not sure why we should introduce such a thing here.

- It is absolutely wrong from semantic point of view to put pointer
  into the restrict macro -- const is a part of type, not part of
  hint for compiler that some pointer is never aliased.
2017-05-19 12:41:03 +02:00
8e655446d1 Fix T51537: Light passes are summed twice for split kernel since denoise commit
Denoise commit introduced kernel_write_result() which saves light passes, so
no need to call both kernel_write_result() and kernel_write_light_passes() from
the split kernel.

Weirdly enough. kernel_write_result() does not take care about debug passes.
2017-05-19 12:14:03 +02:00
a5c73129c5 Fix T51556: Sequencer - White Balance Modifier - Masking is not honored 2017-05-19 11:29:18 +02:00
ec051f5103 Fix/workaround T51070: Cannot scale procedural texture in compositor
The issue is coming from some weird semi-finished canvas feature, which
was remapping coordinate without applying any differential on the sampling
ellipse (in fact, there is no ellipse, sampling think is always a single
pixel).

The whole thing is just weak in the compositor, for now just bring behavior
back to how it was prior to optimization (multithreading) commit.
2017-05-19 10:56:26 +02:00
edbd3ebcdc Compositor: Remove unused funciton 2017-05-19 10:55:26 +02:00
4a04d7ae89 Fix T51553: Cycles Volume Emission turns black when strength is 0 or color is black
The problem was that Cycles implicitly uses a transparent surface shader when only
volume nodes are used, but since the black emission shader gets optimized away,
it was no longer detected and therefore no transparent surface was used.

Therefore, the shader now stores whether volume nodes were connected before
optimizing.
2017-05-19 04:59:35 +02:00
cf1127f380 Fix T51506: Wrong shadow catcher color when using selective denoising 2017-05-19 04:04:54 +02:00
29f4a8510c Cycles: Fix random noise pattern seen with multiscatter bsdf and split kernel
Differentials were unset if roughness was low giving undefined behavior.
2017-05-18 21:39:23 -04:00
a21277b996 Fix T51555: Cycles tile count is incorrect when denoising is enabled
Now rendered and denoised tiles are counted and displayed separately.
2017-05-19 03:29:18 +02:00
ffd83a34ab Fix T51502: Cycles denoising not using correctly aligned width for NLM on CUDA 2017-05-19 02:06:54 +02:00
740cd28748 Cycles Denoising: Add more robust outlier heuristic to avoid artifacts
Extremely bright pixels in the rendered image cause the denoising algorithm
to produce extremely noticable artifacts. Therefore, a heuristic is needed
to exclude these pixels from the filtering process.

The new approach calculates the 75% percentile of the 5x5 neighborhood of
each pixel and flags the pixel if it is more than twice as bright.

During the reconstruction process, flagged pixels are skipped. Therefore,
they don't cause any problems for neighboring pixels, and the outlier pixels
themselves are replaced by a prediction of their actual value based on their
feature pass values and the neighboring pixels.

Therefore, the denoiser now also works as a smarter despeckling filter that
uses a more accurate prediction of the pixel instead of a simple average.
This can be used even if denoising isn't wanted by setting the denoising
radius to 1.
2017-05-18 21:55:56 +02:00
b3a3459e1a Cycles Denoising: Fix wrong order of denoising feature passes 2017-05-18 21:55:56 +02:00
9586cc4708 Cycles: Cleanup MultiGGX closure implementation
The implementation originally handled four different cases:
Regular glossy, glass, metallic fresnel glossy and diffuse.

However, only the first two are actually used currently. Therefore, this commit
removes the other two, which allows to simplify the code.

Additionally, due to the Principled BSDF, the function arguments are now
identical for glossy and glass, which allows to get rid of some ugly #ifdefs.
2017-05-18 21:55:56 +02:00
6bf05ab2ca Install_deps: py 3.5.3, collada 22b1f4ff026881b4 (2.6.47), OCIO 6de971097c7f5. 2017-05-18 16:53:07 +02:00
49bd3d3a1a Cycles: Fix crash loading single channel texture
Was  typo in recent isfinite check.
2017-05-18 15:49:03 +02:00
1247f609d4 Correct last commit
VERT_VISIT was used in a nested function.
2017-05-18 21:48:52 +10:00
Pascal Schoen
32c9d2322c Fix T51408: Cycles - Principled BSDF Shader - Transparency is not working as expected
Renamed the "Transparency" input of the Principled BSDF to
"Transmission" and "Refraction Roughness" to "Transmission Roughness".
2017-05-18 13:18:19 +02:00
208462e424 Fix T51539: BMesh boolean crash
In some cases the vertex visit queue would exceed its max length,
visiting the same vertex multiple times.
2017-05-18 21:09:06 +10:00
102394a323 Fix T51538: Weight-paint circle select w/ clipping 2017-05-18 10:43:34 +10:00
c4d122e305 Cycles: Optimize expansion of headers in the source
Use smarter check of where the file is coming from instead of
attempting to replace same source twice with different settings.

Brings down processing time from 3.6sec to 1.8sec.
2017-05-17 17:26:35 +02:00
9a910443c4 Fix compilation error in Cycles
Was caused by recent fix with finite checks.

Fixes T51536.
2017-05-17 17:23:32 +02:00
1d49205b1a Fix T51529: Black boxes on a denoising render when using a .exr image as a environmental texture
It is caused by NaN value in the input texture. Now we check for all the pixels
having proper finite values.

Should also help here in the studio,
2017-05-17 15:29:47 +02:00
cc2755b443 Revert "Cycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled"
This reverts commit 581c819013.

Seems we do need to do finite check early on, this is incoming.
2017-05-17 15:06:05 +02:00
47f8459ead Fix T51388: Mask moves when zoom is changed in the movie clip editor
Incorrect matrix space for stabilization.
2017-05-17 14:51:51 +02:00
f674bc90e2 BMesh: remove duplicate argument for wireframe op 2017-05-17 20:31:14 +10:00
Hristo Gueorguiev
40e6f65ea1 Fix T50937: baking with OpenCL and CPU have slightly different brightness
OpenCL baking with SSS and Volume are not supported.
2017-05-17 12:24:16 +02:00
24676b535a Fix T49981: When camera is on inactive layer, it does not evaluate constraints
Second round of fix, was broken by 843be91.
2017-05-17 10:22:40 +02:00
0a6c57d3d2 Fix crash from freeing of NULL pointer 2017-05-16 16:29:27 -04:00
966a2681f9 Cycles: Fix building with native only option
Approach suggested by Lukas S.
2017-05-16 16:05:04 -04:00
e14a2e87dc Revert "Cycles: Fix native only kernel since denoiser commit"
Fix didn't work in debug mode due to undefined references.

This reverts commit 5319571511.
2017-05-16 16:03:27 -04:00
d59721c2c3 Fix T50673: OpenEXR multilayer image truncated on save
The issue is in OpenEXR itself. See the report fomr some more details.
2017-05-16 16:34:49 +02:00
26b2323189 Fix memory leak when saving OpenEXR files
It is not a good idea to:

1. Duplicate metadata to self
2. Ignore the fact that something might have had metadata already.

Also moved metadata copy to a preparation function, so it is
never lost.
2017-05-16 15:36:29 +02:00
8be9d68dd4 Fix T49467: Crash due to assert failure in bevel.
The mesh interpolation code had an edge case where one of two
adjacent edges to a vertex has 0 length. This caused an assert
failure indexing the vertex mesh for splash Blenderman.blend.
2017-05-16 07:19:01 -04:00
a70a7f9db3 Fix T49864: EnvMap baking crashes 2.78 if 'Full Sample' checked in AA 2017-05-16 12:40:04 +02:00
f89c6e739a Fix memory leak in environment
Found when was looking into T49864. The issue is caused here
by render_copy_renderdata() doing a copy of views with
BLI_duplicatelist() so we can not just zero the pointers out.

Similar thing is happening for layers as well.
2017-05-16 10:57:28 +02:00
Olly Funkster
06ac6ded66 Fix byte-to-float conversion when using scene strips in sequencer with identical color spaces
Fix T50882: VSE: Blend Modes on Scenes do not layer properly
Fix T51002: Scene strip with Alpha over not working as expected

The byte-to-float conversion was being skipped if the color spaces of the sequence and the scene
are the same, which is the default, resulting in any non-float strips becoming invisible.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2635
2017-05-16 10:36:33 +02:00
f6afd1b73c Make imbuf's OIIO bindings to compile with latest OIIO from git 2017-05-16 09:35:46 +02:00
d508b69e44 Cleanup: gcc7.1 warnings 2017-05-16 12:46:52 +10:00
12651aba03 Fix hair_step is a short 2017-05-15 17:28:01 -04:00
15e8fbd549 Fix compile error on gcc after last commit
error: static assertion failed: "invalid limits"
2017-05-15 16:43:33 -04:00
4621583612 Fix T51297: Use A Higher Hair Segment Limit
Normally, segments up to 50 can be quite enough for most cases.
However, when dealing with things like braids,
the current limit can sometimes be quite a pain.
2017-05-15 14:29:59 -04:00
5319571511 Cycles: Fix native only kernel since denoiser commit 2017-05-15 18:37:33 +02:00
1c21e088f2 Fix T50109: Blender crash when a "Render Result" as a Texture
This commit fixes crash, but user feedback can be improved here to
inform artist that one can't use Render Result as a texture since that
will cause feedback loop.
2017-05-15 15:59:47 +02:00
ef8ad66aa2 Fix T49324: True displacement crashes when shader returns NaN 2017-05-15 15:45:19 +02:00
1f96dd2e0b Fix T51348: Node highlighting is broken
This feature was disabled in the code but not in the interface.

Removing the code, since it needs full re-implementation anyway.
2017-05-15 13:52:17 +02:00
Dalai Felinto
b60f80e9b3 Fix T51501: Cycles baking cancel affects baking script
Basically upon invoking cycles baking we could canell it which would
leave G.is_break hanging as true. Since we were not setting is_break to
false before exec baking, it would misbehave.
2017-05-15 13:04:44 +02:00
df94f2f399 Fix T51180: BMesh crash using calc_uvs=True
Don't assume UV layer exist.
2017-05-15 16:53:57 +10:00
b5b72a3f29 PyAPI: don't re-register add-ons on 'New File'
Some add-ons have bugs with re-registration,
they should be fixed, but no need to exacerbate the problem.
2017-05-15 15:33:01 +10:00
687ff699e9 Cleanup: warnings, style 2017-05-15 14:58:55 +10:00
890d871bc3 Fix T51314: crash cancelling Cycles bake during scene sync and update. 2017-05-13 07:15:25 +02:00
8ca9fa5fd3 Fix T51153: Video duration is detected wrong after FFmpeg update
The issue was caused by stupid workaorund for libav. Now things works for
FFmpeg. There might need some tweaks needed for Libav, but that one is
not really priority for support.
2017-05-12 16:43:36 +02:00
37bc3850ce Mesh Center: improved center-of-mass calculation
Previous method was based on face-area, giving un-even results
based on topology and gave issues with zero area faces.

This method gives matching results for concave ngons and the same geometry triangulated.
2017-05-12 11:04:38 +10:00
868678c85f Fix T51449: empty node editor continuously redrawing and using CPU. 2017-05-11 20:32:19 +02:00
77d633399c BGE: Use BLI's stringify instead of implementing it again
Will solve compilation error in 2.8.
2017-05-11 16:46:43 +02:00
8eeb610832 Depsgraph: Fix/workaround crahs when fcu->rna_path is NULL 2017-05-11 16:28:21 +02:00
Dalai Felinto
6b9ab1f7a2 Unifying access to GLEW from the Blender Game Engine
Note: This is not about functionality, but about using the same stub file
we are using in Blender for the game engine in blender2.8.
2017-05-11 16:08:03 +02:00
15038975a3 Cleanup: GPU PBVH naming
Use GPU_pbvh prefix.
2017-05-11 22:05:19 +10:00
Hristo Gueorguiev
90b9467861 Cycles: fix AO approximation for split kernel 2017-05-11 11:58:25 +02:00
bb376c6693 Ammend last commit: add missing align for row props 2017-05-10 23:53:03 -04:00
c95a8bc68f UI: Follow up on recent VSE work
Fix a few more columns that should be rows
2017-05-10 23:53:03 -04:00
58a0c27546 Cycles: Fix occasional black pixels from denoising with excessive radii
Numerical inaccuracies would cause the XtWX matrix to be no longer
positive-semidefinite, which in turn caused the LSQ solver to fail.
2017-05-11 03:21:54 +02:00
f4b7c33c1a update new 2.79 themes: T50869 2017-05-11 10:27:16 +10:00
edd7c55796 Fix Blenderplayer stubs
The change from 62aa925c11 wasn't included.
2017-05-11 01:13:32 +02:00
722bcb554f Sculpt Drawing: reduce redundant color conversion
Also replace macro with for loop.
2017-05-11 07:39:56 +10:00
b82954f6f4 Fix T51455: Render Layers in compositor from a different scene not working
The code only updated nodes in the nodetree of the scene to which the render layer belongs. Therefore, when using scene B in the compositor setup of scene A, A's node wouldn't be updated.
With this fix, the update function loops over all scenes and checks them for relevant nodes.
2017-05-10 22:39:43 +02:00
42c346028f Fix missing relation in new DEG between World and its NodeTree.
Was preventing update in 3DView etc. when changing something in the
World's NodeTree, especially annoying in blender2.8 branch (since legacy
depsgraph has been removed there), but also affecting master.
2017-05-10 20:35:59 +02:00
8246246bda UI: editor menu, swap Text and node editors
Proposed by @sebastian_k and approved by @severin over IRC.

Follows up on rB0f561da5fb77540626aec7a995314271a91acdf6
2017-05-10 12:20:57 -04:00
Dalai Felinto
62aa925c11 Fix T51354: Final take on multi-view (single view) issues
We now handle selection and transform manipulators
(kudos to Julian Eisel to help hunting down the latter).
2017-05-10 16:54:57 +02:00
Dalai Felinto
195d0fbae3 Fixup for multi-view single eye viewport issues
In d2f1f80a6f I was always calling view3d_main_regio_setup_view with
NULL matrices, which is not always correct.
2017-05-10 13:13:55 +02:00
Dalai Felinto
d2f1f80a6f Partial fix to Multi-View single eye issues in viewport
Handling depth loop for now (3d cursor positioning). Selection is a bit
more tricky.

Reported on 51354
2017-05-10 12:21:51 +02:00
9395646c2c Fix errors in vse ui commit
- Fixes double labels
- Fixes an aligned layout when un-needed
- Fixes an error were a layout can become disabled but never enabled again
2017-05-09 14:46:29 -04:00
894513c7fd Fix (unreported): Crash if a right click is performed on an image datablock (open btn f.e.).
Only access/insert the button_pointer if it's not null...
2017-05-09 20:12:25 +02:00
4d38932cb4 Cycles: Use more stable version of integer square root function
Old code was working quite unreliable in combination with fast math
flag, especially when compiling with Clang. It seems we were hitting
result of the following bug submitted to Clang [1].

Basically, it was happening so that (int)sqrtf(64) was 7 when Cycles
is built with Clang but was correct 8 when built with GCC.

This commit works this around. Annoying, but don't see other way to
keep sampling pattern the same for Clang and GCC.

[1] https://bugs.llvm.org//show_bug.cgi?id=24063
2017-05-09 17:07:17 +02:00
e20eb2dec0 Cycles: Properly free memory used by KernelGlobals
Previous logic did not free memory used by vector classes
which were storing images, causing memory leaks.
2017-05-09 17:07:17 +02:00
98ab2c682d Fix denoiser tooltip 2017-05-09 14:44:59 +02:00
ffc95a33b6 Fix T51434: Module math operation is wrong in GLSL shading
Based on patch from @lazydodo.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2661
2017-05-09 12:32:47 +02:00
06b2f10ad1 Cycles: Enable BPT for NVidia OpenCL 2017-05-09 11:44:18 +02:00
378d44daef Fix assert failure caused by bug in sequencer interface script
If icon_only is True then one must not pass text attribute.
2017-05-09 10:44:31 +02:00
586ab120e5 Libmv: Fix strict compiler warnings, unused variables 2017-05-09 10:16:42 +02:00
0f561da5fb UI: Editor menu, move VSE below MCE
The idea here is to keep things in a logical order to match the order of ones worflow.
This concept can be seen in Graph > Dope Sheet > NLA. This issue is mainly affecting the manual.

Fixes T50709

Differential Revision: https://developer.blender.org/D2630
2017-05-08 23:38:31 -04:00
717d85fb1c Fix missing render update when building without OCIO but having GLSL image draw method 2017-05-08 17:43:32 +02:00
49523c4d0e Cycles: Fix compilation error with gcc-6.3.0 and debug mode 2017-05-08 15:41:28 +02:00
a1442b7cea Fix capitalization in some particle panels 2017-05-08 15:24:31 +02:00
5e82981f47 Sequencer: Fix broken interface script since 415ff74 2017-05-08 14:54:49 +02:00
1cfc48192c Fix T51432: Find Files case sensitive on win32 2017-05-08 09:44:11 +10:00
415ff7467c UI: Cleanup VSE Properties Shelf
The goal is to reduce wasted space and improve clarity in the 'N' panel of the VSE through layout changes.
The changes are intentional conservative to avoid making people re-learn anything.

Author: @mpan3

Differential Revision: https://developer.blender.org/D2439
2017-05-07 18:13:50 -04:00
ce28025eaf Remove unused node socket flag that was added in the render pass commit 2017-05-07 20:32:51 +02:00
e518ea9b5e Cycles: Fix transform addressing in the denoiser code 2017-05-07 18:50:24 +02:00
c9451f1cff [Cycles] Fix math problems in safe_logf
log(0) is undefined and should not have been included
log(1) == 0, dividing by zero is not recommended
2017-05-07 09:16:14 -06:00
3cd27374ee Color management: add Filmic view transform to Blender configuration.
* "Filmic" and "False Color" view transforms added (sRGB display device only).
* "Very Low/Low/Base/High/Very High Contrast" looks added.
* Added filtering so that Filmic only shows look names prefixed with "Filmic - ".

Filmic Dynamic Range LUT configuration created by Troy James Sobotka with
special thanks and feedback from Guillermo, Claudio Rocha, Bassam Kurdali,
Eugenio Pignataro, Henri Hebeisen, Jason Clarke, Haarm-Peter Duiker, Thomas
Mansencal, and Timothy Lottes.

Differential Revision: https://developer.blender.org/D2659
2017-05-07 16:41:38 +02:00
43b374e8c5 Cycles: Implement denoising option for reducing noise in the rendered image
This commit contains the first part of the new Cycles denoising option,
which filters the resulting image using information gathered during rendering
to get rid of noise while preserving visual features as well as possible.

To use the option, enable it in the render layer options. The default settings
fit a wide range of scenes, but the user can tweak individual settings to
control the tradeoff between a noise-free image, image details, and calculation
time.

Note that the denoiser may still change in the future and that some features
are not implemented yet. The most important missing feature is animation
denoising, which uses information from multiple frames at once to produce a
flicker-free and smoother result. These features will be added in the future.

Finally, thanks to all the people who supported this project:

- Google (through the GSoC) and Theory Studios for sponsoring the development
- The authors of the papers I used for implementing the denoiser (more details
  on them will be included in the technical docs)
- The other Cycles devs for feedback on the code, especially Sergey for
  mentoring the GSoC project and Brecht for the code review!
- And of course the users who helped with testing, reported bugs and things
  that could and/or should work better!
2017-05-07 14:40:58 +02:00
bca6978347 Cleanup: use index syntax instead of addition
Harmless but made accessing the first element read strangely.
2017-05-07 03:21:27 +10:00
ce31a892db Cleanup: use uint/ushort for polyfill2d 2017-05-07 02:19:56 +10:00
bdb4ecfbdd Cleanup: use const pointers where possible 2017-05-07 02:12:35 +10:00
5cdd94a58e Fix PyAPI crash assigning/deleting id-properties
Caused by D113.
2017-05-06 23:30:21 +10:00
0eef40ed51 Cleanup: unused return, redundant assignments 2017-05-06 22:43:32 +10:00
89120cd241 bmesh: use 'uint' instead of 'unsigned int'
no functional changes.
2017-05-06 14:19:08 +10:00
b85f7e288e Cleanup: line length, use const struct members 2017-05-06 11:13:14 +10:00
2eb906e1b4 Cycles: Fix access array index of -1 in SSS and volume split kernels 2017-05-05 17:54:03 +02:00
850bb7a50b Cycles: Cleanup, indentation 2017-05-05 16:54:37 +02:00
622ce5672a MakeLocal: fix bad (missing) handling of proxy_from uglyness.
Those shall not be considered while checking whether a to-be-made-local
ID will end up fully local, or still be partially used by linked data...
Even less since we already do have special handling of proxies later.

Fixes main remaining issue found with 04_01_H.lighting.blend Agent327
file, and allows us to switch back to optimized post-processing in
make_local code.
2017-05-05 16:19:16 +02:00
198248fa3d Add a new LOOPBACK flag to libquery's callbacks.
That one tags those ugly little 'from' ID pointers (shape keys and
proxies), which point back from used to user ID, and require a lot of
special care in data-block management...
2017-05-05 16:19:16 +02:00
294ffa0d49 Masks: Fix broken animation after adding primitives
Was missing mask shape initialization.

Not ideal from the CPU ticks point of view, but will work for now.
2017-05-05 13:50:18 +02:00
Hristo Gueorguiev
8b97e42eca Cycles: Split kernel SSS & Volume data definitions cleanup 2017-05-05 13:42:26 +02:00
Hristo Gueorguiev
b9fda4480f Cycles: Show samples progress for OpenCL split kernel 2017-05-05 13:37:21 +02:00
Hristo Gueorguiev
f3c3483242 Cycles: Workaround for AMD GPU OpenCL compiler
Fix for SSS in BPT.
2017-05-05 13:00:43 +02:00
5b6838129f Fix (unreported) memleak in Warp modifier copying. 2017-05-05 10:36:23 +02:00
52e6a6c5ef MakeLocal: switch back to secure, slightly slower final steps.
Again, Agent327's 04_01_H.lighting.blend shows some problem here, it
triggers several times the 'not used at all' assert in step 5 of secure
code, and with optimized version we lose the connection between
rigs and the main characters!

Will keep investigating on this, but for now let's try to give something
working to the studio.
2017-05-05 09:56:17 +02:00
d2cd27a39d MakeLocal: forcefully recalc affected armatures' poses.
This should not be needed imho, we already set POSE_RECALC flag
correctly there, but it still is missing actual update of poses in some
(complex and convoluted) cases. So at least for now, let's go with this
hack, it's not really harming anyone anyway.

Fixes crash in Agent327's 04_01_H.lighting.blend when making all local.
2017-05-05 09:56:17 +02:00
fbf4b2f17a Add check (error message + assert) that pose is valid in armature evaluation.
Not sure how this happens, but in some cases we can evaluate
deformations of an armature which pose is not valid, at least put a
warning here to help identifying the issue quickly.
2017-05-05 09:56:17 +02:00
Julian Eisel
839bf119c1 Revert "Add red alert in UI controls for datablock pointer properties"
This reverts commit f5bc8ad4ce.

We agreed there needs to be a better solution for this, see comments in
rBf5bc8ad4ce87165.
2017-05-05 00:44:06 +02:00
57bcc19bb3 Fix reading past bounds removing from color ramp 2017-05-05 07:41:12 +10:00
97caad858f Remove redundant backbuffer/transform check
Transform no longer uses backbuffer for snap.
2017-05-05 07:06:15 +10:00
d29e3ebcc6 Typo: 'Signle program' -> 'Single program' 2017-05-04 22:15:53 +02:00
ed688e4843 Cycles: Fix crash when assigning KernelGlobals
The memory isn't initialized during allocation, so calling the assignment operator is a bad idea.
2017-05-04 20:49:04 +02:00
a523dfd2fd Fix T51412: Instant crash with texture plugged into the Displacement output
The issue was caused by unlimited textures commit, root of the issue is that
displacement code updates some of the image slots directly, so it needs to
ensure device vectors are all proper size.
2017-05-04 16:28:22 +02:00
b180900e52 Fix missing usercount update of poselib when copying Object.
Still finding such missing cases... :(
2017-05-04 15:08:57 +02:00
e3bc021079 Add debug/timing prints in MakeLocal and remapping code. 2017-05-04 15:08:57 +02:00
ffa31a8421 Fix use after free of new render layer ID properites after copying scene 2017-05-04 12:27:28 +02:00
0f4de9336a Fix memory leak of ID properties after recent render passes commit 2017-05-04 12:18:39 +02:00
5fde78dcad Cycles: Fix unused argument warning when building without debug passes 2017-05-04 09:33:51 +02:00
ad8587b798 [msvc/make.bat] Limit the amount of simultaneously compiled projects.
This was set to maxcpu which in an 8 core box would be 8, each project would then spawn
8 instances of cl.exe, making a possible of 64 simultaneously running compiler instances
slowing the compile down instead of speeding it up.
2017-05-03 15:15:35 -06:00
Dalai Felinto
c171f0b3c9 Fix Cycles build on Windows 2017-05-03 21:16:45 +02:00
6abcd6cfd5 Fix error in node flag check 2017-05-04 02:57:39 +10:00
15189baa52 "Fix" root cause of T51260 Forward compatibility crash fter adding new IDProp type.
We unfortunately cannot fix this for previous versions of Blender, but
at least the issue (Blender crashing on unknown IDProp types) should now
be addressed for future.

Simply reset unknown IDProp types to integer one, and reset its value to zero.
2017-05-03 17:05:28 +02:00
4cf7fc3b3a Render API/Cycles: Identify Render Passes by their name instead of a type flag
Previously, every RenderPass would have a bitfield that specified its type. That limits the number of passes to 32, which was reached a while ago.
However, most of the code already supported arbitrary RenderPasses since they were also used to store Multilayer EXR images.
Therefore, this commit completely removes the passflag from RenderPass and changes all code to use the unique pass name for identification.
Since Blender Internal relies on hardcoded passes and to preserve compatibility, 32 pass names are reserved for the old hardcoded passes.

To support these arbitrary passes, the Render Result compositor node now adds dynamic sockets. For compatibility, the old hardcoded sockets are always stored and just hidden when the corresponding pass isn't available.

To use these changes, the Render Engine API now includes a function that allows render engines to add arbitrary passes to the render result. To be able to add options for these passes, addons can now add their own properties to SceneRenderLayers.
To keep the compositor input node updated, render engine plugins have to implement a callback that registers all the passes that will be generated.

From a user perspective, nothing should change with this commit.

Differential Revision: https://developer.blender.org/D2443

Differential Revision: https://developer.blender.org/D2444
2017-05-03 16:44:52 +02:00
Hristo Gueorguiev
6bf4115c13 Cycles: Split kernel - sort shaders
Reduce thread divergence in kernel_shader_eval.

Rays are sorted in blocks of 2048 according to shader->id.

On R9 290 Classroom is ~30% faster, and Pabellon Barcelone is ~8% faster.

No sorting for CUDA split kernel.

Reviewers: sergey, maiself

Reviewed By: maiself

Differential Revision: https://developer.blender.org/D2598
2017-05-03 15:30:45 +02:00
6f9c839f44 Cycles: Fix OpenCL compilation failure after recent color changes
It is really confusing to have some functions available in some devices
and not on another devices.
2017-05-03 14:11:19 +02:00
44991a0132 Cycles: Use render visibility for duplis when Render Layer option in viewport is used
Previously the logic was different for duplis and regular objects: regular objects
were using render visibility when Render Layer option is enabled which duplis were
always using viewport visibility when rendering from the viewport.

This was quite confusing because caused different results in viewport and render
when artists were expecting them to match 1:1.
2017-05-03 12:14:05 +02:00
cea0236026 Cycles: Simplify code in SVM image by using new utility function
Can not measure any performance difference, so seems the code is identical
and just shorter.
2017-05-03 11:22:48 +02:00
e616cd5706 Cycles: Add utility function to convert float4 color from srgb to linear
It will use SSE2 optimized version when is possible.
2017-05-03 11:19:40 +02:00
d187014675 Cycles: Remove extra clFinish from driver workaround
These were causing problems with Nvidia OpenCL.
2017-05-02 14:26:46 -04:00
299d839dc5 Cycles: Output split state element size 2017-05-02 14:26:46 -04:00
915766f42d Cycles: Branched path tracing for the split kernel
This implements branched path tracing for the split kernel.

General approach is to store the ray state at a branch point, trace the
branched ray as normal, then restore the state as necessary before iterating
to the next part of the path. A state machine is used to advance the indirect
loop state, which avoids the need to add any new kernels. Each iteration the
state machine recreates as much state as possible from the stored ray to keep
overall storage down.

Its kind of hard to keep all the different integration loops in sync, so this
needs lots of testing to make sure everything is working correctly. We should
probably start trying to deduplicate the integration loops more now.

Nonbranched BMW is ~2% slower, while classroom is ~2% faster, other scenes
could use more testing still.

Reviewers: sergey, nirved

Reviewed By: nirved

Subscribers: Blendify, bliblubli

Differential Revision: https://developer.blender.org/D2611
2017-05-02 14:26:46 -04:00
89b1805df6 BGE: Fix silly typo that invalidates negative scaling camera feature.
Negative scale on camera is a nice trick to invert render image on one
axis at no extra CPU cost. It was implemented in the Decklink branch but
I introduced a typo when porting it to master. It is now fixed.
2017-05-02 20:11:02 +02:00
4846184095 Cycles: Fix missing type declaration in OpenCL image
Spotted by Mai in IRC, thanks!
2017-05-02 15:39:33 +02:00
143d7ad40f Revert "Depsgraph: Link from material to object shading"
The change was initially needed for Blender 2.8 branch but the actual
function was reverted in there. So no reason to keep dead unused
placeholder in the dependency graph.

This reverts commit fd69ba2255.
2017-05-02 15:31:49 +02:00
4384a7cf46 Cycles: Fix CUDA split kernel
Global size y needs to be a multiple of 16.
2017-05-02 15:03:51 +02:00
4174e533c0 Cycles: Cache split kernels in CUDA device
This way we don't re-load kernels for every sample in the viewport.
Additionally, we don't risk global size changed inbetween of samples.
2017-05-02 15:03:12 +02:00
fc8f428224 fix typo in WITH_SYSTEM_GFLOG in CMakeLists.txt 2017-04-30 10:52:38 -06:00
0fbce637b3 Cleanup: comment blocks 2017-04-30 02:58:36 +10:00
a1164eb3dd View3D: support both orbit select & depth
When using both preferences, use cursor depth when nothings selected.
2017-04-30 02:41:25 +10:00
47769b5f40 Curve Fitting: minor change to re-fitting method
Avoid calculating a new split-index when re-fitting.

While checking if a knot can be removed, the index with the highest error
can be used as a candidate to replace the knot
(in the case it can't be removed).
2017-04-30 00:01:16 +10:00
6d73e2d3cf Cleanup: unused includes 2017-04-29 16:27:29 +10:00
b5298bf819 Cleanup: menu example
remove some redundant checks, imports
2017-04-29 16:20:06 +10:00
8f66d6826b Cycles: Fix crashes after recent image changes
Not sure if this is a proper fix, but was getting frequent crashes, so
committing this real quick just to make master sable again. Can be
reverted later if there's a better fix. The changes to images really
need a closer look...
2017-04-28 18:54:18 -04:00
d6963630dc Implementation of custom python entries in all right click menus
Hi Guys,

as one of my clients needs the possibility to have custom menu entries in the general right click menu (all over Blender: in the node editor, properties, toolbars,..) I talked with Campbell about expanding our hard coded menu a bit. This is the outcome. As I only need those two, I support currently a button_prop and a button_pointer.

{F540397}

I tested the changes with a custom script where I added a custom entry and executed an operator on click - it seems to work exactly how it's intended to. The script: {F540435}

As I'm not too experienced in rna stuff I would really appreciate any review.
Thanks very much Campbell for his open ears & help on this issue!

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: sybren, mont29

Tags: #addons

Differential Revision: https://developer.blender.org/D2612
2017-04-28 23:44:52 +02:00
af3f7db4ec Fix T51324: Auto-Depth fails rotating out of camera 2017-04-29 03:21:03 +10:00
9ebd737df3 Cycles: Use relative path for #line directives
This way moving Blender bundle around doesn't re-trigger kernels compilation.
2017-04-28 17:46:11 +02:00
b46aad19c0 Libmv: Make ERROR a default printing severity 2017-04-28 16:47:35 +02:00
c648ddb9a1 Cycles: Correct comment after previous commit 2017-04-28 16:47:24 +02:00
9ff88a596c Cycles: Lower default severity level to ERROR 2017-04-28 16:46:30 +02:00
aa88796a6c Alembic: use object-oriented approach in ABC_read_mesh()
This is easier to extend than the if/else if/else chain that was in place,
and allows for somewhat more granular error messages.
2017-04-28 15:33:57 +02:00
2e67a20045 Alembic: Construct ISampleSelector once and pass along 2017-04-28 15:33:57 +02:00
1e8d7f3b25 Fix T51331: fixes for Alembic unit tests on Windows 2017-04-28 15:28:41 +02:00
f383c926b4 Cycles: De-duplicate bit magic for decoding image options in OpenCL kernel 2017-04-28 15:20:34 +02:00
f8d0b27d9d Cycles: Simplify code around maximum OpenCL info size allocation 2017-04-28 15:15:15 +02:00
407fd66d0a Cycles: Cleanup, de-duplicate image packing of various types 2017-04-28 15:08:54 +02:00
0f339a748e Cycles: Quick (real) fix for broken textures on OpenCL
Previous fix did not work for mixed textures. This one will over-allocate
information array, but it's better than not being able to render at all.

Some more cleanup and improvement is coming.
2017-04-28 14:56:22 +02:00
1ec59c8e06 Revert "Cycles: Fix image textures were completely broken since recent unlimited textures commit"
This reverts commit 8f4166ee49.

The fix was not correct for cases when we've got float textures.
2017-04-28 14:48:40 +02:00
06034b147a Cycles: Cleanup, spelling and braces 2017-04-28 14:10:21 +02:00
8f4166ee49 Cycles: Fix image textures were completely broken since recent unlimited textures commit
The indexing was totally wrong in both image packing code and image sampling in kernel.

Fixes T51341: Cycles OpenCL corruption in todays buildbot
2017-04-28 14:04:27 +02:00
e3fc945fe2 Cycles: Cleanup, always use braces for blocks 2017-04-28 13:39:14 +02:00
82e5f60302 Cycles: Cleanup, indentation in preprocessor 2017-04-28 13:24:09 +02:00
20ebeb1a15 Cycles: Cleanup, use ccl::vector instead of std::vector 2017-04-28 13:22:07 +02:00
4245ed360e Cycles: Cleanup, indentaiton and trailing whitespace and wrapping 2017-04-28 13:21:17 +02:00
a85f457195 Fix: T50271: Bilateral/Directional blur's iterations is zero by default
Differential Revision: https://developer.blender.org/D2632
2017-04-27 09:00:11 -04:00
e9ccc98877 Revert "Fix T51328: Add note to cmdline help that threads must be first"
The help message already notes that argument order matters,
and this doesn't need to be the first.
2017-04-27 21:48:06 +10:00
bdf8ad6c4e Cleanup: spelling 2017-04-27 21:41:03 +10:00
ed14c15b7a Cleanup: remove unused matrix arg 2017-04-27 21:41:03 +10:00
a00f54332d Cleanup: Some style and code tweaks to Image Code after changes.
Whitespace and order of switch/case etc. Let's try to stick to float4/byte4/half4/float/byte/half order as defined in "ImageDataType".
2017-04-27 11:11:08 +02:00
Stefan Werner
ec25060a05 Unlimited number of textures for Cycles
This patch allows for an unlimited number of textures in Cycles where the hardware allows. It replaces a number static arrays with dynamic arrays and changes the way the flat_slot indices are calculated. Eventually, I'd like to get to a point where there are only flat slots left and textures off all kinds are stored in a single array.

Note that the arrays in DeviceScene are changed from containing device_vector<T> objects to device_vector<T>* pointers. Ideally, I'd like to store objects, but dynamic resizing of a std:vector in pre-C++11 calls the copy constructor, which for a good reason is not implemented for device_vector. Once we require C++11 for Cycles builds, we can implement a move constructor for device_vector and store objects again.

The limits for CUDA Fermi hardware still apply.

Reviewers: tod_baudais, InsigMathK, dingto, #cycles

Reviewed By: dingto, #cycles

Subscribers: dingto, smellslikedonkey

Differential Revision: https://developer.blender.org/D2650
2017-04-27 09:35:22 +02:00
a6b9bd023b Fix T51328: Add note to cmdline help that threads must be first 2017-04-26 22:48:18 -04:00
7c1263c1ee Cycles: Allow samples to finish in split kernel to avoid artifacts when canceling
Previously canceling a render done by the split kernel could cause artifacts
such as very bright or dark tiles. This was caused by unfinished samples
being included in the output buffer. To avoid this we now wait till all the
currently rendering samples have finished, up to a limit of twice the
expected time for them to finish (currently this is no more than 20 seconds,
but usually its much less). If samples still haven't finished by then we
stop anyways in case there's an endless loop occurring.
2017-04-26 10:48:15 -04:00
90b2539248 Cycles: Change OpenCL split kernel to use single program by default
Single program builds twice as fast as multi programs, so its better for
users to have it as the default.
2017-04-26 10:48:15 -04:00
fe81a32f69 Cycles: Enable Correlated Multi Jitter for OpenCL and split kernel
Testing showed no issues so there's no reason to not have this.
2017-04-26 10:48:15 -04:00
c13acebd61 [msvc/make.bat] Provide a convenience rebuild.cmd in the build folder for easy rebuilds. 2017-04-26 08:46:35 -06:00
be60e9b8c5 Cycles: Fix over-allocation of triangles storage for triangle primitive hair
Was also causing some bad memory access caused by read data from non-initialized
arrays.

Repoted by bzztploink in IRC, thanks!
2017-04-26 16:00:02 +02:00
e6954a5a7c Fix race condition invalidating object data's bounding box 2017-04-26 16:00:02 +02:00
e61ba39e7c Ensure task scheduler exists before any threading starts in Blender 2017-04-26 16:00:02 +02:00
e2f8bb56d6 Avoid race condition copying Scene for off-thread OpenGL image save 2017-04-26 16:00:02 +02:00
c0f555905d User preferences: Use checkbox for Cycles device selection
It was totally unclear whether the device is enabled or disabled.
Lots of people got fully lost in the current interface.

While the solution is not fully ideal, it is at least solves
ambiguity in the interface.
2017-04-26 16:00:02 +02:00
146db944e5 Threading: Remove thread lock which seems useless
Render data is never guarded by image drawe lock.
2017-04-26 16:00:02 +02:00
449ad35093 Move depth select loop into its own function
Useful for splitting out draw logic in 2.8x
2017-04-27 00:01:23 +10:00
6ed15c5a41 Alembic export: support simple child hairs (Fix T51144)
Simple child hairs don't have a face index number assigned, so the
call to dm->getTessFaceData(dm, num, CD_MFACE) would cause a crash. To
work around this, UV and normal vectors are copied from the parent
hair.

I've also removed an unnecessary call to dm->getTessFaceArray(dm);

Reviewers: kevindietrich

Differential Revision: https://developer.blender.org/D2638
2017-04-26 15:31:03 +02:00
51e3a184ea Alembic: fixed indentation 2017-04-26 15:19:37 +02:00
ef80164e1c Alembic: fixed memory leaks 2017-04-26 15:19:37 +02:00
20621d46d1 Alembic: fixed refcount issue when duplicating imported objects
Duplicating an imported object didn't increment the cache reader's refcount,
whereas removing the duplicate did decrement it. This caused problems.
2017-04-26 15:19:37 +02:00
ff1f115706 Fix T51280: Alembic: Crash when removing cache modifier
The calls to id_us_plus/min were unnecessary (and caused assertion
failures) as this is already taken care of by transformcache_id_looper().
2017-04-26 15:19:37 +02:00
87f483debb OSX buildbot: remove redundant option 2017-04-26 14:28:36 +02:00
c1aea353ae OSX buildbot: disable unsupported calls for now and use quicktime off default 2017-04-26 14:04:09 +02:00
f351cb5479 Avoid platform dependant PATH_MAX 2017-04-26 21:06:00 +10:00
9b3e3d4def Alembic export: also export empties
Exporting an empty creates an Alembic XForm object. The empties can also
be animated.
2017-04-26 12:26:21 +02:00
afe1c25d06 Alembic export: renamed func object_is_shape → object_type_is_exportable
The function doesn't return whether the object is a shape at all, since
it also returns true for camera objects (and soon also for empties). It
returns true when objects of this type can be exported to Alembic at all.
This is now reflected in the name.
2017-04-26 12:25:45 +02:00
edc9f8b766 Alembic: shortened CacheFile.filepath to 1024 bytes again
As per discussion on 3128600a8a
2017-04-26 10:42:20 +02:00
268cb5fbd3 Alembic: fixed C++98 compatibility 2017-04-26 10:42:20 +02:00
dba6e170c4 Alembic import: added unit test for mesh deformation. 2017-04-26 10:42:20 +02:00
9623d93f14 Cycles: Fix access undefined macro on non-MSVC compiler
Also rremove trailing whitespace.
2017-04-26 10:00:31 +02:00
0f2d0ff124 workaround for T50176
This works around a long outstanding issue T50176 with cycles on msvc2015/x86 . root cause is still unknown though,feels like a game of whack'a'mole

Reviewers: sergey, dingto

Subscribers: Blendify

Tags: #cycles

Differential Revision: https://developer.blender.org/D2573
2017-04-25 14:21:46 -06:00
Hristo Gueorguiev
e91dc3a97c Cycles: use safe compiler flags for OpenCL.
Using -cl-fast-relaxed-math assumes no NaN/Inf values in any expression.
This causes problems on overflow, division by zero, square root of negative number.
Comparisons with NaN or infinite value are affected as well.

This patch causes <2% slowdown on benchmark scenes.

Fix T50985: Rendering volume scatter with GPU OpenCL comes to an halt after a few seconds
2017-04-25 20:10:51 +02:00
Hristo Gueorguiev
9d26e32ea2 Workaround for AMD GPU OpenCL compiler. 2017-04-25 20:08:14 +02:00
9dadd5ff93 Fix T51292: Alembic import, show notification when trying to load HDF5
HDF5 Alembic files are not officially supported by Blender. With this
commit, the HDF5 format is detected even when Blender is compiled without
HDF5 support, and the user is given an explanatory error message (rather
than the generic "Could not open Alembic archive for reading".
2017-04-25 14:30:09 +02:00
ab4f6f01a6 Cycles: Fix strict compiler flags 2017-04-25 14:12:14 +02:00
0b84f21b08 Fix OSX buildbot 2017-04-25 14:05:03 +02:00
3128600a8a Fix T51262: Blender CRASH with alembic file
Also added a unit test for exporting & importing very long names.
2017-04-25 12:06:03 +02:00
1f85a35a3d Cycles: Cleanup, mainly line length in random module
Was doing lots of investigation recently, with need to have lots of things
side by side.
2017-04-25 11:43:20 +02:00
e353cf8705 Revert "Alembic: Construct ISampleSelector once and pass along"
This reverts commit 099816587a. It had some
unforseen side-effects that should be investigated first.
2017-04-25 10:45:26 +02:00
0a07cdbe80 Cycles: Split vectorized math utilities to a dedicated files
This file was even a bigger mess than vectorized types header,
cleaning it up to make it easier to maintain this files and
extend further.
2017-04-25 10:33:26 +02:00
51ec9441b7 Cycles: Split vectorized types into separate files
The final goal to reach is to make vectorized types much easier to maintain
and the previous design had following issues:

- Having all types and methods implementation made the source file rather
  bloated and unfun to navigate in.

- It was not possible to quickly glance available API for the type you are
  interested in.

- Adding more vectorization types will bloat the file even more, making
  things even more tricky to follow.
2017-04-25 10:33:26 +02:00
b06cd746ce Cycles: Cleanup, preprocessor indentation 2017-04-25 10:33:26 +02:00
573f6d1ec4 Fix T51284: Mesh not skinned 2017-04-25 10:01:34 +02:00
7398b3b71b WM: don't search for app-template when its empty
Changing from a loaded app-template back to Default (none set)
would scan paths for a file with no name. Harmless but silly.
2017-04-25 17:15:23 +10:00
d8661ee2d5 Cycles: Remove re-hashing done in BPT volume code
Since 9d50175 this is no longer needed, at least not with the current
sampler we are using.
2017-04-24 21:48:01 +02:00
69a216d343 Cleanup: remove unnecessary texface checks 2017-04-24 22:45:40 +10:00
aff30aaf2d Cleanup: style 2017-04-24 22:00:46 +10:00
50bfaffc6b Cycles: Cleanup, space after keyword 2017-04-24 11:23:19 +02:00
d67609697e Add C internal version of msgfmt (similar to makesrna/dna binaries).
Fixes performance issues of C++ one with Windows MSVC debug builds...

Merely a translation from msgfmt.cc code by @sergey, using BLI libs intead of C++'s stdlib.

Reviewers: sergey, campbellbarton, LazyDodo

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2605
2017-04-24 10:49:54 +02:00
6d9a223c90 BLI_dynstr: add memarena-based version, and helper to clear without freeing. 2017-04-24 10:42:10 +02:00
5a232039d5 Usual i18n/UI messages fixes and cleanup. 2017-04-24 09:33:49 +02:00
f1ada2e719 [msvc/make.bat] Add convenience option to turn off game engine+player 2017-04-23 14:46:33 -06:00
da82f65424 CMake: Fix CMake for non Apple systems
Follow up to https://developer.blender.org/rB14a4ce6d7fb4dcf3d1aa5b58f9a543549df6d5dc
apple_check_quicktime() macro is only defined for apple, so ignore it otherwise.
2017-04-23 19:10:04 +02:00
14a4ce6d7f CMake: move some Apple specific code into platform_apple_xcode.cmake. 2017-04-23 18:24:47 +02:00
Romain Foyard
a192d5b81c CMake: disable WITH_CODEC_QUICKTIME for macOS > 10.11 for configurations.
QtKit was removed in macOS Sierra, this patch disables WITH_CODEC_QUICKTIME
in Sierra and greater versions of macOS.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2645
2017-04-23 18:24:47 +02:00
cedb1915fe CMake: fix wrong alembic test name on Windows. 2017-04-23 18:24:43 +02:00
4a9e546fed [msvc/make.bat] Allow override of the build folder name 2017-04-23 10:10:57 -06:00
20c9c1b44e OSX: satisfy macro to also apply alembic tests 2017-04-22 19:03:59 +02:00
517bd13baa Disable breaking alembic test for osx 2017-04-22 18:39:11 +02:00
dc5bd2784f [cmake] Fix Alembic build errors with msvc 2017-04-21 12:18:19 -06:00
7e977470f3 Alembic unit tests: Removed trailing spaces 2017-04-21 16:20:35 +02:00
e6ee3fd924 Alembic unit tests: don't depend on ALEMBIC_ROOT_DIR being defined by user
By mistake, the code relied on ALEMBIC_ROOT_DIR being defined by the user
running the tests. Now CMake macros are used to correctly find the Alembic
root directory.
2017-04-21 16:20:01 +02:00
349cafac52 Matrix.decompose(): changed terminology, "location" → "translation"
Matrix.decompose() should either return "location, orientation, size" or
"translation, rotation, scale". Since there are constructors for the former,
I've replaced "location" in the documentation with "translation".

The code is still the same, I just changed the documentation.
2017-04-21 15:51:35 +02:00
9781139590 Cycles: Solve speed regression of classroom scene after principled commit
This way we can skip it from compiling into OpenCL kernels by making
this shader compile-time feature.
2017-04-21 14:41:42 +02:00
b6da2a6a86 Cycles: Make it a generic base class for all types of closure nodes
The idea is to have osme geenric BSDF node which is subclassed by
"regular" BSDF nodes and uber shaders.

This way we can access special type and closure type for making
decisions somewhere else.
2017-04-21 14:36:56 +02:00
e4ab70da86 CMake: Add option to build against system-wide Glog
Similar to previous commit for Gflags.
2017-04-21 14:36:34 +02:00
9c02990ac1 Alembic import: changing cache modifier path no longer discards object paths
This allows, for example, the path of an Alembic file to be changed from
absolute to relative, without having to reconstruct all object paths.
2017-04-21 14:11:49 +02:00
9d819775b7 Alembic: properly initialising cachefile object paths list. 2017-04-21 14:11:49 +02:00
45b9ee525d Alembic: fixed memory leak 2017-04-21 14:11:49 +02:00
099816587a Alembic: Construct ISampleSelector once and pass along
No longer passing time as float and constructing ISampleSelectors all
over the place. Instead, just construct an ISampleSelector once and
pass it along.
2017-04-21 14:11:49 +02:00
df84082c70 Cycles: Cleanup, indentation in preprocessor 2017-04-21 12:26:04 +02:00
470b54a37a Cycles: Cleanup, indentation inside preprocessor 2017-04-21 12:01:27 +02:00
aa2cff4509 Cycles: Fix regression in SSS rendering after principled commit 2017-04-21 12:01:27 +02:00
7a59d381ce Cycles: Cleanup, indentation of comment
Was broken after principled commit.
2017-04-21 12:01:27 +02:00
c7a5c48cba CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations.

Main benefits of this goes as:

- Linux distros can use that to avoid libraries duplication and link
  blender package against gflags package from the system.

- It it easier to test whether Blender works with updated version of
  Gflags prior to re-bundling the library.
2017-04-21 12:01:27 +02:00
55a3d48046 Docs: diagram for reflect_v3_v3v3 2017-04-21 17:27:20 +10:00
13ee5ba467 Store edit-font select-box length
A little awkward to calculate when drawing.
2017-04-21 17:12:43 +10:00
Stefan Werner
aeda1a16f3 D2607: Switch eye dropper to use linear color space internally
This switches the internal color representation of the eye dropper from display space to linear. Any time a linear color is requested and the color is picked from a linear object, the result is now precise to the bit as the color gets patched through directly. Color space conversion now only happens when a color is picked from non-linear display space objects or when the color is requested to be returned in non-linear space.

In addition, this patch changes the DifferenceMatte node to interpret a tolerance of 0.0 to accept colors that are identical bit by bit, as apposed to simply refusing all colors.
2017-04-20 22:41:26 +02:00
Stefan Werner
b628f765b0 D2608: Allow HDR picking from Compositor background
Replaced some STREQ(snode->tree_idname, ...) calls with ED_node_is_*() calls for improved readability, fixed one case where the STREQ was used the wrong way
2017-04-20 22:32:00 +02:00
ca958642fa Fix Surface Deform not unbinding if target is removed 2017-04-20 17:49:45 +02:00
52295dd480 Alembic export: don't show warning for every exported frame
The warning about not having a UV map is now only shown once per hair
system.
2017-04-20 15:30:13 +02:00
ee3faddfaa Fix T45350: Cache not being recomputed with "Bake All Dynamics" 2017-04-20 15:01:21 +02:00
ae79eb2105 Alembic import: select imported objects
When the Alembic import is finished, all imported objects are selected.
2017-04-20 12:01:31 +02:00
31c644b657 Fix T51198: Crash with new Datablock ID Properties 2017-04-20 11:40:31 +03:00
6da53e46c9 Use reflect for calculating second normal 2017-04-20 18:08:05 +10:00
9bb8e46460 Docs: move note (was mixed up) 2017-04-20 17:11:12 +10:00
6c26911c3d Fix T51248: user preferences window size not adapted to DPI. 2017-04-20 01:19:47 +02:00
1873ea337c Fix T51243: Delete Globally won't work with Datablock ID Properties.
That's a quick hack to address that specific case, new pointer IDProp
actually enlights a generic problem - datablocks using themselves - which
is not really handled by current code, would consider this not-so-urgent
TODO though.
2017-04-19 22:07:57 +02:00
1c28e12414 Fix (unreported) missing handling of GPencil Layer's parent Object pointer in BKE_library_query.
Grrrr... still finding missing pointers here... :/
2017-04-19 21:47:01 +02:00
aaec934096 Alembic import: added simple unit test for importer.
It only tests the presence of the objects and their parent/child pointers.
Matrix and animated properties should be done in a later test.
2017-04-19 17:28:25 +02:00
8accea07f7 UI: Reorganize the UV/Image "Game Properties" Pannel
This uses the same amount of room while giving it a more clean look and adds a label for the mapping options so users can tell the purpose.
2017-04-19 11:15:41 -04:00
2dac8b3ee0 Alembic import/export: added as_background_job option
The ABC_export and ABC_import functions both take a as_background_job
parameter, and return a boolean.

When as_background_job=true, returns false immediately after scheduling
a background job. This was the old behaviour of this function, which makes
it very hard for scripts to do something with the data after the import
or export completes.

When as_background_job=false, performs the export synchronously, and
returns true when the export was ok, and false if there were any errors.
This allows further processing.

The Scene.alembic_export() function is deprecated, and will be removed from
Blender 2.8 in favour of calling the bpy.ops.wm.alembic_export() operator.
As such, it has been hard-coded to the old background job behaviour.
2017-04-19 14:40:57 +02:00
b148ac5cf7 Alembic export: made hair/particle export optional.
The export is still slower than needed, as the particle systems themselves
aren't disabled during the export. It's only the writing to the Alembic
file that's skipped.
2017-04-19 13:03:52 +02:00
0fd53c87de Alembic export: converted some export params to actual bools
The variables were interpreted as booleans, and had a 1-bit width. I don't
see a reason to not just use the bool type instead.
2017-04-19 11:43:43 +02:00
42c8d93c5f Fix 'API defined' ID properties still having 'remove' button in UI.
We could not edit them, but still could delete them, which makes no
sense, API-defined properties are similar to class members, removing
them from single instances is pure garbage. And it was broken anyway.

Found by @a.romanov while checking on T51198, thanks.
2017-04-19 09:54:47 +02:00
989080c4f6 Alembic import: little fix for D2634
Now it doesn't crash any more when the Alembic curves object doesn't
have any user properties.
2017-04-18 17:00:21 +02:00
5bdbc88ab8 Alembic import/export: write curve resolution to user property
Curve resolution isn't natively supported by Alembic, hence it is stored
in a user property "blender:resolution". I've looked at a Maya curves
example file, but that also didn't contain any information about curve
resolution.

Differential Revision: https://developer.blender.org/D2634

Reviewers: kevindietrich
2017-04-18 16:36:33 +02:00
70018eb16e Cleanup: missing headers 2017-04-19 00:25:31 +10:00
3922d5194f Fix install_deps.sh for new Ubuntu 17.04, which does not have libopenjpeg! 2017-04-18 15:24:09 +02:00
2836003f6b Fix T51187: Memory leak when exporting OpenEXR monochrome animation 2017-04-18 14:28:13 +02:00
7d5a1c0c4c Alembic unittest: pass unknown CLI arguments to unittest.main()
This allows specifying test names on the CLI, in order to run only one
of the tests.
2017-04-18 13:57:04 +02:00
86288725df Alembic import: fall back to linear when variable order array is invalid.
This seems like more sane behaviour than to keep the orderu at the
invalid default value 0.
2017-04-18 13:57:04 +02:00
d24578b676 Alembic export: fixed curve type and order.
The order number written to Alembic is the same as we use in memory, so
the +1 wasn't needed, at least according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

Furthermore, when writing an array of nurb orders, the curve type should
be set to kVariableOrder, otherwise the importer will ignore it.
2017-04-18 13:57:04 +02:00
Pascal Schoen
8825a8e951 Squashed commit of the following:
commit 90778901c9
Merge: 76eebd9 3bf0026
Author: Schoen <schoepas@deher1m1598.emea.adsint.biz>
Date:   Mon Apr 3 07:52:05 2017 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 76eebd9379
Author: Schoen <schoepas@deher1m1598.emea.adsint.biz>
Date:   Thu Mar 30 15:34:20 2017 +0200

    Updated copyright for the new files.

commit 013f4a152a
Author: Schoen <schoepas@deher1m1598.emea.adsint.biz>
Date:   Thu Mar 30 15:32:55 2017 +0200

    Switched from multiplication of base and subsurface color to blending
    between them using the subsurface parameter.

commit 482ec5d1f2
Author: Schoen <schoepas@deher1m1598.emea.adsint.biz>
Date:   Mon Mar 13 15:47:12 2017 +0100

    Fixed a bug that caused an additional white diffuse closure call when using
    path tracing.

commit 26e906d162
Merge: 0593b8c 223aff9
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Feb 6 11:32:31 2017 +0100

    Merge branch 'master' into cycles_disney_brdf

commit 0593b8c51b
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Feb 6 11:30:36 2017 +0100

    Fixed the broken GLSL shader and implemented the Disney BRDF in the
    real-time view port.

commit 8c7e11423b
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Feb 3 14:24:05 2017 +0100

    Fix to comply strict compiler flags and some code cleanup

commit 17724e9d2d
Merge: 379ba34 520afa2
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jan 24 09:59:58 2017 +0100

    Merge branch 'master' into cycles_disney_brdf

commit 379ba346b0
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jan 24 09:28:56 2017 +0100

    Renamed the Disney BSDF to Principled BSDF.

commit f80dcb4f34
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Dec 2 13:55:12 2016 +0100

    Removed reflection call when roughness is low because of artifacts.

commit 732db8a57f
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed Nov 16 09:22:25 2016 +0100

    Indication if to use fresnel is now handled via the type of the BSDF.

commit 0103659f5e
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Nov 11 13:04:11 2016 +0100

    Fixed an error in the clearcoat where it appeared too bright for default
    light sources (like directional lights)

commit 0aa68f5335
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Nov 7 12:04:38 2016 +0100

    Resolved inconsistencies in using tabs and spaces

commit f5897a9494
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Nov 7 08:13:41 2016 +0100

    Improved the clearcoat part by using GTR1 instead of GTR2

commit 3dfc240e61
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Oct 31 11:31:36 2016 +0100

    Use reflection BSDF for glossy reflections when roughness is 0.0 to
    reduce computational expense and some code cleanup

    Code cleanup includes:
    - Code style cleanup and removed unused code
    - Consolidated code in the bsdf_microfacet_multi_impl.h to reduce
      some computational expense

commit a2dd0c5faf
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed Oct 26 08:51:10 2016 +0200

    Fixed glossy reflections and refractions for low roughness values and
    cleaned up the code.

    For low roughness values, the reflections had some strange behavior.

commit 9817375912
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Oct 25 12:37:40 2016 +0200

    Removed default values in setup functions and added extra functions for
    GGX with fresnel.

commit bbc5d9d452
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Oct 25 11:09:36 2016 +0200

    Switched from uniform to cosine hemisphere sampling for the diffuse and
    the sheen part.

commit d52d8f2813
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Oct 24 16:17:13 2016 +0200

    Removed the color parameters from the diffuse and sheen shader and use
    them as closure weights instead.

commit 8f3d927385
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Oct 24 09:57:06 2016 +0200

    Fixed the issue with artifacts when using anisotropy without linking the
    tangent input to a tangent node.

commit d93f680db9
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Oct 24 09:14:51 2016 +0200

    Added subsurface radius parameter to control the per color channel
    effection radius of the subsurface scattering.

commit c708c3e53b
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Oct 24 08:14:10 2016 +0200

    Rearranged the inputs of the shader.

commit dfbfff9c38
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Oct 21 09:27:05 2016 +0200

    Put spaces in the parameter names of the shader node

commit e5a748ced1
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Oct 21 08:51:20 2016 +0200

    Removed code that isn't in use anymore

commit 75992bebc1
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Oct 21 08:50:07 2016 +0200

    Code style cleanup

commit 4dfcf455f7
Merge: 243a0e3 2cd6a89
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Thu Oct 20 10:41:50 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 243a0e3eb8
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Thu Oct 20 10:01:45 2016 +0200

    Switching between OSL and SVM is more consistant now when using Disney
    BSDF.

    There were some minor differences in the OSL implementation, e.g. the
    refraction roughness was missing.

commit 2a5ac50922
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Sep 27 09:17:57 2016 +0200

    Fixed a bug that caused transparency to be always white when using OSL and
    selecting GGX as distribution of the Disney BSDF

commit e1fa862391
Merge: d0530a8 7f76f6f
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Sep 27 08:59:32 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit d0530a8af0
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Sep 27 08:53:18 2016 +0200

    Cleanup the Disney BSDF implementation and removing unneeded files.

commit 3f4fc826bd
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Sep 27 08:36:07 2016 +0200

    Unified the OSL implementation of the Disney clearcoat as a simple
    microfacet shader like it was previously done in SVM

commit 4d3a0032ec
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Sep 26 12:35:36 2016 +0200

    Enhanced performance for Disney materials without subsurface scattering

commit 3cd5eb56cf
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Sep 16 08:47:56 2016 +0200

    Fixed a bug in the Disney BSDF that caused specular reflections to be too
    bright and diffuse is now reacting to the roughness again

    - A normalization for the fresnel was missing which caused the specular
      reflections to become too bright for the single-scatter GGX
    - The roughness value for the diffuse BSSRDF part has always been
      overwritten and thus always 0
    - Also the performance for refractive materials with roughness=0.0 has
      been improved

commit 7cb37d7119
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Thu Sep 8 12:24:43 2016 +0200

    Added selection field to the Disney BSDF node for switching between
    "Multiscatter GGX" and "GGX"

    In the "GGX" mode there is an additional parameter for changing the
    refraction roughness for materials with smooth surfaces and rough interns
    (e.g. honey). With the "Multiscatter GGX" this effect can't be produced at
    the moment and so here will be no separation of the two roughness values.

commit cdd29d06bb
Merge: 02c315a b40d1c1
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Sep 6 15:59:05 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 02c315aeb0
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Sep 6 15:16:09 2016 +0200

    Implemented the OSL part of the Disney shader

commit 5f880293ae
Merge: 630b80e b399a6d
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Sep 2 10:53:36 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 630b80e08b
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Sep 2 10:52:13 2016 +0200

    Fresnel in the microfacet multiscatter implementation improved

commit 0d9f4d7acb
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Aug 26 11:11:05 2016 +0200

    Fixed refraction roughness problem (refractions were always 100% rough)
    and set IOR of clearcoat to 1.5

commit 9eed34c7d9
Merge: ef29aae ae475e3
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Aug 16 15:22:32 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit ef29aaee1a
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Aug 16 15:17:12 2016 +0200

    Implemented the fresnel in the multi-scatter GGX for the Disney BSDF

    - The specular/metallic part uses the multi-scatter GGX
    - The fresnel of the metallic part is controlled by the specular value
    - The color of the reflection part when using transparency can be
      controlled by the specularTint value

commit 88567af085
Merge: cc267e5 285e082
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed Aug 3 15:05:09 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit cc267e52f2
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed Aug 3 15:00:25 2016 +0200

    Implemented the Disney clearcoat as a variation of the microfacet bsdf,
    removed the transparency roughness again and added an input for
    anisotropic rotations

commit 81f6c06b1f
Merge: ece5a08 7065022
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed Aug 3 11:42:02 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit ece5a08e0d
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jul 26 16:29:21 2016 +0200

    Base color now applied again to the refraction of transparent Disney
    materials

commit e3aff6849e
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jul 26 16:05:19 2016 +0200

    Added subsurface color parameter to the Disney shader

commit b3ca6d8a2f
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jul 26 12:30:25 2016 +0200

    Improvement of the SSS in the Disney shader

     * Now the bump normal is correctly used for the SSS.
     * SSS in Disney uses the Disney diffuse shader

commit d68729300e
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jul 26 12:23:13 2016 +0200

    Better calculation of the Disney diffuse part

    Now the values for NdotL und NdotV are clamped to 0.0f for a better look
    when using normal maps

commit cb6e500b12
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Jul 25 16:26:42 2016 +0200

    Now one can disable specular reflactions again by setting specular and
    metallic to 0 (cracked this in the previous commit)

commit bfb9cb11b5
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Jul 25 16:11:07 2016 +0200

    fixed the Disney SSS and cleaned the initialization of the Disney shaders

commit 642c0fdad1
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Jul 25 16:09:55 2016 +0200

    fixed an error that was caused by the missing LABEL_REFLECT in the Disney
    diffuse shader

commit c10b484dca
Author: Jens Verwiebe <info@jensverwiebe.de>
Date:   Fri Jul 22 01:15:21 2016 +0200

    Rollback attempt to fix sss crashing, it prevented crash by disabling sss completely, thus useless

commit 462bba3f97
Author: Jens Verwiebe <info@jensverwiebe.de>
Date:   Thu Jul 21 23:11:59 2016 +0200

    Add an undef for sc_next for safety

commit 32d348577d
Author: Jens Verwiebe <info@jensverwiebe.de>
Date:   Thu Jul 21 00:15:48 2016 +0200

    Attempt to fix Disney SSS

commit dbad91ca6d
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed Jul 20 11:13:00 2016 +0200

    Added a roughness parameter for refractions (for scattering of the rays
    within an object)

    With this, one can create a translucent material with a smooth surface and
    with a milky look.

    The final refraction roughness has to be calculated using the surface
    roughness and the refraction roughness because those two are correlated
    for refractions. If a ray hits a rough surface of a translucent material,
    it is scattered while entering the surface. Then it is scattered further
    within the object. The calculation I'm using is the following:

    RefrRoughnessFinal = 1.0 - (1.0 - Roughness) * (1.0 - RefrRoughness)

commit 50ea5e3e34
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue Jun 7 10:24:50 2016 +0200

    Disney BSDF is now supporting CUDA

commit 10974cc826
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 31 11:18:07 2016 +0200

    Added parameters IOR and Transparency for refractions

    With this, the Disney BRDF/BSSRDF is extended by the BTDF part.

commit 218202c090
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon May 30 15:08:18 2016 +0200

    Added an additional normal for the clearcoat

    With this normal one can simulate a thin layer of clearcoat by applying a
    smoother normal map than the original to this input

commit dd139ead7e
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon May 30 12:40:56 2016 +0200

    Switched to the improved subsurface scattering from Christensen and
    Burley

commit 11160fa4e1
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon May 30 10:16:30 2016 +0200

    Added Disney Sheen shader as a preparation to get to a BSSRDF

commit cee4fe0cc9
Merge: 4f955d0 6b5bab6
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon May 30 09:08:09 2016 +0200

    Merge branch 'cycles_disney_brdf' of git.blender.org:blender into cycles_disney_brdf

    Conflicts:
    	intern/cycles/kernel/closure/bsdf_disney_clearcoat.h
    	intern/cycles/kernel/closure/bsdf_disney_diffuse.h
    	intern/cycles/kernel/closure/bsdf_disney_specular.h
    	intern/cycles/kernel/closure/bsdf_util.h
    	intern/cycles/kernel/osl/CMakeLists.txt
    	intern/cycles/kernel/osl/bsdf_disney_clearcoat.cpp
    	intern/cycles/kernel/osl/bsdf_disney_diffuse.cpp
    	intern/cycles/kernel/osl/bsdf_disney_specular.cpp
    	intern/cycles/kernel/osl/osl_closures.h
    	intern/cycles/kernel/shaders/node_disney_bsdf.osl
    	intern/cycles/render/nodes.cpp
    	intern/cycles/render/nodes.h

commit 4f955d0523
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 24 16:38:23 2016 +0200

    SVM and OSL are both working for the simple version of the Disney BRDF

commit 1f5c41874b
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 24 09:58:50 2016 +0200

    Disney node can be used without SVM and started to cleanup the OSL implementation

    There is still some wrong behavior for SVM for the Schlick Fresnel part at the
    specular and clearcoat

commit d4b814e930
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 18 10:22:29 2016 +0200

    Switched from a parameter struct for Disney parameters to ShaderClosure params

commit b86a1f5ba5
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 18 10:19:57 2016 +0200

    Added additional variables for storing parameters in the ShaderClosure struct

commit 585b886236
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 17 12:03:17 2016 +0200

    added output parameter to the DisneyBsdfNode

    That has been forgotten after removing the inheritance of BsdfNode

commit f91a286398
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 17 10:40:48 2016 +0200

    removed BsdfNode class inheritance for DisneyBsdfNode

    That's due to a naming difference. The Disney BSDF uses the name 'Base Color'
    while the BsdfNode had a 'Color' input. That caused a text message to be
    printed while rendering.

commit 30da91c9c5
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 4 16:08:10 2016 +0200

    disney implementation cleaned

commit 30d41da0f0
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 4 13:23:07 2016 +0200

    added the disney brdf as a shader node

commit 1f099fce24
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 3 16:54:49 2016 +0200

    added clearcoat implementation

commit 00a1378b98
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Apr 29 22:56:49 2016 +0200

    disney diffuse und specular implemented

commit 6baa7a7eb7
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Apr 18 15:21:32 2016 +0200

    disney diffuse is working correctly

commit d8fa169bf3
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Apr 18 08:41:53 2016 +0200

    added vessel for disney diffuse shader

commit 6b5bab6cec
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 18 10:22:29 2016 +0200

    Switched from a parameter struct for Disney parameters to ShaderClosure params

commit f6499c2676
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 18 10:19:57 2016 +0200

    Added additional variables for storing parameters in the ShaderClosure struct

commit 7100640b65
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 17 12:03:17 2016 +0200

    added output parameter to the DisneyBsdfNode

    That has been forgotten after removing the inheritance of BsdfNode

commit 419ee54411
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 17 10:40:48 2016 +0200

    removed BsdfNode class inheritance for DisneyBsdfNode

    That's due to a naming difference. The Disney BSDF uses the name 'Base Color'
    while the BsdfNode had a 'Color' input. That caused a text message to be
    printed while rendering.

commit 6006f91e87
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 4 16:08:10 2016 +0200

    disney implementation cleaned

commit 0ed0895914
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Wed May 4 13:23:07 2016 +0200

    added the disney brdf as a shader node

commit 0630b742d7
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Tue May 3 16:54:49 2016 +0200

    added clearcoat implementation

commit 9f3d39744b
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Fri Apr 29 22:56:49 2016 +0200

    disney diffuse und specular implemented

commit 9b26206376
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Apr 18 15:21:32 2016 +0200

    disney diffuse is working correctly

commit 4711a3927d
Author: Pascal Schoen <pascal_schoen@gmx.net>
Date:   Mon Apr 18 08:41:53 2016 +0200

    added vessel for disney diffuse shader

Differential Revision: https://developer.blender.org/D2313
2017-04-18 11:43:09 +02:00
f970e859cf Cycles: Cleanup, style 2017-04-18 11:39:21 +02:00
968d86afc3 Depsgraph: Use proper scene to get frame from for pose constraints evaluaiton
Spotted by Luca, thanks!
2017-04-18 11:31:45 +02:00
dd356ec08d Cycles: Remove meaningless volume shaders
This is possible to use surface-only nodes and connect them to volume output.
If there was something connected to surface output those extra connections
will not change anything visually but will force volume features to be included
into feature-adaptive kernels.

In fact, this exact reason seems to be causing slowdown of Barcelone file
comparing AMD OpenCL to NVidia CUDA.

Currently only supported by the final F12 renders because of the current design
of what gets optimized out when and how feature-adaptive kernel accesses
list of required features.

Reviewers: dingto, nirved, maiself, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: bliblubli

Differential Revision: https://developer.blender.org/D2569
2017-04-18 11:20:39 +02:00
bb8f7784ce Fix strict compiler compilation 2017-04-18 09:41:15 +02:00
8d78df315c Fix UI: double separator in Movie Clip Editor's view menu 2017-04-17 23:54:19 -04:00
157a8727b5 Fix brush menu broken before adding uv and texture data
To reproduce: 1) go to texture paint mode 2) go into the brush menu

Pointed out by @lijenstina on IRC also fix is authored by him.
2017-04-17 23:42:17 -04:00
4d0d1b5936 Fix T51150: user_remap on itself changes users to 0.
Remapping to itself is nonsense here (was triggering an assert in
BKE_library code actually), just make it a bail out early in RNA
callback in that case.
2017-04-17 22:33:07 +02:00
4621392353 Fix T51176: Cache file location can be blank and prevent fluid simulation from reading baked data
Sanitize a bit how cache path is handled by fluidsim (there is much more
to be done here though :( ), and forbid empty path (we reset to default
path relative to current .blend file in case it's empty).

If people really, really want to use current OS-wise directory, they can at
least use '.' as path. ;)
2017-04-17 17:35:53 +02:00
819064154c BLI: make BLI_make_existing_file() return true on success, and false on failure... 2017-04-17 17:35:53 +02:00
c89ed72048 Fluidsim cleanup: get rid of magic numbers! 2017-04-17 17:35:53 +02:00
11f4b407d4 Fix build error on Windows introduced in D2425 2017-04-17 13:41:05 +03:00
57d31171d0 Object.raycast: more minor improvements ...
- if it is to check a bool, let it be local;
- removes gotos;
2017-04-16 18:50:06 -03:00
15215652e1 Fix T49617: Grease Pencil Stroke Placement regression
When moved the options to toolsetting, this part was missing. The problem was not the pointer as suggested in D2629.

Thanks Arvīds Kokins for his help fixing this bug
2017-04-16 17:52:39 +02:00
97c9c6a3f3 Fix T51149: Joining curves allows 2D curves in 3D 2017-04-15 16:55:08 +10:00
00ad259939 Object.raycast: error in previous commit
This is taking longer than I expected.
2017-04-15 02:31:33 -03:00
34ea8058b9 Fix: Object.raycast: error to free treedata 2017-04-15 02:24:04 -03:00
97d2f63bfe Object.raycast: Also test distance from BoundBox
If `isect_ray_aabb_v3_simple` provides this information, why not take advantage of it?
2017-04-15 01:31:24 -03:00
480473f1f1 Object.raycast: Test the hit on the BoundBox first
This avoids the unnecessary creation of bvhtree, which can be highly inefficient in some cases
(for example: in the `operator_modal_view3d_raycast.py` template)
2017-04-15 00:44:05 -03:00
718fb3167d Fix Player stubs (tm) 2017-04-15 01:09:44 +02:00
e280c70aa9 Fix T51216: SSAO attenuation not being scale invariant.
Unfortunately this does break compatibility in that the viewport will look a
bit different depending on the settings, but the old behavior was simply not
usable for higher distances.
2017-04-15 00:43:22 +02:00
5fa4f397c2 Alembic import: fixed dupligroup export when the dupli-empty has a parent 2017-04-14 18:20:28 +02:00
4d117f2fd2 Alembic export: fixed flattened dupligroup import 2017-04-14 18:20:28 +02:00
78b5d66af8 Object Info node support for GLSL mode and the internal render
Object Info node can be useful to give some variation to a single material assigned to multiple instances. This patch adds support for Viewport and BI.

{F499530}

Example: {F499528}

Reviewers: merwin, brecht, dfelinto

Reviewed By: brecht

Subscribers: duarteframos, fclem, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D2425
2017-04-14 18:15:57 +03:00
6fc7521ade Fix T49429: incorrect Blender internal viewport border render with DrawPixels method. 2017-04-14 16:26:10 +02:00
e12c311002 Alembic import: greatly improved curve/hair import performance
The U-resolution of the imported curves was kept at the default value
of 12, which is way too high for imported hair. We export hair at a
fairly high resolution already, so it's not needed to subdivide even
further when importing.

Of course this may have an impact on other curves that do require this
U-resolution to be higher. In that case the resolution can be
increased after importing.

I removed the default nu->orderu = num_verts, as that allowed every
point to influence the entire spline, which was more expensive for the
CPU, and unlikely to be needed. The orderu computations had off-by-one
errors in the curve importer, which are now also fixed. The correct
values are:

    - Linear: orderu = 2
    - Quadratic: orderu = 3
    - Cubic: orderu = 4

These values are also what is stored in the Alembic file for curves of
type kVariableOrder, according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

The result is a frame rate increase of roughly 100x (tested with one
100-hair test on one machine, so take with grain of salt).
2017-04-14 15:26:45 +02:00
6af131fa5c Added simple unittests for Alembic exporter
This test checks that a set of cubes are exported with the correct
transform, both with flatten=True and flatten=False.

This commit also adds an easy to use superclass for upcoming Alembic
unit tests.
2017-04-14 12:54:20 +02:00
0b55b8cc6a Cleanup: triple quotes for docstrings 2017-04-14 20:01:43 +10:00
6a8a679037 BLF: avoid glyph cache use-after free
Causes crash if the font size isn't set after clearing (see T51200)
2017-04-14 19:54:09 +10:00
7cfabcef5c Buildbot: Fix typos 2017-04-14 10:03:51 +02:00
b354c15805 Buildbot: Attempt to fix CUDA compilation on OSX
Stupid toolkit is really fragile about CLang version.
2017-04-14 10:01:28 +02:00
ac880b67c3 UI: Add/Improve a few tooltips
See T51061
2017-04-13 18:07:50 -04:00
3906e5939a Alembic export: unified code of exploreTransform and exploreObject. 2017-04-13 16:34:37 +02:00
ebb3045114 Alembic export: added support for writing dupli-groups
This supports our common character animation workflow, where a character,
its rig, and the custom bone shapes are all part of a group. This group
is then linked into the scene, the rig is proxified and animated. Such
a group can now be exported. Use "Renderable objects only" to prevent
writing the custom bone shapes to the Alembic file.
2017-04-13 16:34:37 +02:00
0a032ce83b Fix Surface Deform crash with missing or freed DM 2017-04-13 15:40:50 +02:00
360cf8393a Cycles: Make vectorized types constructor from register explicit
This is not a cheap operation which we dont' want to happen silently.
2017-04-13 15:08:00 +02:00
e6392458d3 Cycles: Remove unused function
It was quite wrong actually by doing some __m128 to flaot4 round trips.
2017-04-13 15:08:00 +02:00
0706b908db Alembic import: fixed off-by-one error in start/end frame
static_cast<int> truncates, so a computed end frame of 99.999999999998
would result in 99, instead of the correct 100.
2017-04-13 14:50:02 +02:00
575d6415fb Task scheduler: Fix typo in TLS for pools created from non-main thread
Did a mistake which started to use same TLS for all threads for such pools.

Also added some extra asserts to help catching the bugs.
2017-04-13 13:34:07 +02:00
544df54f3c Fix Blenderplayer (c) 2017-04-13 12:36:19 +02:00
f5bc8ad4ce Add red alert in UI controls for datablock pointer properties 2017-04-13 12:59:04 +03:00
a7b3047cef Datablock ID Properties
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.

In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.

Original author: @artfunkel

Alexander (Blend4Web Team)

Reviewers: brecht, artfunkel, mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne

Maniphest Tasks: T37754

Differential Revision: https://developer.blender.org/D113
2017-04-13 12:33:05 +03:00
f90a243d9c Cycles: Header cleanup in BVH: move self header to be the first one
This makes us more sure that header files are more self-sufficient.
2017-04-13 11:28:02 +02:00
0097f9b298 Cycles: Split BVH implementations into separate files 2017-04-13 10:55:46 +02:00
c8548871ac Cycles: Use more explicit and commonly used names for BVH structures
This renames BinaryBVH to BVH2 and QBVH to BVH8. There is no user measurable
difference, but allows us to add more types of BVH trees such as BVH8.
2017-04-13 10:29:14 +02:00
ed5c3121f5 Task scheduler: Prevent race condition for the pools created from non-main thread
We can not re-use anything for such pools, because we will know nothing about whether
the main thread is sleeping or not. So we identify such threads as 0, but we don't
use main thread's TLS.

This fixes dead-locks and crashes reported by Luca when doing playblasts.
2017-04-12 18:20:17 +02:00
699a3e2498 Fix T50227: Alembic uv export/load issue
Previously only a CD_MLOOPUV custom data layer was created. Now we also
create the accompanying CD_MTEXPOLY layer too.
2017-04-12 16:33:47 +02:00
6b815ae55d Fix T51184: Crash of Blender when I try to join an object with one that has booleans modifiers 2017-04-12 16:12:50 +02:00
642728b339 Alembic export: fixed exporting as "flat"
This exports all objects in world coordinates without parenting.
2017-04-12 12:21:08 +02:00
de3c98d62b Alembic export: removed superfluous export_object() check.
The exploreTransform() function already does this check, and the check
isn't necessary when the object type isn't exported anyway.
2017-04-12 12:21:00 +02:00
4560f0b007 Cleanup: use lowercase gpu prefix for static funcs
This was mostly followed already.
2017-04-12 20:19:55 +10:00
c29bc61829 Color management: Avoid memory copy into same buffer 2017-04-12 10:23:38 +02:00
0ebe08af34 Docs: minor improvement to code example 2017-04-12 14:21:59 +10:00
31bdb31ecf Fix: width of UILayout.prop_enum() buttons 2017-04-11 13:25:46 +03:00
d097c72f81 Cycles: Only calculate global size of split kernel once to avoid changes
Global size depends on memory usage which might change during rendering.
Havent seen it happen but seems possible that this could cause the global
size to be different than what was used for allocating buffers.
2017-04-11 03:26:18 -04:00
1e6038a426 Cycles: Implement automatic global size for CUDA split kernel
Not sure this is the best way to do things for CUDA but its much better than
being unimplemented.
2017-04-11 03:11:18 -04:00
3722da3b4e Cleanup: quiet harmless but annoying overflow
Caused asan to print warnings generating RNA
2017-04-11 11:49:21 +10:00
532b2786e2 Remove redundant glColor call 2017-04-11 10:47:00 +10:00
ef816f9cff Cycles: Fix the AO replacement option in the split kernel
Currently the code for it was inside the hair-specific part, so it wouldn't be enabled in hairless renders.
2017-04-11 01:07:49 +02:00
8b0fbb909b UI: Add missing UV tools in the UV/Image Editor Window > Tools tab
Original Author: @xrg
Changes By @blendify

Image of patch: {F284237}
2017-04-10 18:37:03 -04:00
8ac7510a4d UI: Do not put walk navigation settings inside an if statement
The issue here is that the preferences are still used because both can be accessed from the 3D View, view menu. In the future, it is likely that the old mode will be removed (maybe 2.8?) but for now we want to keep both operational.

Differential revision: https://developer.blender.org/D2320
2017-04-10 17:44:03 -04:00
2ad1124372 Fix stereoscopic camera volume drawing.
Not sure how we got to that point, but code was drawing twice one side
of the camera volume, and not at all another side!
2017-04-10 17:31:39 +02:00
c8e764ccbf Cycles: Fix race condition in shader attribute for real now
Ended up moving lock in the more centralized space since multiple shaders
can access this map.
2017-04-10 16:53:01 +02:00
fd203a0933 GPencil 2D drawing code: minor optimization.
Do not recompute both points's 2D coordinates for each segments, we can
copy over from previous one... Does not gives any measurable speedup off
hands, though.
2017-04-10 16:30:05 +02:00
a40f15d04f Fix T51158: Motion Tracking Movie clip editor graph 2017-04-10 16:16:12 +02:00
58f3b3c6d1 Tracking: Fix use-after-free bug 2017-04-10 16:02:14 +02:00
358def15a3 Install deps: Fix compilation error of Alembic
Couple of things here:

- Boost is not necesserily compiled into your /opt/lib and system-wide
  version might have been used. The recent change in Alembic did not
  take this into account.

- Alembic needs some extra component of Boost.
  This part might be missing now for other distros than DEB.
2017-04-10 15:55:25 +02:00
9539cfacca Cycles: Apparently board name could be an empty string 2017-04-10 15:31:21 +02:00
3b4cc5dfed Cycles: Workaround cubic volume filtering crashing on Linux
The issue was caused by recent change in inline policy.

There is some sort of memory corruption happening here, ASAN suggests
it's stack overflow issue. Not quite sure why it is happening tho and
was not able to solve anything here yet in the past hours.

Committing fix which works with a big TODO note.

The issue is visible on AVX2 machine when rendering cycles_reports_test.
2017-04-10 14:44:07 +02:00
90d85c7975 Cycles: Fix compilation error of AVX2 kernels with SSE optimization disabled 2017-04-10 14:44:04 +02:00
c3d393c1df Cycles: Cleanup, indentation and trailing whitespace 2017-04-10 14:44:04 +02:00
73a9ff0d2d PyAPI: Fast buffer access to id property arrays
Support Python's buffer protocol for ID-properties.
2017-04-10 21:12:02 +10:00
5b873c8c24 Cleanup: use doxy code block 2017-04-09 16:26:04 +10:00
162e184ffd ListBase: Add insert-replace function
Handy to replace an existing link
(without having to store before/after links)

Use for id-props
2017-04-09 16:07:09 +10:00
b60d4800c6 Cycles: Fix building of CUDA kernels with compilers where C++11 is disabled 2017-04-08 07:12:04 -04:00
1cd54ec225 Add helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.
Doing this in a fully 'clean' way is far from obvious, especially
unregister, you often end up leaving nasty 'orphanned' keymap items
referring to unregistered operators...
2017-04-08 11:09:11 +02:00
867d311307 Cycles: Fix warning with MSVC 2017-04-07 18:28:38 +02:00
7d77b3e813 Cycles: Fix compilation error with certain CUDA and host compiler configuration
This seems to happen on Windows only, happened to Thomas and Nathan already.

Similar patch Thomas was showing, but i do not see it committted. So comitting
now in order to get more developers and users happy.
2017-04-07 18:28:38 +02:00
8c22a974d6 Tests: Compare vectors with epsilon
SOlves the test false-positively failing in 32 bit environment.
2017-04-07 18:28:38 +02:00
b332fc8f23 [Cycles/msvc] Get cycles_kernel compile time under control.
Ever since we merged the extra texture types (half etc) and spit kernel the compile time for cycles_kernel has been going out of control.

It's currently sitting at a cool 1295.762 seconds with our standard compiler (2013/x64/release)

I'm not entirely sure why msvc gets upset with it, but the inlining of matrix near the bottom of the tri-cubic 3d interpolator is the source of the issue, this patch excludes it from being inlined.

This patch bring it back down to a manageable 186 seconds. (7x faster!!)

with the attached bzzt.blend that @sergey  kindly provided i got the following results with builds with identical hashes

58:51.73 buildbot
58:04.23 Patched

it's really close, the slight speedup could be explained by the switch instead of having multiple if's (switches do generate more optimal code than a chain of if/else/if/else statements) but in all honesty it might just have been pure luck (dev box,very polluted, bad for benchmarks) regardless, this patch doesn't seem to slow down anything with my limited testing.

{F532336}

{F532337}

Reviewers: brecht, lukasstockner97, juicyfruit, dingto, sergey

Reviewed By: brecht, dingto, sergey

Subscribers: InsigMathK, sergey

Tags: #cycles

Differential Revision: https://developer.blender.org/D2595
2017-04-07 10:26:55 -06:00
8e0cdfd0c9 Libmv: Correction to previous commit
We do need to make a copy of the values.
2017-04-07 17:57:48 +02:00
a1f8755d32 Libmv: Fix crash of keyframe selection on 32bit linux 2017-04-07 17:10:44 +02:00
eae691f89e Buildbot: List freetype for OIIO libraries
OIIO in release environment is compiled with Freetype support.

This fixes compilation error of static unit tests.
2017-04-07 17:01:07 +02:00
07708b85b4 Buildbot: Link statically against freetype 2017-04-07 17:00:43 +02:00
4360a74715 CMake: Fix detection of idiff program 2017-04-07 17:00:06 +02:00
c637e749b2 Tests: Fix compilation error with static OpenMP 2017-04-07 16:06:28 +02:00
43a910abce Alembic import: prevent crash when cancelling import.
It's possible that cancellation occured between the creation of the reader
and the creation of the Blender object, in which case reader->object()
returns a NULL pointer.
2017-04-07 16:03:29 +02:00
3748ca432d Alembic import: prevent double user decrement when cancelling import.
BKE_libblock_free_us() was called on the object data, which decrements
its user count, after which the same function was called on the object,
which decrements the user count of the object data again. This double
decrement was too much.
2017-04-07 16:03:29 +02:00
fd08570665 Cycles: Fix access of NULL pointer as array
Was confusing guarded allocator for some reason.
2017-04-07 15:08:00 +02:00
ddb42076c9 Alembic: synced gather_objects_paths with visit_objects
This was necessary, but was only mentioned at gather_object_paths (which
I didn't see earlier). That's now also fixed.
2017-04-07 13:41:34 +02:00
1d9f369824 Cleanup: Unused function 2017-04-07 12:55:04 +02:00
9706bfd25d Cycles: Fix corrupted mesh render when topology differs at the next frame 2017-04-07 12:49:10 +02:00
91b9db0724 Cycles: Change work pool and global size of split CPU for easier debugging 2017-04-07 06:06:08 -04:00
8f85ee2fc9 Cycles: Fix indentation 2017-04-07 06:06:08 -04:00
5b45fff136 Cycles: Add missing flush 2017-04-07 06:06:08 -04:00
d66ffaebef Cycles: Check ray state properly to avoid endless loop
The state mask wasnt applied before comparison giving false results. It
shouldnt really happen that a ray state contains any flags that need to
be masked away, but if it does happen its better to not get stuck.
2017-04-07 06:06:08 -04:00
e8e341b585 Alembic: documented use of CacheReader struct 2017-04-07 11:06:50 +02:00
df7d5382d3 Alembic: just pass NULL when we know mcmd->reader is NULL.
More explicit, easier to read & understand.
2017-04-07 11:03:26 +02:00
102966b12e Fix building alembic gtest with buildinfo... 2017-04-07 10:44:13 +02:00
a0799ce336 Fix T51137: Edge Rip Hangs 2017-04-07 11:47:28 +10:00
d426c335c5 Fix T51135: Cylinder primitive generated bad UVs 2017-04-06 12:20:22 -03:00
c684fab8a6 Alembic: rewrapped some lines to fit within 80 chars. 2017-04-06 16:47:01 +02:00
98329a5760 Alembic import: compatibility with pre-C++11 compilers. 2017-04-06 16:47:01 +02:00
8e3676d533 Alembic import: restructured the importer w.g.t. parenthood
Previously, a GHash was used to store a flattened mapping of parent
information based on the Alembic hierarchy, and then that hash was used to
set parent pointers on Blender objects. This resulted in errors and
some duplicate objects. The new approach stores parent pointers while
traversing the Alembic hierarchy, which means that there is much more
information about the actual context of the Alembic object itself,
producing a more stable import.
2017-04-06 16:47:01 +02:00
fa827374a7 Alembic: rotation mode issue in copy_m44_axis_swap, and added unit tests. 2017-04-06 16:47:01 +02:00
b6775cd684 Added float[][] comparison macros to testing.h
I've moved EXPECT_M3_NEAR from abc_matrix_test.cc to testing.h, as that's
a more suitable location.
2017-04-06 16:47:01 +02:00
c2fec0f1b0 Alembic: Renamed create_rotation_matrix to create_swapped_rotation_matrix and more:
Also replaced the bool param "to_yup" with "AbcAxisSwapMode mode", so that
it's more explicit that axes are swapped.

Also added unittests for create_swapped_rotation_matrix.
2017-04-06 16:47:01 +02:00
8ae656bf22 CMake: Fixed order of bf_alembic in SETUP_BLENDER_SORTED_LIBS
bf_alembic depends on bf_bmesh, and should therefore be above it.
2017-04-06 16:47:00 +02:00
bc55c19807 Alembic import: fixed crash on more complex model
There was a problem with parent-child relations not getting set up
correctly when an Alembic object was both the transform for a mesh object
and the parent of other mesh objects.
2017-04-06 16:47:00 +02:00
42cd2719ec Alembic: comment typo/error fixes 2017-04-06 16:47:00 +02:00
6c37a53a2e Alembic import: prevented unnecessary vector scaling 2017-04-06 16:47:00 +02:00
5e86144cd3 Alembic import: moved import-time scaling to different function
convert_matrix() now only converts from Imath::M44d to float[4][4] (taking
different camera orientations into account). Import-time scaling is now
performed by the caller.
2017-04-06 16:47:00 +02:00
4cb5114e13 Alembic: removed unnecessary matrix copy 2017-04-06 16:47:00 +02:00
aaa88fac76 Alembic: simplified AbcEmptyReader::readObjectData 2017-04-06 16:47:00 +02:00
8b2555e798 Alembic: added some r_ prefixes for return parameters 2017-04-06 16:47:00 +02:00
f226b808ff Alembic: code style 2017-04-06 16:47:00 +02:00
3735065d22 Alembic: don't use m_shapes_type 2017-04-06 16:46:51 +02:00
8fe3f47596 Alembic: more lenient check on absence of sheer & homogeneous scaling
Checking precise values of floats is not a good idea.
2017-04-06 16:04:31 +02:00
a9504580b3 Alembic: simplified conditional statements 2017-04-06 16:04:31 +02:00
997ff4bdc4 Alembic import: nicer progress updates 2017-04-06 16:04:31 +02:00
d1696622b7 Alembic import: fixed bug where local matrix from Alembic was used as object matrix
Also renamed AbcObjectReader::readObjectMatrix to
setupObjectTransform, as it does more than just reading the object
matrix; it also sets up an object constraint if the Alembic Xform is
animated.
2017-04-06 16:04:31 +02:00
818ee188e7 Alembic import: separated reading matrix and getting the appropriate Xform object
Also added a bit better error reporting, instead of silently ignoring
invalid Alembic data.
2017-04-06 16:04:31 +02:00
e4367ccb78 Alembic import: be more lenient towards unknown object types.
Alembic is an interchange and caching format, that can contain custom
object schemas. Blender shouldn't crash (because of failing asserts) just
because it doesn't know such an object type.
2017-04-06 16:04:31 +02:00
aba7759992 Alembic: don't call object.getFullName() multiple times. 2017-04-06 16:04:31 +02:00
2c688bac19 Alembic: Renamed parent_map to reader_map
It's a mapping from full path of an Alembic object to an AbcObjectReader*.
The fact that at some point it is used to construct parent-child relations
doesn't matter.
2017-04-06 16:04:31 +02:00
152ec791ad Alembic: use typedefs to make it easier to handle maps/vectors 2017-04-06 16:04:31 +02:00
85672d29f2 Alembic: more const-ness 2017-04-06 16:04:31 +02:00
02d6df80aa Alembic: fixed importer
The importer was guessing whether an Alembic IXform object was part of a
child object, or should be represented as an Empty in Blender. By reversing
the order in which objects are visited, the children can now claim their
parent as part of the same object (so IPolyMesh claims its parent IXform
as part of the same Blender object). This results in much less guesswork.

I've also removed similar guesswork from the code that sets parent pointers,
by simply searching for the parent in a hierarchical way, instead of trying
to predict (again) which IXforms were turned into empties.

Also, visit_object() now actually visits the object -- previously it only
visited its children, and assumed the object it was called on was already
handled by a previous call.
2017-04-06 16:04:31 +02:00
76ca6ed26e Alembic: prevent a couple of unnecessary multiplications 2017-04-06 16:04:31 +02:00
e0bf97d8b4 Alembic: be more explicit in y-up versus z-up variables. 2017-04-06 16:04:31 +02:00
06c25ace7b Alembic: removed a lot of unnecessary & duplicate code from abc_util.cc
create_transform_matrix(float[4][4]) did mostly the same as
create_transform_matrix(Object *, float[4][4]), but more elegant.
However, the former has some inconsistencies with the latter (which
are now merged and made explicit, turned out one was for z-up→y-up
while the other was for y-up→z-up), and was renamed to
copy_m44_axis_swap(...) to convey its purpose more clearly.

Furthermore, "loc" has been renamed to "trans", as matrices don't
store locations but translations; and more variables now have a src_
or dst_ prefix to denote whether they contain a matrix/vector in the
source or destination axis orientation.
2017-04-06 16:04:31 +02:00
1c3b6e042a Alembic: added note 2017-04-06 16:04:31 +02:00
b0967e9d42 Alembic: allow copy_{z,y}up_from_{y,z}up() to be called with yup=zup
This allows in-place conversion between z-up and y-up, by passing the
same variable to both arguments.
2017-04-06 16:04:31 +02:00
00e0a94b3c Alembic: import empties under their own name in Alembic, not their parent's
Before this commit something strange happened, as the m_data_name of
an inherit data-less object was used.
2017-04-06 16:04:31 +02:00
cbe0709db2 Alembic: Don't compute world matrix when it's not necessary. 2017-04-06 16:04:31 +02:00
62a47f9660 Alembic: cleaned up hack in AbcObjectReader::read_matrix() 2017-04-06 16:04:31 +02:00
347a4956a0 Alembic: added some clarification 2017-04-06 16:04:31 +02:00
c0ec0a19da Alembic: added some getter functions to help debug prints etc. 2017-04-06 16:04:31 +02:00
5f23f5b516 Alembic: do not presume to predict the parent name
AbcExporter::createTransformWriter() tries to predict the parent Xform
name, but if it cannot be found has multiple ways of creating it, possibly
under a different name than originally searched for.
2017-04-06 16:04:31 +02:00
56cfd3d5a7 Alembic: Removed AbcTransformWriter::m_parent
It was set, but never read anywhere.
2017-04-06 16:03:59 +02:00
ae76a90593 Buildbot: Correct previous release
Seems CMake is not happy about changing compiler from script.
2017-04-06 11:39:06 +02:00
97300a3beb Buildbot: Force build environment to use latest GCC 2017-04-06 11:21:07 +02:00
f74b4a010d Cleanup: function naming for manipulator
Rename 'stats_*' to 'protectflag_to_drawflags_*' (was too vague).
Also remove NULL check from gimbal_axis
2017-04-06 12:26:07 +10:00
5e3b6e951b Cleanup: minor changes to transform-manipulator
Match stats_editbone & stats_pchan behavior to avoid confusion.
2017-04-06 12:02:32 +10:00
7ae9d092d0 Fix alembic build error with MSVC 2017-04-05 10:59:29 -06:00
f921442a44 Depsghraph: Remove unused function 2017-04-05 15:36:17 +02:00
52029e689c Cycles: Fix race condition in attributes creation during SVM compilation 2017-04-05 14:57:54 +02:00
3ce30823ff Cycles: Add utility class to simplify scoped spin locks 2017-04-05 14:57:34 +02:00
424901ad7b Cycles: Guard global write access in SVM compilation code 2017-04-05 14:21:49 +02:00
e4c5441286 Locales: Some optimization work
Mainly visible for MSVC debug builds and gives about 2x speedup.
2017-04-05 11:25:58 +02:00
8647d5af90 InstallDeps: Raise minimal & official version of OIIO to 1.7.13.
As requested by @sergey.
2017-04-05 09:26:41 +02:00
6d55dcf4dd Alembic: addition of a simple logging class.
The idea is to have a system where we properly log error messages and
let the users know that errors occured redirecting them to the console
for explanations. This is only implemented for the exporter since the
importer already has similar functionalities; however they shall
ultimately be unified in some way.

Reviewers: sybren, dfelinto

Differential Revision: https://developer.blender.org/D2541
2017-04-05 04:56:38 +02:00
411e7abe94 Cleanup: redundant casts 2017-04-05 01:08:19 +10:00
9170e49250 Fix missing protection of RNA_pointer_as_string() against NULL pointers.
Odd that issue was never reached before? Looks like it hit in
datablock_idprops branch though...
2017-04-04 16:04:13 +02:00
92aeb84fde Cycles: Tag shaders for update after the threading part is over
This avoids write access happening in non-atomic manner in
Shader::tag_update which modifies the global managers. Even
for 1 byte data types it's quite dangerous.
2017-04-04 15:43:12 +02:00
7b149bfde6 Depsgraph: Use atomic operation to tag the changed ID 2017-04-04 15:43:12 +02:00
5ce95df2c6 Cycles: Fix uninitialized memory access when comparing curve mapping nodes
The issue is coming from the fact that float3 is actually 16 bytes aligned
data type and the "padding" was not initialized. This caused memcmp() to
access non-initialized memory.
2017-04-04 15:43:12 +02:00
a63a31dd12 install_deps: removed leftover compile_HDF5 command
It was a leftover from when Alembic with HDF5 was still officially
supported.
2017-04-04 14:50:58 +02:00
8a60d84327 Bumped Alembic library version to 1.7.1
This provides us with a clearer API (so I don't have to use const_cast<>
in upcoming code). It also allows layering of different Alembic files,
so you can have a base file and load a separate file containing overrides.

Verbally approved by Dr. Sergey.
2017-04-04 12:55:38 +02:00
ffac92e385 Buildbot: Update master config 2017-04-04 12:52:54 +02:00
b93ddfd8ac Alembic: force ALEMBIC_LIB_USES_BOOST=ON when not using C++11
Alembic requires one of ALEMBIC_LIB_USES_BOOST, ALEMBIC_LIB_USES_TR1, or
C++11, and silently defaults to the latter if the former two are OFF.

Before this change, Alembic was only built without C++11 of OpenEXR
was built at the same time. This dependency was both unnecessary and
undocumented.
2017-04-04 12:41:44 +02:00
ca5ccf5cd4 Task: Remove non-atomic pool suspended flag assignment
This was done some lines above by atomic fetch and and.
2017-04-04 12:32:15 +02:00
4f7eb3ad12 Buildbot: Update master config 2017-04-04 12:15:35 +02:00
728f75c6a7 Buildbot: Some more twqeaks to master config 2017-04-03 15:51:31 +02:00
e741804ce3 Buildbot: Update bundled vetrsion of server configuration 2017-04-03 15:36:52 +02:00
cc93a66e71 Buildbot: SPecial branch trickery for linux slaves 2017-04-03 15:04:16 +02:00
2aa0215ec5 Point all submodules to master branch
This way it should be safe to use `git submodule update --remote`.
2017-04-03 14:54:51 +02:00
d27ef3913a Buildbot: Some special tricks for Blender 2.8 slave 2017-04-03 14:49:07 +02:00
54a60eff24 Fix blender player 2017-04-03 12:31:33 +02:00
ab347c8380 Fix T51115: Bump node is broken when the displacement socket is used 2017-04-03 10:51:00 +02:00
368b74315a Collada - add flag to limit precision of exported data, mainly to simplify debugging 2017-04-03 10:48:00 +02:00
f65d6ea954 fix: collada - do proper conversion from int to bool (as with other nearby parameters) 2017-04-03 10:45:24 +02:00
3bf0026bec fix: T50412 - collada: Replaced precision local limit function by blender's own implementation 2017-04-01 15:29:50 +02:00
e1fb080743 Cleanup: style 2017-04-01 12:09:17 +11:00
6c42079b78 Depsgraph: Correction for the previous local view commit
Need to flush layers from components back to ID node.
2017-03-31 17:08:18 +02:00
25ab3aac9d Fix threading conflicts in multitex_ext_safe()
This function was modifying texture datablock, which makes the call
unsafe for call from multiple threads. Now we pass the argument that
we don't need nodes to the underlying functions.

There will be still race condition in noise texture, but that should
at least be free from crashes. Doesn't mean we shouldn't fix it tho.
2017-03-31 17:08:18 +02:00
90df1142a3 Cycles: Solve threading conflict in shader synchronization
Update tag might access links (when checking for attributes) and
the links might be in the middle of rebuild in simplification
logic.
2017-03-31 17:08:18 +02:00
27d20a04b5 Fix unreported bug in Blender Render: using unnormalized normal in normal map node in the same way as in baking 2017-03-31 17:53:55 +03:00
ff693959d8 WM: Previous commit broke common-case loading new file
Handle this in the operator
2017-03-31 23:48:10 +11:00
7f7c807a92 Keep current app-template when selecting 'New File' 2017-03-31 22:06:36 +11:00
e5fa738ce9 UI cleanup: simplify Icon handling of uiDefAutoButR for PROP_POINTER.
Comes from D113, but really not related to the patch's topic!
2017-03-31 12:14:27 +02:00
4b7d95290f Cycles: More fixes after include changes 2017-03-31 10:12:13 +02:00
d097c2a1b3 Fix T51072: The reference of a pyobject may be being overwritten in bm_mesh_remap_cd_update
In this case the Pyobject gets lost from pybm, and bm.free() does not invalidate the PyElem.
This will cause the destructor of python to read invalid memory and crash.

The solution is to make a copy of the pyobjects pointers before overwriting.
2017-03-31 01:01:16 -03:00
8bd61ea54d Correct string formatting (error in recent change) 2017-03-31 09:48:57 +11:00
14c2083460 Cleanup: warnings 2017-03-31 09:48:57 +11:00
4cfac9edab Cleanup/fix bad code in IDP_SetIndexArray()
Mainly, using index before checking for its validity...
2017-03-30 22:52:53 +02:00
5b3b0b4778 Redraw parent popup when the child popup is closed 2017-03-30 16:48:18 +03:00
843be91002 Depsgraph: Fix missing updates when in local view
This area is a subject of reconsideration, so for now used simplest
way possible -- ensure depsgraph's nodes have proper layer flags
when going in and out of local mode.
2017-03-30 14:42:55 +02:00
a88801b99b Cycles: Fix missing kernel re-compilation after recent changes
Reported by Mai in IRC, thanks!
2017-03-30 11:45:30 +02:00
ced8fff5de Fix T51051: Incorrect render on 32bit Linux
The issue was apparently caused by -fno-finite-math-only added to kernel.cpp
CFLAGS. For now just removed this flag from the kernel (we don't really want
it there at this point, and we don't have it for SSE/AVX optimized kernels).

But surely more investigation is needed here.
2017-03-30 11:37:31 +02:00
9b1564a862 Cycles: Cleanup, rename RegularBVH to BinaryBVH
Makes it more explicit what the structure is from it's name.
2017-03-30 09:47:27 +02:00
31e6249256 Mirror Modifier: Add offsets for mirrored UVs
The mirror modifier now has two fields that specify a -1 to 1 offset for
the U and V axes when mirroring their coordinates.

D1844 by @circuitfox
2017-03-30 13:15:02 +11:00
66ef0b8834 Cycles: Fix compilation error of app after the include directories change 2017-03-29 16:54:41 +02:00
48fa2c83eb Cycles: Attempt to work around compilation errors of CUDA on sm_2x 2017-03-29 16:22:51 +02:00
be17445714 Cycles: Cleanup, indentation 2017-03-29 15:41:56 +02:00
cc7386ec6b Cycles: Remove toolkit-specific workaround from kernel 2017-03-29 15:07:53 +02:00
5af4e1ca15 Cycles: Only use CUDA 8.0 as officially supported one
This deprecates CUDA 7.5.
2017-03-29 15:06:47 +02:00
270df9a60f Cycles: Cleanup, don't use m_ prefix for public properties 2017-03-29 14:45:49 +02:00
30bed91b78 Cycles: Fix compilation error with visibility flag disabled 2017-03-29 14:28:45 +02:00
0579eaae1f Cycles: Make all #include statements relative to cycles source directory
The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.

For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.

Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.

This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.

Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.

Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner

Reviewed By: lukasstockner97, maiself, nirved, dingto

Subscribers: brecht

Differential Revision: https://developer.blender.org/D2586
2017-03-29 13:41:11 +02:00
61db9ee27a Cycles: Attempt to workaround compilation error on new CUDA toolkit and sm_2x 2017-03-29 11:50:17 +02:00
c2d3bb7090 Remove non-bmesh case from test 2017-03-29 20:11:54 +11:00
dd662c74ae Fix skin mark operator
Accessed custom-data layer offset before creating.
2017-03-29 20:11:54 +11:00
a7ca991841 Fix crash closing window in background mode 2017-03-29 20:11:54 +11:00
cb6ec44fc7 Fix missing NULL check in gpencil poll
Also de-duplicate poll functions
2017-03-29 20:11:54 +11:00
6332e0e1f7 Use 'empty' option for clearing factory settings 2017-03-29 20:11:54 +11:00
df7f6a3e2e Option to load startup file with empty-data
Useful for batch conversion and tests.
2017-03-29 20:11:54 +11:00
b3f9ae0125 Buildbot: Revert previous change, older toolkit has same exact behavior 2017-03-29 10:48:10 +02:00
15ff75d06b Buildbot: Use older NVCC on 32bit linux
Newer toolkit has some weird issue with cross0-compiling 32bit kernels
from 64bit environment.
2017-03-29 10:21:17 +02:00
ac43e5cc87 Buildbot: Remove global hardcoded NVCC path
This was initially needed for heterogeneous setup of two toolkits which
we no longer need.
2017-03-29 10:16:41 +02:00
286adfde38 Cycles: Bring back preview AA samples when using BPT
This was removed in 93426cb. Please be more accurate when
changing interface.
2017-03-29 09:12:26 +02:00
4c7f4e4662 PyAPI: minor path init simplification 2017-03-29 15:07:41 +11:00
4f69dca547 Fix 'bl_app_override' wrapping multiple times.
Calling `SomeClass.draw(self, context)` instead of `self.draw()`
would try to wrap the argument `self` multiple times, causing an error.
2017-03-29 14:31:14 +11:00
d808557d15 Fix memory leak re-registering operators
Re-registering an operator used by the keymap would lead memory.
Reload scripts for eg leaked over ~1600 blocks.
2017-03-29 13:35:15 +11:00
02b2094847 PyAPI: check modules are registered before unregister
Needed since templates may unregister classes.

Also replace old modules on reloading.
2017-03-29 12:38:02 +11:00
93426cb295 Fix T51068: Place props in their own row
This allows the props to extend into the blank space that is to the right.
2017-03-28 16:33:05 -04:00
6ea54fe9ff Cycles: Switch to reformulated Pluecker ray/triangle intersection
The intention of this commit it to address issues mentioned in the
reports T43865,T50164 and T50452.

The code is based on Embree code with some extra vectorization
to speed up single ray to single triangle intersection.

Unfortunately, such a fix is not coming for free. There is some
slowdown for AVX2 processors, mainly due to different vectorization
code, which caused different number of instructions to be executed
and different instructions-per-cycle counters. But on another hand
this commit makes pre-AVX2 platforms such as AVX and SSE4.1 a bit
faster. The prerformance goes as following:

              2.78c AVX2   2.78c AVX   Patch AVX2         Patch AVX
BMW            05:21.09     06:05.34    05:32.97 (+3.5%)   05:34.97 (-8.5%)
Classroom      16:55.36     18:24.51    17:10.41 (+1.4%)   17:15.87 (-6.3%)
Fishy Cat      08:08.49     08:36.26    08:09.19 (+0.2%)   08:12.25 (-4.7%
Koro           11:22.54     11:45.24    11:13.25 (-1.5%)   11:43.81 (-0.3%)
Barcelone      14:18.32     16:09.46    14:15.20 (-0.4%)   14:25.15 (-10.8%)

On GPU the performance is about 1.5-2% slower in my tests on GTX1080
but afraid we can't do much as a part of this chaneg here and
consider it a price to pay for more proper intersection check.

Made in collaboration with Maxym Dmytrychenko, big thanks to him!

Reviewers: brecht, juicyfruit, lukasstockner97, dingto

Differential Revision: https://developer.blender.org/D1574
2017-03-28 17:26:47 +02:00
69aa6577b3 Forgot those IDP_LibLinkProperty call on node sockets IDProps in previous commit... 2017-03-28 14:38:00 +02:00
59bb4ca1b0 Fix: Icon offset for pie buttons 2017-03-28 13:44:02 +03:00
3f61280327 Cycles: Pass m128 vectors by const reference 2017-03-28 11:01:11 +02:00
e1909958d9 Fix lib_link_cachefile.
That one was:
* Resetting non-ID pointers (lib_link_xxx funcs should only affect ID
  pointers, everything else shall be done in direct_link_xxx func).
* Even worse, always calling lib_link_animdata, even when
  LIB_TAG_NEED_LINK tag was unset...
2017-03-28 10:15:52 +02:00
bed327f1ce Bring back lib_link_mesh() in 'order' with other libdata liblink functions.
We do not need any special handling anymore for usercount of images used
by faces/polygons (tpage stuff), since we have the 'real_user' handling,
which will gracefully cope with all possible situations.

So better not keep that ugly confusing useless special case.
2017-03-28 10:10:15 +02:00
39172c6f34 readfile.c: Cleanup lib_link code a bit.
Mainly:
* Add missing `IDP_LibLinkProperty()` calls for many ID types
  (harmless currently, but better be consistent here!).
* Bring lib_link_xxx functions more in line with each other.
* Replace some long if/else by switch.
2017-03-28 10:03:59 +02:00
1b5acbb329 Correct splash size check 2017-03-28 17:07:37 +11:00
5ce120b865 Fix columns with fixed width 2017-03-28 00:07:31 +03:00
6a5e92c022 Cleanup: Use upper case consistently in adaptive feature compile logging. 2017-03-27 22:52:33 +02:00
7a65f9b171 Cleanup: Resolve todo in CUDA voxel image code. 2017-03-27 22:36:26 +02:00
0df33cc52d Cycles UI: Avoid abreviation for Hair Extension.
Since 2.5x we should try to avoid such abreviations in the UI, except for common terms like Min / Max as much as possible.
2017-03-27 21:59:29 +02:00
0cfc557c5d Cycles: Move Shadow Catcher UI option next to Ray Visibility.
Previously it was beneath the Performance UI label, which was incorrect. It's better suited next to Ray Visibility.
2017-03-27 21:51:56 +02:00
bd053ac7ba Cycles: Correct ifdef around float3 intrinsics 2017-03-27 16:13:07 +02:00
2a05292efa Correct for Py3.5 2017-03-27 21:34:21 +11:00
8d48ea0233 Cycles: Make shadow catcher an optional feature for OpenCL
Solves majority of speed regression on AMD OpenCL.
2017-03-27 10:47:14 +02:00
Hristo Gueorguiev
e07ffcbd1c Cycles: Add OpenCL support for shadow catcher feature
The title says it all actually.
2017-03-27 10:46:59 +02:00
Hristo Gueorguiev
8ada7f7397 Cycles: Remove ccl_addr_space from RNG passed to functions
Simplifies code quite a bit, making it shorter and easier to extend.
Currently no functional changes for users, but is required for the
upcoming work of shadow catcher support with OpenCL.
2017-03-27 10:46:28 +02:00
d14e39622a Cycles: First implementation of shadow catcher
It uses an idea of accumulating all possible light reachable across the
light path (without taking shadow blocked into account) and accumulating
total shaded light across the path. Dividing second figure by first one
seems to be giving good estimate of the shadow.

In fact, to my knowledge, it's something really similar to what is
happening in the denoising branch, so we are aligned here which is good.

The workflow is following:

- Create an object which matches real-life object on which shadow is
  to be catched.

- Create approximate similar material on that object.

  This is needed to make indirect light properly affecting CG objects
  in the scene.

- Mark object as Shadow Catcher in the Object properties.

Ideally, after doing that it will be possible to render the image and
simply alpha-over it on top of real footage.
2017-03-27 10:46:03 +02:00
5aaa643947 Cycles: Optimize shaders earlier to skip unneccessary attributes for noninteractive rendering
Before, Cycles would first sync the shader exactly as shown in the UI, then determine and sync the used attributes and later optimize the shader.
Therefore, even completely unconnected nodes would cause unneccessary attributes to be synced.

The reason for this is to avoid frequent resyncs when editing shaders interactively, but it can still be avoided for noninteractive renders - which is what this commit does.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D2285
2017-03-27 05:36:49 +02:00
086320a62e CMake: WITH_PYTHON_SECURITY=OFF was ignored
Allow auto-execution to be enabled,
also move this to user-prefs versioning code.
2017-03-27 13:02:41 +11:00
356aacab6b Add back missing include 2017-03-27 09:14:40 +11:00
505b3b7328 Fix padding and align calculation for box layouts 2017-03-26 18:02:11 +03:00
2830f687aa Cleanup: line length, assignment 2017-03-26 21:52:25 +11:00
4bdb2d4885 Fix: Ignore min flag for rows that require all available width 2017-03-26 12:19:01 +03:00
fa63515c37 Fix: Use "round" instead of "floor" in snapping UI to pixels 2017-03-26 12:16:04 +03:00
001fce167a Fix: Button's label can be NULL 2017-03-26 12:04:16 +03:00
ed072e1dcd re-adds the include "BLI_math.h" to custondata
It was removed here rBd52191616b5f
2017-03-26 04:08:16 -03:00
15143a7464 Cleanup: simplify script path assignment 2017-03-26 11:31:39 +11:00
8c0682a93c PyAPI: add missing class registration 2017-03-26 11:28:16 +11:00
f8e02c75ba PyAPI: debug-python check for missing class register
Moving to manual class registration means its easier to accidentally
miss registering classes.

Now detect missing class registration
and warn when running with `--debug-python`
2017-03-26 11:28:10 +11:00
393efccb19 Fix GHOST crash on X11 with recent DPI changes on some systems. 2017-03-25 19:32:50 +01:00
Wouter
fe3fb23697 Automatic DPI for all platforms, per monitor DPI for Windows.
For Windows 8.1 and X11 (Linux, BSD) now use the DPI specified by the operating
system, which previously only worked on macOS. For Windows this is handled per
monitor, for X11 this is based on Xft.dpi or xrandr --dpi. This should result
in appropriate font and button sizes by default in most cases.

The UI has been simplified to a single UI Scale factor relative to the automatic
DPI, instead of two DPI and Virtual Pixel Size settings. There is forward and
backwards compatibility for existing user preferences.

Reviewed By: brecht, LazyDodo

Differential Revision: https://developer.blender.org/D2539
2017-03-25 11:22:16 +01:00
86730f1f35 Remove support for py app-templates
Only zip-files make sense here.
2017-03-25 18:14:00 +11:00
7cb2974182 Cleanup: imports, indentation, long lines 2017-03-25 11:07:48 +11:00
a6f74453b6 Fix unreported: inaccuracy of interpolation of custom color layers due to float truncation
Same solution from rBd23459f51640 but now in `layerInterp_mcol`
Also a cleaning was done in the includes
2017-03-24 20:06:43 -03:00
f68145011f WM: Application Templates
This adds the ability to switch between different application-configurations
without interfering with Blender's normal operation.

This commit doesn't include any templates,
so its mostly to allow collaboration for the Blender 101 project
and other custom configurations.

Application templates can be installed & selected from the file menu.

Other details:

- The `bl_app_template_utils` module handles template activation
  (similar to `addon_utils`).
- The `bl_app_override` module is a general module
  to assist scripts overriding parts of Blender in reversible way.

See docs:
https://docs.blender.org/manual/en/dev/advanced/app_templates.html

See patch: D2565
2017-03-25 10:04:04 +11:00
a7f16c17c2 Fix various i18n ambiguous issues reported in T43295. 2017-03-24 20:02:15 +01:00
dab3865c0b Fix UI message issue, and style cleanup (!) 2017-03-24 20:02:15 +01:00
e9770adf63 Cycles: Remove obsolete variable from the TileManager 2017-03-24 19:44:05 +01:00
8e58e197fd Ашч T50995: Wrong freestyle render with new depgraph
The iossue was caused by 0371ef1/
2017-03-24 16:33:26 +01:00
5b45715f8a Cycles: Correct isfinite check used in integrator
Use fast-math friendly version of this function.

We should probably avoid unsafe fast math, but this is to be done with
real care with all the benchmarks properly done.

For now comitting much safer fix.
2017-03-24 15:39:33 +01:00
6aa972ebd4 Fix/workaround T51007: Material viewport mode crash on node with more than 64 outputs
Ideally we need to find a way to remove such a static limit here, but it's not so
trivial to implement for texture nodes. Requires some bigger system redesign there.

Just raising limit for now, which is fine for modern systems.
2017-03-24 14:36:00 +01:00
467d824f80 Fix T50238: Cycles: difference in texture position between OpenGL and Cycles render 2017-03-24 12:24:14 +01:00
e32710d2d7 Buildbot: Use proper NVCC path
In fact, we could probably remove this option all together.
2017-03-24 10:27:41 +01:00
85a5fbf2ce Cycles: Workaround incorrect SSS with CUDA toolkit 8.0.61 2017-03-24 10:08:18 +01:00
a14fb77fee Update CLERW to the latest version 2017-03-24 09:43:03 +01:00
d52191616b Fix for last fix of fix: (unsigned)char is limited to 255
setting char as value outside its range will wrap
2017-03-24 04:35:17 -03:00
178708f142 Fix of last commit. Clamp values that will be used! 2017-03-24 04:13:16 -03:00
d23459f516 Fix T51038: layerInterp_mloopcol was casting instead of rounding the interpolated RGBA channels
Casting to int truncates a floating-point number, that is, it loose the fractional part.
2017-03-24 04:06:30 -03:00
bc0b5d611c Cleanup: minor edits to path test
No need for redundant ID's and correct arg order
2017-03-24 17:48:22 +11:00
50f9fc7a53 BLI_path_util: Add BLI_path_join
There weren't any convenient ways to join multiple paths in C
that accounted for corner cases.
2017-03-24 17:40:35 +11:00
0453c807e0 Add: BKE_appdir_folder_id_ex
Allows getting the path without using a static string.
2017-03-24 10:35:58 +11:00
6a6566a7fc Cleanup: line-length 2017-03-24 10:11:01 +11:00
096602d3a8 bpy.path.display_name: strip spaces
Useful for Python module paths that can't start with numbers.
2017-03-24 06:55:44 +11:00
05b7591c62 BLI_path_util: Add string versions of SEP, ALTSEP
This allows for adding separators in string literals.
2017-03-24 05:23:03 +11:00
9af6f40e4d addon_utils: add disable_all function 2017-03-24 05:20:26 +11:00
a96110e710 Cycles: Remove old non-optimized triangle intersection function
It is unused now and if we want similar function we should use
Pluecker intersection which is same performance with SSE optimization
but which is more watertight.
2017-03-23 17:59:34 +01:00
27248c8636 Cycles: Remove unused macro 2017-03-23 17:59:02 +01:00
ba8c7d2ba1 Cycles: Use SSE-optimized version of triangle intersection for motion triangles
The title says it all actually. Gives up to 10% speedup on test scenes here
on i7-6800K.

Render times on GPU are unreliable here, but there might be some slowdown
caused by watertight nature of intersections.
2017-03-23 17:58:03 +01:00
a1348dde2e Cycles: Fix speed regression on GPU
Avoid construction of temporary array and make utility function force-inlined.
Additionally avoid calling float4_to_float3 twice.

This brings render times to the same values as before current patch series.
2017-03-23 17:45:19 +01:00
2a5d7b5b1e Cycles: Use utility function for SSS triangle intersection
This effectively de-duplicates triangle intersection logic implemented
for both regular triangle and SSS triangle.
2017-03-23 17:45:19 +01:00
a5b6742ed2 Cycles: Move watertight triangle intersection to an utility file
This way the code can be reused more easily.
2017-03-23 17:45:19 +01:00
f8a999c965 Cycles: Move triangle intersection precalc to an util file
This is a preparation work for the followup commit which wil l move
remaining parts of Woop intersection logic to an utility file.

Doing it as a separate commit to keep changes more atomic and easier
to bisect when/if needed.
2017-03-23 17:45:19 +01:00
b797a5ff78 Cycles: Cleanup, move utility function to utility file
Was an old TODO, this function is handy for some math utilities as well.
2017-03-23 17:45:19 +01:00
aa0602130b Cycles: Cleanup, code style and comments 2017-03-23 17:45:19 +01:00
1c5cceb7af Cycles: Move intersection math to own header file
There are following benefits:

- Modifying intersection algorithm will not cause so much re-compilation.
- It works around header dependency hell and allows us to use vectorization
  types much easier in there.
2017-03-23 17:45:19 +01:00
e8ff06186e Cycles: Cleanup, inline AVX register construction from kernel global data
Currently should be no functional changes, preparing for some upcoming refactor.
2017-03-23 17:45:19 +01:00
5c06ff8bb9 Cycles: Cleanup, remove unused function 2017-03-23 17:45:19 +01:00
e04970b392 Fix player stubs (tm) 2017-03-23 15:47:23 +01:00
2c78b0c71f Collada - Export: now use bind_mat and rest_mat custom properties (when the use_bind_info option is enabled and the properties exist) 2017-03-23 14:14:23 +01:00
b48ba0909a Collada - Import: now add bind_mat and rest_mat as custom properties (when the use_bind_info option is enabled) 2017-03-23 14:14:23 +01:00
476f5c473a Collada - remove no longer used functions (moved to collada_utils) 2017-03-23 14:14:23 +01:00
51d4743033 Collada - Added support for custom bind matrix (using new bind_mat custom property) 2017-03-23 14:14:22 +01:00
6cfa962986 Collada - removed TransformBase baseclass (not needed for anything) 2017-03-23 14:14:22 +01:00
7c094f6079 Collada - Added some helper functions into collada_utils, for common usage in the collada module 2017-03-23 14:14:22 +01:00
092d673689 Added new option for storing bindpose matrix, see T50412 2017-03-23 14:14:22 +01:00
339d0170d1 collada: Simplify reading Node Matrix 2017-03-23 14:14:22 +01:00
1729dd9998 collada: Make sure that bone use_conncet is set to false when connect type is not defined in Import 2017-03-23 14:14:22 +01:00
33e32c341a collada: add extern 'C' for c header includes 2017-03-23 14:14:22 +01:00
ec3989441f fix: collada - Connected bones get their tails set to wrong location when fix leaf nodes option is enabled 2017-03-23 14:14:22 +01:00
1978ac65c4 collada: use local variable to avoid repeated call of bone chain_length_calculator 2017-03-23 14:14:22 +01:00
89631485cc collada: use vector copy function instead of direct assigning 2017-03-23 14:14:22 +01:00
1600b93fb8 UI: allow to extend camera as a menu
Needed for T46853
2017-03-23 20:45:02 +11:00
4f4a484b9b Cloth refactor: Remove goal springs and some other cleanup
This removes the goal springs, in favor of simply calculating the goal forces on the vertices directly. The vertices already store all the necessary data for the goal forces, thus the springs were redundant, and just defined both ends as being the same vertex.

The main advantage of removing the goal springs, is an increase in flexibility, allowing us to much more nicely do some neat dynamic stuff with the goals/pins, such as animated vertex weights. But this also has the advantage of simpler code, and a slightly reduced memory footprint.

This also removes the `f`, `dfdx` and `dfdv` fields from the `ClothSpring` struct, as that data is only used by the solver, and is re-computed on each step, and thus does not need to be stored throughout the simulation.

Reviewers: sergey

Reviewed By: sergey

Tags: #physics

Differential Revision: https://developer.blender.org/D2514
2017-03-23 03:52:46 -03:00
4d82d525f8 Cycles: Fix building for some compilers 2017-03-23 00:14:48 -04:00
a63ba2739e Cleanup: remove redundant temp dir init
This is already called by wm_init_userdef, in old code
different initialization methods were used but now it's not needed.

Confusing since prefs are loaded in this function that don't initialize temp.
2017-03-23 15:05:42 +11:00
12b62b58e1 Cleanup: minor wm_homefile_read simplification
Logic in this function is a bit scattered,
minor changes to avoid confusion.

Also rename 'from_memory' to 'use_factory_settings'.
2017-03-23 10:42:09 +11:00
762319e911 fix redundant assignment
Thanks clang for the warning.
2017-03-22 16:26:53 -04:00
d8b34a17ac Cleanup: remove BLI_getlastdir
Replace with BLI_path_name_at_index
2017-03-23 06:33:30 +11:00
c7a4f96f88 Pydoc: Change Wikipedia links and grammar in mathutils matrix code 2017-03-22 14:54:22 -04:00
2ba1868c3f Cleanup/optimization: Simplify some usages of uiItemFullO/_ptr, avoid multiple search of same op. 2017-03-22 19:42:19 +01:00
387ba87ad3 Cleanup: ignore open-blend as startup/prefs basis
No reason startup/prefs would ever be blend-file relative.
2017-03-23 05:24:05 +11:00
dc5007648c Depsgraph: Fix missing relations update tag when typing #frame
New depsgraph requires relations to be updated after drivers changes.
2017-03-22 14:44:45 +01:00
Stefan Werner
412220c8d3 Cycles: fixed warnings 2017-03-22 12:28:01 +01:00
797b1d5053 Fix T51024: Switch install_deps to set OSL_ROOT_DIR instead of CYCLES_OSL.
Path by @alekulyn, thanks.

Differential Revision: https://developer.blender.org/D2571
2017-03-22 12:05:43 +01:00
2b44db4cfc Fix/workaround T50533: Transparency shader doesn't cast shadows with curve segments
There seems to be a compiler bug of MSVC2013. The issue does not happen on Linux and
does not happen on Windows when building with MSVC2015.

Since it's reallly a pain to debug release builds with MSVC2013 the AVX2 optimization
is disabled for curve sergemnts for this compiler.
2017-03-22 11:37:23 +01:00
8563d3b254 Create correct node after image file drag&drop for Blender Render 2017-03-22 12:00:33 +03:00
d0253b2ea4 BLI_path_util: add BLI_path_name_at_index
Utility to get a file/dir in the path by index,
supporting negative indices to start from the end of the path.

Without this it wasn't straightforward to get
the a files parent directory name from a filepath.
2017-03-22 19:34:43 +11:00
253281f9d6 Fix for splash not opening centered
When the new window didn't end up using the size stored in the preferences
the splash would not be centered (even outside the screen in some cases).

Now centered popups listen for window resizing.
2017-03-22 13:53:54 +11:00
a0f16e12a0 Cycles: Use more friendly GPU device name for AMD cards
For example, for RX480 you'll no longer see "Ellesmere" but will see
"AMD Radeon RX 480 Graphics" which makes more sense and allows to easily
distinguish which exact card it is when having multiple different cards
of Ellesmere codenames (i.e. RX480 and WX7100) in the same machine.
2017-03-21 12:01:11 +01:00
7780a108b3 Cycles: Simplify some extra OpenCL query code 2017-03-21 12:01:03 +01:00
a41240439b Update CLEW to latest version
Needed to get access to some AMD extensions.
2017-03-21 12:01:03 +01:00
fceb1d0781 Cycles: Cleanup, add some utility functions to shorten access to low level API
Should be no functional changes.
2017-03-21 12:01:03 +01:00
eb1a57b12c Cycles: Fix wrong vector allocation in the mesh sync code 2017-03-21 04:30:08 +01:00
8fff6cc2f5 Cycles: Fix building of OpenCL kernels
Theres no overloading of functions in OpenCL so we can't make use of
`safe_normalize` with `float2`.
2017-03-20 22:55:52 -04:00
13d8661503 Fix T51012: Surface modifier was not working with curves
This prevented the Force Field Curve Shape of working
2017-03-20 18:51:32 -03:00
3c4df13924 Fix T50268: Cycles allows to select un supported GPUs for OpenCL 2017-03-20 15:37:27 +01:00
d544a61e8a Cycles: Update remaining time once per second without waiting for a tile change
Previously, the code would only update the status string if the main status changed.
However, the main status did not include the remaining time, and therefore it wasn't updated until the amount of rendered tiles (which is part of the main status) changed.

This commit therefore makes the BlenderSession remember the time of the last status update and forces a status update if the last one was more than a second ago.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2465
2017-03-20 15:28:36 +01:00
a201b99c5a Fix T50975: Cycles: Light sampling threshold inadvertently clamps negative lamps 2017-03-20 14:48:55 +01:00
6b86b446d3 Cleanup: useless call to glRasterPos before view3d_cached_text_draw_add()
Probably some leftover from much older code?
2017-03-20 14:36:06 +01:00
18bf900b31 Fix T50990: Random black pixels in Cycles when rendering material with Multiscatter GGX 2017-03-20 12:07:41 +01:00
06159e6a58 Correct unintended splash on loading startup 2017-03-20 12:46:20 +11:00
dbc8b81ecf User Preferences: Split out addon and keymap free 2017-03-20 12:42:19 +11:00
eaf88f564c Remove register_module use in Cycles 2017-03-20 12:16:51 +11:00
fa11d41113 Cleanup: especially non pep8 parts of Py UI 2017-03-20 09:49:35 +11:00
df76616d74 Usual UI/i18n message fixes.
Please provide valid description for SurfaceDeform modifier tooltip.
Such place-holders should not pass final checks before merging in master!
2017-03-19 17:31:07 +01:00
19d493ee10 Moving classes to separate listing broke panel order
Although this wasn't so obvious since it
only showed up for factory settings and in the preferences window.

Panel display order depends on registration order,
Sorry for the noise. On the bright side we no longer need to move
classes around to re-arrange panels.
2017-03-20 02:37:55 +11:00
84935998a7 Add missing classes from recent commit 2017-03-20 02:07:24 +11:00
56d3cc9341 PyAPI: ID Property tests 2017-03-19 03:57:40 +11:00
9bdda427e6 PyAPI: remove bpy.utils.register_module()
In preparation for it being removed, see: T47811
2017-03-18 20:03:24 +11:00
2fbc50e4c1 Alternate fix for T50899
object_get_derived_final shouldn't have been assuming mesh objects.

It's even valid to use a curve as a target for a shrink-wrap modifier.
2017-03-18 18:33:01 +11:00
3ceb68c833 Missing from recent commit 2017-03-18 12:33:59 +11:00
e392bb4937 PyAPI: add BPY_execute_string_as_string
Utility to execute a string and get the resulting string,
matching BPY_execute_string_as_number.

Not used just yet but generally useful function.
2017-03-18 12:19:03 +11:00
d863b5182e Cleanup: use return args last and 'r_' prefix. 2017-03-18 09:39:36 +11:00
9d873fc3de Various icon adjustments 2017-03-17 16:57:53 +03:00
ea3d7a7f58 Fix T50968: Cycles crashes when image datablock points to a directory
See more details about root of the cause there:

  https://github.com/OpenImageIO/oiio/pull/1640
2017-03-17 14:47:12 +01:00
d6b4fb6429 Cycles: Fix mistake in previous split kernel commits
Own stupid mistake. Reported by nirved in IRC, thanks!
2017-03-17 11:55:59 +01:00
502c4be56e fix: redraw dope sheet / action editor when pose bone selection changes 2017-03-17 11:04:13 +01:00
a58350b07f Cycles: Cleanup, indentation 2017-03-17 10:25:37 +01:00
98b81493f3 Refactor writefile handling of data-blocks.
Instead of calling a function looping over whole list of a given ID
type, make whole loop over Main in parent function, and call functions
writing a single datablock at a time.

This design is more in line with all other places in Blender where we
handle whole content of Main (including readfile.c), and much more easy
to extend and add e.g. some generic processing of IDs before/after
writing, etc.

From user point, there should be no change at all, only difference is
that data-block types won't be saved in same order as before (.blend
file specs enforces no order here, so this is not an issue, but it could
bug some third party users using other, simplified .blend file reader maybe).

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2510
2017-03-17 10:02:08 +01:00
e361adbca2 Cycles: Fix compilation error of LCG RNG 2017-03-17 09:58:08 +01:00
439a277aa5 Cycles: Silence strict compiler warning 2017-03-17 09:56:44 +01:00
2cae58524c Cycles: Improve memory usage of CPU split kernel by using smaller global size 2017-03-17 01:54:10 -04:00
60a344b43d Cycles: Fix handling of barriers 2017-03-17 01:54:04 -04:00
b27e224276 Mesh Convert: remove meaningless modifier check
Meshes w/o modifiers wouldn't have their derived mesh applied.
Check was to avoid crash but its in fact meaningless,
since the modifier might be disabled, or there may be virtual modifiers.
2017-03-17 10:10:55 +11:00
750c0dd4de Fix T50950: Converting meshes fails w/ boolean 2017-03-17 09:58:05 +11:00
d4d8da28fc Add BKE_blendfile_userdef_read_from_memory
Needed to read user-preferences from in-memory startup.blend

Also skip data-blocks when reading preferences.
2017-03-17 07:01:48 +11:00
b2d3956e7b Add support for loading preference struct
Previously it would always load into 'U' global.
Needed for loading & merging template preferences.
2017-03-17 05:20:50 +11:00
db04980678 PyAPI: Menu.path_menu: Add path filter callback
Needed if we want to filter based on filenames (not just extension).
2017-03-17 05:20:50 +11:00
f7793bd53c Correct reading missing property 2017-03-17 05:20:50 +11:00
1f65ab606b Fix missing undo pushes in outliner's new datablock management operations.
Not sure why I did not put those from start... Actually *not* having an
undo point here can be problematic, since undoing some previous action
was trying to restore from bad pointer (I think) in UI, generating
asserts.

Note however that it's not a 'pure' undo, in that you may not find your
linked data in exact same state as before deleting it, after an undo,
since it actually implies *reloading* the deleted libraries (and not
restoring from a previously stored memory dump).

Reported by @sergey, thanks.
2017-03-16 17:05:48 +01:00
fa9bd04483 Fix outliner contextual menu allowing to delete indirect libraries.
There is no way currently to prevent the option from showing in menu, so
instead report a warning to user (and curse again current nightmarish
system of operation in outliner...).

Reported by @sergey, thanks.
2017-03-16 17:05:48 +01:00
0434053f13 Depsgraph: Fixed crash with curve bevel indirect dupligroups
Need to expand all object's dupli-groups, not only the dupli-groups
of objects directly linked to the scene.
2017-03-16 15:35:21 +01:00
68e58f1991 Depsgraph: Use string and vector in the DEG namespace only 2017-03-16 15:35:21 +01:00
6d8875bd61 Depsgraph: Don't use explicit values in runtime only enum
Lower risk of forgetting to update some values here.
2017-03-16 15:35:21 +01:00
c4e07dd29b Cleanup: differentiate startup/prefs in home-file reading 2017-03-17 00:42:13 +11:00
aad9dd2f1b Support passing in UserDef for free function
Needed so we can load and free non-global user preferences.
2017-03-17 00:18:20 +11:00
1cad64900e Cycles: Define ccl_local variables in kernel functions
Declaring ccl_local in a device function is not supported
by certain compilers.
2017-03-16 11:27:17 +01:00
1ff753baa4 Cycles: Workaround for compilation error caused by passing KernelGlobals
Pass globals as a bare pointer, same as it sued to be prior to split kernel rework.

AMD CPU platform and Intel OpenCL were complaining about this.

Perhaps we shouldn't pass globals as pointer at all, this isn't something what is
really portable and can cause issues on 32 bit perhaps.
2017-03-16 11:27:17 +01:00
26620f3f87 Cycles: Avoid some ccl_local in various kernels 2017-03-16 11:27:17 +01:00
4833a71621 Cycles: Adjust global size for OpenCL CPU devices to make them faster 2017-03-16 06:11:42 -04:00
d68a84d1d2 Fix BGE building.
When you use typedef'ed enum, you need to define all supported values
explicitely in enum, else compiler goes grumpy...
2017-03-16 10:30:02 +01:00
375ede0f3f Comments: wmOperator.cancel & modal 2017-03-16 06:39:09 +11:00
68496c0b38 Missed BGE in recent commit 2017-03-16 06:28:20 +11:00
c832354e33 Load user-preferences before startup file
Internal change needed for template support.
Loading the user preferences first so it's possible
for preferences to control startup behavior.

In general it's useful to load preferences before data-files,
so we know security settings for eg.
2017-03-16 04:02:24 +11:00
c44cdd5905 Cycles: Allow rendering a range of resumable chunks
The range is controlled using the following command line arguments:

  --cycles-resumable-start-chunk
  --cycles-resumable-end-chunk

Those are 1-based index of range for rendering.
2017-03-15 16:00:01 +01:00
c5dba540d7 Cycles: Use argument parser for resumable render feature
Currently there is no functional changes, but we will be adding
couple more of options here soon.
2017-03-15 16:00:01 +01:00
Dalai Felinto
81dc8dd42a Fix bug on Blender version string
Reported by Pablo Vazquez (venomgfx) over irc.
2017-03-15 15:42:01 +01:00
Dalai Felinto
c6c85a8c6b Move Blender version string handling to its own function
Planning to use this util function in 2.8 for doversioning (to communicate converted layers)
2017-03-15 14:10:20 +01:00
af1d9ecd40 Fix strict compiler warning in the previous commit 2017-03-15 12:48:07 +01:00
9ad252d157 Fix T50938: Cache not being reset when changing simulation settings with new depsgraph
The thing i'm really starting to hate is the requirement to specify both
operation code and node type. Seems to be duplicated enums without real
need for that.
2017-03-15 11:10:42 +01:00
6a5487e021 BGE: Fix blenderplayer stub.
Add dummy definition of WM_operator_is_repeat.
2017-03-14 21:17:40 +00:00
f13c729b26 WM: free operators when repeating
Needed since the active operator isn't ensured to be the last.
2017-03-15 05:37:42 +11:00
647fb6ef1e fix D2552: Collada - Follow up change to complete the fix in rBda6cd7762810 (use unique id for bones with same name in different armatures) 2017-03-14 19:31:25 +01:00
4877c9362a Collada simplify: avoid duplicate negation in boolean 2017-03-14 19:31:25 +01:00
76ec329dd1 WM: add Operator.is_repeat() check for C & Py
This addresses an issue raised by D2453 -
that there was no way to check if operators are run
multiple times in a row.

Actions are still ignored that don't cause an UNDO event.
2017-03-15 03:57:01 +11:00
1208792adb WM: store operators with undo flag
This is needed so we can tell if operators are executed repeatedly.
2017-03-15 03:57:01 +11:00
582f9ddeb7 Update path_menu for recent API change 2017-03-15 03:57:01 +11:00
5ba51de84a Cycles: Cleanup, indentation 2017-03-14 16:54:16 +01:00
43f7d5643f Fix T50926: python crashes with path containing utf8 characters.
Default text encoding is platform-dependent in python, and windows
usually do not use utf-8 as default...
2017-03-14 16:04:45 +01:00
Jon Allee
da6cd77628 fix D2552: Collada - use unique id for bones with same name but in different armatures. Co-authored-by: Gaia <gaia.clary@machiniamtrix.org> 2017-03-14 14:35:51 +01:00
f3ff03b3c1 CLNor: rework threaded computation.
Was using some threaded queue on top of task pool, tssk...

Now using properly task pool directly to crunch chunks of smooth fans.

No noticable changes in speed.

Tried to completely get rid of the 'no threading with few loops' code,
but even just creating/freeing the task pool, without actually pushing
any task, is enough to make code 50% slower in worst case scenario (i.e.
few thousands of simple cube objects).
2017-03-14 12:54:57 +01:00
284701e371 CLNor code: use averaged debug timing. 2017-03-14 12:54:57 +01:00
1410ea0478 Fix T50876: Cycles Crash - Cycles crashes before sampling when certain meshes have autosmooth enabled.
The root of the issue was in custom normal code, so far it assumed that
we could only have one cyclic smooth fan around each vertex, which is...
blatantly wrong (again, the two cones sharing same vertex tip e.g.).

This required a rather deep change in how smooth fans/clnor spaces are processed,
took me some time to find a 'good' solution.

Note that new code is slightly slower than previous one (maybe about 5%),
not much to be done here, am afraid.

Tested against all older report files I could find, seems OK.
2017-03-14 12:54:57 +01:00
521133682c Fix own mistake in recent 'edge split' refactor.
We do can have some vertices to split, while not having any edge (think
about two cones sharing the same tip vertex e.g.).
2017-03-14 12:54:57 +01:00
8dd0355c21 Cycles: Try to avoid infinite loops by catching invalid ray states 2017-03-14 06:22:57 -04:00
0ee1cdab7e WM: Option to load startup w/o closing the splash
Not user visible, needed for switching templates.
2017-03-14 21:05:00 +11:00
4c5374d46a PyAPI: extend Menu.path_menu
- Add optional 'display_name' callback
  so callers can construct own names.
- Add optional 'prop_filepath' argument
  (for operators that don't use "filepath").
- Add doc-string.
- Use keyword only arguments.
2017-03-14 21:00:55 +11:00
810982a95c Fix T50932: depth picking w/ pose-bone constraints 2017-03-14 18:02:27 +11:00
76acaefdd7 Cycles: Cleanup, wipe obviously outdated parts of split kernel comments 2017-03-13 17:16:16 +01:00
0c72008592 fix msvc warnings about unknown opencl pragmas 2017-03-13 10:08:14 -06:00
aa36c73c33 Cycles: Add missing header in the file 2017-03-13 16:59:09 +01:00
2b3cc24388 Fix T50920: Adds missing edges on return of bisect operator 2017-03-13 09:22:11 -03:00
Hristo Gueorguiev
f169ff8b88 Fix T50925: Add AO approximation to split kernel 2017-03-13 11:15:58 +01:00
8794a43b68 Cycles: Make MESA compiler more happy
While this compiler is not officially supported yet, getting it to work is
a nice thing because more and more AMD cards will fall under MESA driver.

It's also nice to use explicit comparison with NULL, which makes it more
clear whether variable is a boolean or pointer. Even Rust enforces this!

Patch by Ian Bruce with own modifications.
2017-03-13 09:57:25 +01:00
e8021f5e3b UI: expose mesh conversion in apply menu
The mesh convert operator can 'freeze' a mesh
(WYSIWYG, modifiers, shape keys etc).
However its not very obvious that the way to perform this
operation is to convert a mesh to a mesh.

Expose this as 'Visual Geometry to Mesh' in the 'Apply' menu,
since this is where users might expect to see it.
2017-03-13 07:33:24 +11:00
10404e3e56 Comments: minor clarification 2017-03-13 07:18:28 +11:00
b759d3c9c5 fix T50923: Inconsistent default values and wrong order of parameters in api call 2017-03-12 20:31:51 +01:00
18ed060bc3 Fix T50930 Typo in 'jpeg2k_codec' description 2017-03-12 13:56:25 -04:00
6521307dcd BMesh: rename cryptic functions
Use expanded names for bmesh primitive operations
(urmv jvke semv jfke).

Use 'bmesh_kernel_' prefix,
these functions aren't intended for wide use so favor readability.

Remove BM_face_vert_separate,
it wasn't used and only skipped step of finding correct loop of face.
2017-03-13 04:39:20 +11:00
f28376d8d9 Cleanup: style 2017-03-13 04:39:20 +11:00
Julian Eisel
8ca11f5b72 UI: Always open enum-search popups with empty search string
It might be useful to keep the search string stored in some cases, but
in most it's not useful but confusing. Especially if the string is taken
from a menu showing a different enum.
2017-03-12 18:14:43 +01:00
3f94836922 Fix T50788: blender startup crash on macOS with some types of volumes available. 2017-03-12 18:03:15 +01:00
68ca973f7f Fix T50628: gray out cycles device menu when no device configured only for GPU Compute. 2017-03-12 18:00:17 +01:00
76015f98ae Fix icon alignment for pie buttons 2017-03-11 22:34:09 +03:00
bcc8c04db4 Cleanup: code style & cmake 2017-03-12 02:47:53 +11:00
98045648ab Add support for Objects in Drive variable Rotational Difference
Thus it is according to the Manual
https://docs.blender.org/manual/en/dev/animation/drivers/drivers_panel.html#driver-variables
2017-03-11 10:43:23 -03:00
304315d181 BMesh: Fix BM_face_loop_separate_multi
When the loop region passed in had no loops to edge-split from,
it was assumed nothing needed to be done.

This ignored the case where loops share a vertex
without any shared edges.

Now BM_face_loop_separate_multi behaves like BM_face_loop_separate.

Fixed error where faces remained connected by verts in BM_mesh_separate_faces.
2017-03-11 23:26:44 +11:00
ce155ad2f6 Correct recent bmesh separate addition
- Was setting flag incorrectly to avoid re-use.
- Check edge has loops before accessing.
2017-03-11 23:26:13 +11:00
96868a3941 Fix T50888: Numeric overflow in split kernel state buffer size calculation
Overflow led to the state buffer being too small and the split kernel to
get stuck doing nothing forever.
2017-03-11 05:39:28 -05:00
5afe4c787f BMesh: add BM_mesh_separate_faces
Fast-path for bmesh split operator which duplicates and deletes.
Use when only separating faces, currently used by the intersect tool.
2017-03-11 20:50:32 +11:00
5be8adf8c0 Makefile: set tab width=4 2017-03-11 20:48:12 +11:00
f667593b6a Fix text and icon positioning issue on high DPI, after recent changes in 32c5f3d. 2017-03-11 04:47:22 +01:00
2d3c44389a Fix OpenCL warnings about doubles on some platforms. 2017-03-11 00:55:23 +01:00
c374e9f1f5 Breakdowner - Constrain Transform and Axis
This commit adds new features to the breakdowner, giving animators more
control over what gets interpolated by the breakdowner. Specifically:

   "Just as G R S let you move rotate scale, and then X Y Z let you do that
   in one desired axis, when using the Breakdower it would be great to be
   able to add GRS and XYZ to constrain what transform / axis is being
   breakdowned."

As requested here:
https://rightclickselect.com/p/animation/csbbbc/breakdowner-constrain-transform-and-axis


Notes:
* In addition to G/R/S, there's also B (Bendy Bone settings and C (custom properties)
* Pressing G/R/S/B/C or X/Y/Z again will turn these constraints off again
2017-03-11 11:53:45 +13:00
b6713dcbe5 rBa81ea408367abe2f33b351ff6dcc6b09170fd088 "object" -> "target" 2017-03-10 13:54:06 -03:00
a81ea40836 fix T50899: Even though the Shrinkwrap options hide the possibility of using a non-mesh target, you can still circumvent this... Causing Crash 2017-03-10 13:51:04 -03:00
103ae04fbc Correct glPixelTransfer function 2017-03-11 03:03:47 +11:00
15eb83c8b3 Fix T50900: Text-Blocks created from "Edit Source" have zero users. 2017-03-10 15:43:33 +01:00
9d6acc34a1 Fix useless allocation of edge_vectors in threaded case of loop split generation. 2017-03-10 15:43:33 +01:00
59fd21296a Cycles: Cleanup, extra semicolon and space 2017-03-10 15:38:30 +01:00
17b3097205 Adjust kmi header 2017-03-10 15:10:40 +03:00
6038583909 Cleanup: struct flags for select picking 2017-03-10 21:47:43 +11:00
3dbb560331 Cleanup: rename drawObjectSelect
After adding draw_object_select, noticed a similar name.
Rename drawObjectSelect to draw_object_selected_outline.
2017-03-10 21:27:33 +11:00
12e681909f Fix T47690: Connected PET w/ individual origins
- Connectivity length was overwritten by distance to closest selected.
- Vertices used the 'island' center of the closest vertex,
  even if it wasn't connected.

Now optionally keep track of the original index of used as the closest
connected distance.

To support this needed to add optional support for islands of 1 vertex.
2017-03-10 20:27:23 +11:00
4a2cde3f0e Cycles: Enable SSS and volumes for CUDA and Nvidia OpenCL split kernel 2017-03-10 02:09:41 -05:00
17689f8bb6 Fix T50904: Imprecise timeline frame selection using mouse
The changes introduced in rB3e628eefa9f55fac7b0faaec4fd4392c2de6b20e
made the non-subframe frame change behaviour less intuitive, by always
truncating downwards, instead of rounding to the nearest frame instead.
This made the UI a lot less forgiving of pointing precision errors
(for example, as a result of hand shake, or using a tablet on a highres scren)

This commit restores the old behaviour in this case only (subframe inspection
isn't affected by these changes)
2017-03-10 15:07:17 +13:00
62cc226101 3D View: x-ray support for depth picking
Selection loop would draw the selection ignoring xray.
Now draw in a separate pass after clearing the depth buffer,
as with regular drawing.

Also disable depth sorting,
caller can sort the hit-list by depth if needed.
2017-03-10 05:00:49 +11:00
Hristo Gueorguiev
9de9f25b24 Cycles: add single program debug option for split kernel
Single program generally compiles kernels faster (2-3 times), loads faster,
takes less drive space (2-3 times), and reduces the number of cached kernels.
2017-03-09 17:09:37 +01:00
Hristo Gueorguiev
06c051363b Cycles: split kernel_shadow_blocked to AO & DL parts
Reduces memory allocation for split kernel.

This allows for faster rendering due to bigger global size,
specially when GPU memory is limited.

Perfromance results:

                         R9 290 total render time
                        Before    After   Change
BMW                      4:37      4:34   -1.1 %
Classroom               14:43     14:30   -1.5 %
Fishy Cat               11:20     11:04   -2.4 %
Koro                    12:11     12:04   -1.0 %
Pabellon Barcelona      22:01     20:44   -5.8 %
Pabellon Barcelona(*)   15:32     15:09   -2.5 %

(*) without glossy connected to volume
2017-03-09 17:09:37 +01:00
Hristo Gueorguiev
e8b5a5bf5b Cycles: Speedup transparent shadows in split kernel
This commit enables record-all transparent shadows rays.

Perfromance results:

               R9 290 render time (without synchronization), seconds
                        Before    After   Change
BMW                      261.5    262.5   +0.4 %
Classroom                869.6    867.3   -0.3 %
Fishy Cat                657.4    639.8   -2.7 %
Koro                    1909.8    692.8  -63.7 %
Pabellon Barcelona      1633.3   1238.0  -24.2 %
Pabellon Barcelona(*)   1158.1    903.8  -22.0 %

(*) without glossy connected to volume
2017-03-09 17:09:37 +01:00
Hristo Gueorguiev
57e26627c4 Cycles: SSS and Volume rendering in split kernel
Decoupled ray marching is not supported yet.

Transparent shadows are always enabled for volume rendering.

Changes in kernel/bvh and kernel/geom are from Sergey.
This simiplifies code significantly, and prepares it for
record-all transparent shadow function in split kernel.
2017-03-09 17:09:37 +01:00
Dalai Felinto
6c942db30d Remove (ifdef) draw_documentation from text_draw.c
This was no longer supported.
2017-03-09 17:02:35 +01:00
88e8e7a074 3D View: wrap GPU_select cache calls
Avoids including GPU_select and makes it more clear that the cache is
needed for view3d_opengl_select calls.

Also use typed enum for select mode.
2017-03-09 20:47:37 +11:00
4ab322fdd2 3D View: use cache for armature select 2017-03-09 09:25:33 +11:00
c837bd5ea5 Cycles: Fix CUDA build error for some compilers
Needed to include `util_types.h` before using `uint`.
2017-03-08 16:44:43 -05:00
45b764e95b 3D View: new nethod of opengl selection
Intended to replace legacy GL_SELECT, without the limitations of
sample queries which can't access depth information.

This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL
which access the depth buffers to detect whats under the pointer,
so initial selection is always the closest item.

The performance of this method depends a lot on the OpenGL
implementations glReadPixels.

Since reading depth can be slow, buffers are cached for object picking
so selecting re-uses depth data, performing 1 draw instead of 3
(for 24, 18, 10 px regions, picking with many items under the pointer).

Occlusion queries draw twice when picking nearest,
so worst case 6x draw calls per selection.

Even with these improvements occlusion queries is faster on AMD hardware.

Depth selection is disabled by default, toggle option under select method.
May enable by default if this works well on different hardware.

Reviewed as D2543
2017-03-09 06:22:02 +11:00
817e975dee Fix T50849: Transparent background produces artifacts in this compositing setup
The issue was caused by sometimes negative color returned by the filter node.

Seems to be caused by precision issues. Don't see any reason why we would want
negative colors in output. Those only causing issues later on.
2017-03-08 15:56:50 +01:00
97c4c2689f Cycles: Make it more obvious message which initialization failed 2017-03-08 13:57:21 +01:00
05dfe9c318 Fix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~
Patch by Bruno d'Arcangeli (@arcangeli), thanks!
2017-03-08 13:38:01 +01:00
c24d045a23 OpenGL Select: integer rect for passing region 2017-03-08 23:23:39 +11:00
9af0c8b00a Cleanup: replace short -> int for selection hits 2017-03-08 23:23:39 +11:00
6f3f891c58 Rename BLI_rct*_init_pt_size -> radius 2017-03-08 23:23:39 +11:00
75cb4850f0 Cycles: Use 1-based line number for #line directives
AMD CPU platform was complaining about #line 0 directives in the code.
2017-03-08 12:45:18 +01:00
ecfbfe478b Cycles: Log which device kernels are being loaded for 2017-03-08 12:33:51 +01:00
712f7c3640 Cycles: Make it possible to access KernelGlobals from split data initialization function 2017-03-08 11:02:54 +01:00
ef7c36f5ed Cycles: Cleanup, remove residue of previous split kernel data
This is all in split data state array.
2017-03-08 10:26:29 +01:00
a095611eb8 Fix T50886: Blender crashes on render
Was a mistake in one of the previous TLS commits.

See comment in the pool_create to see some details why it was crashing.
2017-03-08 09:41:38 +01:00
3505be8361 update theme back to black re: T50869 2017-03-08 18:31:24 +11:00
64751552f7 Cycles: Fix indentation 2017-03-08 01:31:32 -05:00
fe7cc94dfa Cycles: Fix strict warning about unused variable 2017-03-08 01:31:32 -05:00
306034790f Cycles: Calculate size of split state buffer kernel side
By calculating the size of the state buffer in the kernel rather than the host
less code is needed and the size actually reflects the requested features.

Will also be a little faster in some cases because of larger global work size.
2017-03-08 01:31:30 -05:00
997e345bd2 Cycles: Fix crash after failed kernel build
Pointers to kernels were uninitialized leading to freeing of random memory
addresses. Another reason it would be good to use smart pointers.
2017-03-08 01:31:09 -05:00
18e50927f7 Cycles: Faster building of split kernel
Simple change to make it so that only kernels that have been modified are
rebuilt. Might only be useful during development.
2017-03-08 01:31:09 -05:00
223f45818e Cycles: Initialize rng_state for split kernel
Because the split kernel can render multiple samples in parallel it is
necessary to have everything initialized before rendering of any samples
begins. The code that normally handles initialization of
`rng_state` (`kernel_path_trace_setup()`) only does so for the first sample,
which was causing artifacts in the split kernel due to uninitialized
`rng_state` for some samples.

Note that because the split kernel can render samples in parallel this
means that the split kernel is incompatible with the LCG.
2017-03-08 01:31:09 -05:00
cd7d5669d1 Cycles: Remove sum_all_radiance kernel
This was only needed for the previous implementation of parallel samples. As
we don't have that any more it can be removed.

Real reason for removal tho is this: `per_sample_output_buffers` was being
calculated too small and artifacts resulted. The tile buffer is already
the correct size and calculating the size for `per_sample_output_buffers`
is a bit difficult with the current layout of the code. As
`per_sample_output_buffers` was only needed for `sum_all_radiance`,
removing that kernel and writing output to the tile buffer directly
fixes the artifacts.
2017-03-08 01:31:07 -05:00
4cf501b835 Cycles: Split path initialization into own kernel
This makes it easier to initialize things correctly in the data_init kernel
before they are needed by path tracing.
2017-03-08 01:30:43 -05:00
5b8f1c8d34 Cycles: Seperate kernel loading time from render time 2017-03-08 01:24:55 -05:00
b78e543af9 Cycles: Add names to buffer allocations
This is to help debug and track memory usage for generic buffers. We
have similar for textures already since those require a name, but for
buffers the name is only for debugging proposes.
2017-03-08 01:24:55 -05:00
817873cc83 Cycles: CUDA implementation of split kernel 2017-03-08 01:24:53 -05:00
0892352bfe Cycles: CPU implementation of split kernel 2017-03-08 00:52:41 -05:00
352ee7c3ef Cycles: Remove ccl_fetch and SOA 2017-03-08 00:52:41 -05:00
a87766416f Cycles: Report device maximum allocation and detected global size 2017-03-08 00:52:41 -05:00
365a4239c5 Cycles: Workaround for driver hangs
Simple workaround for some issues we've been having with AMD drivers hanging
and rendering systems unresponsive. Unfortunately this makes things a bit
slower, but its better than having to do hard reboots. Will be removed when
drivers have been fixed.

Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable for testing purposes.
2017-03-08 00:52:41 -05:00
230c00d872 Cycles: OpenCL split kernel refactor
This does a few things at once:

- Refactors host side split kernel logic into a new device
  agnostic class `DeviceSplitKernel`.
- Removes tile splitting, a new work pool implementation takes its place and
  allows as many threads as will fit in memory regardless of tile size, which
  can give performance gains.
- Refactors split state buffers into one buffer, as well as reduces the
  number of arguments passed to kernels. Means there's less code to deal
  with overall.
- Moves kernel logic out of OpenCL kernel files so they can later be used by
  other device types.
- Replaced OpenCL specific APIs with new generic versions
- Tiles can now be seen updating during rendering
2017-03-08 00:52:41 -05:00
520b53364c Cycles: Add OpenCL kernel for zeroing memory buffers
Transferring memory to the device was very slow and there's really no
need when only zeroing a buffer.
2017-03-08 00:52:41 -05:00
dfd6055eb0 Cycles: Add more atomic operations 2017-03-08 00:52:41 -05:00
bc652766e8 Cycles: Expose passes size to device tasks
This is needed so devices can know the size of a tile buffer before any
tiles are acquired.
2017-03-08 00:52:41 -05:00
0f56f7a811 Cycles: Allow device_memory to be used directly
This is useful for when theres no host side memory attched to the buffer
2017-03-08 00:52:41 -05:00
9e566b06e3 Task scheduler: Add concept of suspended pools
Suspended pools allows to push huge amount of initial tasks
without any threading synchronization and hence overhead.

This gives ~50% speedup of cached rigid body with file from
T50027 and seems to have no negative affect in other scenes
here.
2017-03-07 17:32:01 +01:00
347410a322 Depsgraph: Remove workarounds from depsgraph for keeping threads alive
This is something what should be done in the task scheduler instead
with local thread queues so we handle this in a single place.
2017-03-07 17:32:01 +01:00
55c2cd85f0 Task scheduler: Initial implementation of local tasks queues
The idea is to allow some amount of tasks to be pushed from working
thread to it's local queue, so we can acquire some work without doing
whole mutex lock.

This should allow us to remove some hacks from depsgraph which was
added there to keep threads alive.
2017-03-07 17:32:01 +01:00
2f722f1a49 Task scheduler: Use real pthread's TLS to access active thread's data
This allows us to avoid TLS stored in pool which gives us advantage of
using pre-allocated tasks pool for the pools created from non-main thread.

Even on systems with slow pthread TLS it should not be a problem because
we access it once at a pool construction time. If we want to use this more
often (for example, to get rid of push_from_thread) we'll have to do much
more accurate benchmark.
2017-03-07 17:32:01 +01:00
a07ad02156 Task scheduler: Refactor the way we store thread-spedific data
Basically move all thread-specific data (currently it's only task
memory pool) from a dedicated array of taskScheduler to TaskThread.
This way we can add more thread-specific data in the future with
less of a hassle.
2017-03-07 17:32:01 +01:00
9522f8acf0 Task scheduler: Remove per-pool threads limit
This feature was adding extra complexity to task scheduling
which required yet extra variables to be worried about to be
modified in atomic manner, which resulted in following issues:

- More complex code to maintain, which increases risks of
  something going wrong when we modify the code.

- Extra barriers and/or locks during task scheduling, which
  causes extra threading overhead.

- Unable to use some other implementation (such as TBB) even for
  the comparison tests.

Notes about other changes.

There are two places where we really had to use that limit.

One of them is the single threaded dependency graph. This will
now construct a single-threaded scheduler at evaluation time.
This shouldn't be a problem because it only happens when using
debugging command line arguments and the code simply don't
run in regular Blender operation.

The code seems a bit duplicated here across old and new
depsgraph, but think it's OK since the old depsgraph is already
gone in 2.8 branch and i don't see where else we might want
to use such a single-threaded scheduler.

When/if we'll want to do so, we can move it to a centralized
single-threaded scheduler in threads.c.

OpenGL render was a bit more tricky to port, but basically we
are using conditional variables to wait background thread to
do all the job.
2017-03-07 17:32:01 +01:00
35d78121f0 Fix typo in command line arg list 2017-03-07 09:07:58 -05:00
Julian Eisel
af076031d6 Update keymap presets for recent transform manipulator changes
Part of T50565.
2017-03-07 11:54:40 +01:00
Julian Eisel
ca796f872e Once more T50565: Allow using planar constraints for scale manipulator 2017-03-07 11:23:07 +01:00
15fa806160 Rigid body: fix viewport not updating on properties change. 2017-03-06 16:25:47 +01:00
f1c764fd8f Fix width calculation for split layouts 2017-03-06 16:35:56 +03:00
0e995e0bfe Cycles: Fix strict -Wpedantic warnings with GCC
Patch by Stefan Werner, thanks!
2017-03-06 14:18:26 +01:00
b498db06eb Task scheduler: Cleanup, use BLI_assert() instead of assert() 2017-03-06 11:33:27 +01:00
3623f32b48 FFmpeg: Update for the deprecated API in 3.2.x
Should be no functional changes.
2017-03-06 10:34:57 +01:00
355ad008a2 Surface Deform Modifier: Respect object transforms at bind time
This slightly changes SDef behavior, by now respecting object transforms
at bind time, thus not requiring the objects to be aligned in their
respective local spaces, but instead using world space.
2017-03-06 03:43:26 -03:00
Julian Eisel
80444effc6 Multi-View: Map cursor coordinates to visual coordinates
When rendering multi-view in side-by-side or top-bottom mode, we squash
the UI to half of its size and draw it twice on screen. That means the
cursor coordinates used for UI interaction don't match what's visible on
screen.
This commit is a little event system hack (tm) to fix this. It has some
small glitches with cursor grabbing, but nothing to bad.
We'll also use it for viewport HMD support.

D1350, thanks for the feedback @dfelinto!
2017-03-06 01:32:35 +01:00
e72af060ab CMake: confine WIN32 options 2017-03-06 04:05:00 +11:00
5f98cd6360 Cleanup: typos 2017-03-05 23:36:49 +11:00
a461216885 BMesh: Add 'cut' separate mode for intersect tool
It was only possible to separate all geometry from an intersection or none.

Made this into an enum with a 3rd option to 'Cut', (now default)
which keeps each side of the intersection separate
without splitting faces in half.
2017-03-05 23:36:46 +11:00
3caeb51d7f Fix T50855: Intersect (knife) w/o separate doesn't select 2017-03-05 22:28:16 +11:00
f75b52eca1 Fix T50843: Pitched Audio renders incorrectly in VSE
There was a bug in the intended code behaviour to always seek with a
pitch of 1.0 regardless of pitch/pitch animation/doppler effects.

Check the bug report for a more detailed explanation of problems
concerning pitch and seeking.
2017-03-05 12:19:32 +01:00
4a4d71414e BLI_rect: add init from point functions
Initialize a rectangle from point+size.
2017-03-05 20:51:23 +11:00
2089a17f7e Fix T50838: Surface Deform DM use after free issue
Implementd fix suggested by @sergey in T50838.
2017-03-04 03:16:50 -03:00
6b9d73e8a7 Cleanup: expose struct for ED_view3d_mats_rv3d_* 2017-03-04 13:32:40 +11:00
7b92b64742 Fix own previous commit, sorry about that :( 2017-03-03 17:23:22 +01:00
2e8398c095 Get rid of BLI_task_pool_stop().
Comments said that function was supposed to 'stop worker threads', but
it absolutely did not do anything like that, was merely wiping out TODO
queue of tasks from given pool (kind of subset of what
`BLI_task_pool_cancel()` does).

Misleading, and currently useless, we can always add it back if we need
it some day, but for now we try to simplify that area.
2017-03-03 17:16:39 +01:00
18c2a44333 Fix ugly mistake in BLI_task - freeing while some tasks are still being processed.
Freeing pool was calling `BLI_task_pool_stop()`, which only clears
pool's tasks that are in TODO queue, whithout ensuring no more tasks
from that pool are being processed in worker threads.

This could lead to use-after-free random (and seldom) crashes.

Now use instead `BLI_task_pool_cancel()`, which does waits for all tasks
being processed to finish, before returning.
2017-03-03 17:12:03 +01:00
5f05dac28f Update comment which was remained in an old place 2017-03-03 16:36:21 +01:00
17cf423f30 Cleanup: Indentation 2017-03-03 15:53:55 +01:00
91ce13e90d Fix T50842: NLA Influence Curve draws out of bounds when it exceeds the 0-1 range 2017-03-04 01:24:21 +13:00
c0d0ef142f Cleanup: GPU_select never took NULL rect 2017-03-03 22:24:08 +11:00
25de610876 Cleanup: redundant header, use const, short -> bool 2017-03-03 22:24:08 +11:00
cdfae957f2 When creating texture/image in Texture Paint mode, both datablocks should get the same name
The paint slot name was not the same as what is displayed on the texture properties panel.
Instead, the slot type (e.g. "Diffuse Color") was used as the name.

Patch by Suchaaver (@minifigmaster125) with minor changes from @mont29.

Reviewers: mont29, sergey

Maniphest Tasks: T50704

Differential Revision: https://developer.blender.org/D2523
2017-03-03 10:50:01 +01:00
810d7d4694 Cycles: Fix possibly uninitialized variable
Hopefully this was a reason of randomly disappearing textures in our renders.
2017-03-03 10:10:26 +01:00
df88d54284 Fix T49655: Reloading library breaks proxies.
Can't say enough how much I hate those proxies... their duality (sharing
some aspects of both direct *and* indirect users) is a nightmare to handle. :(
2017-03-03 08:52:19 +01:00
42cb93205c Fix own stupid mistake in recent mesh 'split_faces' rework.
Was assigning new edge index to ml_prev->e, and then assigning ml_pre->e
to orig_index...
2017-03-02 17:22:03 +01:00
Julian Eisel
a78717a72d Fix duplicated 'Accurate' property for manipulator keymap item
Is already added through Transform_Properties
2017-03-02 13:39:01 +01:00
Julian Eisel
e7dc46d278 Fix weird "use_planar_constraint" button in redo panel
Issue was that the VIEW_OT_manipulator operator calls the transform
operators and passes them it's own operator properties. That means the
transform operator got properties passed that it doesn't have.
2017-03-02 13:37:42 +01:00
a83a68b9b6 Threads: Use atomics instead of spin when entering threaded malloc 2017-03-02 12:42:34 +01:00
87f8bb8d1d Fix another part of T50565: Planar constraints were always initialized to accurate transform
Now it is defined by keymap.
2017-03-02 12:18:07 +01:00
499faa8b11 Fix second part T50565: Using planar transform once makes it enabled by default
Was caused by property being saved by the operator manager.
2017-03-02 11:20:57 +01:00
856077618a Fix T50830: Wrong context when calling surfacedeform_bind
The custom poll function for surfacedeform_bind seems to have caused
issues when calling it from Python. Fixed by using the generic modifier
poll function, and setting the button to be active or not in the
Python UI code instead. (there might be a better way, but for now this
works fine)
2017-03-01 17:56:10 -03:00
193827e59b Correct comment
Thanks to @dingto for noticing.
2017-03-01 14:12:03 -05:00
49c99549eb Cleanup: Use .enabled instead of .active 2017-03-01 13:06:19 -05:00
278fce1170 Fix T50565: Planar constraints don't work properly with non-Blender key configurations
The issue was introduced by 4df75e5 and seems we just need to explicitly
add new keymap item now.

There is still some difference from old behavior, which is planar transform
is using precision movement since e138cde and here i don't see nice solution
currently: the change was requested here in the studio and it's just a
conflict in picking shift key for something which is not supposed to be
accurate.

At least now it's possible to invoke planar constraint and simply unhold
shift.
2017-03-01 18:00:54 +01:00
7fcae7ba60 Task scheduler: Remove query for the pool's number of threads
Not really happy of per-pool threads limit, need to find better
approach to that. But at least it's possible to get rid of half
of the nastyness here by removing getter which was only used in
an assert statement.

That piece of code was already well-tested and this code becomes
obsolete in the new depsgraph and does no longer exists in blender
2.8 branch.
2017-03-01 18:00:54 +01:00
ecee40e919 All drop-down buttons should use the same width 2017-03-01 19:30:18 +03:00
714e85b534 Cleanup: code-style, duplicate header 2017-03-02 00:16:36 +11:00
32c5f3d772 Fix text and icon positioning issues 2017-03-01 16:11:21 +03:00
f0cf15b5c6 Task scheduler: Remove counter of done tasks
This was only used for progress report, and it's wrong because:

- Pool might in theory be re-used by different tasks
- We should not make any decision based on scheduling stats

Proper way is to take care of progress by the task itself.
2017-03-01 12:45:51 +01:00
351c9239ed Cleanup: Use explicit unsigned int in atomics 2017-03-01 12:01:19 +01:00
c1012c6c3a Cleanup: update copyright and Blender description 2017-02-28 12:04:43 -05:00
87f236cd10 Cycles: Fix division by zero in volume code which was producing -nan 2017-02-28 17:33:06 +01:00
efe78d824e Fix/workaround T48549: Crash baking high-to-low-poly normal map in cycles
For now only prevent crash.
2017-02-28 14:08:33 +01:00
a581b65822 Fix T49936: Cycles point density get's it's bounding box from basis shape key 2017-02-28 12:41:56 +01:00
6d1ac79514 Cleanup: Grey --> Gray 2017-02-27 19:33:57 -05:00
4fa4132e45 Surface Deform Modifier (SDef)
Implementation of the SDef modifier, which allows meshes to be bound by
surface, thus allowing things such as cloth simulation proxies.

User documentation: https://wiki.blender.org/index.php/User:Lucarood/SurfaceDeform

Reviewers: mont29, sergey

Subscribers: Severin, dfelinto, plasmasolutions, kjym3

Differential Revision: https://developer.blender.org/D2462
2017-02-27 13:49:14 -03:00
cd5c853307 Fix memory leak when making duplicates real and parent had constraints
Thanks Bastien for help!
2017-02-27 17:46:41 +01:00
2342cd0a0f Fix/workaround T50677: Shrinkwrap constraint don't get updated when target mesh gets modified
Do a "full" update on leaving sculpt mode, so we are sure scene will be brought
to a consistent state.

Ideally we'll only do that when there are objects which depends on geometry
without re-calculating self geometry, but that's a bit tricky currently.
2017-02-27 16:27:53 +01:00
691ffb60b9 Similar to previous commit, but for object constraints 2017-02-27 16:19:52 +01:00
bf7006c15a Depsgraph: Shrinkwrap constraint actually depends on geometry 2017-02-27 16:00:39 +01:00
5acac13eb4 Cycles: Fix compilation error on vanilla Ubuntu 16.10
Patch by @swerner, thanks!
2017-02-27 15:22:51 +01:00
f1b21d5960 Fix T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Attributes were not resized after pushing new triangles to the mesh.
2017-02-27 15:21:14 +01:00
209a64111e Fix part of T50634: Hair Primitive as Triangles + Hair shader with a texture = crash
Wrong formula was used to calculate needed verts and tris to be reserved.
2017-02-27 15:21:14 +01:00
00ceb6d2f4 Cycles: Make it more clear values never changes by using const qualifier 2017-02-27 15:21:14 +01:00
f7d67835e9 Cleanup: typo in struct name 2017-02-28 00:38:33 +11:00
cc78690be3 Cycles: Forgot this in previous commit 2017-02-27 12:54:35 +01:00
238db604c5 Cycles: Add more logs about what's going on in shader optimization 2017-02-27 12:38:24 +01:00
845ba1a6fb Cycles: Experiment with replacing Sharp Glossy with GGX when Filter Glossy is used
The idea is to make it simpler to remove noise from scenes when some prop uses
Sharp glossy closure and causes noise in certain cases. Previously Sharp Glossy
was not affected by Filter Glossy at all, which was quite confusing.

Here is a file which demonstrates the issue: {F417797}

After applying the patch all the noise from the scene is gone.

This change also solves fireflies reported in T50700.

Reviewers: brecht, lukasstockner97

Differential Revision: https://developer.blender.org/D2416
2017-02-27 12:33:59 +01:00
406398213c Fix missing break setting curve auto-handles 2017-02-27 13:35:03 +11:00
631ecbc4ca Fix unreported bug: Ensure you have the correct array directory even after the dm->release(dm) 2017-02-26 14:16:54 -03:00
112e4de885 Improve add-on UI error message
Show the paths of the duplicate addons

D791 by @gregzaal
2017-02-27 03:57:11 +11:00
0561aa771b Cleanup: minor changes to array_store
- remove unused struct member.
- misleading variable name.
2017-02-26 15:29:09 +11:00
5c3216e233 Fix compiling after a0b8a9f 2017-02-25 14:58:08 +01:00
d66d5790e9 Fix (unreported) missing update when adding constraint from RNA. 2017-02-25 11:38:02 +01:00
94ca09e01c Fix rows with fixed last item (D2524) 2017-02-25 13:18:41 +03:00
2c4564b044 Alembic: avoid crashing when reading non-indexed UV params. 2017-02-25 07:08:42 +01:00
a0b8a9fe68 Alembic: addition of a scope timer to perform basic profiling. 2017-02-25 07:08:42 +01:00
8c5826f59a Fix T50698: Cycles baking artifacts with transparent surfaces. 2017-02-25 03:12:53 +01:00
15f1072ee2 Fix build error with macOS / clang / c++11. 2017-02-25 03:12:53 +01:00
caaf5f0a09 Fix T50757: Alembic, assign imported materials to the object data
instead of to the object itself.
2017-02-24 21:19:52 +01:00
9062c086b4 Fix T50676: Crash on closing while frameserver rendering.
Can't see any reason to call AUD exit early in WM_exit, that's a
low-level module that has no dependency on anything else in Blender, but
is dependency of some other parts of Blender, so it should rather be
exited late in the process!
2017-02-24 14:58:38 +01:00
1e29286c8c Cycles: Fix compilation warning with CUDA on OSX 2017-02-24 14:33:10 +01:00
f49e28bae7 Cycles: Fix non-zero exit status when rendering animation from CLI and running out of memory 2017-02-24 14:25:38 +01:00
4c164487bc Add "Gravitation" option to "Force" type force fields
This adds an option to force fields of type "Force", which enables the
simulation of gravitational behavior (dist^-2 falloff).

Patch by @AndreasE

Reviewers: #physics, LucaRood, mont29

Reviewed By: #physics, LucaRood, mont29

Tags: #physics

Differential Revision: https://developer.blender.org/D2389
2017-02-23 19:23:39 -03:00
29859d0d5e Fix some more minor issue with updated py doc generation. 2017-02-23 22:31:21 +01:00
c067f1d0d4 Fix stupid mistake in previous commit for release builds of API doc. 2017-02-23 22:08:01 +01:00
c7ad27fc07 Update py API doc generation tools to comply to new name scheme on server.
- for rc/release: /api/2.79c/, zip file named blender_python_reference_2.79c_release.zip
 - for dev: /api/master/, zip file named blender_python_reference_2_79_4.zip
2017-02-23 21:45:20 +01:00
6a249bb000 Usual UI messages fixes... 2017-02-23 21:10:43 +01:00
50328b41a7 Cycles: Fix compilation error on 32bit Linux 2017-02-23 17:30:26 +01:00
4e12113bea Cycles: Fix wrong render results with texture limit and half-float textures 2017-02-23 14:46:22 +01:00
13e075600a Cycles: Add utility function to convert float to half
handles overflow and underflow, but not NaN/inf.
2017-02-23 14:42:06 +01:00
9eb647f1c8 Fix T50656: Compositing node editor is empty, no nodes can be added 2017-02-23 11:23:49 +01:00
60592f6778 Fix T50748: Render Time incorrect when refreshing rendered preview in GPU mode 2017-02-23 10:51:06 +01:00
9dd194716b Fix T50736: Zero streaks in Glare node.
Please never, ever use same DNA var for two different things. Even worse
if they do not have same type and ranges!

This is only ensuring issues (as described in report, but also if
animating both RNA props using same DNA var... yuck).

And we were not even saving any byte in DNA, could reuse some padding
there to store the two new needed vars (yes, two, since we cannot re-use
existing one if we want to keep backward *and* forward compatibility).
2017-02-23 10:39:51 +01:00
Julian Eisel
7359cc1060 Fix possible crash in various 3D View operators
Was actually harmeless and not crashing, but I'd say more or less only
by luck: the NULL-check for region data would only evaluate to true for
the correct 3D View region. However, if we were to add region data to a
different region type in future, this would lead to undefined behavior
if executed in the wrong region.
2017-02-23 02:14:27 +01:00
43299f9465 Columns should be expandable by default 2017-02-23 00:06:54 +03:00
5e1d4714fe Fix T50745: Shape key editing on bezier objects broken with Rendered Viewport Shading
So... Curve+shapekey was even more broken than it looked, this report was
actually a nice crasher (immediate crash in an ASAN build when trying to
edit a curve shapekey with some viewport rendering enabled).

There were actually two different issues here.

I) The less critical: rB6f1493f68fe was not fully fixing issues from
T50614. More specifically, if you updated obdata from editnurb
*without* freeing editnurb afterwards, you had a 'restored' (to
original curve) editnurb, without the edited shapekey modifications
anymore. This was fixed by tweaking again `calc_shapeKeys()` behavior in
`ED_curve_editnurb_load()`.

II) The crasher: in `ED_curve_editnurb_make()`, the call to
`init_editNurb_keyIndex()` was directly storing pointers of obdata
nurbs. Since those get freed every time `ED_curve_editnurb_load()` is
executed, it easily ended up being pointers to freed memory. This was
fixed by copying those data, which implied more complex handling code
for editnurbs->keyindex, and some reshuffling of a few functions to
avoid duplicating things between editor's editcurve.c and BKE's curve.c

Note that the separation of functions between editors and BKE area for
curve could use a serious update, it's currently messy to say the least.
Then again, that area is due to rework since a long time now... :/

Finally, aligned 'for_render' curve evaluation to mesh one - now
editing a shapekey will show in rendered viewports, if it does have some
weight (exactly as with shapekeys of meshes).
2017-02-22 21:56:49 +01:00
b637db2a7a Cleanup: remove unused orig_nu from keyIndex ghash of editcurves. 2017-02-22 21:56:49 +01:00
99947e2943 Use new api doc links
Differential Revision: https://developer.blender.org/D2522
2017-02-22 11:19:30 -05:00
75cc33fa20 Fix Cycles still saving render output when error happened
This was fixed ages ago for the interface case but not for the
command line. The thing here is that currently external engines
are relying on reports system to indicate that error happened
so suppressing reports storage in the background mode prevented
render pipeline from detecting errors happened.

This is all weak and i don't like it, but this is better than
delivering black frames from the farm.
2017-02-22 13:06:24 +01:00
36c4fc1ea9 Cycles: Fix shading with autosmooth and custom normals
New logic of split_faces was leaving mesh in a proper state
from Blender's point of view, but Cycles wanted loop normals
to be "flushed" to vertex normals.

Now we do such a flush from Cycles side again, so we don't
leave bad meshes behind.

Thanks Bastien for assistance here!
2017-02-22 10:54:36 +01:00
2c30fd83f1 Cycles: Additionally report all OpenCL cflags
This way we can control exact spaces and such added to the cflags
which is crucial to troubleshoot certain drivers.
2017-02-22 10:06:02 +01:00
ae1c1cd8c0 Refactor Mesh split_faces() code to use loop normal spaces.
Finding which loop should share its vertex with which others is not easy
with regular Mesh data (mostly due to lack of advanced topology info, as
opposed with BMesh case).

Custom loop normals computing already does that - and can return 'loop
normal spaces', which among other things contain definitions of 'smooth
fans' of loops around vertices.

Using those makes it easy to find vertices (and then edges) that needs
splitting.

This commit also adds support of non-autosmooth meshes, where we want to
split out flat faces from smooth ones.
2017-02-22 09:40:46 +01:00
3622074bf7 Fix Drawing nested box layouts (D2508) 2017-02-21 21:02:56 +03:00
4e9b17da4c Cycles: Speedup by avoiding extra calculations in noise texture when unneeded
Noise texture is now faster when the color socket is unused. Potential for
speedup spotted by @nutel.

Some performance results:

                     Render Time Before    After    Difference
Gooseberry benchmark         47:51.34    45:55.57       -4%
Koro                         12:24.92    12:18.46     -0.8%
Simple cube (Color socket)      48.53       48.72     +0.3%
Simple cube (Fac socket)        48.74       32.78    -32.7%
Goethe displacement           1:21.18     1:08.47    -15.6%
Cycles brick displacement     3:02.38     2:16.76    -25.0%
Large displacement scene     23:54.12    20:09.62    -15.6%

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2513
2017-02-21 07:24:33 -05:00
34a502c16a Cleanup: use proper link to the api 2017-02-20 20:21:57 -05:00
696836af1d Fix T50718: Regression: Split Normals Render Problem with Cycles
The issue seems to be caused by vertex normal being re-calculated
to something else than loop normal, which also caused wrong loop
normals after re-calculation.

For now issue is solved by preserving CD_NORMAL for loops after
split_faces() is finished, so render engine can access original
proper value.
2017-02-20 11:56:02 +01:00
75ce4ebc12 Mesh faces split: Add missing vertex normal copy 2017-02-20 11:47:43 +01:00
333dc8d60f Fix T50719: Memory usage won't reset to zero while re-rendering on two video cards
Was only visible with Persistent Images option ON.
2017-02-20 11:02:19 +01:00
9992e6a169 Fix a few compiler warnings with macOS / clang. 2017-02-18 23:59:34 +01:00
3f5b2e2682 Fix T50564: 3D view panning with scroll wheel inconsistent with dragging. 2017-02-18 22:41:56 +01:00
6f1493f68f Fix T50614: Curve doesn't restore initial form after deleting all its shapekeys
Logic of handling shapekeys when entering and leaving edit mode for
curves was... utterly broken.

Was leaving actual curve data with edited shapekey applied to it.
2017-02-17 18:55:52 +01:00
31123f09cd Remove unused functions related to distance between BoundBox and ray 2017-02-17 09:49:20 -03:00
d41451a0ca Forgotten in last commit: Check the allocation 2017-02-16 23:41:38 -03:00
6c59a3b37a Do not release the arrays used in the parameters of the expanded functions of bvhutils
The release of these arrays should be the programmer's discretion since these arrays can continue to be used.

Only the expanded functions `bvhtree_from_mesh_edges_ex` and `bvhtree_from_mesh_looptri_ex` are currently being used in blender (in mesh_remap.c), and from what I could to analyze, these changes can prevent a crash.
2017-02-16 22:55:01 -03:00
7819d36d4e Make File: Print 'blender.exe' at the end of the path to run from 2017-02-16 17:08:33 -05:00
99a6bbf7dd Cleanup: Spelling, Spaces --> Tabs, Whitespace 2017-02-16 17:06:03 -05:00
21eae869ad UI: Move 'relations extras' right below 'relations'
Differential Revision: https://developer.blender.org/D2218
2017-02-16 12:02:32 -05:00
306acb7dda Fix T50687: Cycles baking time estimate and progress bar doesn't work / progress when baking with high samples 2017-02-16 17:15:08 +01:00
26c8d559fe Register test for mesh.split_faces() 2017-02-16 15:36:00 +01:00
6468cb5f9c Faces split: Don't leave CD_NORMAL after split
This is supposed to be a temporary layer.

If someone needs loop normals after split it should explicitly
ask for that.
2017-02-16 11:00:17 +01:00
5cbaf56b26 Cyctes tests: Commit blender.git side changes 2017-02-16 10:36:22 +01:00
fc185fb1d2 CDDM Copy: Only tag data layers dirty if we ignored tessellation data
This solves assert failure in CustomData_from_bmeshpoly() happening with
broom.blend file from barber shop SVN.
2017-02-16 09:55:44 +01:00
809ed38075 Cleanup: Indentation 2017-02-16 09:16:20 +01:00
781507d2dd Freestyle: Feature edge selection by nested object groups.
A group of object groups can be formed by means of the dupli_group option in
the Object properties window.  The present revision extends the Selection by
Group option in the Freestyle Line Set so as to support not only flat object
groups but also nested groups.
2017-02-16 10:53:11 +09:00
9b3d415f6a Fix more corner cases failing in mesh faces split
Now we handle properly case with edge-fan meshes, which should
fix bad topology calculated for cash register which was causing
crashes in the studio.
2017-02-15 23:09:31 +01:00
40e5bc15e9 Fix wrong edges created by split faces
We need to first split all vertices before we can reliably
check whether edge can be reused or not.

There is still known issue happening with a edge-fan mesh
with some faces being on the same plane.
2017-02-15 21:41:25 +01:00
41e0085fd3 [Alembic] Fix msvc warning - C4138 '*/' found outside of comment 2017-02-15 12:40:41 -07:00
e22d4699cb Cycles: Cleanup, style 2017-02-15 20:33:49 +01:00
13d31b1604 Fix T50542: Wrong metadata frame when using OpenGL render 2017-02-15 17:09:49 +01:00
3e628eefa9 Motion blur investigation feature
This commit adds a way to debug Cycles motion blur issues which
are usually happening due to something crazy happening in between
of frames. Biggest trouble was that artists had no clue about
what's happening in subframes before they render. This is at
least inefficient workflow when dealing with motion blur shots
with complex animation.

Now there is an option in Time Line Editor which could be found
in View -> Show Subframe. This option will expose current frame
with it's subframe to the time line editor header and it'll allow
scrubbing with a subframe precision in time line editor.

Please note that none of the tools in Blender are aware of
subframe, so they'll likely be using current integer frame still.

This is something we don't consider a bug for now, the whole
purpose for now is to give a tool for investigation. Eventually
we'll likely tweak all tools to be aware of subframe.

Hopefully now we can finish the movie here in the studio..
2017-02-15 16:19:05 +01:00
efbe47f9cd Fix T50662: Auto-split affects on smooth mesh when it sohuldn't
Seems to be a precision error comparing proper floating point
normal with the one coming from short.
2017-02-15 15:21:15 +01:00
fe47163a1e Cycles: Fix CUDA compilation error after recent changes 2017-02-15 15:01:08 +01:00
20283bfa0b Fix wrong loop normals left after face splitting
Let's keep all data in a consistent state, so we don't have any
issues later on.

This solves rendering artifacts mentioned in the previous commit.
2017-02-15 14:58:49 +01:00
dd79f907a7 Mesh: Re-implement face split solving issue mentioned earlier
Now new edges will be properly created between original and
new split vertices.

Now topology is correct, but shading is still not quite in
some special cases.
2017-02-15 14:49:42 +01:00
8b8c0d0049 Cycles: Don't calculate primitive time if BVH motion steps are not used
Solves memory regression by the default configuration.
2017-02-15 12:59:31 +01:00
6cdc954e8c Cycles: Pass special flag whether BVH motion steps are used
Doesn't currently change anything, but would need for some future
work here.

It uses existing padding in kernel BVH structure, so there is
nothing changed memory-wise.
2017-02-15 12:45:06 +01:00
dc7bbd731a Cycles: Fix wrong hair render results when using BVH motion steps
The issue here was mainly coming from minimal pixel width feature
which is quite commonly enabled in production shots.

This feature will use some probabilistic heuristic in the curve
intersection function to check whether we need to return intersection
or not. This probability is calculated for every intersection check.
Now, when we use multiple BVH nodes for curve primitives we increase
probability of that primitive to be considered a good intersection
for us. This is similar to increasing minimal width of curve.

What is worst here is that change in the intersection probability
fully depends on exact layout of BVH, meaning probability might
change differently depending on a view angle, the way how builder
binned the primitives and such. This makes it impossible to do
simple check like dividing probability by number of BVH steps.

Other solution might have been to split BVH into fully independent
trees, but that will increase memory usage of all the static
objects in the scenes, which is also not something desirable.

For now used most simple but robust approach: store BVH primitives
time and test it in curve intersection functions. This solves the
regression, but has two downsides:

- Uses more memory.

  which isn't surprising, and ANY solution to this problem will
  use more memory.

  What we still have to do is to avoid this memory increase for
  cases when we don't use BVH motion steps.

- Reduces number of maximum available textures on pre-kepler cards.

  There is not much we can do here, hardware gets old but we need
  to move forward on more modern hardware..
2017-02-15 12:45:04 +01:00
088c6a17ba Cycles: Fix missing initialization of triangle BVH steps
Likely was harmless for Blender, but better be safe here.
2017-02-15 12:44:52 +01:00
5723aa8c02 Cycles: Fix wrong pointiness caused by precision issues 2017-02-15 12:40:13 +01:00
b36e26bbce Revert "Mesh: Solve incorrect result of mesh.split_faces()"
The change was delivering broken topology for certain cases.
The assumption that new edge only connects new vertices was
wrong.

Reverting to a commit which was giving correct render results
but was using more memory.

This reverts commit af1e48e8ab.
2017-02-15 12:40:13 +01:00
384b7e18f1 UI: Wireframe modifier- make crease grayed out when disabled 2017-02-14 23:48:35 -05:00
402b0aa59b Comments: notes on polyfill2d, minor corrections 2017-02-15 14:17:06 +11:00
af1e48e8ab Mesh: Solve incorrect result of mesh.split_faces()
This function was keeping original edges and was creating some
extra vertices which is not something we are really looking
forward to,
2017-02-14 17:02:22 +01:00
737a3b8a0a Mesh: Cleanup, use shorter version of loop 2017-02-14 16:27:09 +01:00
324d057b25 Mesh: Use faster calculation of previous loop 2017-02-14 16:27:09 +01:00
4d325693e1 BKE_boundbox_ensure_minimum_dimensions is no longer necessary
The bug T46099 no longer applies since the addition of `dist_squared_to_projected_aabb_simple`
Has also been added comments that relates to an occlusion bug with the ruler. I'll investigate this.
2017-02-14 10:25:00 -03:00
6c104f62b9 transform_snap_object: Remove do_bb parameter. It is always true 2017-02-14 09:38:20 -03:00
54102ab36e Alembic: fix naming of imported transforms.
When importing an Alembic file with grouped transforms, it would badly name the transforms, taking the name of the parent instead of its own.

Patch by @maxime.robinot

Differential Revision: https://developer.blender.org/D2507
2017-02-14 08:15:13 +01:00
930186d3df Cycles: Optimize sorting of transparent intersections on CUDA 2017-02-13 18:24:45 +01:00
21dbfb7828 Cycles: Fix wrong transparent shadows with CUDA
Was a bug in recent optimization commit.
2017-02-13 18:22:10 +01:00
581c819013 Cycles: Fix wrong shading on GPU when background has NaN pixels and MIS enabled
Quite simple fix for now which only deals with this case. Maybe we want to do
some "clipping" on image load time so regular textures wouldn't give NaN as
well.
2017-02-13 16:32:55 +01:00
81eee0f536 Cycles: Use fast math without finite optimization
This allows us to use faster math and still have reliable
isnan/isfinite tests.

Only do it for host side, kernels stays unchanged.

Thanks Lukas Stockner for the tip!
2017-02-13 16:25:35 +01:00
37afa965a4 Fix T50655: Pointiness is too slow to calculate
Optimize vertex de-duplication the same way as we do doe Remove Doubles.
2017-02-13 12:00:10 +01:00
594015fb7e Cycles: Use Cycles-side mesh instead of C++ RNA
Those are now matching and it's faster to skip C++ RNA to
calculate pointiness.
2017-02-13 10:40:05 +01:00
9148ce9f3c F-Curve normalization: Do proper curve min/max instead of handle min/max
Would be cool to find some way to cache the results.
2017-02-13 10:02:04 +01:00
5552e83b53 Cycles: Don't use built-in API for image sequences in preview mode
Our Python API is not ready for such things at all. Better be slower
but more correct for until we improve our API.
2017-02-11 22:24:59 +01:00
e76364adcd Image: Fix non-deterministic behavior of image sequence loading
The issue was caused by usage of non-initialized image user, which
could have different settings, causing some random image being loaded
or not loaded at all.

This caused non-deterministic behavior of Cycles image loading because
it was querying image information from several places.

This fixes crash reported in T50616, but it's not a complete fix
because preview rendering in material is wrong (same wrong as in
2.78a release).
2017-02-11 22:19:49 +01:00
1ac6e4c7a2 UI: Redesign the VSE multicam strip
Idea from https://rightclickselect.com/p/sequencer/zfbbbc/sequencer-panels-update by @pauloup

|{F434631}|{F434624}|
|Before |After|

Test file:
{F434643}
2017-02-11 11:35:02 -05:00
3ede515b5b Use dummy versionning numbers for missing libraries.
We now assert that we now file version of libraries (needed for
do_version after linking step), so for missing libraries, set dummy
numbers (using version of main .blend file actually).
2017-02-10 22:50:45 +01:00
9d8a9cacc3 De-duplicate min/max calculation in F-Curve normalization 2017-02-10 18:10:26 +01:00
e33e58bf23 CTests: Initial work to cover Cycles nodes with OpenGL tests
Works similar to regular Cycles tests, just does OpenGL render to
get output image.

Seems to work fine with the only funny effect: Blender window will
pop up for each of the tests. This is current limitation of our
OpenGL context. Might be changed in the future.
2017-02-10 14:52:54 +01:00
e991af0934 Cleanup: Trailing whitespace 2017-02-10 14:08:12 +01:00
cd4309ced0 Cycles: Cleanup, move EdgeMap to blender_util
it's better place for such an utility structure. Still not fully ideal tho.
2017-02-10 13:34:10 +01:00
0178915ce9 Cycles: Make an utility class for edge map
Simplifies some logic.
2017-02-10 13:34:09 +01:00
fd7e9f7974 Cycles: Fix pointiness attribute giving wrong results with autosplit
Basically made the algorithm to handle vertices with the same coordinate
as a single vertex.
2017-02-10 13:34:09 +01:00
d395d81bfc Cycles: Cleanup: Use less indentation by inverting condition 2017-02-10 13:34:09 +01:00
0b65b889ef Cycles: Calculate all vertex attribute after faces generation
This way the calculation is not spread over multiple places.
2017-02-10 13:34:09 +01:00
b26da8b467 Cycles: Cleanup: use vector instead of bare malloc
This way memory is more "manageable" and easier to follow.
2017-02-10 13:34:09 +01:00
b929eef8c5 Alembic: fixed mistake in bounding box computation
By performing the Z-up to Y-up conversion, the change in sign of the
Z-coordinate swaps "minimum" and "maximum".
2017-02-10 11:54:00 +01:00
38155c7d3c Do not overide text 2017-02-09 16:25:04 -05:00
bb1367cdaf Fix T50629 -- Add remove doubles to the cleanup menu
Also move it up in the verticies menu
2017-02-09 16:18:33 -05:00
e523cde574 Cleanup: Remove commented code
Code has been commented from before 2010 and relates to old Background image code.
2017-02-09 09:26:57 -05:00
d2f4900d1a Use a smaller cross icon for clearing search box contents 2017-02-09 19:08:58 +13:00
351eb4fad1 More tweaks to Normalisation options in Graph Editor
* Added a new dedicated icon for normalize
* Only use an icon for "Auto"
2017-02-09 18:59:51 +13:00
316d23f2ba Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons
These take less space, fit in better with rest of the UI, and make their relationship clearer
2017-02-09 17:10:49 +13:00
117d90b3da Fix: GPencil delete operators did not respect color locking 2017-02-09 17:10:48 +13:00
b16fd22018 Cycles: Fix regression with transparent shadows in volume 2017-02-08 14:00:48 +01:00
da31a82832 Cycles: Solve speed regression by casting opaque ray first 2017-02-08 14:00:48 +01:00
04cf1538b5 Cycles: Fix compilation error on OpenCL 2017-02-08 14:00:48 +01:00
31a025f51e Cycles: Split shadow functions to avoid some duplicated calculations 2017-02-08 14:00:48 +01:00
dde40989f3 Cycles: Store shadow intersections in the kernel globals
Seems CUDA failed to de-duplicate the array across multiple inlined
versions of the shadow_blocked(). Helped it a bit with that now.

Gives about 100MB memory improvement on a scenes after previous
commit and brings up memory "regression" to only 100MB comparing to
the master branch now.
2017-02-08 14:00:48 +01:00
7447950bc3 Cycles: Speedup transparent shadows on CUDA
This commit enables record-all behavior of transparent shadows
rays.

Render times difference goes as following:

               GTX 1080 render time
BMW                  -0.5%
Fishy Cat            -0.0%
Pabellon Barcelona   -11.6%
Classroom            +1.2%
Koro                 -58.6%

Kernel will now use some extra VRAM memory to store the intersection
array (200MB on my configuration). This we can optimize out with some
further commits.
2017-02-08 14:00:48 +01:00
9830eeb44b Cycles: Implement record-all transparent shadow function for GPU
The idea is to record all possible transparent intersections when
shooting transparent ray on GPU (similar to what we were doing  on
CPU already).

This avoids need of doing whole ray-to-scene intersections queries
for each intersection and speeds up a lot cases like transparent
hair in the cost of extra memory.

This commit is a base ground for now and this feature is kept
disabled for until some further tweaks.
2017-02-08 14:00:48 +01:00
9c3d202e56 Cycles: Use an utility function to sort intersections array 2017-02-08 14:00:48 +01:00
58a10122d0 Cycles: Make GPU version of shadow_blocked() closer to CPU
Now we break the traversal cycle and then perform volume attenuation
and check with zero throughput. Not sure it makes any measurable sense
at this moment, but in the future it might help de-duplicating some
extra logic here.
2017-02-08 14:00:48 +01:00
98a1855803 Cycles: De-duplicate transparent shadows attenuation
Fair amount of code was duplicated for CPU and GPU, now we are
using inlined function to avoid such duplication.
2017-02-08 14:00:48 +01:00
8cda364d6f Fix T49249: Alembic export with multiple hair systems crash blender
Removed unnecessary call to DM_update_tessface_data(). This call is
already performed by DM_ensure_tessface(dm). The call being performed
twice caused a failing BLI_assert().

Reviewed by: Kévin Dietrich
2017-02-08 12:26:36 +01:00
ac38d5652b Alembic export: avoid infinite loops trying to find parent objects.
Also added some assertions for debugging purposes

Reviewed by: Kévin Dietrich
2017-02-08 12:26:36 +01:00
95e7f93fa2 Alembic export: only create transform writer if the object should be exported
Reviewed by: Kévin Dietrich
2017-02-08 12:26:36 +01:00
b320873382 Alembic: #undef'ed the correct macro
TEST_RET is not defined anywhere in Blender's sources, and LAYER_CMP
is no longer used after this function ends.
2017-02-08 12:26:36 +01:00
ce9df09067 Alembic: Use getXForm() in check, because it's used in rest of the function too
This makes the code within the function consistent.
2017-02-08 12:26:36 +01:00
82df7100c8 Alembic: Renamed copy_zup_yup to copy_yup_from_zup (and same for zup_from_yup)
With the new names the arguments (yup, zup) are in the same order as
they appear in the function name. The old names used copy_src_dst(dst,
src), which I found very confusing. Furthermore, now it is clear from
where to where the copy is made.

This makes the function names a little bit longer, though. If that is
a real issue, we can just name them zup_from_yup(zup, yup).

Reviewed by: Kévin Dietrich
2017-02-08 12:26:36 +01:00
69dbeeca48 Cleanup: Use const qualifier in some of color management code 2017-02-07 17:49:54 +01:00
b641d016e1 Sequencer: Some extra speedup in color space conversion
Use the new utility from coloranagement which multi-threads byte to
float conversion.

Gives extra 10% speedup from quick tests.
2017-02-07 17:49:54 +01:00
ce629c5dd9 Color management: Add utility function to convert byte to float with processor applied 2017-02-07 17:49:54 +01:00
e5bb005369 Sequencer: Speedup conversion to sequencer space
Speedup is mainly gained by multi-threading. Gives about 3x
fps gain on an edit shot file.

There is still some room for improvements, will happen in one
of the upcoming commits.
2017-02-07 17:49:54 +01:00
5d6177111d Color management: Implement threaded byte buffer conversion
The title says it all actually: now we can convert byte buffer
directly, without need of temporary float buffer.
2017-02-07 17:49:54 +01:00
03be3102c7 Param is_cached not being used in bvhtree_from_mesh_edges_setup_data
This could cause bugs in the memory release
2017-02-07 11:03:10 -03:00
03544eccb4 Fix missing hair after rendering with different viewport/render settings
Derived mesh for particles did not include tessellated faces when it
was expected to. Now added explicit function to copy CDDM with tess
faces without need to re-tessellate the result.
2017-02-07 14:21:29 +01:00
53896d4235 Fix T49253: Cycles blackbody is wrong on AVX2 CPU on Windows
Seems to be bug in optimizer, but managed to reshuffle in a way
which should also give some speedup.
2017-02-07 13:05:19 +01:00
1158800d1b PIL_time_utildefines: also show total time in TIMEIT_AVERAGED. 2017-02-07 10:14:46 +01:00
f7eaaf35b4 Fix (unreported) Object previews being written even for skipped objects. 2017-02-06 20:58:18 +01:00
e217839fd3 Cleanup writefile code a bit.
Modernize some of it a bit, saves quite some lines of blabla (using
shile instead of for loops... tsssts...).
2017-02-06 20:43:14 +01:00
dbdc346e9f CMake: Remove MOTO library dependency when it is not needed
It is not necessary to add MOTO library dependency when we use
WITH_IK_SOLVER (now it uses Eigen) or we use WITH_MOD_BOOLEAN (it was
used by bsp intern library some time ago but it is not present in the
code anymore).

Reviewers: mont29, sergey

Subscribers: mont29, sergey

Differential Revision: https://developer.blender.org/D2477
2017-02-06 19:29:42 +01:00
0170c682fe Specify the correct size of the BVHTree of edges
~edge_num~ edges_num_active
Not always all the edges enter in the build
2017-02-06 14:59:31 -03:00
e3f99329d8 Standardization and style for BKE_bvhutils
Add `bvhtree_from_mesh_edges_ex` and callbacks to nearest_to_ray (Similar to the other functions of this code)
2017-02-06 14:11:06 -03:00
ac8348d033 Fix 'public' global 'g_atexit' var in Blender.
No reason to not make this private to this file, and it gave conflict
when using bpy as module and loading it in a GLib application (which
also has a g_atexit var).
2017-02-06 17:42:30 +01:00
9e97b00873 Fix compilation error after recent change 2017-02-06 15:29:13 +01:00
c7f40caa2c Add shortcuts for unsigned int, short, long and char
Feel free to use those in the new code.

And stay away from simple "unsigned".
2017-02-06 15:04:13 +01:00
c5cc9e046d Use hash instead of linear lookup in armature deform
This avoids calling linear lookup 100s of time when dealing with
real-life character.

Still some tweaks possible.
2017-02-06 14:47:36 +01:00
d0015cba02 Multi-thread displace modifier
The title says it all actually. Use BLI task to loop over vertices
and distort their locations. Gives 2x FPS increase in a file with
just time-dependent displace modifier on my desktop.
2017-02-06 14:21:29 +01:00
89f3837d68 Displace modifier: Use special version of texture sampling
This version will give less spin locks and now well-tested by render engines.

This should reduce amount of threading overhead when having multiple objects
with displace modifier enabled.

In the future this will also help us threading the modifier.

There are more modifiers which could benefit from this, but let's first
investigate the new behavior with one of them.
2017-02-06 12:37:08 +01:00
385fe4f0ce Add special texture sampling function which takes image pool argument
Using image pool will reduce number of thread locks when acquiring image.
Useful when it's needed to sample texture fewzillion times a second.
2017-02-06 12:23:03 +01:00
223aff987a Fix memory leak when building without audaspace 2017-02-06 11:18:20 +01:00
Phil Christensen
351c409317 C++ conformance fixes (MSVC /permissive-)
We (the Microsoft C++ team) use the Blender project as part of our "Real world code" tests.
I noticed a place in WIN32 specific code (dvpapi.cpp:85) where a string literal is losing
its const-ness when being passed to BLI_dynlib_open().  This is not permitted when using the
/permissive- conformance compiler switch (see our blog
https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/)

My suggested fix is to add const and propagate it where needed.  Another possible fix would be
to explicitly cast away the const.

Reviewers: mont29, sergey, LazyDodo

Subscribers: Blendify, sergey, mont29, LazyDodo

Tags: #platform:_windows

Differential Revision: https://developer.blender.org/D2495
2017-02-06 10:44:56 +01:00
22156d951d fix T50602: Avoid crash when executing transform_snap_context_project_view3d_mixed with dist_px NULL 2017-02-06 01:01:39 -03:00
da08aa4b96 Cleaning of the last commit: lack of attention with the debug of time X(
This was a stupid mistake
2017-02-04 19:06:41 -03:00
75aa866211 Optimize BVHTree creation of vertices that have BLI_bitmap test
Instead of reference the vertex first and test the bitmap afterwards. Test the bitmap first and reference the vertex after.

In a mesh with 31146 vertices and the entire bitmap disabled, the loop time is 243% faster
With all bitmap enabled, the time becomes 463473% faster!!!

One possible reason for this huge difference in peformance is that maybe the compiler is not putting the function "BM_vert_at_index" inline (I dont know if buildbot do this, but it's good to investigate).
2017-02-04 19:01:29 -03:00
47caf343c0 fix T50592: Scene.raycast not working
Ray_start and ray_normal values were being ignored
2017-02-04 18:17:15 -03:00
a2c469edc2 Fix (unreported) crash in new snap code.
Looks like `object_map` and `mem_arena` may be NULL sometimes...

Also, cleaned up function pointers declaration of Nearest2dUserData,
those were warning out in gcc. Please, *always* use typdef defined
prototypes for function pointers, it is sooooo much cleaner and clearer
that way. And easy to convert from compatible functions too.
2017-02-04 21:51:27 +01:00
6663099810 Fix T50590: BI lamp doesn't hold a texture in this case.
BKE_lamp_free was somehow missing the refactor of datablocks handling
(which, among other things, completely separated ID refcounting and
linking management from ID freeing itself).

Either forgot during development, or lost during merge...
2017-02-04 21:31:52 +01:00
c367e23d46 Snap System: Use callbaks to differentiate how referenced vertives of DerivedMeshs and Bmeshs
Before it was informed the type of object in the `userdata`, and a same function ran between the types to obtain the coordinates of the vertices
2017-02-03 20:08:57 -03:00
a0561a05ef Remove flag: SNAP_OBJECT_USE_CACHE from snap_context
Since the cache is created in one way or another, this flag is not really making a difference
More details here: D2496
2017-02-03 19:03:31 -03:00
21f3767809 fix T46892: snap to closest point now works with Individual Origins
The code looks for the closest element between its centers. In the case of islands, the center of each vertex is the center of the island.
The solution here is to skip the search for islands when the operation is translation
2017-02-03 13:15:44 -03:00
0b4a9caf51 Forgotten in committee ddf99214dc
In obect mode, the rotation matrix need to be restored to the initial value if a snap point is not found
2017-02-03 12:57:02 -03:00
0e459ad1a3 Buildbot: Re-enable cuda support for OSX 2017-02-03 16:11:05 +01:00
52696a0d3f Fix T50125: Shortcut keys missing in menus for Clear Location, Rotation, and Scale.
Menu entries and shortcuts did not have exact same behavior, now they do
(using shortcuts' behavior).
2017-02-03 16:10:00 +01:00
f3a7104adb Fix T49860: Copying vgroups between objects sharing the same obdata was not possible.
Pretty straight forward actually, just do not bother about obdata part
of vgroups in that case, only copy object part of it.

And let's curse once again those stuff spread accross several types of
data-blocks...
2017-02-03 15:47:44 +01:00
a1820afa30 Depsgraph: Add some extra debug prints on eval 2017-02-03 14:05:59 +01:00
030e99588d Tests: Use proper order for EXPECT_EQ() 2017-02-03 12:03:59 +01:00
aea17a612d Tests: Use EXPECT_FALSE() instead of EXPECT_EQ(foo, false) 2017-02-03 11:52:47 +01:00
dc1b45ff1a Tests: Use EXPECT_TRUE() instead of EXPECT_EQ(foo, true) 2017-02-03 11:52:29 +01:00
e1e85454ea Cycles: Cleanup, order of arguments to EXPECT_EQ
The order was wrong from the semantic point of view, caused
by some legacy workarounds in Libmv. Didn't realize it's was
not how things were expected to be used.
2017-02-03 11:35:34 +01:00
103f2655ab Explode modifier: Don't tessellate DM if we are not going to apply modifier 2017-02-03 11:03:47 +01:00
ddf99214dc fix T49494: snap_align_rotation should use a local pivot to make the transformation
The problem was simple, just transform the global coordinates of t->tsnap.snapTarget to local coordinates.
(Some comments were added to the code)
2017-02-03 02:27:57 -03:00
9f67367f0a Fix T50084: Adding torus re-orders UV layers.
Issue was indeed in join operation, mesh in which we join all others
could be re-added to final data after others, leading to undesired
re-ordering of CD layers, and existing vertices etc. being shifted away
from their original indices, etc.

All kind of more or less bad and undesired changes, fixed by always
re-inserting destination mesh first.

Also cleaned up a bit that code, it was doing some rather
non-recommanded things (like allocating zero-sized mem, doing own
coocking to remove a data-block from main, etc.).
2017-02-02 21:42:00 +01:00
33e456b0ce install_deps.sh: don't use backticks
The script complained that it could not find the executable "--build-all".
2017-02-02 17:49:24 +01:00
9e2dca933e Fix T50524: Basis shapekey editing while rendering bug.
Root of the issue was BM_mesh_bm_to_me() breaking application of basis
offset to 'child' shapekeys, when called more than once from same BMesh.
2017-02-02 17:05:48 +01:00
feb588060a Fix T50497: prop_search not correctly drew in UI (D2473) 2017-02-02 17:30:50 +03:00
86747ff180 Fix T50535: Cycles render segfault when Explode modifier before hair particle modifier + UV material
Tricky issue caused by CDDM_copy() coying MFACE array but not MTFACE which
confused logic later on.

Now we don't copy ANY tessellation unless it is requested to.

Thanks Bastien for help and review!
2017-02-02 14:36:30 +01:00
6edfa73f5c Revert the change of a default in a recent commit
This was my own mistake
2017-02-01 23:46:53 -05:00
Michael Stahre
7f10a889e3 Fix incorrect spot lamp blend in python GPU uniform export.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2378
2017-02-02 04:03:26 +01:00
Michael Stahre
d4e0557cf1 Fix missing uniform type for python GPU uniform export.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2379
2017-02-02 04:03:26 +01:00
Aaron
3ab8895610 UI: Add missing colon 2017-02-01 14:56:11 -05:00
fb61711b1a Fix T50570: pressing pgup or pgdn in any scrollable area irreversably alters scrolling speed.
'page' prop of scroll up/down operators would get stuck once set once by
pageup/down keys... Now only take this prop into account if explicitely
set, not when its value is inherited from previous run.
2017-02-01 12:52:26 +01:00
c231c29afa Cycles tests: Allow python auto-exec 2017-02-01 10:13:40 +01:00
fa19940dc6 Cycles: Fix rng_state initialization when using resumable rendering 2017-02-01 05:43:17 +01:00
92258f3678 Snap System: BVH: Ignore calculations, in parent nodes, used only in perspective view
Strangely this change does not affect the performance very much.
Suzanne subdividide 6x (ortho view):
Before:0.00013983
After :0.00013920

But it makes it easier to read the code
2017-01-31 21:43:44 -03:00
75a4c836d6 Snap System: Invert the test order of the elements to snap (useful for ruler)
When the function that tests snap on multiple elements starts from the face and ends at the vertex, the transition between elements becomes much smoother.
2017-01-31 17:10:34 -03:00
a90622ce93 Fix T50331: New Dependency Graph - "frame" python driver expression not working 2017-01-31 12:17:55 +01:00
326516c9d7 Cycles: Fix spelling in comment 2017-01-31 12:08:19 +01:00
b3690cdecd Fix variable shadow and avoid calculating same value twice 2017-01-31 11:55:29 +01:00
Dalai Felinto
887fc0ff6d Silence unused var warnings after rBac58a7fa 2017-01-31 11:00:50 +01:00
b5682a6fdd Cleanup: use 'cb_flag', not 'cd_flag' for library_query callbacks.
`cd_flag` tends to be used for CustomData flags in mesh area, while for
library_query those are rather callback flags...
2017-01-31 10:41:25 +01:00
60e387f5e3 Cleanup: Rename callback flags from library_query to IDWALK_CB_...
Better to have clear way to tell whether flag is parameter for
BKE_library_foreach_ID_link(), parameter for its callback function, or
return value from this callback function.
2017-01-31 09:47:59 +01:00
a928a9c1e1 Fix compilation error: too few arguments to function call.
D2492 by @tomjpsun.
2017-01-31 07:00:31 +01:00
d07e2416db Fix bug not reported: Ruler/Protractor: Snap to vertices and edges was not considering the depth variation
Taking advantage of the area, the depth is decreased 0.01 BU to each loop to give priority to elements in order: Vertice > Edge > Face. This increases the threshold and improves the snap to multiple elements
2017-01-30 23:49:09 -03:00
b841d60bf8 Snap System: Return depth by snapping to edges and vertices, because the Ruler only works right this way
The Ruler snaps to the element with the lowest depth.
2017-01-30 22:49:44 -03:00
a50b173952 Use the same solution to test the pixel distance to the AABB, with BoundBox
The previous solution took arbitrary values to determine if the mouse was near or not to the Bound Box (it simply scaled the Bound Box).

Now the same function that detected the distance from the BVHTree nodes to the mouse is used in the Bound Box
2017-01-30 22:27:38 -03:00
4e1025376e Freestyle: Use of the Fill Range by Selection operator in the mesh edit mode.
This revision extends the functionality of the "Fill Range by Selection" button in
the "Distance from Camera/Object" modifiers so that only selected mesh vertices
in the edit mode are taken into account  (instead of considering all vertices when
in the object mode) to compute the min & max distances from the reference.
This will give users much finer control on the range values.
2017-01-31 09:08:10 +09:00
bc4aeefe82 Make 'make local' twice quicker.
Use new Main->relations ID usages mapping in BKE_library_make_local().

This allows a noticeable simplification in code, and can be up to twice
quicker as previous code (Make Local: All from 2 to 1 minute e.g. in a
huge production file with thousands of linked data-blocks).

Note that new code has been successfuly tested with several complex cases
(production files from Agent327), as well as some testcases from recent
bug reports related to that function. But as always, nothing beats real
usage by real users, so please check this before we release 2.79. ;)

Main areas that would be affected: Make Local operations (L shortcut in
3DView), and append from libraries.
2017-01-30 22:33:20 +01:00
eadfd901ad Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.
Use Main->relations in BKE_library_foreach_ID_link(), when possible
(i.e. IDWALK_READONLY is set), and if the data is available of course.

This is quite minor optimization, no sensible improvements are expected,
but does not hurt either to avoid potentially tens of looping over e.g.
objects constraints and modifiers, or heap of drivers...
2017-01-30 22:33:20 +01:00
fbd28d375a Fix missing non-ID nodetrees in ID relationships built from library_query.c
This shall fix both existing code (bpy mapping, and local/lib usages
checks), and new Main->relations generation.
2017-01-30 22:33:20 +01:00
4443bad30a Add optional, free-after-use usages mapping of IDs to Main.
The new MainIDRelations stores two mappings, one from ID users to ID
used, the other vice-versa.

That data is assumed to be short-living runtime, code creating it is
responsible to clear it asap. It will be much useful in places where we
handle relations between IDs for a lot of them at once.

Note: This commit is not fully functional, that is, the infamous, ugly,
PoS non-ID nodetrees will not be handled correctly when building relations.
Fix needed here is a bit noisy, so will be done in next own commit.
2017-01-30 22:33:20 +01:00
997a210b08 Fix T49632: Grease pencil in "Edit Strokes" mode: Snap tool did not snap points to active object
A simple confusion between enums: ~SNAP_NOT_ACTIVE~
2017-01-30 18:30:19 -03:00
4580ace4c1 Alembic/CacheFile: fix crash de-referencing NULL pointer. 2017-01-30 10:46:24 +01:00
62f2c44ffb Cleanup: Unused function and and variables in snap code
Please doublecheck ED_transform_snap_object_project_ray_ex() is really
valid, it's weird to have extra arguments here unused.
2017-01-30 09:26:33 +01:00
505ff16dbf Snap System: BVH: ignore AABBs behind ray
This provides a slight improvement in performance in specific cases, such as when the observer is inside a high poly object and executes snap to edge or vertex
2017-01-30 02:49:41 -03:00
318ee2e8c1 Fix unreported bug: parameter ray_start repeated
The bug would only be seen in terms of performance
2017-01-30 02:26:00 -03:00
167ab03f36 Solve compilation error: Field has incomplete type 'enum eViewProj'
Error reported by @tomjpsun
Patch D2491
2017-01-30 02:19:18 -03:00
cdff659036 Freestyle: Fix (unreported) wrong distance calculation in the Fill Range by Selection operator.
Distance calculation performed by the "Fill Range by Selection" button of the
"Distance from Camera" color, alpha and thickness modifiers was incorrect,
limiting the usefulness of the functionality.

The problem was that the distance between the camera and individual vertex
locations was calculated in the world space, which was inconsistent with the
distance calculation done by the modifiers in the camera space.
2017-01-30 12:18:39 +09:00
6c23a1b8b9 Remove BKE_boundbox_ray_hit_check
Remove `BKE_boundbox_ray_hit_check` since it is no longer being used and can be easily replaced by `isect_ray_aabb_v3_simple`
2017-01-29 14:19:58 -03:00
b99491caf7 [msvc] Set proper OpenSubdiv flags when not using find_package to find opensubdiv. Fixes T50548 2017-01-29 10:00:38 -07:00
cf6ca226fa New math_geom function isect_ray_aabb_v3_simple
The new `isect_ray_aabb_v3_simple` function replaces the `BKE_boundbox_ray_hit_check` and can be used in BVHTree Root (first AABB). So it is much more efficient.
2017-01-29 13:56:58 -03:00
dead79a16a Rename func set_SnapData to snap_data_set
Don't use CamelCase in functions and try to keep area affected first, and action last, in names
2017-01-29 13:13:14 -03:00
88b0b22914 fix T50486: Don't always do the ray_start_correction in the ortho view
You need to make sure that ray_start is really far away, because even in the Orthografic view, in some cases, the ray can start inside the object
2017-01-29 12:26:15 -03:00
cd596fa1c7 Remove struct PreDefProject and store all immutable parameters within the new struct SnapData
In order to simplify the reading of these functions, the parameters: `snap_to`, `mval`, `ray_start`, `ray_dir`, `view_proj` and `depth_range` are now stored in the struct `SnapData`
2017-01-29 12:07:14 -03:00
d6f965b99c Fix T50550: GPUShader: compile error - Background image not showing in
viewport.

Caused by rBd6cf28c5e15739f864fbf04614c2a50708b4b152, which forgot to
update the GLSL code for the "Light Path" node.
2017-01-29 16:00:25 +01:00
15b253c082 Fix blurry icons 2017-01-29 17:21:57 +03:00
ba116c8e9c fix D2489: Collada exporter broke edit data when exporting Armature while in Armature edit mode 2017-01-28 22:10:20 +01:00
c64c901535 fix D2489: Collada exporter broke edit data when exporting Armature while in Armature edit mode 2017-01-28 21:51:18 +01:00
e4e1900012 Fix (IRC reported) DataTransfer modifier affecting base mesh in some cases.
Checking only whether mverts is same as base mesh one is not enough in
all cases, some modifiers (deform ones) can only generate new mvert
data, while keeping others from original mesh.

Now checking both mvert or medge, hopefully this will be enough to catch
all problematic cases this time.

Thanks @gaia for finding that problem. :)
2017-01-27 19:27:07 +01:00
11abb13483 Fix T50534, Part II: warn user when DataTransfer mod affects custom normals.
Custom normals need Autosmooth setting to be enabled, always!
2017-01-27 19:07:29 +01:00
fb2f95c91a Fix T50534: Part I, cleanup loop normals generated during modifier stack evaluation.
Those could stay around, and be displayed in 3DView even when autosmooth
was disabled (but would not be 'active').
2017-01-27 19:07:29 +01:00
bfe3b967fa UI: Move Scene Game Properties to the Scene Tab (was in world) 2017-01-27 11:36:53 -05:00
436f1e3345 Snap Functions: Remove the use of the function 'BLI_bvhtree_find_nearest_to_ray' in transform_snap_object
Although the "BLI_bvhtree_find_nearest_to_ray" function is more practical than the generic "BLI_bvhtree_walk_dfs", it does not work to snap in perspective view. This makes it necessary to add "ifs" and functions that make the code difficult to understand

patch: D2474
2017-01-27 13:02:05 -03:00
0330741548 Cycles: Add option to replace GI with AO approximation after certain amount of bounces
This is a speed up option which is mainly useful for viewport. Gives nice speedup in
the barbershop scene of 2x when replacing GI with AO after 2nd bounce without loosing
too much details.

Reviewers: brecht

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D2383
2017-01-27 14:21:49 +01:00
Dalai Felinto
84b18162cf Fixup for rBac58a7fa (HSV doversion)
We are not bumping file version, but we cannot have the doversion code running twice.
In this particular case it was crashing files, since we were setting node->storage to NULL, and later on accessing it.
2017-01-27 11:24:23 +01:00
bce9e80d82 CMake: Fix typo 2017-01-27 05:24:58 +01:00
67bef6bcf6 Depsgraph: Fix typo in assert 2017-01-26 17:22:54 +01:00
fd69ba2255 Depsgraph: Link from material to object shading
This is a ground work for the upcoming changes in Blender 2.8 branch
where we need to do special actions to reconstruct shaders when
material changes.
2017-01-26 17:01:37 +01:00
c441eb27ea Depsgraph: Add relation from node tree to material it's coming from 2017-01-26 16:49:24 +01:00
331f721725 Depsgraph: Remove owner argument from relations builder as well
The idea was to link something to a parent, but the point is:
we must not pass owner deep and then have any parent-type-related
logic implemented in the "children".
2017-01-26 16:36:37 +01:00
f14e1da5aa Fix (unreported) crash when file browser attempts to show preview of some defective font
Confirmed with the Wine's bundled fonts.
2017-01-27 00:36:24 +09:00
3c3c52a74b Depsgraph: Remove owner node argument which was simply passed around 2017-01-26 16:29:09 +01:00
ac58a7fa19 Compositor: Make HSV node inputs a real sockets
This is much more flexible solution which will allow doing some
more procedural features.

Reviewers: brecht, dfelinto, mont29

Reviewed By: mont29

Subscribers: Severin

Differential Revision: https://developer.blender.org/D2403
2017-01-26 15:20:13 +01:00
Dalai Felinto
18cf3e1a38 Fix unfreed memory after cleaning render layers
The freestyle data was never freed when removing a renderlayer.

```
blender -b --factory-startup --debug-memory --python-expr "import bpy;bpy.ops.scene.render_layer_add();bpy.context.scene.render.layers.active_index=0;bpy.ops.scene.render_layer_remove()"
```
2017-01-26 11:58:51 +01:00
01527197aa Alembic: fix compile error on Linux. 2017-01-26 06:18:07 +01:00
b91edd61d0 Fix T50287: Blender crashes when open a blend that contains an alembic
file.

Missed in rB62a2ed97b.
2017-01-26 06:16:33 +01:00
64f5afdb89 [Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons

1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.

This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there

5 has been fixed in rBL61751

Reviewers: juicyfruit, brecht, sergey

Reviewed By: sergey

Subscribers: Blendify

Tags: #cycles, #automated_testing

Differential Revision: https://developer.blender.org/D2367
2017-01-25 09:37:19 -07:00
Dalai Felinto
e5482f986c Fix T50115: stereoscopic video file memory leak 2017-01-25 15:16:36 +01:00
ced20b74e5 Fix T50032: Wrong render result when same image is used with and without alpha 2017-01-25 14:02:59 +01:00
e29a6f739d Fix T50512: Linked Backround scene with animation not updating with new depsgraph
Was missing relations for the set scenes.

Perhaps not ideal solution, but should be good enough for now.
2017-01-25 12:30:29 +01:00
e4de6e87e1 Depsgraph: Do ID tag outside of build_scene
Otherwise it was possible to get ID tags cleared in the middle
of DEG construction when there are set scenes used.
2017-01-25 12:28:27 +01:00
8ea09252c8 Fix T50517: Rendering expecting time is negative 2017-01-25 11:18:12 +01:00
4cbfaa6f3f Revert "UI: Add missing menu item"
This reverts commit 1ad842d432.
2017-01-25 01:33:10 -05:00
1ad842d432 UI: Add missing menu item 2017-01-25 01:00:28 -05:00
a7d5cabd4e Fix T49405: Crash when baking with adaptive subdivision
Blenders baking system currently doesn't support the topology used by
adaptive subdivision and primitive ids will be wrong or out of range
leading to crashes. Updating the baking system to support other
topologies would be a bit involved, so for now we simply disable
subdivision while baking to avoid crashes.
2017-01-25 00:40:45 -05:00
57f937ad5a Remove commented code 2017-01-24 16:00:15 -05:00
Julian Eisel
8a6c689f30 Fix T50386: Crash when spawning pie menus
D2455 by @raa, thanks!
2017-01-24 21:35:38 +01:00
605695de61 Depsgraph: Fix duplicated operation node when two objects are sharing same armature 2017-01-24 17:15:39 +01:00
d84df351d0 Cycles: Don't rely on indirectly included algorithm 2017-01-24 16:39:16 +01:00
b6ccba9241 Fix typo in comment 2017-01-24 14:56:35 +01:00
d4c5e366ea Install deps: Bump OpenSubdiv version to 3.1.1
Required to have some crash fixes.
2017-01-24 11:49:45 +01:00
520afa2962 GPencil: Fix unreported animation data missing when change palette name
When a palette was renamed, the animation data was not changed.

This fix is related to commit 196520fe7d
2017-01-24 09:15:41 +01:00
e5d8c2a67f Use new manual URL 2017-01-23 19:10:37 -05:00
d5c7d22bc2 Update script generating/uploading py API doc to new addresses (docs.blender.org). 2017-01-23 21:10:56 +01:00
39577403d3 Fix compilation error with legacy depsgraph disabled 2017-01-23 18:08:41 +01:00
bc096e1eb8 Cycles: Split ShaderData object and shader flags
We started to run out of bits there, so now we separate flags
which came from __object_flags and which are either runtime or
coming from __shader_flags.

Rule now is: SD_OBJECT_* flags are to be tested against new
object_flags field of ShaderData, all the rest flags are to
be tested against flags field of ShaderData.

There should be no user-visible changes, and time difference
should be minimal. In fact, from tests here can only see hardly
measurable difference and sometimes the new code is somewhat
faster (all within a noise floor, so hard to tell for sure).

Reviewers: brecht, dingto, juicyfruit, lukasstockner97, maiself

Differential Revision: https://developer.blender.org/D2428
2017-01-23 12:56:55 +01:00
b9311b5e5a Cycles: Make object flag names more obvious that hey are object and not shader 2017-01-23 12:14:17 +01:00
2ae39ff6b1 Fix strict compiler warning in the gflags code 2017-01-23 11:52:41 +01:00
7b8810b01a Silence strict compiler warnings
Similar thing to other areas where we mix Blender's char with OpenGL API.
2017-01-23 11:46:02 +01:00
77982e159c Cycles: Fix typo in the panel name
No user visible changes, it was a typo in the name of the class.

Spotted by povmaniac in IRC, thanks!
2017-01-23 10:35:15 +01:00
2268f41418 Cycles: Update current Cycles version 2017-01-23 10:25:59 +01:00
ce8889175a Fix T50491: Cycles UI breaks when pushing F8.
Cycles add-on did not actually support reloading correctly.

When you want to correctly reload sub-modules (i.e. modules of an add-on
which is a package), you need to use importlib, a mere import will do
nothing with already loaded modules (RNA classes are sort of
pre-registered when they are evaluated, through the meta-class system).
2017-01-22 12:42:14 +01:00
d2382f782e Fix T49527: Blender stalls when changing armature ghosting range with stepsize = 0
A big thanks to Steffen Mortensen (stifan) for finding the root cause of this bug!
2017-01-22 02:55:10 +13:00
82187a58f5 Fix own mistake in rB051526da6279, confusing off_t with ptrdiff_t. 2017-01-20 21:57:48 +01:00
475d536f72 Fix minor glitches in GP code.
Reported by coverity scan.
2017-01-20 18:46:06 +01:00
a97ec403c2 Fix/cleanup stupid check on array of char being non-NULL pointer...
Reported by coverity scan.
2017-01-20 18:43:42 +01:00
21e1282265 Fix float buffer of tracking image accessed outside of check that it has been correctly allocated.
Reported by coverity scan.
2017-01-20 18:41:56 +01:00
43268c1997 Cycles: Use more const qualifiers to avoid possible issues 2017-01-20 17:54:17 +01:00
a1c21e0b50 Cycles: Cleanup, split one gigantic function into two smaller ones 2017-01-20 17:52:48 +01:00
094d916c60 Fix compilation error with strict flags 2017-01-20 17:47:09 +01:00
051526da62 Cleanup/fix some BLI_string_utf8 not using size_t/off_t as expected. 2017-01-20 16:51:05 +01:00
2666a222f6 Cleanup/fix last remnant usages of int instead of size_t for string length in BLI_string_utils. 2017-01-20 16:51:05 +01:00
404e59c842 D1873: Customize style for animation motion paths
New options to define the style of the animation paths in order to get
better visibility in complex scenes.

Now is possible define the color, thickness and several options relative
to the style of the lines used to draw motion path.
2017-01-20 16:49:14 +01:00
1ad04c7d65 Cycles: Store time in BVH nodes
This way we can stop traversing BVH node early on.

Gives about 2-2.5x times render time improvement with 3 BVH steps.
Hopefully this gives no measurable performance loss for scenes with
single BVH step.

Traversal is currently only implemented for QBVH, meaning old CPUs
and GPU do not benefit from this change.
2017-01-20 12:46:18 +01:00
c4890cd354 Cycles: Add option to split triangle motion primitives by time steps
Similar to the previous commit, the statistics goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0                46                    260
    1                27                    373
    2                18                    598
    3                15                    826

Scene used for the tests is the agent's body from one of the barber
shop scenes (no textures or anything, just a diffuse material).

Once again this is limited to regular (non-spatial split) BVH,
Support of spatial split to this feature will come later.
2017-01-20 12:46:18 +01:00
5298853e95 Cycles: Add option to split curve motion primitives by time steps
The idea is to create several smaller BVH nodes for each of the motion
curve primitives. This acts as a forced spatial split for the single
primitive.

This gives up render time speedup of motion blurred hair in the cost
of extra memory usage. The numbers goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0               258                    191
    1               123                    278
    2                69                    453
    3                43                    627

Scene used for the tests is the agent's hair from one of the barber
shop scenes.

Currently it's only limited to scenes without spatial split enabled,
since the spatial split builder requires some changes to work properly
with motion steps coordinates.
2017-01-20 12:46:18 +01:00
d50d370755 Cycles: Add utility function to calculate curve boundbox from given 4 keys
Also fixed some issues with motion keys calculation:

- Clamp lower and upper limits of curves so we can safely call those
  functions for the very first and very last curve segment.
- Fixed wrong indexing for the curve radius array.
- Fixed wrong motion attribute offset calculation.
2017-01-20 12:46:18 +01:00
6f900c383a Cycles: Cleanup, trailing whitespace 2017-01-20 12:46:18 +01:00
26cdc64a7f Cycles: Split motion triangle file once again, avoids annoying forward declarations 2017-01-20 12:46:17 +01:00
14d343a8f9 Cycles: Move motion triangle intersection functions to own file
Mimics how regular triangles are working and makes it more clear where
the stuff is located in the kernel.

Needed to have some forward declarations because of the current placement
of things in the kernel.
2017-01-20 12:46:17 +01:00
ebc695ef2c Cycles: Cleanup, better variable name 2017-01-20 12:46:17 +01:00
20eb1fe3c1 Cycles: Add utility function to fetch motion keys while on CPU side 2017-01-20 12:46:17 +01:00
938ec3a743 Cycles: Cleanup, comments 2017-01-20 12:46:16 +01:00
461214508c Cycles: Add utility function to fetch motion triangle when on CPU side 2017-01-20 12:46:15 +01:00
811e6c2d32 Cycles: Cleanup, delete trailing whitespace 2017-01-20 12:46:15 +01:00
254fbcdd7b Cycles: Fix compilation error on with older GCC
Hopefully it works on all platforms now.
2017-01-20 11:55:48 +01:00
ff1b850081 Fix T50460. Greying out issue with Cycles culling options. 2017-01-20 10:58:03 +01:00
05ff32bd25 Fix compile error (-Werror=float-conversion). 2017-01-20 10:50:55 +01:00
2e3fda2d95 DopeSheet: Show group colours behind keyframes too
Following @AlonDan's feature request and @hjalti's screenshot yesterday,
I've decided to implement support for this to make it easier to scan which
keyframes correspond with which set of controls, especially when faced with
a large wall of keyframes.

In retrospect, I should've done this a long time ago!
2017-01-20 18:40:26 +13:00
831cfcfb3d API: Do not show "Created using Sphinx" in the footer
I talked to Campbell and he said there is no need for this
2017-01-19 16:16:04 -05:00
c91bdaf55b Build dir should be set after the sanity checks
Error here is that if do not have 2012 it switch to 2015 but not change the build dir
2017-01-19 16:00:52 -05:00
2a2ae9c3fa BMesh: remove BM_face_create_ngon_vcloud
Instead, add BM_verts_sort_radial_plane
and use regular creation API.
2017-01-20 06:09:37 +11:00
53e7a4a83c Correct asserts, un-hiding when selected is ok 2017-01-20 06:00:55 +11:00
d6cf28c5e1 Cycles: Expose diffuse and glossy depth to Light Path node
Was a bit confusing to have transparent and translucent depth
exposed but no diffuse or glossy.

Reviewers: brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D2399
2017-01-19 15:09:58 +01:00
afdd756e56 Cycles: Don't use fast math for the host code
This is important for the reliable behavior or isnan/isfinite/min/max
functions to work with nan and non-finite values. Some of the issues
with fast math are possible to work around, but didn't find a way to
have reliable min/max implementation yet.
2017-01-19 14:51:11 +01:00
78b94902f8 Cycles: Add fast-math safe isnan and isfinite
Currently unused, but might become really handy in the future.
2017-01-19 14:51:11 +01:00
6d36e033ba Cycles: Remove using namespace hell
Please NEVER EVER use such a statement, it's only causing HUGE
issues. What is even worse: it's not always possible to immediately
see that the hell is coming from such a statement.

There is still some statements in the existing code, will leave
those for a later cleanup.
2017-01-19 14:51:11 +01:00
446ed355a5 GPencil: Add option to create blank frame in active layer only
Now it is possible to select if the blank frame is created in active
layer only or in all layers.
2017-01-19 13:05:23 +01:00
666cb5ddd9 Cleanup: naming, comments assert for hide+selected 2017-01-19 22:59:41 +11:00
e2d02fee30 BMesh: improve hide-flush internal logic
- flushing hidden state ran when it didn't need to.
- flushing checks didn't early exit when first visible element found.
- low level BM_*_hide API calls like this can use skip iterators
  can loop over struct members directly.

No user-visible changes.
2017-01-19 22:50:56 +11:00
b76dbf5e65 UI: Fix capitalization inconsistency 2017-01-18 19:38:55 -05:00
4a19112277 Cycles: Fix amount of rendered samples not being shown while rendering the last tile on CPU 2017-01-19 00:48:09 +01:00
1455023e64 Fix T49807: Inset faces edge rail bug 2017-01-19 10:37:04 +11:00
11187e8628 Fix face-creation with existing hidden geometry
- face-create-extend option could add hidden verts and edges into
  the selection history (invalid state).
- faces could be created that included existing hidden edges
  that remained hidden (invalid state too).
- newly created faces could copy hidden flag from surrounding faces,
  giving very confusing results (looks as if face creation failed).

Surprising nobody noticed these years old bugs!
2017-01-19 09:17:36 +11:00
fd4728c85a BMesh: Use angle_signed_on_axis_v3v3v3_v3 2017-01-19 07:59:32 +11:00
a48d3417b5 Fix strict compiler warning message 2017-01-18 15:56:40 +01:00
b059a71655 GPencil: Avoid variable shadowing 2017-01-18 15:56:04 +01:00
6d868d9f48 Reproject Strokes - To Surface/Geometry
Experimental option for the Reproject Strokes operator to project strokes on to
geometry, instead of only doing this in a planar (i.e. parallel to viewplane) way.

The current implementation is quite rough, and may need to be improved before it
is really ready for use. Potential issues:
* Loss of precision (i.e. stairstepping artifacts) from the 3D -> 2D -> 3D conversion
  as we don't have float version of one of the projection funcs
* Jagged depth if there are gaps, since it will default back to the 3d-cursor plane
  if no geometry was found (instead of doing some fancy interpolation scheme)
* I'm not sure if it's that useful for adapting GP strokes to deforming geometry yet...
2017-01-19 03:20:44 +13:00
00edc600b0 Fix: Make it possible to erase strokes (on other layers) even if the active layer doesn't have any frames 2017-01-19 03:06:43 +13:00
7452af0f86 Fix: Avoid creating redundant frames when erasing
Now the eraser checks if there's an active frame with some strokes in it
before creating a new frame. There's no point in creating a new frame if
there are no strokes in the active frame (if one exists).

This still doesn't help much if there were strokes but they weren't touched though...
2017-01-19 03:06:43 +13:00
a93881d704 GPencil: Pressing 'B' while in 'Continuous Drawing' mode will create a blank frame
This is a hardcoded keymapping that just calls the "Add Blank Frame" operator
introduced in the previous commit.
2017-01-19 03:06:42 +13:00
259447300f GPencil: "Add Blank Frame" operator (D+B)
This operator adds a new frame with nothing in it on the current frame.
If there is already a frame there, all existing frames are shifted one frame later.

Quite often when animating, you may want a quick way to get a blank frame,
ready to start drawing something new. Or maybe you just need a quick way to
add a "placeholder" frame so that a suddenly-appearing element does not show
up before its time.
2017-01-19 03:06:41 +13:00
86b6006ef8 GPencil: Cleanup - move include line to correct scope 2017-01-18 13:00:09 +01:00
196520fe7d GPencil: Fix unreported error in animation after rename items
If the layers or the colors were renamed, the animation data was wrong
because the data path was not updated.

I also have fixed a possible stroke color name update if the name was duplicated moving
the rename function call after checking unique name.
2017-01-18 12:29:02 +01:00
d216313732 Cleanup: Strict compiler flags
Also seems the new file forced trailing whitespace, which goes against

  https://wiki.blender.org/index.php/Dev:Doc/Code_Style#Trailing_Space
2017-01-18 12:20:53 +01:00
e138cdeeb6 Transform manipulator: Allow first clicking Shift before selecting axis
Avoids possible jumps when one is trying to do some really preciese tweak.

Quite striaghtforward change for mouse input initialization: take Shift
state into account. However, this will interfere with the axis exclusion
which is currently also uses Shift (the feature to move something in a
plane which doesn't have selected axis). This is probably not so commonly
used feature (nobody in the studio even knew of it) and the only downside
now would be that such a constrainted movement will become accurate by
default. That's easy to deal from user side by just unholding Shift key.

Reviewers: brecht, mont29, Severin

Differential Revision: https://developer.blender.org/D2418
2017-01-18 12:18:54 +01:00
8d4b31ce03 GP Interpolation: "Remove Breakdowns" operator
To make it faster to try different interpolation curves, there's a new operator
"Remove Breakdowns" which will delete all breakdowns sandwiched by normal
keyframes (i.e. all the ones that the previous run of the Interpolation op created)
2017-01-18 19:42:00 +13:00
65ec429d11 GP Interpolate Sequence: Tool settings for controlling the shape of interpolation
This commit introduces the ability to use the Robert Penner easing equations
or a Custom Curve to control the way that the "Interpolate Sequence" operator
interpolates between keyframes. Previously, it was only possible to get linear
interpolation between the gp frames.

Workflow:
1) Place current frame between a pair of GP keyframes
2) Open the "Interpolate" panel in the Toolshelf
3) Choose the interpolation type (under "Sequence Options")
4) Adjust settings (e.g. if you're using "Custom Curve", use the curvemap widget
   to define the way that the interpolation proceeds)
5) Click "Sequence" to interpolate
6) Play back/scrub the animation to see if you've got the result you want
7) If you need to make some tweaks, undo, or delete the generated keyframes,
   then repeat the process again from step 4 until you've got the desired result.
2017-01-18 19:41:59 +13:00
224ae23443 GP Interpolate: Move settings from "gp_sculpt" to a new toolsettings struct - "gp_interpolate"
The "gp_sculpt" settings should be strictly for stroke sculpting, and not abused by
other tools. (Similarly, if other general GP tools need one-off options, those should
go into the normal toolsettings->gpencil_flag)

Furthermore, this paves the way for introducing new settings for controlling the way
that GP interpolation takes place (e.g. with easing equations, or a custom curvemap)
2017-01-18 19:41:58 +13:00
4903a83235 GP Interpolate Code Cleanup (Second Round)
* Reduce scope of variables
* Simplify a lot of the active_gpl->actframe->...->framenum stuff
* Missed some error messages
2017-01-18 19:41:58 +13:00
fd119a3723 Code Cleanup for GP Interpolation ops (first pass)
* Reshuffled some blocks of code for better ease of navigation/flow in the file
* Improved some tooltips
* Removed "Helper" tag from some functions that serve bigger roles
* Fixed some errant formatting
2017-01-18 19:41:57 +13:00
cd8cde1a6a Code Cleanup: Move GPencil Interpolation operators into their own file
The interpolation operators (and their associated code) occupied a significant
portion of gpencil_edit.c (which was getting a bit heavy). So, it's best to split
these out into a separate file to make things easier to handle, in preparation
for some further dev work.
2017-01-18 19:41:57 +13:00
af9f6fd57e Add 'Layer Weight' node to Blender internal node items 2017-01-17 12:02:05 +03:00
d7b2093db3 Return correct alpha for environment map in GLSL 2017-01-17 11:52:02 +03:00
e0303d0297 Cleanup/refactor: move BKE_deform_flip_side_name & co to BLI_string_utils
Functions like that do not have anything to do in BKE really, even less
when actually more used for bones than vgroups!
2017-01-16 20:36:23 +01:00
7ce833af5b Cleanup/refactor: get rid of fixed name limit in BKE_deform_flip_side_name & co.
Those were forcing to use vgroup name define in bones area, or even
mixing with maxbonename... ugly, and totally avoidable.
2017-01-16 20:36:23 +01:00
b997988323 Cleanup/refactor: Add new BLI_string_util.
Things like `BLI_uniquename` had nothing, but really nothing to do in
BLI_path_util files!

Also, got rid of length limitation in `BLI_uniquename_cb`, we can use
alloca here to avoid overhead of malloc while keeping free size (within
reasonable limits of course).
2017-01-16 20:36:23 +01:00
3748defefe Cleanup: remove unused & unimplemented BLI_newname. 2017-01-16 20:36:22 +01:00
702bc5ba26 Fix T50393: Flip names working just on one side when both are selected.
Just store bones that could not get renamed to desired flipped name on the
first try into a temp list, and try to rename them a second time.

This is rather simple solution, will induce 'over numbering' in case you
flip a bone to another unselected bone's name (since number will be
incremented in both rename attempts), but think this is acceptable minor
glitch, for a corner case situation that does not have any good
resolution anyway.

Also, set `strip_numbers` option of `BKE_deform_flip_side_name` to
false, otherwise chains of bones with same names would get their numbers
completely messed up after name flipping.

Based on work by @dfelinto in D2456 (https://developer.blender.org/D2456), thanks.
2017-01-16 20:36:22 +01:00
92fbcbb4bf Cycles: Cleanup, spelling 2017-01-16 17:55:41 +01:00
d3e4eecaa5 Cycles: Cleanup, avoid shadowing 2017-01-16 17:54:39 +01:00
0a446d7276 Add 3d to 2d plane mapping functions to math lib
This adds two functions to project 3d coordinates onto a 3d plane,
to get 2d coordinates, essentially eliminating the plane's normal axis
from the coordinates.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2460
2017-01-14 00:34:51 -02:00
646aa40cf7 Fix missing user when opening text from ID UI widget.
Own mistake in recent fix for Text data-block usercount (rBa9163f7d2).

Reported by @sergey over IRC, thanks.
2017-01-13 18:12:56 +01:00
e5a665fe24 Cycles: Fix wrong transparent shadows for motion blur hair
This was a missing bit from b53ce9a.
2017-01-13 16:14:57 +01:00
14f6e27f6a Cycles: Cleanup, style 2017-01-13 15:24:56 +01:00
807b1a262f Cycles: Simplify some code in Curve BVH reference fill
makes code slightly shorter and uses idea of const qualifiers.
2017-01-13 10:59:34 +01:00
3160472a66 Cycles: Avoid shadowing in BVH code
Run into some nasty bugs while trying various things here.

Wouldn't mind enabling -Wshadow for Cycles actually..
2017-01-13 10:53:01 +01:00
bd6bd62753 Fix small spelling error 2017-01-12 23:36:08 -05:00
d464fb0996 Dynamic Paint: recursively search for island border edges.
It is quite likely in a triangulated mesh that the actual island edge
belongs to a different triangle than the current pixel; for example
consider corners of a triangulated axis aligned rectangle face that
have the additional edge: a pixel there will have to be assigned to
one of the triangles, but one of the edges of the original rectangle
can only be accessed through the other triangle.

Thus for robust operation it is necessary to do a recursive search.
The search is limited by requiring that it only goes through edges
that bring it closer to the target point, and also by depth as a
safeguard.

Differential Revision: https://developer.blender.org/D2409
2017-01-12 21:28:15 +03:00
c937c3af46 Dynamic Paint: provide margin of error for linking neighbors across seams.
The code requires the pixel on the other side of the seam to be assigned
precisely to the expected triangle. This can cause false negatives around
vertices, where a pixel is likely to touch multiple triangles and thus
cannot be said to unambiguously belong to any one of them, so check
distance to the intended triangle and accept the result if it's close.
2017-01-12 21:28:15 +03:00
99ca90e808 Dynamic Paint: improve UV island border handling in effects.
1. Forcibly symmetrize the neighbor relations, so that if A is neighbor
   of B, B is neighbor of A. The existing code is guaranteed to violate
   this if texture resolution is different between the sides of a seam.

2. In texture mode dynamic paint adds a 1 pixel wide border around the
   islands. These pixels aren't really part of the dynamic paint domain
   and thus by design can't have symmetrical neighbor relations. This
   means they can't be treated by effects like normal pixels.
   The simplest way to handle it in a consistent way is to exclude
   them from effects, but add an additional pass that recomputes them
   as average of their non-border neighbors, located on both sides of
   the seam.
2017-01-12 21:28:14 +03:00
720e564882 Cycles: Allow up to 4 motion curve primitives per BVH node
This avoids intersection AABB of different curve primitives
which makes it less ray-to-primitive intersections.

This gives about 30% speedup of hair rendering in the barber
shop scenes here. There is still some work to be done on those
files to solve major speed issues on certain frames.
2017-01-12 18:23:23 +01:00
b53ce9a1d0 Cycles: Prepare BVH traversal code to work with multiple curve primitives per node 2017-01-12 18:20:19 +01:00
f12f906dd9 Cycles: Correct assert() for cases when there are multiple curves per BVH node 2017-01-12 17:38:27 +01:00
76a4cf1941 Cycles: Use separate limit for motion primitives for BVH node limits
This way we can have different limits for regular and motion curves
which we'll do in one of the upcoming commits in order to gain some
percents of speedup.

The reasoning here is that motion curves are usually intersecting
lots of others bounding boxes, which makes it inefficient to have
single primitive in the leaf node.
2017-01-12 16:54:08 +01:00
0421ae056d Cycles: Change confusing logic of max leaf size check
Maximal number of elements is supposed to be inclusive. That is what
it was always meant in this file and what @brecht considered still
the case in 6974b69c61.

In fact, the commit message to that change mentions that we allowed
up to 2 curve primitives per leaf while in fact it was doing up to 1
curve primitive.

Making it real 2 primitives at a max gives about 5% slowdown for the
koro.blend scene. This is a reason why BVHParams.max_curve_leaf_size
was changed to 1 by this change.
2017-01-12 16:33:08 +01:00
d9cd9ff322 Cycles: Cleanup, space prior to semicolon
We don't have that in Blender style, no reason to violate it here.
2017-01-12 15:31:25 +01:00
985c121c0b Cycles: Cleanup, make curve functions private
Not only they don't really follow naming convention (we don't use
camel case) but also was not necessary to keep them in the global
symbol table.
2017-01-12 15:28:19 +01:00
83d18a2a91 Cycles: Make it more clear message why curve motion attribute was removed 2017-01-12 15:22:41 +01:00
53fa389802 Cycles: Use dedicated debug passes for traversed nodes and intersection tests
This way it's more clear whether some issue is caused by lots of geometry in
the node or by lots of "transparent" BVH nodes.
2017-01-12 13:44:35 +01:00
8daf02f134 Cycles: Remove more duplicated code in debug passes logic 2017-01-12 13:33:53 +01:00
789fdab825 Cycles: Fix wrong scaling of traversed instances debug pass 2017-01-12 13:32:13 +01:00
618b3480c8 Cycles: Cleanup, remove duplicated code 2017-01-12 13:31:35 +01:00
d1131227c5 Cycles: Cleanup, indentation within preprocessor 2017-01-12 12:54:24 +01:00
511dbe56db Cycles: Cleanup, use switch() instead of if-else chain
About to add extra debug passes, which will be more clear to use switch().
2017-01-12 12:45:37 +01:00
554024e08e Cycles: move hair particle settings to scene context
Since the beginning of times hair settings in cycles were global for
the whole scene but were located in the particle context. This causes
quite some trickery to get shots set up for the movies here in the
studio by forcing artists to create dummy particle system to change
settings of hair on the shot.

While ideally this settings should be properly become per-particle
system for the time being it will save sweat and blood to move the
settings to scene context.

Reviewers: brecht

Subscribers: jtheninja, eyecandy, venomgfx, Blendify

Differential Revision: https://developer.blender.org/D2287
2017-01-12 10:48:17 +01:00
67f68295be Cycles tests: Rework output messages
Made them closer to how GTest shows the output, so reading test logs
is easier now (at least feels more uniform).

Additionally now we know how much time tests are taking so can tweak
samples/resolution to reduce render time of slow tests.

It is now also possible to enable colored messages using magic
CYCLESTEST_COLOR environment variable. This makes it even easier to
visually grep failed/passed tests using `ctest -R cycles -V`.
2017-01-12 09:47:54 +01:00
65c8937f7e Add Add Modifiers tab to the NLA & VSE editors
This is a follow up to rBca935ab

Differential Revision: https://developer.blender.org/D2442
2017-01-12 01:03:23 -05:00
Julian Eisel
092cbcd1d2 Fix T50056: Dyntopo brush size shortcut broken using constant detail setting. 2017-01-11 23:16:02 +01:00
Julian Eisel
c4f60319d1 UI: Try limiting 'x' icon to search buttons
Reusing PROP_TEXTEDIT_UPDATE instead of adding a new property flag just for search strings. Currently it's only used for search strings anyway so seems fine for now.

Fixes T50336.
2017-01-11 22:15:50 +01:00
c910beaa21 Split interp_weights_face_v3 into specific functions for tris and quads
This splits `interp_weights_face_v3` into `interp_weights_tri_v3` and
`interp_weights_quad_v3`, in order to properly handle three sided polygons
without needing a useless extra index in your weight array. This also
improves clarity and consistency with other math_geom functions, thus
reducing potential future errors.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2461
2017-01-11 17:55:13 -02:00
0507b3e4c4 Viewport SSAO: Fix normals not normalized 2017-01-11 18:47:06 +01:00
394fa07d41 Cycles: Fix wrong motion blur when combining deformation motion blur with autosplit
The issue was that we used to compare number of vertices for mesh after the auto
smooth was applied (at the center of the shutter time) with number of vertices
prior to the auto smooth applied. This caused false-positive consideration of a
mesh as changing topology.

Now we do autosplit as early as possible and do it from blender side, so Cycles
does not need to re-implement splitting on it's side.
2017-01-11 16:32:57 +01:00
38b0141554 Cycles: Pass explicit subdivision type to object_to_mesh
This allows us to do some extra logic checks there based on particular
subdivision type.

Additionally avoids implicit cast of enum to bool.
2017-01-11 16:23:54 +01:00
2b66a17e50 Copy autosmooth mesh settings BKE_mesh_new_from_object
This way render engine can first apply all modifiers on the
new mesh and then optionally perform autosmooth face splitting
on it.
2017-01-11 16:04:39 +01:00
8576efc98a RNA: Expose autosmooth face splitting
This way render engine can request mesh to be auto-split and not
worry about implementing this functionality on it's own.

Please note that this split is to be performed prior to tessellation.
2017-01-11 15:59:32 +01:00
7bbb2292dc Cycles: Cleanup, whitespace around operator 2017-01-11 15:16:22 +01:00
e068d09a4b Cycles: Improve logging of cases when motion blur is disabled
Next logical step is to expose this somehow to the interface.
2017-01-11 14:34:56 +01:00
e041bf7579 Cleanup: Use more meaningful constants other than 0 2017-01-11 00:27:53 +01:00
1dbaf0dbcc Add mid_v3_v3_array function and remove redundant functions
Other than implementing a `mid_v3_v3_array` function, this removes
`cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and
`mid_v3_v3v3v3v3` respectively.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2459
2017-01-10 19:58:34 -02:00
da026249ab UI Layout: fix some cases mixing fixed and expandable sizes
When layout has only small buttons (buttons with icon and without label)
its size should be fixed. Code was modified to be able to add a new UI_ITEM_MIN
flag which indicates that the layout has only small fixed-width buttons.

Patch by @raa, with minor style edits by @mont29.

Reviewers: Severin, mont29

Reviewed By: mont29

Tags: #bf_blender, #user_interface

Differential Revision: https://developer.blender.org/D2423
2017-01-10 16:24:22 +01:00
d5cf90f59f Cleanup: Strict CLang warning in Smoke module 2017-01-09 13:12:43 +01:00
bb88c7af81 Cleanup: Indentation 2017-01-09 13:11:42 +01:00
1b75cd5aa8 Cleanup: Don't use C++ comments style in C code 2017-01-09 12:35:08 +01:00
378afc9830 Fix for T50373: lattices should not be able to get subsurf modifiers
Reviewers: mont29

Reviewed By: mont29

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2449
2017-01-09 12:24:34 +01:00
9c756162ae Fix T50385: Deadlock in BKE_libblock_remap_locked.
Am pretty sure node update should not touch to Main database like that,
but for now let's allow it, I guess the hack is needed for things like
Sverchok. ;)
2017-01-09 10:43:23 +01:00
e713009e9b Fix: Audio plays back incorrectly after rendering to a video file
D2365
2017-01-06 18:18:20 +01:00
62604c5c20 Make button span the full width of the properties editor 2017-01-05 15:41:14 -05:00
b2159b94bc Remove instances of old vector icons
I checked and this makes consistent with other area of blender.
See https://developer.blender.org/rBf86eccb1ca2388ae203df2a59285a2f2fb9b6aa8#131061
2017-01-04 23:24:43 -05:00
Julian Eisel
82b9e1e312 Show 'Manipulate Center Points' in weight paint mode
If the active object is in weight paint mode, but some armatures in pose mode, 'manipulate center points' still affects the transformation. See bd2034a749.

Also removed redundant check, we basically did the same check for paint modes twice.
2017-01-05 00:14:25 +01:00
b86042f21a Dynamic Paint: Fix random pixel flooding by absolute brush with spread.
If a very low wetness absolute alpha brush is used with spread and
drying effects enabled, some pixels will rapidly accumulate paint.
This happens because paint drying code applies a minimal wetness
threshold that causes the paint to instantly dry out.

Specifically, every frame the brush adds paint at the specified
absolute alpha and wetness set to the minimal threshold, spread
drops it below threshold, and finally drying moves all paint to
the dry layer. This drastically accelerates the rate of flow of
paint into the affected pixels.

Fortunately, the reason paint spread actually ends up decreasing
wetness turns out to be a simple floating point precision problem,
which can be easily fixed by restructuring the affected expression.
2017-01-04 19:44:29 +03:00
a9163f7d22 Fix (IRC reported) bad handling of Text data-block user count.
Reported on IRC by dfelinto, thanks.

Root of the issue was that opening a new text file would create
datablock with one user, when Text editor is actually a 'user one' user.

This was leaving Text datablocks in inconsitent user count, and
generating asserts in BKE_library area.

Also changed a weird piece of code related to that extra user thing in
main remapping func.
2017-01-04 14:07:38 +01:00
351a9d084f Fix T50369: Objects can't be deleted from scene when using "link group objects to scene"
Main issue here was that in old usercount system 'user_real' did simply
not allow that kind of thing to work. With new pait of 'USER_EXTRA'
tags, it becomes possible to handle the case correctly, by merely refining
checks about indirectly use objects whene removing them from a scene.

Incidently, found another related bug, 'link group objects to scene' was not
incrementing objects' usercount - bad, very very bad!
2017-01-04 10:28:59 +01:00
Dalai Felinto
c0c48cdacc Fix T50350: Quick Explode time frame problem
The settings.frame_start rna was clamping frame start to frame end when frame start was bigger than frame end.
The fix is simply to set frame end first
2017-01-04 10:13:28 +01:00
3a1b1100af Revert "Remove double menu entries"
This reverts commit e2d7efc950.
2017-01-03 10:34:05 -05:00
ff0221f5d8 Fix implicit size_t to int conversion.
Seems like it was erroring on some buildbots...
2017-01-03 15:30:59 +01:00
65582e75e3 Fix: NLA "Strip Time" setting cannot be edited
This is a hacky fix for a regression introduced sometime after 2.76.
The "Strip Time" setting on NLA Strips could not be edited without the
value immediately jumping back to the current FCurve value (or 0.0 if no
keyframes existed); even enabling autokey wouldn't let you key the property.

Until we have proper overrides (that only lose their values on frame change),
it's best that this setting is editable, even if it does mean it you have to
manually change the frame to see the updated values.
2017-01-03 11:42:50 +13:00
8f1f3a0d46 GPencil: Per-layer option to always show onion skinning
Sometimes it can be useful to be able to keep onion skins visible in the
OpenGL renders and/or when doing animation playback. In particular, there
are two use cases where this is quite useful:
 1) For creating a cheap motion-blur effect, especially when the before/after
    values are also animated.
 2) If you've animated a shot with onion skinning enabled, the poses may end
    up looking odd if the ghosts are not shown (as you may have been accounting
    for the ghosts when making the compositions).

This option can be found as the small "camera" toggle between the "Use Onion Skinning"
and "Use Custom Colors" options.
2017-01-02 23:32:13 +13:00
3c74071634 Fix: Passed wrong last argument to function 2017-01-02 23:32:13 +13:00
Dalai Felinto
070f22c440 Fix T49861: Interlace stereo is broken in 2.78
This is a regression introduced in rB5bd9e832

It looks more like a hack than a proper fix, but the shader logic
changed a lot for blender2.8, so I would rather do the elegant fix
there, while leaving master working.

If we ever do a 2.78b (or 2.79) this should get in.
2017-01-02 11:30:17 +01:00
13174df534 API: Fix rst syntax 2017-01-02 00:33:15 -05:00
42e4b0955c API: Fix redirect in bgl page 2017-01-02 00:24:40 -05:00
143d9373e4 API: Update to modern sphinx syntax 2017-01-01 23:54:55 -05:00
32c65faeb9 Cleanup: redundant assignment in rect resize 2017-01-02 13:56:19 +11:00
911544c70c API: Fix double slashes in URLs 2017-01-01 19:53:16 -05:00
7924c84c44 Fix T50305: When adding new ID with same name as existing, Blender could generate invalid utf-8 ID name.
`check_for_dupid()` would roughly truncate existing name, without doing any utf-8 validation.
2017-01-01 02:27:03 +01:00
adadfaad88 Fix (unreported) fully broken 'sanitize utf-8' helper.
That code was a joke, letting some invalid utf8 bytes pass, returning
wrong offset for some invalid sequences, not to mention length and
pointer easily going out of sync, NULL final byte being 'forgotten' by
memcpy, etc. etc.

The miracle here is that we could survive using this for so long!
Probably because we do not use utf-8 sanitizing enough in Blender,
actually... :/
2017-01-01 02:15:42 +01:00
acbb84b021 Add BLI_string_utf8 specific test.
This test should ensure we correctly detect all invalid utf-8 sequences in a given string.

DISCLAIMER:
Do not run this with current code - you'll either laugh or cry, nearly *all* checks fail!

Based on utf-8 decoder stress-test (https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)
by Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2015-08-28 - CC BY 4.0
2016-12-31 16:10:20 +01:00
bf7d7bc323 Add new operator, ED_OT_undo_redo, to allow py tools to trigger that action.
Patch D2430 by @raa, thanks.
2016-12-29 12:38:20 +01:00
934b3f3682 Fix T50334: Also select indirectly imported objects when linking/appending.
Since we create a base and instantiate them, they become directly
linked, so makes sense to also select them if requested.
2016-12-29 12:17:23 +01:00
7ba2356a53 Freestyle: fix typo in console message.
Patch D2270 by Anthony Edlin (@krash), thanks.
2016-12-29 10:34:59 +01:00
6bd245bb53 Edits to user prefs NDOF UI
Small changes:

- Remove "NDOF" from each setting
- Change tooltip for deadzone
- Unrelated typo in cmake comment

Reviewers: merwin, Severin

Reviewed By: merwin, Severin

Tags: #bf_blender, #user_interface

Differential Revision: https://developer.blender.org/D2319
2016-12-29 01:09:11 -05:00
3d243eb710 Fix T49848: bevel of spiral gets bigger and bigger widths.
This is the same issue as was fixed with T39486: the adjustment pass
that tries to equalize different widths at either end of an edge
sometimes causes the widths to get bigger and bigger.
The previous fix was to let "clamp_overlap" do double duty as a way
to limit this behavior. But clearly this is undiscoverable, as the
current bug report shows.  So I put in an "auto-limiting" mode that
detects when adjustments are going crazy and then acts as if
clamp_overlap were set.
The reason we can't always act as if clamp_overlap is set is that
certain models (e.g., Bent_test in regression tests) look bad if
that is enabled.
2016-12-28 13:55:19 -05:00
2412e67ef8 UI: Make icon-only buttons for enum items with empty label.
Patch D2420 by @raa, thanks.
2016-12-28 15:07:18 +01:00
a522469940 Various UI message and API doc tweaks and fixes.
Mostly from patch D2256 by Aaron Carlisle (@Blendify), thanks!
2016-12-28 14:37:08 +01:00
11ae06b0b7 Update manual links in 'add object' py template.
Patch D2328 by @blendify, thanks.
2016-12-28 14:25:31 +01:00
45d0231a24 Minor UI message fix.
Based on D2436 by @blendify, thanks.
2016-12-28 14:17:15 +01:00
cabd2dceca Tweak error message when external image editor launching fails.
Include idea that Blender may fail to launch it even if path is correct,
in some cases (dear Windows...).

Based on idea from @lijenstina and @blendify (D2349), thanks.
2016-12-28 14:11:47 +01:00
b1c6ddb107 Also apply similar fixes to .keyframe_delete()
- T49816
2016-12-29 01:12:25 +13:00
3cbe95f683 Fix T49816: Keyframing NLA Strip influence from Python set keyframes in the wrong place 2016-12-29 01:12:24 +13:00
c5338fd162 Fix T50184: Grease Pencil Layer synchronization between Dope Sheet and Properties panel 2016-12-29 01:12:23 +13:00
7f262acb92 Fix T49479: Freestyle inconsistent line drawing with large geometry dimension.
Ray-plane intersection routine GeomUtils::intersectRayPlane() was used with an
unnormalized direction vector as input.
2016-12-28 18:09:35 +09:00
6559ab2d51 3D View roll & orbit were scaling view-quat length
Over time roll and orbit would scale the quaternion
which is documented as unit length.

In practice any errors would be subtle,
but better normalize as other operators do.
2016-12-28 18:10:34 +11:00
d5edaac42d Comments: mul_project_m4_v3_zfac 2016-12-28 15:49:39 +11:00
d874b40a55 Fix T50240: Rendering crashes when synced to JACK Transport
Disabling synchronization while rendering.
Using G.is_rendering as suggested by bastien. ;-)
2016-12-27 20:47:01 +01:00
752a783fa4 Fix T50305: Blender truncates a long multibyte character object's name to an invalid utf-8 string.
Add logic in RNA to ensure we pass valid utf8 string to BKE ID new functions...
2016-12-27 16:39:19 +01:00
c1e3041051 Comments: hints for perspective functions
Note which GL functions these are equivalent to.
2016-12-27 15:30:11 +11:00
41ec1adb03 Correct bad cast, unused var warning 2016-12-27 15:29:55 +11:00
3a9c490531 [MSVC] Fix test for C++11 support for vc2015/2017 based on D2432 by Ulysse Martin (youle) 2016-12-24 10:37:10 -07:00
b47c912f4b Fix (unreported) crash in 'Match movie length operator' in case of lost video texture file 2016-12-23 16:51:26 +03:00
d0335796a8 Readfile: Resurrect do_versions_after_liblink.
Basic idea is to store fileversion in Library datablock, and split again
Main by libraries after lib linking, do_versions_after_liblink on
those separated Mains, and merge again.

This allows to still have correct versions for each data-block in that
second do_versions step.

Note that this is not used currently in master (might be soon, though),
but is needed for 2.8 work.
2016-12-23 12:54:51 +01:00
8db2f72997 Fix (unreported) --threads option no more respected by main task scheduler.
Main scheduler would be created way before `-t` argument would be
parsed, since it was on forth pass! Moved it to first pass of argparse,
that kind of stuff should be initialized asap on startup.
2016-12-22 22:00:48 +01:00
Julian Eisel
5e31e07230 Fix wrong return type in blenderplayer stubs 2016-12-22 02:35:34 +01:00
5fb85ef2c2 Fix strict compiler warning in generated C++ RNA 2016-12-20 12:29:41 +01:00
544f6113f8 OpensSubdiv: Cleanup, unused argument 2016-12-20 12:29:41 +01:00
1c34a7f4eb Libmv: Fix missing virtual destructor in frame access sub-class
This is undefined behavior in C++ and Clang was complaining a lot
about this.
2016-12-20 12:29:41 +01:00
4d5cd638ff String drawing function for the "simdebug" utilities.
Simple string drawing API for debug drawing, in addition to basic primitives.
2016-12-20 11:02:40 +01:00
bd42987399 Fix (unreported) linked datablocks going through do_versions several times.
When linking data-blocks from same library in several steps, the already
linked data-blocks of same lib would go again through versionning code...

Note: only fixed for libraries, I can't imagine how this could happen
with local data...
2016-12-19 16:31:06 +01:00
e30d94bb3b Cleanup: rename paramenter to right name 2016-12-19 12:28:51 +01:00
6c3d8fbeb3 Cleanup: trackball logic
Used SQRT2 and SQRT1_2 to calculate the same value,
harmless but a little confusing, set once and check instead.
2016-12-17 19:14:02 +11:00
2e15618f49 Fix T50216: Missing checks caused data transfer segfault
Data transfer was not checking if the required geometry existed, thus
causing a segfault when it didn't. This adds the required checks, and
reports errors if geometry is missing.

This also replaces instances of the words "polygon" and "loop" in error
messages with "face" and "corner" respectively, to be consistent with
the rest of the existing UI.

Reviewed By: mont29

Differential Revision: http://developer.blender.org/D2410
2016-12-16 23:53:08 -02:00
535298eea5 Fix T50264: Stroke is not painted when append Grease Pencil block
When append a datablock the default brushes were not created and only
were created when draw new strokes. Now the default brushes are created
when draw strokes if necessary.
2016-12-16 22:56:43 +01:00
Julian Eisel
4df75e536a Make Shift+LMB on transform manipulator configurable
It's now possible to change the shortcut that enables planar transformation with the transform manipulators (shift+LMB on axis).

This actually fixes the workaround added in rB20681f49801fd. Thing is that we needed to allow using the manipulators, even if a modifier key is held so things like snapping work right away. That's why normal LMB behavior uses KM_ANY. However, event handling would always execute the KM_ANY keymap handler because it's iterated over first. Simply solved this by registering the KM_SHIFT keymap item first, so it has priority over the KM_ANY one.
2016-12-16 02:49:53 +01:00
Julian Eisel
524ab96245 Fix drawing enum property with icon only flag
Enum properties with icon only flag should use minimum/fixed width in expanded layouts (alignment=UI_LAYOUT_ALIGN_EXPAND).

Differential Revision: https://developer.blender.org/D2415 by @raa (only made some really minor corrections)
2016-12-15 23:43:17 +01:00
e2d7efc950 Remove double menu entries
These were already present in the "Select" menu.
2016-12-15 22:12:29 +01:00
bd3de93557 Gtest: Fix/workaround MSVC complains about use of struct with alignment 2016-12-15 17:53:57 +01:00
26bb0ee464 Fix Playerstubs tm 2016-12-15 15:47:00 +01:00
12e1732f72 Layer Weight node support for Blender Internal Render 2016-12-15 15:03:28 +03:00
665110a414 Proper fix for strict compiler warning 2016-12-15 11:51:53 +01:00
14d17cd27a Revert "Cleanup: Remove unused variable"
This reverts commit 743165eb48.

Didn't see it is used in debug mode, sorry
2016-12-15 11:50:25 +01:00
743165eb48 Cleanup: Remove unused variable 2016-12-15 11:49:44 +01:00
Karsten Weiss
820709c14d Fix STR_String Capitalize on non Win32
Harmless since its not used, but good to fix.
2016-12-15 12:58:19 +11:00
741c4082d8 BGE: Fix T50098: Crash when useding ImageMirror
The crash was caused by a missing m_sync initialisation in the second
ImageRender constructor.
2016-12-14 20:07:51 +01:00
84a283d18c Fix World Space Shading option influence on Fresnel node for BI + cleanup 2016-12-14 19:48:01 +03:00
525673b37b Cycles: Fix uninitialized variable issue after recent changes 2016-12-14 17:31:11 +01:00
4f03d3290c Fresnel node support for Blender Internal Render 2016-12-14 18:02:38 +03:00
91bbffd379 Cycles: Move object culling helper to own files
This is a stand-alone logic, which becomes quite comprehensive now.
2016-12-14 13:01:33 +01:00
6967216485 Cycles: Fix indendation 2016-12-14 12:47:28 +01:00
c4d6fd3ec0 Cycles: Consider GGX/Beckmann/Ashikhmin of 0 roughness a singular ray
This matches behavior of Multiscatter GGX and could become handy later on
when/if we decide it would be beneficial to replace on closure with another.

Reviewers: lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2413
2016-12-14 11:04:02 +01:00
72d18c195e Cycles: Tweak curve segment (un)pack to handle more curve segments
There was 16 bits reserved for primitive type, while we only need 4.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2401
2016-12-14 10:59:45 +01:00
d210755f85 Usual UI messages/i18n fixes/tweaks. 2016-12-14 10:56:21 +01:00
fbcd51aef8 Fix T50243: libmv_panography_test is broken
There was fully wrong logic in comparison: was actually accessing memory
past the array boundary. Run test manually and the figure seems correct
to me now.

Spotted by @LazyDodo, thanks!
2016-12-14 10:46:20 +01:00
c21a5139e1 Small cleanup: Remove unused code
This code has not been used for a long time if not ever.
Most of the code was removed in rB1d3609262704f88c9e30b2cebdb236110b25cdc9
however, this was forgoten.
2016-12-13 20:15:53 +01:00
Julian Eisel
c1267bb800 UI: Externally open file and path from context menu
Adds two buttons to context (RMB) menu of path buttons:
* "Open File Externally" to open a file in an external app (only visible if path contains a filename)
* "Open Location Externally" to open a path in an external file browser

The functionallity for this was already there, just hidden behind Shift/Alt click of file_browse button (folder icon next to path button).
2016-12-13 17:01:59 +01:00
ec2fd74f47 Fix strict warnings on Windows 2016-12-13 16:46:04 +01:00
8bae72d04a Fix strict compiler error when building without bullet 2016-12-13 10:18:02 +01:00
Karsten Weiss
9446b6809a Libmv: Fix typo in assert message 2016-12-13 10:16:20 +01:00
Karsten Weiss
356dacea90 Libmv: Fix copy-paste mistake in camera intrinsic parameters 2016-12-13 10:15:40 +01:00
5f852a4324 Cleanup: bad (harmless) usage of PARM_PYFUNC_OPTIONAL in new ID.make_local RNA definition.
PARM_PYFUNC_OPTIONAL is only useful in definition of callbacks for
registrable types...
2016-12-12 15:56:00 +01:00
7415b9ffa3 Fix (unreported) some RNA func definitions setting flags of other func parameters!
Both found cases where luckily harmless, though...
2016-12-12 15:54:16 +01:00
440d104279 Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.

To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.

This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).

And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).

Reviewers: sergey, Severin

Subscribers: dfelinto, brecht

Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:46:06 +01:00
62703850ad Cleanup: Get rid of unused BKE_rigidbody_relink_constraint().
Also use proper ID_NEW_REMAP macro in BKE_rigidbody_world_groups_relink()!
2016-12-12 15:05:19 +01:00
b708dce34f Cleanup: Rename BKE_libblock_relink, and move it to BKE_library_remap.h
Was a waaaaayyyyy to much generic name for such a specific func, renamed
to much more descriptive BKE_libblock_relink_to_newid().

In near future (few weeks, to limit as much as possible silent mismatch
in branches), will rename BKE_libblock_relink_ex to BKE_libblock_relink,
this is the real generic data-block relinking func!
2016-12-12 14:58:10 +01:00
efadc8051e Cleanup: Get rid of ntreeSwitchID(_ex) functions, use generic BKE_libblock_relink_ex instead. 2016-12-12 14:31:50 +01:00
968e01d407 Cycles: Cleanup, variable names
Use underscore again and also solve confusing part then in BVH smae
thing is called prim_addr but in intersection funcitons it was called
triAddr.
2016-12-12 12:10:37 +01:00
b21938f3d4 Cycles: Cleanup, variables names
Use underscore instead of camel case.
2016-12-12 10:19:49 +01:00
2bb7a135ae Added --debug-io flag to command line 2016-12-09 17:21:11 +01:00
5a8b5a0377 Land D2339 by bliblu bli 2016-12-09 08:28:04 -07:00
1846a78849 Depsgraph: Add missing relation for cast modifier
When control object is used we need to known our own transformation as well.
2016-12-09 13:40:12 +01:00
3bd94b9f45 Depsgraph: Bone parent should also include armature transform relation
It is required to have world-space bone position, which consists of armature
object transform and local bone transform.
2016-12-09 13:05:39 +01:00
dd58390d71 Fix emissive volumes generates unexpected fireflies around intersections
Discard the whole volume stack on the last bounce (but keep
world volume if present).

Volumes are expected to be closed manifol meshes, meaning if
ray entered the volume there should be an intersection event
of ray exisintg the volume. Case when ray hit nothing and
there are still non-world volumes in the stack can happen in
either of cases.

1. Mesh is not closed manifold.

Such configurations are not really supported anyway and should
not be used.

Previous code would have consider the infinite length of the
ray to sample across, so render result wasn't really correct
anyway.

2. Exit intersection is more far away than the camera far
   clip distance.

This case also will behave differently now, but previously it
wasn't really correct either, so it's not like we're breaking
something which was working as expected.

3. We missed exit event due to intersection precision issues.

This is exact the case which this patch fixes and avoid
fireflies.

4. Volume has Camera only visibility (all the rest visibility
is set to off)

This is what could be considered a regression but could be
solved quite easily by checking volume stack's objects flags
and keep entries which doesn't have Volume Scatter visibility
(or even better: ensure Volume Scatter visibility for objects
with volume closure),

Fixes T46108: Cycles - Overlapping emissive volumes generates unexpected bright hotspots around the intersection
Also fixes fireflies appearing on the edges of cube with
emissive volue.

Reviewers: juicyfruit, brecht

Reviewed By: brecht

Maniphest Tasks: T46108

Differential Revision: https://developer.blender.org/D2212
2016-12-08 17:35:43 +01:00
Julian Eisel
0a26904a75 Fix T49872: 3D cursor places with camera shift in ortographic mode 2016-12-08 12:41:27 +01:00
Julian Eisel
d5708fdad6 Fix expanding enum property in sub-layout of pie menus
//ui_item_enum_expand// function replaces all pie menu's sub-layouts with radial layout. It should replace only root layout.

To reproduce the issue paste the code in Blender's text editor and press Run Script button.
```
import bpy

class VIEW3D_PIE_template(bpy.types.Menu):
    bl_label = "Select Mode"

    def draw(self, context):
        layout = self.layout.menu_pie()
        layout.column().prop(
            context.scene.render.image_settings, "color_mode", expand=True)

def register():
    bpy.utils.register_class(VIEW3D_PIE_template)

def unregister():
    bpy.utils.unregister_class(VIEW3D_PIE_template)

if __name__ == "__main__":
    register()
    bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template")
```

Differential Revision: https://developer.blender.org/D2394 by @raa
2016-12-08 12:21:57 +01:00
62a2ed97ba Fix crash when opening a Blender file containing Alembic data.
Was also affecting object linking.
2016-12-07 23:04:27 +01:00
a63108efb1 Fix install_deps.sh failing to build ffmpeg 3.
--disable-libfaac is no more ffmpeg build option.
2016-12-07 17:17:31 +01:00
fc4a51e3fa Fix (unreported) Sequencer Drop effect: wrong initial offset in second input buffer.
Reading rest of the code, it's obvious we want to start à YOFF lines
from start of rect2i, so we have to also multiply by number of
components.

Also did some minor cleanup.
2016-12-07 14:53:57 +01:00
8f29503b52 Fix T49893: Crash in Video Sequence Editor with 'drop' effect.
Code was not accounting for possibilities that width or height of given
buffers may be smaller than XOFF/YOFF...

Note that I seriously doubt that drop code actually works (as in, gives
expected results) when applied to tiles like it seems to be done
currently, but this is much more complex (and involved) topic.
2016-12-07 14:23:46 +01:00
2002167a96 Remove unused include statement 2016-12-07 11:39:12 +01:00
bfe34789d1 Use proper defaults for Hue/Saturation node 2016-12-07 11:27:27 +01:00
4b69b6d316 Cycles :Cleanup, indentation 2016-12-06 15:37:29 +01:00
0371ef16ee Depsgraph: Only re-schedule objects which are on visible layers
Otherwise it's possible to cause infinite update loop in Cycles viewport.

Gets a bit messy logic, need to revisit this..
2016-12-06 14:48:48 +01:00
1b9cae9d04 Fix T50122: SEGFAULT: OCIO configuration typo leads to segfault 2016-12-06 14:19:17 +01:00
1de79c8960 Fix T50003, Bevel makes non-manifold mesh.
Problem was setting prev/next faces for edges around
a vertex on valence-2 vertices.
2016-12-06 07:43:47 -05:00
8ce6de3bdd Fix T50020: adding a background image does not set image user data. 2016-12-06 00:04:15 +01:00
fe0520e2c8 UI: add a message to indicate when using a modifier that wasn't
compiled.

This adds a short message to the smoke, remesh and boolean modifiers' UI
when trying to use them when their compilation was turned off. This was
already implemented for the fluid and ocean simulation modifiers.

This also makes the 'quick fluid' and 'quick smoke' operator abort and
report when trying to use them when unavailable.
2016-12-05 23:33:21 +01:00
7471f09f2b Depsgraph: Use HIGH priority for scheduled tasks
This kind of keeps threads "warmer" and should in theory give better
cache coherency bringing some %% of speedup. It was already tested
few months ago and it gave few % speedup in barber shop, but was
reverted due to some bone popping. The popping is now fixed so it
should be fine to use new scheduling policy.
2016-12-05 16:31:34 +01:00
69e8e34d96 Depsgraph: avoid more transitive relations for rigid body simulation 2016-12-05 16:30:30 +01:00
d1d7217692 Depsgraph: Rigid body simulation doesn't need explicit time relation
It'll be dependent on time via Time Source -> Rebuild RB World chain.
2016-12-05 16:03:10 +01:00
2cb5dffc8d Depsgraph: Avoid transitive relation from local transform to final
There is always an uber eval node on the way. so we can avoid creating
some relations here in order to speed up both construction time and
evaluation.
2016-12-05 15:59:31 +01:00
60dae91db8 Fix depsgraph: hair collision is actually enabled, so add the relations. 2016-12-05 13:36:30 +03:00
95b224dab2 Fix compilation error on recent Debian desktop
Something funny happened here, there were missing symbols from png
library to math functions.
2016-12-05 11:35:26 +01:00
b18f83bcf4 Fix T50141: Nabla zero division on texture force field
This sets forces to zero, when Nabla is zero and a grayscale texture is
used or texture mode is Gradient or Curl.

Nabla equal to zero was causing a zero division, and forces ended up
being set to `nan`.

Reviewed By: mont29

Differential Revision: http://developer.blender.org/D2393
2016-12-04 18:01:46 -02:00
dfca1e1460 CMake: disable QuickTime with macOS SDK 10.12+, no longer supported by Apple. 2016-12-04 20:26:37 +01:00
1791697d43 Fix macOS 10.9 build when using OIIO without FFmpeg. 2016-12-04 20:26:37 +01:00
7d443ed86d Docs: Show 'Other Options' last in --help
Own error when changing order,
moving experimental features last made some sense,
but causes them to be listed twice.

Reorder and comment to avoid it happening again.
2016-12-04 21:55:17 +11:00
d9d7b5b4d0 Cleanup: simplify bitmap line drawing
- Expand overly dense & confusing delta assignments.
- Replace bit shift with multiply.

Also link to 'clipped' version of this function
which may be useful to add later.
2016-12-04 15:15:25 +11:00
923eae25d1 [msvc] Changes for new oiio/ffmpeg versions. 2016-12-03 17:38:20 -07:00
ae04d0fcb6 CMake: update for macOS 10.9 libs with ffmpeg 3.2.1 and webp support. 2016-12-03 15:30:47 +01:00
1a01ef4ae9 Fix macOS build with openimageio 1.7.8 and openexr.
These macros conflict and are no longer needed with C99 or C++ anyway.
2016-12-03 15:19:49 +01:00
a2ebc5268f Cycles: Refactor Progress system to provide better estimates
The Progress system in Cycles had two limitations so far:
 - It just counted tiles, but ignored their size. For example, when rendering a 600x500 image with 512x512 tiles, the right 88x500 tile would count for 50% of the progress, although it only covers 15% of the image.
 - Scene update time was incorrectly counted as rendering time - therefore, the remaining time started very long and gradually decreased.

This patch fixes both problems:
First of all, the Progress now has a function to ignore time spans, and that is used to ignore scene update time.
The larger change is the tile size: Instead of counting samples per tile, so that the final value is num_samples*num_tiles, the code now counts every sample for every pixel, so that the final value is num_samples*num_pixels.

Along with that, some unused variables were removed from the Progress and Session classes.

Reviewers: brecht, sergey, #cycles

Subscribers: brecht, candreacchio, sergey

Differential Revision: https://developer.blender.org/D2214
2016-12-03 05:02:21 +01:00
35d490b3f1 OCIO: Implement exposure/gamma for fallback implementation
Quite handy for debugging.

Unfortunately, this doesn't support viewport tweaks yet since those
require GLSL for colorspace conversion. Maybe this will be implemented
as well one day in the future..
2016-12-02 16:57:00 +01:00
31fbf2b74a Cycles: Implement AVX2 path for curve intersection functions
Gives little performance improvement on Linux and gives up to 2%
speedup on koro.blend on Windows.

Inspired by Maxym Dmytrychenko, thanks!
2016-12-02 12:23:38 +01:00
acc1f8fbed Cycles: Add AVX intrinsics helpers
They are defined for MSVC but seems to be missing in GCC and CLang-3.8.

Maybe some further tweaks to policy when to define those functions is
needed, but should be fine for now.
2016-12-02 12:23:38 +01:00
0c958b9f8e Fix T50062: Mask - Clicking in ActivePoint Parent makes Blender crash.
Mask primitive adding code was not initializing correctly id_type of
points' parents.
2016-12-02 10:47:18 +01:00
0ac2be7030 Cycles: Disable AVX2 crash workarounds
I can no longer reproduce crash with neither of the files where
the crash was originally visible. This is something where other
changes (light threshold, sampling) had an effect and made code
to work as it is supposed to. Could have been optimizator issue
or something like that.

Let's see if we hit same issue again.
2016-12-02 10:17:05 +01:00
a4c6558481 Fix (unreported) memleak in ImBuf mipmap code in some cases.
`IMB_remakemipmap` may 'shrink' the mipmap list without actually freeing
anything, so we need to check all possible levels in `imb_freemipmapImBuf`
to avoid memory leaks, not only those currently used.
2016-12-02 09:44:41 +01:00
0e1cf858a0 install_deps.sh: Update official (default) lib versions of py/oiio/osl/osd/ffmpeg. 2016-12-01 16:31:34 +01:00
7fe7835d13 Fix (unreported) looptri array not being recalculated in ccgDM and emDM
In ccgDM and emDM, looptri array recalculation was being handled
directly by `*DM_getLoopTriArray` (`getLoopTriArray` callback), while
`*DM_recalcLoopTri` (`recalcLoopTri` callback) was doing nothing.

This results in the array not being recalculated when other functions
that depend on the array data called the recalc function.

This moves all the recalculation code to `*DM_recalcLoopTri` and makes
`*DM_getLoopTriArray` call that.

This commit also makes a minor change to the `getNumLoopTri` function,
so that it returns the correct number without having to recalculate the
looptri array.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2375
2016-12-01 12:41:56 -02:00
69a75b0169 GPencil: Include various new operators into the 3D View menus too
Quite a few of the operators added for 2.78 were not included in the menus
2016-12-02 03:13:47 +13:00
bdceea9475 GPencil Sculpt: Numpad keys now work when doing sculpt sessions (i.e. when the operator is run using wait_for_input=True)
This just brings it in line with the drawing operator
2016-12-02 03:13:47 +13:00
d258865995 Compiler warning fix 2016-12-02 03:13:46 +13:00
87cacd3893 Buildbot: Disable glibc211 slaves 2016-12-01 15:05:53 +01:00
f812b05922 Fix T50116: Light threshold broke branched path tracer
In fact, the issue was caused by light threshold being too high for
certain scenes. Lowered it down to 0.01.
2016-12-01 14:27:10 +01:00
9d50175b6c Cycles: Fix correlation issues in certain cases
There were two cases where correlation issues were obvious:

- File from T38710 was giving issues in 2.78a again
- File from T50116 was having totally different shadow between
  sample 1 and sample 32.

Use some more simplified version of CMJ hash which seems to give
nice randomized value which solves the correlation.

This commit will break all unit test files, but it's a bug fix
so perhaps OK to commit this.

This also fixes T41143: Sobol gives nonuniform noise

Proper science paper about hash function is coming.

Reviewers: brecht

Reviewed By: brecht

Subscribers: lukasstockner97

Differential Revision: https://developer.blender.org/D2385
2016-12-01 14:19:15 +01:00
87cd56b012 Fix T50075: Assert during debug render of hair_geom_transmission.blend 2016-12-01 12:11:11 +01:00
58877d6d08 Alembic: quiet compilation warnings on Windows.
Most of them are harmless implicit conversions (e.g. Alembic deals with
doubles for storing time information when Blender uses both ints and
floats/doubles) or class/struct mismatch on forward declarations.
2016-12-01 08:32:15 +01:00
05b181fbc5 Fix T46795 : Reset GWLP_USERDATA to NULL at window destruction so any future events will not try to reference this deleted class. 2016-11-30 18:26:25 -07:00
df63195d2a Cleanup id->newid usage, initial work.
This aims at always ensuring that ID.newid (and relevant LIB_TAG_NEW)
stay in clean (i.e. cleared) state by default.

To achieve this, instead of clearing after all id copy call (would be
horribly noisy, and bad for performances), we try to completely remove
the setting of id->newid by default when copying a new ID.

This implies that areas actually needing that info (mainly, object editing
area (make single user...) and make local area) have to ensure they set
it themselves as needed.

This is far from simple change, many complex code paths to consider, so
will need some serious testing. :/
2016-11-30 15:27:59 +01:00
2f6f75613f OCIO: Cleanup style
Was a ground work for some more improvements here, but got dragged
to some other studio maintenance job here.

The plan would be to enable exposure/gamma control for fallback mode
which will definitely be really handy for development and might be
handy for cases when OCIO config can not be read.
2016-11-30 12:54:14 +01:00
2ac8c9b42e Alembic: slight cleanup, reorder mesh code a bit. 2016-11-30 09:35:53 +01:00
66a3671904 Fix T49813: crash after changing Alembic cache topology.
Crash is due by mismatching loops and faces counts between the Alembic
data and the Blender derivedmesh which does not appear so
straightforward to fix (the crash happens deep in the derivedmesh code).

So for now, try to detect if the topology has changed and if so, both
only read vertices (vertex colors and UVs won't be read, as tied to face
loops) and add a warning message in the modifier's UI to let the user
know.
2016-11-30 09:20:45 +01:00
Julian Eisel
514db9f014 UI: Remove 'x' icon from paths and lists 2016-11-29 23:41:20 +01:00
bd5ae46c19 Fix compilation error with latest OIIO 1.7.8
There are some changes in OIIO includes so now need to do some
things differently.
2016-11-29 12:40:38 +01:00
1ec5edcc96 Fix T50094: Crash when viewport rendering point density texture
The idea is simple: cache PD resolution from cache_point_density() RNA
function because that one is supposed to be called while database is
locked for original synchronization.

Ideally we would also pass array size to the sampling function, but
it turned out to be quite problematic because API only accepts int type
and passing size_t might cause some weird behavior.
2016-11-29 11:39:14 +01:00
7ea2dedd59 Cycles: Pass extra array size argument to builtin image pixels functions
This is a way to avoid possible memory corruption when render threads works
in parallel with UI thread.

Not guarantees complete safe, but makes things easier to check anyway.
2016-11-29 11:03:11 +01:00
cc1a64be36 Math lib: Fix use function of wrong dimension
Seems to be a typo in recent commit e1e49fd.
2016-11-29 10:31:54 +01:00
3b467b35a8 Fix T50029: BVHTree.FromPolygons memory leak 2016-11-29 19:32:41 +11:00
9bea39c474 [msvc] remove /opt all together and revert to the default behavior /opt:ref for release builds, /opt:noref for debug builds. 2016-11-28 19:55:07 -07:00
dd34b7a71c Comment: explain viewport & render pixel-size
It wasn't all that clear why both pixel-sizes are needed.
2016-11-29 13:18:04 +11:00
6278adc3ca [msvc] change linker options from /opt:noref to /opt:ref, saves about 20% off the executable size
Nobody appears to know why this option was on (and just on for just x64 at that)
2016-11-28 13:22:36 -07:00
Julian Eisel
e0307113a5 UI: Add 'x' icon to text buttons to clear content
This is useful e.g. for search buttons to quickly clear the filter string. We might want to make this optional for python scripts.
2016-11-28 19:03:31 +01:00
df687837f8 [msvc2017] remove eigen vector workaround for msvc2017. 2016-11-28 10:12:21 -07:00
3340acd46b Fix T50065: Audaspace: some values of the lower limit of Factory.limit causes the factory not to play
Backport of upstream audaspace bugfix (ddd9a4d).
2016-11-28 17:23:44 +01:00
96ed2b0ce0 Remove sensor-size to int conversion
Currently harmless since the value is always set at its default (32).
Even so, it's confusing since its used with floats after.
2016-11-28 17:36:37 +11:00
841f3e4972 A number of other minor RNA fixes and precautionary safeguards against further crashes here 2016-11-28 02:33:49 +13:00
452028c77c GPencil RNA API: "set_active" option for layer.new() and palette.new() is now true/enabled by default
To bring the API more into line with the UI (and the general expected behaviour of
Blender when it comes to adding stuff), newly created layers and palettes will be
made the active ones by default. It's possible to override this behaviour still
(e.g. in cases where you're auto-generating a large number of them), but otherwise,
this change will help prevent errors like T50123.
2016-11-28 02:33:48 +13:00
e2d223461e Fix T50123 - GreasePencil: Modifying name of new color in new palette via bpy segfaults
When there were no prior palettes, creating a new one didn't automatically make it active.
This caused problems when trying to rename the color, as the RNA code assumed that if there's
a color, it must come from the active palette.

This commit partially fixes the problem by ensuring that if there are no palettes, the first
one will always be made active.
2016-11-28 02:33:48 +13:00
d20f5b7de0 Typo fix 2016-11-28 02:33:47 +13:00
ce3cae81f6 [msvc2015] Fix cmake warnings regarding backslashes in path of the run-time libraries 2016-11-26 17:00:25 -07:00
d464a7c441 fix T50118: Added missing assignment of Bone Roll 2016-11-26 18:48:50 +01:00
265e5def76 Fix T50104, Race condition in SVMShaderManager::device_update_shader 2016-11-25 12:03:04 -07:00
bcd0d8584f Math Lib: avoid temp array for rotate_m4
No need to have temp array storage, avoid 2x loops.
2016-11-25 21:00:32 +11:00
e1e49fd1a8 Math Lib: rotate matrix cleanup
- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix
  duplicating 'angle_to_mat2' - now used instead.
  (better avoid matching functions having different behavior).

- Add 'axis_angle_to_mat4_single',
  convenience wrapper for 'axis_angle_to_mat3_single'.

- Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.
2016-11-25 16:39:34 +11:00
d30a0239a2 Fix Torus default UV's offset outside 0-1 bounds
When major/minor segments didn't fit evenly into 4,
the UV's would move outside the UV bounds.
2016-11-25 14:29:34 +11:00
4f4e0ecdcf Remove eekadoodle workaround for add torus
This is no longer needed since moving to MPoly/MLoop data structure.

Also use 3x3 matrix for transforming instead of quaternion
(slightly better performance).
2016-11-25 14:26:25 +11:00
729affe7c9 Cycles: Avoid divisions by zero in volume sampling code
Was giving huge artifacts in the barber shop file here in the studio,

Maybe not fully optimal solution, but committing it for now to have
closer look later.
2016-11-24 16:39:02 +01:00
Martijn Berger
4d3d2d0299 Remove unused vector icons from RNA 2016-11-24 13:43:29 +01:00
403f00e558 Fix prefs UI when built w/o Cycles 2016-11-24 11:14:45 +11:00
4842cc017c Removed the deprecated OpenVDB shader node for direct loading of .vdb files.
This node was already disabled. All vdb data should eventually be loaded
through the Cycles sync procedure as object data.

Specialized nodes for accessing voxel data may eventually be added again
for convenience, but these would just be advanced attribute nodes.
2016-11-23 16:50:49 +01:00
def365e252 Fix T50100: Cycles SeparateRGBNode Red socket defined wrong
Spotted by David (bocs), thanks!
2016-11-23 11:33:09 +01:00
f2b57c3532 Depsgraph: Fix matrix_world driver source
Reported by Dalai in IRC, thanks!
2016-11-23 11:09:05 +01:00
a537e7b426 Cycles: Fix strict compilation warnings 2016-11-23 10:59:54 +01:00
faf74d1d2d Merge branch 'master' into openvdb 2016-11-23 09:52:33 +01:00
411836d97c Fix Cycles device backwards compatibility error if device type is unavailable. 2016-11-23 00:04:06 +01:00
57141ea30e Fix spelling in Cycles distance culling description. 2016-11-23 00:04:06 +01:00
99c5c8befc Fix T49718: Wrong "Make Duplicates Real" behavior with "Keep Hierarchy"
All objects were being parented to a single instance of each parent
object, instead of their respective instances, when using dupliverts or
dupligroups.

Behavior was caused by the `persistent_id[0]` (vertex/face id) being
ignored when computing `parent_gh` hash, which caused all instances to
have the same hash, and thus only the first one was included.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2370
2016-11-22 14:59:59 -02:00
9aa8d1bc45 Cycles: Fix strict compilation warnings
Should be no functional changes.
2016-11-22 16:39:03 +01:00
67b1979c91 Install_deps: fix warning message not showing up in case build fails.
Kinda stupid, but big nice warning about need to try clean build if
something fails was only showing in case install_deps completed
successfully... :P
2016-11-22 16:06:05 +01:00
751573ce6f Fix T50034: Blender changes processor affinity unauthorized 2016-11-22 16:03:16 +01:00
cb694d6595 GLog: Workaround compilation error on Hurd
There is syscall headers but no SYS_Write syscall.
2016-11-22 12:43:59 +01:00
4818b3c97e Cycles: Fix re-definition of some functions on x32 arch 2016-11-22 12:34:45 +01:00
1be717d007 Fix (unreported) crash when drawing armatures' poses in some cases.
Was affecting armatures' pose drawing code, could try to draw with
non-updated pose, which may contain NULL bone pointers (e.g. after some
data-block management tool execution, like make local, remapping, etc.).
2016-11-22 12:24:03 +01:00
edc10f5529 Cycles: Another attempt to fix compilation on 32bit Linux 2016-11-22 12:11:08 +01:00
af444e913f Cycles: Attempt to fix 32bit buildbot builds after recent commit 2016-11-22 12:06:16 +01:00
272412f9c0 Cycles: Implement texture size limit simplify option
Main intention is to give some quick way to control scene's memory
usage by clamping textures which are too big. This is really handy
on the early production stages when you first create really nice
looking hi-res textures and only when it all works and approved
start investing time on optimizing your scene.

This is a new option in Scene Simplify panel and it acts as
following: when texture size is bigger than the given value it'll
be scaled down by half for until it fits into given limit.

There are various possible improvements, such as:

- Use threaded scaling using our own task manager.

  This is actually one of the main reasons why image resize is
  manually-implemented instead of using OIIO's resize. Other
  reason here is that API seems limited to construct 3D texture
  description easily.

- Vectorization of uchar4/float4/half4 textures.

- Use something smarter than box filter.

  Was playing with some other filters, but not sure they are
  really better: they kind of causes more fuzzy edges.

Even with such a TODOs in the code the option is already quite
useful.

Reviewers: brecht

Reviewed By: brecht

Subscribers: jtheninja, Blendify, gregzaal, venomgfx

Differential Revision: https://developer.blender.org/D2362
2016-11-22 12:00:09 +01:00
927a168b07 GPU: Consider latest Gallium driver an official ATI/AMD
This will make triple buffer used by default for such configuration.

Ideally we would switch to triple buffer on all platforms, but let's
do it in 2.8 branch and don't open can of worms in master now.

This should solve issues like T49945.
2016-11-22 11:38:27 +01:00
bd8cbf5c07 Glog: Fix compilation error on ppc64el
This was fixed in upstream already. Time to re-bundle?
2016-11-21 21:04:48 +01:00
dd51ec592f CLEW: Workaround compilation error on ppc64el
Something was conflicting here, causing C++ to consider bool as
a __vector(4) bool.
2016-11-21 21:03:34 +01:00
94d8e6fc6c Partly revert own rBb97c567c1df1e, clear_proxy is actually safe.
This is very confusing, in fact, and rna tooltip was wrong,
BKE_object_make_local_ex actually ensures we never have several proxies
of same object, since it always clears proxy when it has to copy object
to make it local...

What that RNA function is probably missing, though, is same logic as in
BKE_library_make_local to actually remap proxy from old linked object to
new local one.
2016-11-21 20:57:02 +01:00
b97c567c1d Fix two very bad issues in new ID.make_local RNA function.
I) `clear_proxy` parameter was not assigned to parm in RNA define code,
so 'pyfunc optional' flag was set to `new_id` parameter of `user_remap`
func - super ugly!

II) `clear_proxy` parameter itself, when set to False, would allow to
leave .blend file in invalid state (more than one proxy of same object),
this should never, ever be allowed in RNA API imho. Left the PAI
untouched for now, just disabled any effect from this parameter (hence
always clearing proxy when copying).
2016-11-21 15:25:33 +01:00
2a78635dea Cleanup: get rid of unused BKE_constraints_relink().
Libquery/generic ID remapping code handles this now.
2016-11-21 15:25:33 +01:00
25c534f20a Fix T49981: New Depsgraph - When camera is on inactive layer, it does not evaluate constraints 2016-11-21 14:37:23 +01:00
af7343ae22 Cycles: Attempt to fix compilation error on ppc64el
There is some define conflict between system headers and clew,
so delay include of clew.h as much as possible.]

This is something which needed to be done in the code before
the refactor, hopefully such change will still work.
2016-11-21 13:32:41 +01:00
5eab3b079f Depsgraph: Fix infinite viewport object update in CYcles render mode
The issue was caused by wrong object re-tag needed to have proper dependnecies
update for OpenSubdiv.
2016-11-21 12:00:09 +01:00
b3c8ee891a Depsgraph: use more explicit parenthesis 2016-11-21 11:05:56 +01:00
83b1f24140 Fix Xcode link error, missing definitions in RNA C++ API that other compilers ignored. 2016-11-20 18:12:12 +01:00
b86c6aa6be Cycles: Don't shadow loop variable 2016-11-20 11:46:43 -05:00
f68ef05a56 Cycles: add basic backwards compatibility for device selection, move to System tab.
For the multi-GPU case users still have to reconfigure the devices they want to use.

Based on patch from Lukas Stockner.

Differential Revision: https://developer.blender.org/D2347
2016-11-20 15:45:22 +01:00
aea4ed00d5 Cycles: refactor culling code into utility class. 2016-11-20 15:25:47 +01:00
e8641d4474 Cycles: distance culling for objects.
This can be used together with camera culling to keep nearby objects visible in
reflections, using a minimum distance within which objects are visible. It is
also useful to cull small objects far from the camera.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2332
2016-11-20 15:01:11 +01:00
2c26a7b71e Cleanup: harmless mistake in rangetree 2016-11-20 09:11:26 +11:00
53a1b48321 GHOST/X11: Incorrect WM_STATE access
This worked by accident because of struct padding,
treat state as a CARD32 as documented.

Matches wine-x11 usage.
2016-11-20 09:03:51 +11:00
dd82d70bc5 Fix T50081: Grease pencil parented rotation problem
When the parent object matrix change after the layer was parented, the
inverse matrix for strokes must be updated when editing strokes or the
transformations will be wrong.
2016-11-19 22:41:37 +01:00
8c93178c96 Fix T50078: Vertex Groups not copied over when making proxy.
Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2368
2016-11-19 19:18:10 +01:00
369872a2c5 Fix T49991: reloading librairies doesn't update node groups.
We need to check node tree links are still valid, after we remapped
some NodeGroup.

Note: In fact, we have to run that for *all* ID types, since nodes may
use any kind of data-block (in theory)... :/
2016-11-19 12:31:40 +01:00
fa6a62fac2 Fix NodeGroup generic verify function crashing if node's ID pointer is NULL.
Another nice crasher - in this case, we just want to nuke all sockets...

Related to T49991.
2016-11-19 12:18:32 +01:00
bd6a9fd734 Fix (unreported) nodeRemoveAllSockets() not clearing inputs/outputs sockets lists.
Nice crasher (though seems to not be much used so far)!

Related to T49991.
2016-11-19 12:16:14 +01:00
5a6534a5bb Fix forward-compat Nodes write code being executed also for undo steps writing.
Forward compatibility code should never, ever be run during undo saving.

Note: related to T49991 (but does not fix it either, crash now happens
when doing a real file save...).
2016-11-18 22:44:05 +01:00
884693b42a Fix Node space ID remap callback not handling node trees.
Yep. Kinda ridiculous, but forgot to handle the very node trees
data-blocks in that editor!

Related (but not fixing) to T49991.
2016-11-18 22:44:05 +01:00
b6c0edcb09 Fix T50071: Radience HDR fomat does not support alpha at all. 2016-11-18 22:44:05 +01:00
b8710e1468 Fix UV layer bug in object_utils.object_data_add()
Adding a torus in edit-mode, with 'Generate UVs'
for example would either create another UV layer with the default name or
switch to the default UV layer name if it exists.

Now use the existing UV layer if present.
2016-11-19 06:57:55 +11:00
40990d52d1 Add Torus: avoid excessive attr access 2016-11-19 06:57:13 +11:00
39be226e93 BMesh: invalid return from BM_mesh_validate
Returned value was always false, even for valid meshes,
note that this is a debug-only function.

Also set internal-tag cleared.
2016-11-19 06:31:17 +11:00
a90644ed19 Minor debug-report tweak to autosave code.
Print in cosole a warning when we skip autosave due to runnning modal op.

Related to T49974.
2016-11-18 18:47:29 +01:00
Dalai Felinto
0f8e5f4fb4 Cycles: Different noise seed for stereoscopic rendering (Fix #T50024)
Patch by Sergey Sharybin.
2016-11-18 18:23:52 +01:00
ba7c11aa05 Depsgraph: Fix residue of debug-only code 2016-11-18 17:48:01 +01:00
27de0c40c5 Fix T50035: Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush
Patch by @LucaRood, added some cleanup of DRAW/FILL conditions in this
code too...
2016-11-18 15:49:41 +01:00
f6083b7bcd Fix (unreported) bad handling of brush's fill threshold value.
'1' threshold value would only allow to access a third of the basic
'color space' (from black to white, from 0.0 to 1.0 component values),
when you expect it to access the whole range.

Unfortunately, this needs a subversion bump to allow already defined
brushes to keep exact same behavior!

Also, did not change default value (0.2) for new brushes, think here
keeping current one makes more sense.

Thanks to @LucaRood for confirming the issue.
2016-11-18 15:32:50 +01:00
8f0dc3cef6 Fix T50052: bpy.utils.unregister_module doesn't unregister classes of submodules in reload scenario.
reload case would clear TypeMap before unregistering addons, which made
all calls to unregister_module() to do absolutely nothing.
2016-11-18 15:15:46 +01:00
Julian Eisel
3fb11061ba Fix T50063: Editing driver's expression eliminates "Zero" number
Disables trimming of trailing zeros in case button contains an expression.
2016-11-18 13:38:46 +01:00
Dalai Felinto
fffb1a4cfb Implement multi-view stereo support for image empties
Empty images were implemented to expand (and eventually replace)
the background images functionalities. If we are ever to drop
background images "image empties" should support stereo/multi-view as well.
2016-11-18 12:38:18 +01:00
841c4deed7 Fix potential NULL dereference in mesh sequence cache modifier.
Reported by coverity.
2016-11-18 12:03:12 +01:00
b859fef670 Fix copy/paste typo in new depsgraph object geometry builder (found by coverity). 2016-11-18 11:55:28 +01:00
b095c1979f Fix double freeing of OpenVDB data from dangling pointers in device data. 2016-11-18 09:45:11 +01:00
03a395766a BMesh: avoid using temp array for face-area 2016-11-18 06:10:53 +11:00
46739f1e5c BMesh: minor cleanup
Comment & don't use dummy pointer.
2016-11-18 06:10:53 +11:00
a1a8343281 Cleanup: redundant index loop for monkey-create
Also rename face vars (the faces aren't temp),
and quiet old-style-definition warning.
2016-11-18 06:10:53 +11:00
d294509dd8 Depsgrpah: Fix missing animation update in movie clips 2016-11-17 16:37:25 +01:00
4dbd61cc64 Depsgraph: Move scene builder function to own file
This way it's much easier to grasp what the graph actually contains.
2016-11-17 15:44:32 +01:00
1f8762bb8e Fix T50060: New depsgraph does not update mask animation 2016-11-17 15:29:22 +01:00
0a08d8c892 Depsgraph: Use utility macro to iterate over linked list
This will be compiled into same exact code, just saves us from
doing annoying type casts all over the place.
2016-11-17 15:11:55 +01:00
0c322c3000 Depsgraph: Move rig builder functions to own files
Those routines are rather big and started to be annoying to have
one big file.

Should be no functional changes.
2016-11-17 14:41:16 +01:00
4877e0efc9 Move registration of volumes from attributes out of the smoke sim logic.
This bit of code will be the same for every potential source of volumetric
data.
2016-11-17 13:30:11 +01:00
9b598ebc47 Cleanup of Blender sync code for OpenVDB volume attributes.
Besides removing some debug printing lines, the code should also become
easier to adapt to alternative sources of volume data beside the smoke sim.
2016-11-17 10:12:36 +01:00
16e2c0ef3c [MSVC] Preliminary VS2017 support. 2016-11-16 20:13:58 -07:00
60409841a4 Fix T50001: auto tile size addon broken after Cycles GPU device changes.
Adds a get_num_gpu_devices() utility function for the addon to use.
2016-11-17 02:17:56 +01:00
e400f4a53e Fix T50051: Avoid crash when render grease pencil from VSE
The renderpasses for grease pencil are not necessary when render from
sequencer.

This fix solves the GPF but we need to rethink the complete render
process for grease pencil and integrate better in the render and
composition workflow.

Thanks to Dalai Felinto por helping in the debug and fixing of the
problem.
2016-11-16 21:33:47 +01:00
c7e7038edc Use tri-linear ("box") interpolation for OpenVDB grids rather than nearest point sampling.
Cycles shading options contain a setting for tri-cubic sampling as well, but this
is not supported in OpenVDB by default (only tri-quadratic). Cubic sampling appears
a bit pointless anyway, compared to the ability to add actual geometric detail.
2016-11-16 17:05:04 +01:00
d30baf60c6 Merge branch 'master' into openvdb 2016-11-16 16:36:43 +01:00
2a2eb0c463 Cycles: Fix different noise pattern from fix in T49838:
No need to hash subframe == 0.
2016-11-16 15:32:00 +01:00
209bc9977c Fix T50046: Segmentation fault due to out-of-range VertexGroup.weight() call.
`get_vert_def_nr()` was not checking vert index in bmesh case (aka Edit mode).
2016-11-16 12:42:17 +01:00
Martijn Berger
f86eccb1ca Remove unused vector icons
it seems to me the icons are unused:

  - VICO_VIEW3D_VEC
  - VICO_EDIT_VEC
  - VICO_EDITMODE_VEC_DEHLT
  - VICO_EDITMODE_VEC_HLT
  - VICO_DISCLOSURE_TRI_RIGHT_VEC
  - VICO_DISCLOSURE_TRI_DOWN_VEC
  - VICO_MOVE_UP_VEC
  - VICO_MOVE_DOWN_VEC
  - VICO_X_VEC

Since their code contains immediate mode GL calls and they seem to be unused i thought we could remove them.

Reviewers: mont29

Reviewed By: mont29

Subscribers: merwin

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2356
2016-11-16 12:25:14 +01:00
e17b92f535 Fix custom props not being handled correctly by manual/pyref UI menu entries. 2016-11-16 11:09:14 +01:00
4722fc5dd0 Disable possibility to flip bone names of linked armatures
Linked data should not be modified in such a way.

Reported by Nathan here in the studio, reviewed by Bastien, thanks!
2016-11-16 10:39:41 +01:00
eb9e9f7f1a Cleanup: Remove unused function 2016-11-16 10:10:07 +01:00
d3947aef59 Fix voxel attribute sampling position when using VDB grids.
OpenVDB handles inverse transform from object to grid space internally.
2016-11-16 10:09:29 +01:00
8b2905952e Fix T50026: "Only Insert Needed" doesn't work when using Trackball rotation
The rotation case here only covered rotation by the "Rotate" tool, but skipped
the "Trackball" tool.
2016-11-16 11:14:38 +13:00
6397319659 Fix T50023: Inverse Kinematics angle limits defaulting to 10313.2403124°
Regression from 2.77a. The units for the min/max limits were changed in RNA
but the pose channels were still being initialised with in degrees.
2016-11-16 11:10:19 +13:00
0de157a320 FIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data types , to force aligned on 16 byte boundaries. 2016-11-15 13:21:01 -07:00
44b691dc65 RNA Main API: set remove's do_unlink default value to true.
On second and third thoughts, this should have been done that way since
the begining, cases were you just delete a few data-blocks without any
serious knowledge of their usages are much, much more frequent than
cases where you are deleting thousands of data-blocks and are sure they
are not used anywhere anymore...

Own fault, but really frustrated that this topic was only raised the day
after 2.78a was released. :(
2016-11-15 17:12:18 +01:00
f2690673ba Get rid of 'drivers unlinking' code in BKE_libblock_free_data()
This has nothing to do here (freeing is not unlinking/remapping!), and
was actually redoing something already taken care of by
`BKE_libblock_relink_ex()` call in `BKE_libblock_free_ex()`.

Also, gives some noticeable speedup when removing datablocks with
do_unlink=True, about 5 to 10% quicker e.g. when deleting all objects
from a py console, in a big production file...
2016-11-15 16:39:48 +01:00
af0e6b31a5 Depsgraph: Fix frash with iTaSC solver
This commit reverts part of a fix for T33275, but things are:

- I can not reproduce the original issue at all, so doesn't seem to
  cause any regressions.

- It is really bad idea to do delayed initialization in the threaded
  environment, it's a straight way to some nasty issues.

- We can't do things like this anyway because we go more granular,
  meaning such a delayed initialization will fail in the case of
  having several IK solvers (unless they properly accommodate to
  changed bone head).

- Verified the fix with various files from Mango project and all of
  them seems to work nice with new depednency graph now (old depsgraph
  has some flickering, but it's not related on DEG itself, but on
  an environment with lots of proxies and threaded evaluation and it
  is not a new behavior).
2016-11-15 16:18:59 +01:00
9019f8ca95 Revert "Proxy: Construct pchan hash when syncing armature proxy"
This reverts commit 9b5a32cbfb.

Apparently it is possible to have other thread mocking around with the hash.

Needs deeper investigation, for the time being reverting to prevent crashes.
2016-11-15 16:13:24 +01:00
cb117f283b Fix menu inconsistencies
This commit fixes two issues:

- UV/Image editor uvs menu did not match the 3D View's which was changed in rB2b240b043078
- Circle select tool was missing in particle edit mode

Reviewers: Severin
Differential Revision: https://developer.blender.org/D2329
2016-11-15 16:07:32 +01:00
a828818d59 Cleanup: More explicit parentheses 2016-11-15 16:01:21 +01:00
625db1d86e Avoid interface ID remapping when freeing the whole database
This makes heavy scenes to be freed almost instantly (so now
quadbot scene takes only 0.06sec to free),
2016-11-15 15:56:40 +01:00
85e51b0638 Avoid driver target remapping when freeing the whole database
Added BKE_libblock_free_data_ex() which takes special do_id_user
argument which basically indicates whether main database was already
taken care about not having "dead" pointers.

Gives about 40% speedup of main database free with quadbot scene
(3.4sec vs. 5.4 sec on quite powerful desktop).
2016-11-15 15:56:40 +01:00
Julian Eisel
0cd1b5ef85 Fix T50022: "Mirror" in Dopesheet Crashes Blender
Just fixing crash itself. Actually operator shouldn't run in most editors (not in dopesheet either I guess), but don't want to spend time on that right now.
2016-11-15 15:30:33 +01:00
Dalai Felinto
69470e36d6 Implement grouped undo option for operators
This option makes an operator to not push a task to the undo stack if the previous stored elemen is the same operator or part of the same undo group.

The main usage is for animation, so you can change frames to inspect the
poses, and revert the previous pose without having to roll back tons of
"change frame" operator, or even see the undo stack full.

This complements rB13ee9b8e
Design with help by Sergey Sharybin.

Reviewers: sergey, mont29

Reviewed By: mont29, sergey

Subscribers: pyc0d3r, hjalti, Severin, lowercase, brecht, monio, aligorith, hadrien, jbakker

Differential Revision: https://developer.blender.org/D2330
2016-11-15 14:25:10 +01:00
445274fc4f Depsgraph: Fix typo in previous optimization commit
Was a residue from another experiment, caused infinite loop when
reporting dependency cycles.
2016-11-15 14:22:17 +01:00
a284d04093 Atomics: Add some extra utility functions
Also fixed semantic of fetch-and-add in assembler implementation,
it seemed to not match the naming.
2016-11-15 13:41:08 +01:00
4ee08e9533 Atomics: Make naming more obvious about which value is being returned 2016-11-15 12:16:26 +01:00
46b5cdaa4d BMesh: remove redundant link-list manipulation
No need to track previous edge in vert-separate cleanup
2016-11-15 12:39:59 +11:00
c418ef48cb BMesh: match BM_vert_find_first_loop with iterator logic
Use changes from previous commit for BM_vert_find_first_loop.
2016-11-15 07:55:55 +11:00
d9597ce3ba BMesh: avoid extra calls per faces-of-vert iterator
- `bmesh_radial_faceloop_find_first` & `bmesh_disk_faceedge_find_first`
  can be replaced with a single call to a new function:
  `bmesh_disk_faceloop_find_first`

- `bmesh_disk_faceedge_find_first` called `bmesh_radial_facevert_check`
  which isn't needed, since either the current or next loop in the
  cycle is attached to the edge we're looking for.
2016-11-15 07:39:39 +11:00
a3b61f0639 BMesh: use const for BM_vert_face_check 2016-11-15 07:30:18 +11:00
e6ad6ff082 BMesh: minor improvement to BM_vert_face_check
No need to perform edge-of-vert then loop-of-edge check.

Any vertex that has an edge with a face will be connected to a face.
2016-11-15 06:57:11 +11:00
77ba1ed5db BMesh: fix edge-rotate with w/ flipped faces
Edge-rotate would randomly flip one of the faces to match the other.

Also maintain active-face when rotating the edge.
2016-11-15 04:01:35 +11:00
d3919c22b0 BMesh: fix edge-rotation selection state bug
Failed edge rotation could leave unselected edge between selected faces,
also report warning when edges fail to be rotated.
2016-11-15 03:26:19 +11:00
6a2b95e1ca BMesh: replace iterator with BM_face_vert_share_loop 2016-11-15 02:44:57 +11:00
dc0a9e6535 BMesh: remove redundant argument 2016-11-15 02:44:57 +11:00
b047d79871 Cycles: De-duplicate image loading functions
The code was templated already, so don't see big reason to have
3 versions of templated functions. It was giving some extra code
to maintain and in fact already had divergency for support of huge
image resolution (missing size_t cast in byte image loading).

There should be no changes visible by artists.
2016-11-14 14:03:17 +01:00
7a4a2ed5f4 intsall_deps / OSL use c++11 ABI when install_deps is asking for c++11 2016-11-14 09:59:30 +01:00
ca21b0702c Removed unused util_volume files. 2016-11-13 21:59:54 +01:00
28f4388c2e Merge branch 'cvdb_ray_isect' into openvdb 2016-11-13 21:42:35 +01:00
fc9fa07c0e BMesh: BM_face_exists no longer uses return arg
Just return the face or NULL, like BM_edge_exists(),
Also for BM_face_exists_overlap & bm_face_exists_tri_from_loop_vert.
No functional changes.

Old code did some partial overlap checks where this made some sense,
but it's since been removed.
2016-11-14 04:33:35 +11:00
099f7dc9dd Set the primitive type for volume samples to VOLUME.
This is so the primitive_attribute_* functions correctly look for
voxel attributes.
2016-11-13 17:59:19 +01:00
1b1d6ce131 Fix T50013: Blender 2.78a Link/Append Crash.
Object freeing may in some kind access its obdata (in case it has some
caches e.g.), since here obdata may have already been freed, let's set
object's data pointer to NULL (probably not ideal solution, but we don't
care much, those form archipelagos of unused linked datablocks,
we nuke'em all anyway).

Also fix stupid mistake in one of own recent commits (using ID we just
freed, tsst...).
2016-11-13 15:49:41 +01:00
235932ba2e Fix various cleanup issues and inconsistencies.
All volumes are held in the scene volumes list now, so VolumeManager doesn't need
to free them explicitly.

The ImageManager reference in VoxelAttribute is an artifact from smoke rendering,
this should be phased out eventually and can be assumed to be NULL for Volumes.

Make sure the VolumeManager cleans up the device memory properly, in particular
the ray intersector instances must be freed.
2016-11-13 15:14:16 +01:00
736e3cd434 Proper volume data storage in Cycles when syncing from Blender data.
Previously a viewport render would continuously keep adding Volume instances
to the VolumeManager data, because there was no way to detect existing volume
data. Now the `id_map` model known from meshes and other data types is used for
volume data as well.

Note that the VolumeKey currently simply uses an Object ID pointer, thus
assuming a single Volume per object. In the future volumes could become a
real ID type in Blender, or the specific volume could be narrowed down with
additional info in the key.
2016-11-13 13:40:00 +01:00
7e8bf9dbd6 Fix T50007: blender offline python documentation in zipped HTML files, not shown correctly.
Stupid mistake, os.scandir is not recursive... Patch by @brecht, thanks.
2016-11-13 12:06:26 +01:00
3d04df097a Added an assert to catch non-uniform grids earlier.
OpenVDB ray intersectors only support uniform grids. This should be
checked as early as possible to allow feedback to the Cycles user
(i.e. the Blender app). For now the assert just prevents exceptions
from OpenVDB itself, until a transparent mechanism for this is implemented.
2016-11-13 11:25:49 +01:00
54318700dd Removed direct grid lists in VolumeManager, all grids should be in Volumes now. 2016-11-13 11:24:51 +01:00
947015de57 Disables VolumeManager functions that load grids directly from a filename.
These are legacy functions from the OpenVDB import node, but they don't
work with the new design any more because there is no specific Volume
instance to add the grids to.
2016-11-13 11:22:24 +01:00
cc8132b0c8 Fix T49997: don't flip texture users menu in texture properties. 2016-11-13 02:29:10 +01:00
43703fa4bf Fix T50008: camera DOF Distance picking from W key menu not working. 2016-11-12 22:31:24 +01:00
447fc7c4ce fix T50004: Removed check for empty mesh and adjusted the vertex import function to accept meshes without vertices as well 2016-11-12 22:20:07 +01:00
4151f12713 Fix Make Vertex Parent operator missing from vertex/curve/lattice menus.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2346
2016-11-12 19:01:13 +01:00
111e2f5aba Fix T49904: Cycles standalone missing default generated texture coordinates. 2016-11-12 17:33:07 +01:00
b5a58507f2 Fix Cycles OSL compilation based on modified time not working. 2016-11-12 17:33:07 +01:00
69288737ca Fix Cycles standalone not finding CPU device after recent changes. 2016-11-12 17:33:07 +01:00
478e59a04e Fix T49985: cycles standalone XML missing distant lights. 2016-11-12 17:33:07 +01:00
188ecee642 Fix T49985: cycles standalone using wrong socket names for XML reading. 2016-11-12 17:33:07 +01:00
Julian Eisel
627141082b Sculpt UI: Make DynTopo constant detail a resolution value
This should make it easier to sculpt in high resolutions, downside is that the new way to calculate maximum edge length is a bit less intuitive. Maximum edge length used to be calculated as blender_unit * percentage_value, now it's blender_unit / value.

Reused old DNA struct member, but had to bump subversion to ensure correct compatibility conversion. Also changed default value slightly (would have had to set to 3.333... otherwise).

Was Requested by @monio (see https://rightclickselect.com/p/sculpting/zpbbbc/dyntopo-better-scale-input-in-constant-detail-mode) and I think it's worth testing.
2016-11-12 16:53:38 +01:00
e00c3ab13f BMesh: update comments, ifdef'd code 2016-11-13 01:39:40 +11:00
dd610cb6e9 Improved thread data handling for the OpenVDB Cycles node.
OpenVDB grid accessors, samplers, and ray intersectors must be stored per thread.
Previously this data was stored in a per-thread map in each grid. This causes problems
because the pthread_id keys can become invalid, and it also creates a lot of unused
accessors.

The patch switches thread data storage around, so that thread-local data is now passed
along KernelGlobals for every work task as needed (tasks only run in one thread).
This system is much more reliable and similar to other cases of thread-local data,
such as OSL shaders.

The patch also removes the virtual base class for "volumes", which might give a minor
performance improvement. If a generic volume type for Cycles is needed it can be
abstracted from scratch.

Removed the unused thread_id list in Cycles CPU tasks, which were only needed
for the now deprecated OpenVDB grid accessor lookup.
2016-11-12 13:47:35 +01:00
7fd2efa507 BMesh: Minor improvement to face-join
Pass in loops instead of edge & faces.
Nearly all callers have the loop-pairs to pass in.
2016-11-12 10:30:32 +11:00
dad0c31ceb Fix renaming error in last commit 2016-11-12 10:30:28 +11:00
8b01a6e0f1 BKE_library_make_local(): some minor improvements.
Do not set 'real user' to groups every time we run the first clearing loop.

And do fully clear properly LIB_TAG_DOIT (this is not yet enforced in
existing code, but would love to get to that stage in future, so let's
do it at least with new code!).
2016-11-11 23:17:52 +01:00
2dbcb75ed5 Minor naming cleanup. 2016-11-11 23:17:52 +01:00
f6ab97c1ae Enhance BKE_library_make_local() to make it much quicker in complex cases.
Basic idea is to split first loop in two, and run checks before making
anything actually local, to detect data-blocks that we can directly make
local (because we are sure they are only used by already/future local
datablocks).

This allows to avoid a lot of overhead in later 'cleanup' steps of this
function, here with barbershop shot it's four times quicker (from 190s to 48s).

We are still far from the instantaneous results of MakeLocal in 2.77,
but in that version main characters lose their connection to their
armature and remain static after makelocal, so guess new code is still
better. ;)

There are probably more optimizations possible here, but would rather
polish this area of code once we get rid of proxies, those really
make it a nightmare to work on.
2016-11-11 23:17:52 +01:00
f1ad2ab85f Minor optimization to BKE_library_tag_unused_linked_data(). 2016-11-11 23:17:52 +01:00
8e4066b9d3 Switch to unsafe but quick freeing of archipelagos of linked data.
This *should* work, but do not hesitate to revert in case it creates new
crashes in append or makelocal processes.
2016-11-11 23:17:52 +01:00
674c3bf894 Fix T49996: VSE opengl render crash with grease pencil if current frame is empty
If the opengl render with grease pencil is run from VSE with the current
frame outside visible frames, the render pass is wrong and the render
must be canceled because nothing to render. Related to #T49975
2016-11-11 22:27:10 +01:00
cdeaec3b0d GPencil: Create brush set when create new datablock or layer
Before this commit, the brush set was created with the first stroke
drawing, but if the user creates the datablock or the layer manually
(not drawing) the brush list was empty.

This commit complement the python fix by Sergey:
https://developer.blender.org/rB89c1f9db37cc1becdd437fcfdb1877306cc2b329
2016-11-11 20:04:58 +01:00
ed957768a0 Fix crash happening in some cases with MakeLocal operator.
Culprit here was once more proxies. Think what was happening here was:
1) Both proxy and proxified armatures' PoseChannels were cleared
   (needed after remapping due to Bone pointers being stored in pchans).
2) Proxy PoseChannels got rebuilt in `BKE_pose_rebuild_ex()`, which ends,
   in proxy cases, by actually replacing rebuilt pchans by those from
   the proxified object... which has not yet been rebuilt.

Fixed the issue by merely adding bone pointer to data copied from
original pchan into new 'from proxy' one... Sounds much, much safer and
sanier anyway, that way we can be sure bone pointer is actually pointing
to a bone of the object's armature (this is supposed to be the same
Armature datablock between proxy and proxified objects, but that may not
be always true especially during makelocal process).
2016-11-11 18:11:30 +01:00
7d33d4439f Fix T49994: Setting dupligroup which uses indirect relation will crash
Did similar trick to old dependency graph: tag invisible relations for update.

Might need some re-consideration, see the comment.

This should solve our issues with powerlib addon here in the studio.
2016-11-11 16:16:27 +01:00
2a838c71d9 Depsgraph: Add missing NULL pointer check 2016-11-11 15:28:34 +01:00
24d89a1f77 Depsgraph: Fix missing DONE flag in relations builder
Was causing relations be build twice in certain cases.
2016-11-11 15:20:17 +01:00
7dda3cf830 Fix T49993: Indirectly used taper/bevel crashes new dependency graph
New dependency graph expects strict separation between nodes and relations builder,
meaning, if we try to create relation with an object which is not in the graph yet
we'll have an error in depsgraph.

Now, so far object nodes were created from bases of the current scene, which caused
missing objects in graph in certain cases.

Didn't find better approach than to simply ensure object nodes exists when we know
they'll be used by relation builder.
2016-11-11 14:52:05 +01:00
b1743cda5a Depsgraph: Fix typo in text on curve relation builder 2016-11-11 14:41:02 +01:00
653541ea78 Depsgraph: Fix missing ID node tag
Might have caused nodes created multiple times for the same object.
2016-11-11 14:26:11 +01:00
915c74a33b Depsgraph: Add some data builder logic to corresponding function 2016-11-11 14:24:47 +01:00
89c1f9db37 Grease Pencil: Fix python errors opening N panel -> GP with empty VSE
Solves errors, but not sure interface is indeed what users will expect.

Will ask GP team to check on this.
2016-11-11 14:04:04 +01:00
9eeca9e7cd Depsgraph: cleanup, no functional changes 2016-11-11 13:54:02 +01:00
48971da4c8 Depsgraph: Fix wrong relation names 2016-11-11 11:42:43 +01:00
4710fa700c Depsgraph: Fix wrong relations in array modifier 2016-11-11 11:41:33 +01:00
a1aa3a8b75 Cycles: Add comments to endif directives
`kernel_path.h` and `kernel_path_branched.h` have a lot of conditional code and
it was kind of hard to tell what code belonged to which directive. Should be
easier to read now.
2016-11-10 19:50:23 -05:00
80aae2b6fe Consider Numpad Enter in pose slide operators
It was annoying to only have regular Enter confirming input there.
2016-11-10 17:19:23 +01:00
e316636fa8 Fix BKE_library_make_local() trying to also make local proxified objects.
Proxified objects can never be local, we can totally ignore them here.

This 'fixes' the asserts related to usercount when trying to remap poselib
of localized proxified objects (not sure what exactly was going on wrong here,
but proxies are a giant can of worms for sane data-blocks handling anyway :/).
2016-11-10 17:09:16 +01:00
f0d53ac109 Depsgraph: Fix another issue which seems to be a bug
Similar to a previous commit.

Doing separately for an easy of bisect.
2016-11-10 15:49:33 +01:00
aef66a6be0 Depsgraph: Fix wrong relation from IK solver to pole target
Copy paste error...

How to avoid those?
2016-11-10 15:46:22 +01:00
Dalai Felinto
0b9b8ab2dd Fix Grease Pencil render in VSE crashes when no strips (#T49975)
Solution as suggested by Sergey Sharybin. Initial debugging by
Antonio Vazquez.
2016-11-10 12:24:54 +01:00
Martijn Berger
63b38848a2 buidlbot, msbuild is slightly different in that is wants to build debug anyway even if we told cmake we want release 2016-11-10 11:00:04 +01:00
Martijn Berger
1977440770 buidlbot, msbuild is slightly different in that is wants to build debug anyway even if we told cmake we want release 2016-11-10 10:55:49 +01:00
2138fdb785 Added bpy.types.ID.make_local() that can make a single ID block local.
This new `bpy.types.ID.make_local(clear_proxies=True)` allows Python
code to press the "Make Local" button on any ID block. I chose
`clear_proxies=True` as the default, since it's the default behaviour
of `id_make_local()` (defined in `library.c`).

The caller does need to take care of ensuring that linked-in objects
don't refer to local data, and that proxies aren't broken.

Reviewers: sergey, mont29

Reviewed By: mont29

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D2346
2016-11-10 10:49:57 +01:00
Martijn Berger
8b8e04cae6 let cmake handle calling msbuild for windows buildbots 2016-11-10 10:48:54 +01:00
afc8a4f9e2 Fix UI message. 2016-11-09 19:27:43 +01:00
47759b14ab BMesh: face-join, remove redundant face assignment
Keep ifdef'd out for holes, this isn't needed currently.
2016-11-10 03:21:42 +11:00
4d9562a3ae Depsgraph: Fix crash deleting bones in armature edit mode
For the new dependency graph we have to rebuild graph when
bones "topology" are changing.
2016-11-09 17:00:31 +01:00
18be39ff17 Fix some assert when making local (due to infamous PITA ShapeKey ID). 2016-11-09 16:42:28 +01:00
e72caa513a BMesh: Cleanup, remove hole ifdef 2016-11-10 01:08:12 +11:00
49a3eaa3dc BMesh: face-flip, no need for temporary edge-array
Reverse loops in-place.
2016-11-10 00:08:26 +11:00
f4ec58f465 Merge branch 'master' into cvdb_ray_isect 2016-11-09 12:01:30 +01:00
c6495263c6 Fix invalid default value type when constructing a default volume shader graph. 2016-11-09 11:35:11 +01:00
e9689e1a20 Fix: setting an audio callback before audio device initialization. 2016-11-09 00:06:49 +01:00
4d0f7c320c Depsgraph: Use atomics to tag ID when evaluating driver
This is required since new dependency graph evaluates drivers in threads
so it was possible to have some partially written ID tag there.
2016-11-08 17:54:14 +01:00
682bcb2995 Atomics: Add 32 bit version of fetch and AND/OR 2016-11-08 17:12:04 +01:00
4f28dac872 BMesh: remove edge search when flipping faces
Replace search with direct lookup.
2016-11-09 00:18:32 +11:00
0085001eb0 Fix memory leak when Blender is build without Bullet and files with RB is opened 2016-11-08 11:54:04 +01:00
a2d78d7a46 Fix T49838: Noise randomization for frame should be done per interframes as well
Add subframe to the animated seed hash calculation.

Should be no difference for the regular files, only for cases when scene is
rendered from sequencer with a speed effect, which is not really a common thing.
2016-11-08 11:16:37 +01:00
93ace71bd7 Cycles: Only use new light sample threshold for new files
This is a late follow-up commit to the light sample threshold changes which
caused difference in rendering all existing .blend files which is not something
we are happy about: it is fine to use new optimized defaults for new files, but
existing ones should always be rendering in the same way as they used to be.

Sorry for the inconveniece, but such thing should have been done to begin with.
If this setting was modified it will not be reset to zero.

Now all render tests should be passing again.

P.S. Also really annoying to bump subversion for such reasons, but currently we
don't have better way to achieve what we want.
2016-11-08 10:58:09 +01:00
508e2f0d69 Fix T49937: Blender is crashing because of Lamp Data Node
Lamp Data node requires shadow sample array which is only enabled when
Shadows are enabled in the shading settings.

This commit prevents crash but might not give expected render results
in such a configuration.
2016-11-08 10:40:21 +01:00
f19f9be1b9 BMesh: remove redundant edge-split loop initialize
Would always set both first1 and first2.
2016-11-08 07:13:20 +11:00
9912792564 Forgot this in last commit. (Brick GLSL). 2016-11-07 20:59:09 +01:00
28639a22bc Fix Brick Texture GLSL, broken after Mortar Smooth addition. 2016-11-07 20:55:36 +01:00
535914aa46 BMesh: remove redundant array size
Correct unhelpful comment & some comment edits.

Rename 'disk_is_flagged' -> 'bm_vert_is_manifold_flagged',
since the check is quite specific.
2016-11-08 06:54:20 +11:00
7a98c43f9d BMesh: minor improvement to edge-split assignment 2016-11-08 06:49:22 +11:00
e74e622776 Fix compilation error when CUDA toolkit is not installed
After CUDA dynload changes having CUDA toolkit became required
in order to compile Cycles. This only happened due to wrong
default value to the option.
2016-11-07 14:47:10 +01:00
6f3f27c0cc Buildbot: Update copy of buildbot master configuration 2016-11-07 14:29:11 +01:00
c9efcc5e4a Cycles: Remove device settings from performance tab
This was included in the commit by accident, it doesn't belong there.
2016-11-07 13:22:53 +01:00
1d01a1a269 Depsgraph: Disable timing profile 2016-11-07 12:50:45 +01:00
Martijn Berger
f51f215bc3 fix building depsgraph after recent changes 2016-11-07 12:32:00 +01:00
37947ed552 Depsgraph: Do not rely on indirectly included cstring
Also add comment why exactly cstring is needed.
2016-11-07 12:09:42 +01:00
9b5a32cbfb Proxy: Construct pchan hash when syncing armature proxy
This makes bone lookup much faster (by avoiding liner string lookup)
and speeds up depsgraph construction time on file open.
2016-11-07 11:04:49 +01:00
21350b73df Despgraph: Optimize cycles detection algorithm
The idea is simple: when falling back to one of the nodes which was partially
handled we "resume" checking outgoing relations from the index which we stopped.

This gives about 15-20% depsgraph construction time save.
2016-11-07 11:04:49 +01:00
4c30a9ee42 Depsgraph: Speedup initial rig build time
We don't need to sort bone channels, it's all taken care about
by the depsgraph itself.

Gives up to 30% initial rig construction time speedup.
2016-11-07 11:04:49 +01:00
65a1fd975c Depsgraph: Move key implementation from header to dedicated file 2016-11-07 11:04:49 +01:00
109be7ed39 Depsgraph: Move class implementation from header to implementation files
This is more proper way to go:

- Avoids re-compilation of all dependent files when implementation changes
  without changed API,

- Linker should have much simpler time now de-duplicating and getting rid
  of redundant implementations.
2016-11-07 11:04:49 +01:00
287197c4e3 Depsgraph: Fully switch from string to const char*
This brings up to 10-20% depsgraph build time improvement in the layout
files from the studio repository.
2016-11-07 11:04:49 +01:00
c9eca0c6c9 Depsgraph: Add extra name tag for operation nodes
The idea here is to address issue that name on it's own is not
always unique: for example, when adding driver operations the
name used for nodes is the RNA path (and multiple drivers can
write to different array indices of the path). Basically, now
it's possible to pass extra integer value to distinguish
operations in such cases.

So now we've already switched from sprintf() to construct unique
operation name to pass RNA path and array index.

There should be no functional changes yet, but this work is
required for further work about replacing string with const
char*.
2016-11-07 11:04:49 +01:00
d872aeaf51 Depsgraph: Cleanup, operation has name, not description
Hopefully should make things more clear here.
2016-11-07 11:04:49 +01:00
9331930345 Depsgraph: Remove unused function
A residue from times where we thought to do partial graph updates,
which we are not committing any time soon.
2016-11-07 11:04:49 +01:00
f8d9a56aa1 Depsgraph: Use const char for component API 2016-11-07 11:04:49 +01:00
4ef45ba775 Depsgraph: Remove some includes which seems unused 2016-11-07 11:04:49 +01:00
bbd4b96fe9 Depsgraph: Use const char instead of string in part of drivers construction 2016-11-07 11:04:49 +01:00
a7f53bc512 Depsgraph: Switch away form string to const char* for node names
There is no real reason to have nodes storing heap-allocated name
and description. Doing this increases amount of allocations during
dependency graph building, which usually means somewhat slowness.

We're temporarily loosing some eyecandy in the graphviz visualizer,
but those we can bring back as a part of graphiz dump (which happens
much less often than depsgraph build).

This will happen in multiple commits for the ease of bisect in the
future just in case this causes any regression. This commit contains
ID creation API changes.
2016-11-07 11:04:49 +01:00
f64548daa6 Depsgraph: Remove prototype of unused and non-implemented method 2016-11-07 11:04:49 +01:00
c8c7414c3f Expose Bullet rotational spring settings in the UI.
Bullet spring constraint already supports rotational springs, but
they are not exposed in blender UI, likely due to a simple oversight.
Supporting them is as simple as adding a few DNA/RNA properties
with appropriate UI and passing them on to Bullet.

Reviewers: sergof

Reviewed By: sergof

Differential Revision: https://developer.blender.org/D2331
2016-11-07 12:59:12 +03:00
dd921238d9 Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).

From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.

Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht, juicyfruit, mib2berlin, Blendify

Differential Revision: https://developer.blender.org/D2338
2016-11-07 03:19:29 +01:00
f89fbf580e Cycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixels
With this fix, using a MIS map resolution equal to the image size for closest imterpolation or twice the size for linear interpolation gets rid of all fireflies.
Previously, a much higher resolution was needed to get acceptable noise levels.
2016-11-06 20:34:50 +01:00
818af9c331 MSVC Runtime copy : Remove erroneously left in diagnostic message from CMakeLists.txt 2016-11-05 14:04:23 -06:00
2b1d3318f4 [msvc2015] Add support for copying the vc runtime.
There's more dll's hanging out in the ucrt folder, but  I just grabbed the ones blender requested (not sure if that's a wise idea, but it seems to work)

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D2335
2016-11-05 13:58:50 -06:00
Martijn Berger
521b981575 change default for quicktime suport for macOS to off 2016-11-05 14:23:00 +01:00
Martijn Berger
c02cce7b75 cycles, cuDeviceComputeCapability is deprecated as of cuda 5.0 2016-11-04 14:49:54 +01:00
f0ac661aa8 Fix T49905: Segfault when copying object data of linked object.
We have to clear `newid` of all datablocks, not only object ones.

Note that this whole stuff is still using some kind of older, primitive
'ID remapping', would like to see whether we can replace it with new,
more generic one, but that's for another day.
2016-11-04 09:55:46 +01:00
17fb504bcf Fix (unreported) asserts in make_object_duplilist_real().
Code would try to add multiple time the same key in `parent_gh` (for this
ghash a lot of dupliobjects may generate same key).

Was making the tool unusable in debug builds.

Also optimise things a bit by avoiding creating parent_gh when only
`use_base_parent` is set.
2016-11-04 08:34:01 +01:00
4e5d251ccb Fix T49918: Make duplicates real crash on clicking operator toggles.
handle_mutex may be NULL here...
2016-11-04 08:11:40 +01:00
4a68ff150f Fix T49903: Blender crashes -> Append Group incl. Object using boolean modifier
New code dealing with getting rid of lib-only cycles of data-blocks
could add several time the same datablock to the list of candidates. Now
this is avoided, and pointers are further cleaned up as double-safety
measure.
2016-11-03 21:10:10 +01:00
e27d9facdf install_deps cleanup: some Debian stuff was still present in the 'generic compile-only' part of the script. 2016-11-03 20:08:04 +01:00
dd6fa94dcc Add 'Set From Faces' tool to custom split normals.
Feature request during bconf, makes sense to have it even as an hack for
now, since this is probably one of the most common use cases. This should
be redone in bmesh once we have proper custom noramls handling in edit mode...
2016-11-03 13:26:18 +01:00
b6980ade90 Depsgraph: Add code for timing despgraph builder 2016-11-03 13:25:07 +01:00
27c559f059 Cycles: Fix missing underscore in geom_object.h 2016-11-03 12:38:00 +01:00
647255db93 Fix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color
The issue was caused by image ID nodes not being in the depsgraph.

Now, tricky part: we only add nodes but do not add relations yet. Reasoning:

- It's currently important to only call editor's ID update callback to solve
  the issue, without need to flush changes somewhere deeper.

- Adding relations might cause some unwanted updates, so will leave that for
  a later investigation.
2016-11-03 11:31:49 +01:00
fc1b35e44c Depsgraph: Fix wrong comparison of ID type vs. node type 2016-11-03 11:19:42 +01:00
534f11f71e Fix T49857: Blender crashes after adding texture node to compositing tree 2016-11-03 10:25:31 +01:00
a7461419d8 Fix OpenVDB socket creation in the Cycles node.
Was always using the last socket name, so other grids could not be accessed.
2016-11-03 10:20:02 +01:00
f800794b97 Cycles: Fix OpenCL build error caused by light termination commit 2016-11-03 03:15:39 +01:00
9847ad977a Cycles: Fix T49901: OpenCL build error after recent light texture coordinate commit
Basically, the problem here was that the transform that's used to bring texture coordinates
to world space is either fetched while setting up the shader (with Object Motion is enabled) or
fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed.

Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is.
However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't
store the Lamp index.

So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled.
To fix and support this properly, one of the following could be done:
- Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL
- Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed
- Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed.
- Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.
2016-11-03 03:08:14 +01:00
643c5a24d5 Depsgraph: Fix race condition writing drivers to array property
Animation system has separate fcurves for each of array elements and
dependency graph creates separate nodes for each of fcurve, This is
needed to keep granularity of updates, but causes issues because
animation system will actually write the whole array to property when
modifying single value (this is a limitation of RNA API).

Worked around by adding operation relation between array drivers
so we never write same array form multiple threads.
2016-11-02 18:08:33 +01:00
c5510df268 tests: Update hash for OBJ
Was a recent update of UV precision.
2016-11-02 15:35:18 +01:00
c9ffb6fc91 Libmv: Update tests to make tests pass after recent Ceres update
Just a precision issue, difference is around 1e-7. Should be fine to
simply update expected value.
2016-11-02 15:32:11 +01:00
15f2a51232 Solve threading conflict when calculating smooth normals
It was possible to have synchronization issues whe naccumulating smooth
normal to a vertex, causing shading artifacts during playback.

Bug found by Dalai, thanks!
2016-11-02 15:10:40 +01:00
dac5438562 COLLADA: Removed obsolete Export select option 'Both' which created invalid data (duplicate transformation information for nodes) 2016-11-02 14:11:46 +01:00
630c0559f9 Depsgraph: Fix some errors printed to the console
They were not real issues, it's just some areas of code tried to create
relations between non-existing nodes without checking whether such
relations are really needed.

Now it should be easier to see real bugs printed.

Hopefully should be no regressions here.
2016-11-02 12:23:00 +01:00
Martijn Berger
4fdf68271c Cycles standalone, compile fix UINT_MAX is not defined in device_cuda.cpp 2016-11-02 10:56:16 +01:00
83ebf501cd CMake: Make ld.gold linker optional
Some platforms are having hard time using this linker so added an option
to not use it. The options is an advanced one and enabled by default so
should not cause any changes for current users.
2016-11-02 10:42:15 +01:00
97a8cd6883 CMake: Fix use of some option which was never defined
This way it seems more logical to me.
2016-11-02 10:32:46 +01:00
f94a460397 [msvc/make.bat] Detect spaces in the build path and error out. 2016-11-01 15:30:12 -06:00
Dalai Felinto
13ee9b8ebe Change frame for animations should not bein the UNDO stack
Request from Hjalti Hjalmarsson for the animation work.

Basically a common part of the workflow of animation is to change the pose, scrub back and forth a few times and roll back the changes when unsatisfied.
However if you go back and forth too many times the UNDO stack would be full, and it would not be possible to bring back the previous pose.

I'm leaving clip_editor change frames as it is for now. But we can
probably change the behaviour there as well.
2016-11-01 22:11:16 +01:00
4e95a9069e Add 'copy array' for rna buttons
ctrl-alt-c/v allows to copy/paste whole RNA array, e.g. location, rotation, etc., from UI buttons.

Request from Andy at the studio.
2016-11-01 14:59:12 +01:00
1ee43c5aef Fix T49856: Blender 2.78 crashes after loading data from a blendfile
Issue here was that py API code was keeping references (pointers) to the
liniked data-blocks, which can actually be duplicated and then deleted
during the 'make local' process...

Would have like to find a better way than passing optional GHash to get
the oldid->newid mapping, but could not think of a better idea.
2016-11-01 13:39:31 +01:00
bf1e9bc613 Ceres: Update to the latest actual version
Brings all the fixes and improvements done in upstream within the last 13 months.
2016-11-01 11:29:33 +01:00
cf8f6d1dbc Added 'delete unlocked vertex groups' option. 2016-10-31 15:31:47 +01:00
d6ecf8efcd Merge branch 'master' into openvdb 2016-10-31 13:38:28 +01:00
aad46dd175 BMesh: radial loop (internal API symmetry)
Radial append/remove had swapped args and *slightly* different behavior.
- bmesh_radial_append(edge, loop)
- bmesh_radial_loop_remove(loop, edge)

Match logic for append/remove,
Logic for the one case where the edge needs to be left untouched
has been moved to: `bmesh_radial_loop_unlink`.
2016-10-31 23:05:20 +11:00
6488ce7f33 BMesh: simplify vert & edge removal 2016-10-31 22:07:23 +11:00
60682c37dd BMesh: remove redundant walker member & assignment 2016-10-31 17:24:15 +11:00
04aa454075 Cycles: Deduplicate AO calculation
No functional changes.
2016-10-31 00:40:59 +01:00
Julian Eisel
2257e6899a UI: Don't show empty panel right-click menu 2016-10-31 00:08:13 +01:00
2e9dd1200f Cycles: Fix OpenCL compilation with the new brick texture 2016-10-30 16:25:35 +01:00
5050572e89 Cycles: Style Fix: Light sampling threshold description 2016-10-30 13:51:49 +01:00
b6d35e1fa7 Viewport smoke: add support to render the volume using a color ramp.
This is yet another debug option that allows to render an arbitrary
simulation field by using a color ramp to inspect its voxel values.
Note that when using this, fire rendering is turned off.

Reviewers: plasmasolutions, gottfried

Differential Revision: https://developer.blender.org/D1733
2016-10-30 12:29:05 +01:00
4e68f48227 Cycles: Initialize the RNG state from the kernel instead of the host
This allows to save a memory copy, which will be particularly useful for network rendering.

Reviewers: sergey, brecht, dingto, juicyfruit, maiself

Differential Revision: https://developer.blender.org/D2323
2016-10-30 11:51:20 +01:00
26bf230920 Cycles: Add optional probabilistic termination of light samples based on their expected contribution
In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways.
To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased.
This is the same approach that's also used in path termination based on length.

Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise.

Reviewers: #cycles

Subscribers: sergey, brecht

Differential Revision: https://developer.blender.org/D2217
2016-10-30 11:31:28 +01:00
ce785868a5 Fix compile errors for when WITH_ALEMBIC is OFF. 2016-10-30 03:42:46 +01:00
b2974d7ab7 Cycles: Add smoothing option to the Brick Texture
This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width.
Mainly useful for displacement textures.

The new default value for the smoothing option is 0.1 to give some smoothing that helps with antialiasing, but existing nodes are loaded with smoothing 0 to preserve compatibility.

Reviewers: sergey, dingto, juicyfruit, brecht

Reviewed By: brecht

Subscribers: Blendify, nutel

Differential Revision: https://developer.blender.org/D2230
2016-10-30 02:16:22 +02:00
5aa6a2ec06 Fix T49846: OpenCL rendering compilation failure 2016-10-29 20:06:52 +02:00
1272ee455e Cycles: Implement texture coordinates for Point, Spot and Area Lamps
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp.
On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp.

Credit for the Area lamp part goes to Stefan Werner (from D1995).
2016-10-29 19:24:08 +02:00
d3b0977a35 Fix T49878: Alembic crash with long object name
Crash comes from writing to char array (ID::name) out its bound and thus
overriding memory in the ID struct.
2016-10-29 16:22:33 +02:00
753edafcb7 Alembic: store a pointer to the object reader in the cache modifiers and
constraints.

This avoids traversing the archive everytime object data is needed and
gives an overall consistent ~2x speedup here with files containing
between 136 and 500 Alembic objects. Also this somewhat nicely de-
duplicates code between data creation (upon import) and data streaming
(modifiers and constraints).

The only worying part is what happens when a CacheFile is deleted and/or
has its path changed. For now, we traverse the whole scene and for each
object using the CacheFile we free the pointer and NULL-ify it (see
BKE_cachefile_clean), but at some point this should be re-considered and
make use of the dependency graph.
2016-10-29 12:23:09 +02:00
0c13792437 Alembic export: fix frame range values being reset at every update, draw
call.
2016-10-29 11:04:51 +02:00
8a1b38f071 Cleanup: avoid using G.main. 2016-10-28 18:26:34 +02:00
216dec7eb1 Alembic Export: set start and end frame to that of the scene for
convenience.

Users will most likely export an entire animation rather than a single
frame, so it can save a few clicks.
2016-10-28 18:21:43 +02:00
65c481e145 CacheFile: fix missing depsgraph update. 2016-10-28 18:08:31 +02:00
194a33ff00 CacheFile: only enable scale property slider if we are editing the cache
through a constraint.

It doesn't make sense and is a bit confusing to have this property
enabled in the modifier context.
2016-10-28 18:08:30 +02:00
Nathan Letwory
03b8531cea Compile fix for Windows.
__inline instead of inline is needed.
2016-10-28 11:54:01 +03:00
216a3a3826 Fix T49743: Adding torus in edit mode local mode shows error
The 'local' layers were not correctly set when redoing 'add object'
addons using object_utils.py helper (we always want to restore layers
from view in local view, even if we set 'real' layers from operator
afterwards).
2016-10-27 13:23:29 +02:00
5f0933f07a Fix T49829: Removal of custom icon previews during add-on unregister crashes Blender.
Issue was happening when removal of custom icons was done while they
were still being rendered by preview job.

Now add a 'deffered deletion' system, to prevent main thread to delete
preview image until loading thread is done with them.

Note that ideally, calling `ED_preview_kill_jobs()` on custom icon
removal would have been simpler, but we don't have easy access to
context here...
2016-10-27 13:06:14 +02:00
f11298692b Cycles: More workarounds for weird crashes on AVX2
Oh man, is it a compiler bug? Is it something we do stupid?

For now more crap to prevent crashes. During the conference will talk to
Maxyn about how can we troubleshoot such weird issues.
2016-10-27 12:51:03 +02:00
7e380ad4c0 Cycles: Another attempt to fix crashes on AVX2 processors
Basically don't use rcp() in areas which seems to be critical after
second look. Also disabled some multiplication operators, not sure
yet why they might be a problem.

Tomorrow will be setting up a full test with all cases which were
buggy in our farm to see if this fix is complete.
2016-10-26 22:14:41 +02:00
de22e55291 Cycles: Fix compilation error of AVX2 kernel without SSE math 2016-10-26 20:49:33 +02:00
35f152358b Cycles: Completely disable transform SSE for now
Was causing issues on another frame.

On a tight schedule, disabling for now so artists are happy.

Still looking into root of the issue!
2016-10-26 15:23:58 +02:00
7c7d23691f Cycles: Fix crashes after recent optimization commits
There is some precision issues for big magnitude coordinates which started
to give weird behavior of release builds. Some weird memory usage in BVH
which is tricky to nail down because only happens in release builds and GDB
reports all variables as optimized out when trying to use RelWithDebInfo.

There are two things in this commit:

- Attempt to make vectorized code closer to original one, hoping that it'll
  eliminate precision issue.
  This seems to work for transform_point().
- Similar trick did not work for transform_direction() even tho absolute
  error here is much smaller. For now disabled that function, need a more
  careful look here.
2016-10-26 14:30:25 +02:00
72921a1e43 RangeTree API rewrite
Rewrite the current range-tree API used by dyn-topo undo
to avoid inefficiencies from stdc++'s set use.

- every call to `take_any` (called for all verts & faces)
  removed and added to the set.
- further range adjustment also took 2x btree edits.

This patch inlines a btree which is modified in-place,
so common resizing operations don't need to perform a remove & insert.
Ranges are stored in a list so `take_any` can access the first item
without a btree lookup.

Since range-tree isn't a bottleneck in sculpting, this only gives minor speedups.
Measured approx ~15% overall faster calculation for sculpting,
although this number time doesn't include GPU updates and depends on how
much edits fragment the range-tree.
2016-10-26 23:33:41 +11:00
44522a5b98 BLI_bitmap_draw_2d: optimize polygon filling
Existing method was fine for basic polygons but didn't scale well
because its was checking all coordinates for every y-pixel.

Heres an optimized version.
Basic logic remains the same this just maintains an ordered list of intersections,
tracking in-out points, to avoid re-computing every row,
this means sorting is only done once when out of order segments are found,
the segments only need to be re-ordered if they cross each other.

Speedup isn't linear, test with full-screen complex lasso gave 11x speedup.
2016-10-26 23:24:58 +11:00
8125271ddb Cleanup: rename functions in BLI_bitmap_draw_2d 2016-10-26 23:24:19 +11:00
3e36cbb3de Cleanup: move bitmap drawing into its own module
Bitmap drawing is out-of-scope for a general math API,
move to BLI_bitmap_draw_2d.
2016-10-26 20:11:09 +11:00
a1f137767f BMesh: edge-net split, edge selection error
In practice I couldn't make this cause a bug,
however it's a logical regression in fix for T48716.

Thanks to Francesc Juhe for finding.
2016-10-26 14:18:44 +11:00
bc71c2bf08 [msvc] make.bat - create a build.log in the build directory 2016-10-25 11:49:08 -06:00
f523fb43f9 Cycles: Fix for fix (tm)
Sorry guys, for some reason read the expression back-to-front
and did wrong fix :S
2016-10-25 18:29:13 +02:00
5c4113a3e4 Cycles: Fix typo in previous commit for BVH improvements 2016-10-25 18:06:38 +02:00
a39ab9cfde Fix T49815: Blender always reverts to RGBA when using Save As Image.
`BKE_imformat_defaults()` was doing some weird black magic based on
imbuf's channels, instead of merely copying imbuf's planes here...
2016-10-25 17:59:45 +02:00
cf9a6b416c API: Fix Links
Self-explanatory. to find broken links run `sphinx-build -b linkcheck sphinx-in sphinx-out`

Reviewers: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision: https://developer.blender.org/D2297
2016-10-25 17:34:01 +02:00
42a91f7ad8 Partial fix for T49836: Camera DOF properties not updating via graph editor
Do this for the new dependency graph: was missing handle of OB_UPDATE_TIME in tag update.

Hopefully it's all correct still.

Old dependency graph needs work, but i'm tempting to call it unsupported and move on
to 2.8 branch.
2016-10-25 16:53:13 +02:00
c54381488b Cycles: Enable SSE math optimization for AVX kernels
This gives about 5% speedup for AVX processors.

Benefit of such optimization on other microarchitectures is still
under investigation.
2016-10-25 16:10:47 +02:00
8c761ff838 Cycles: Use new SSE version of offset calculation for all QBVH flavors
Gives up to ~1% speedup again.

While it seems to be small, still nice since the code now is actually more
clean that it used to be before.
2016-10-25 15:27:50 +02:00
f7cf2f659a Cycles: Move QBVH near/far offset calculation to an utility function
Just preparing for new optimization to be used in all traversal implementation.

Should be no measurable difference.
2016-10-25 15:08:33 +02:00
064caae7b2 Cycles: BVH-related SSE optimization
Several ideas here:

- Optimize calculation of near_{x,y,z} in a way that does not require
  3 if() statements per update, which avoids negative effect of wrong
  branch prediction.

- Optimization of direction clamping for BVH.

- Optimization of point/direction transform.

Brings ~1.5% speedup again depending on a scene (unfortunately, this
speedup can't be sum across all previous commits because speedup of
each of the changes varies from scene to scene, but it still seems to
be nice solid speedup of few percent on Linux and bigger speedup was
reported on Windows).

Once again ,thanks Maxym for inspiration!

Still TODO: We have multiple places where we need to calculate near
x,y,z indices in BVH, for now it's only done for main BVH traversal.
Will try to move this calculation to an utility function and see if
that can be easily re-used across all the BVH flavors.
2016-10-25 14:47:34 +02:00
81c9e0d295 Cycles: Avoid branching in SSE version of intersection pre-calculation
Similar to the previous commit, avoid negative effect of bad branch prediction.

Gives measurable performance up to ~2% in tests here.

Once again, thanks to Maxym Dmytrychenko!
2016-10-25 14:18:32 +02:00
af411d918e Cycles: Implement SSE-optimized path of util_max_axis()
The idea here is to avoid if statements which could cause wrong
branch prediction.

Gives a bit of measurable speedup up to ~1%. Still nice :)

Inspired by Maxym Dmytrychenko, thanks!
2016-10-25 13:54:17 +02:00
3e71006448 CMake: Followup to previous commit, try to ensure -ldl is always last
Seems CMake will rearrange and copy libraries which are passed to the linker
when some of the libraries is listed twice (for example, -lz from png libraries
and -l for blender itself). This was causing libopenimageio to be added somewhere
at the end of linking flags without -ldl followed after which was causing linking
issues.
2016-10-25 10:22:03 +02:00
d2fe875f8c Fix possible compilation error with OIIO enabled
OIIO library has plugin API which uses dlopen()/dlclose() so need to
link OIO libraries against dl library.
2016-10-25 09:28:25 +02:00
10a25b655a Cycles: Add AVX2 path to subsurface triangle intersection
Similar to regular triangle intersection case. Gives about 3% speedup rendering
SSS object on my desktop,

Question: how to avoid such a code duplication in a nice way without speed loss?
2016-10-24 16:56:41 +02:00
da8f5d6eac Cycles: Don't use guarded vector for statically initialized data
This will confuse hell of a guarded allocators because it is possible
to have allocation happened prior to Blender's guarded allocator is
fully initialized.

This was causing crashes and assert failures when running blender
with fully guarded memory allocator.
2016-10-24 14:18:22 +02:00
14a55bc059 Cycles: Fix shadowing variable which also causes use of uninitialized variable
Was causing wrong aperture for panorama cameras.

Seems to be a regression in 371d357.
2016-10-24 14:04:31 +02:00
cde18cf3b3 Cycles: Fix static initialization order fiasco
Initialization order of global stats and node types was not strictly
defined and it was possible to have node types initialized first and
stats after that. This will zero out memory which was allocated from
the statistics causing assert failure when de-initializing node types.
2016-10-24 13:47:39 +02:00
963aa7e270 Cycles: Fix uninitialized variable from the previous commit 2016-10-24 12:54:24 +02:00
80a6e5beb5 Cycles: Remove explicit std:: from types where possible
We have our own abstraction level on top of the STL's implementation.
This commit will guarantee our tweaks are used for all cases.
2016-10-24 12:31:11 +02:00
48997d2e40 Cycles: Cleanup, style 2016-10-24 12:26:12 +02:00
3f29259676 Fix T49818: Crash when rendering with motion blur
It was possible to have non-initialized unaligned BVH split
to be used when regular BVH split SAH was inf. Now we ensure
that unaligned splitter is only used when it's really initialized.

It's a regression and should be in 2.78a.
2016-10-24 11:47:32 +02:00
1e1811357d Cycles: Cleanup, spaces 2016-10-24 11:47:32 +02:00
0b749d57ee Fix unlikely uninitialized pointer usage.
Reported by Coverity.
2016-10-24 10:25:58 +02:00
89a3b17853 Fix T49827L Crash linking material while in Material viewport shading mode
Material linking might and does change the way how drawObject is calculated
but does not tag drawObject for recalculation in any way.

Now use dependency graph to tag draw object for reclaculation. Currently do
this using OB_RECALC_DATA taq since tagging is not very granular yet. In the
future we can introduce ore granular tagging in the new dependency graph
easily.

Simple and safe for 2.78a.
2016-10-24 10:13:22 +02:00
c013280eec Fix mistake in BKE_mesh_new_from_object handling of materials in MetaBall case.
Typo, spoted by Coverity scan.

To be backported to 2.78a.
2016-10-24 10:06:00 +02:00
1d13950ae5 API doc: enable 'split index' option. 2016-10-23 17:48:31 +02:00
Quentin Wenger
e0a34e963f Displace modifier: add global/local space option for X/Y/Z/XYZ directions.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2309
2016-10-23 14:35:46 +02:00
35fde5ff7d System info: make it more resiliant to errors.
Using context manager for output file itself, and whole try/except block
to at least catch and print error in file.

Also some minor tweaks to previous 'list add-ons' commit.
2016-10-23 13:12:58 +02:00
5d2620e9c2 System info: also report enabled add-ons.
Based on idea & patch by @lijenstina over IRC (iirc :/ ).
2016-10-23 13:05:47 +02:00
672e906d49 Add a built-in sphinx extension to allow cross-linking to the blender manual.
This works by downloading the objects.inv file (https://www.blender.org/manual/objects.inv)
and using it to resolve links with blender-manual: before them.
2016-10-23 11:15:52 +02:00
Hristo Gueorguiev
8905c5c874 Cycles: OpenCL 3d textures support.
Note that volume rendering is not supported yet, this is a step towards that.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2299
2016-10-22 23:49:29 +02:00
371d3570e0 Fix Cycles address space OpenCL error after recent fix. 2016-10-22 23:36:30 +02:00
5765deecd4 GPencil: New option to lock strokes to axis
Now, the strokes can be locked to a plane set in the cursor location.
This option allow the artist to rotate the view and draw keeping the
strokes flat over the surface. This option is similar to surface option
but doesn't need a object.

The option is only valid for 3D view and strokes in CURSOR mode.
2016-10-22 16:44:39 +02:00
9d0ac94d52 Fix T49750: Cycles wrong ray differentials for perspective and stereo cameras. 2016-10-22 16:37:26 +02:00
b5d527ff6c Fix T49656: Crash when starting playback while using JACK audio with A/V sync
When ED_screen_animation_play is called from wm_event_do_handlers,ScrArea *sa = CTX_wm_area(C); is NULL in ED_screen_animation_timer.
Informing the audio system in CTX_data_main_set, that a new Main has been set.
2016-10-22 15:00:32 +02:00
132478d4b8 Fix T49657: Audio backend "Jack" should be named "JACK". 2016-10-22 14:20:47 +02:00
d5ee031f76 Fix T49764: Audio strips crackle when animating the volume
- Implemented linear interpolation for volume changes in the software
mixer.
- Using this in the software device.
2016-10-22 13:39:55 +02:00
fd4caafc53 Fix T49789: Compositor mix node interpolation bug 2016-10-21 17:58:37 +02:00
b51874437d Fix T49804: Display grid Scale/Subdivision are sometimes disabled in View3D when they should not.
Not really possible to precisely detect all cases in which they should or
should not be active, but at least now it won't show as disabled when it
actually has some effects.
2016-10-21 16:06:53 +02:00
f7ce482385 Cycles: Fix another OpenCL logging issue
Previously an error message would be printed whenever the OpenCL build produced output.
However, some frameworks seem to print extra information even if the build succeeded, so now the actual returned error is checked as well.
When --debug-cycles is activated, the build output will always be printed, otherwise it only gets printed if there was an error.
2016-10-21 02:49:00 +02:00
0c4d949eff Alembic: only export custom data (UVs, VCols) once, on the first frame.
This would cause Alembic to throw an exception and fail exporting
animations because it was trying to recreate and overwrite the
attributes for each frame.
2016-10-20 19:43:22 +02:00
32c2cba4ef Fix T49797: Exception from scene update handler might leak external engine descriptors
This was causing memory leaks in Cycles.

Some more detailed information in the comment in the code.

Seems to be safe and nice enough for 2.78a.
2016-10-20 13:33:47 +02:00
christian brinkmann
2cd6a89d07 Python API: add full_path parameter for bpy.ops.ui.copy_data_path_button.
Also use the operator as part of the UI keymap now, to deduplicate code and let
users configure a custom shortcut.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2303
2016-10-20 00:31:08 +02:00
789ea7397f Fix T49793 : Fix enabling SSE2 globally for msvc.
When feeding msvc both /arch:sse2 and /arch:sse it's not smart enough to pick the best option, just goes with the last option
2016-10-19 10:06:45 -06:00
417847c161 Fix T49775: Appending data with internal dependency cycles prevents correct clearing of linked data-blocks.
This is not a simple fix, but imho still needs to be backported to 2.78a...
2016-10-19 14:32:08 +02:00
82f842c27f [msvc] Minor cleanup in blenkernel.
this patch resolves the following warnings;

```
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	764
Warning	C4098	'attach_stabilization_baseline_data': 'void' function returning a value		blenkernel\intern\tracking_stabilize.c	139
Warning	C4028	formal parameter 3 different from declaration		blenkernel\intern\cachefile.c	148
Warning	C4028	formal parameter 3 different from declaration		blenkernel\intern\paint.c	413
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\editderivedmesh.c	591
Warning	C4028	formal parameter 3 different from declaration		blenkernel\intern\library_remap.c	709
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	754
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	758
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	759
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	763
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	764
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	765
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	769
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\ocean.c	770
Warning	C4028	formal parameter 1 different from declaration		blenkernel\intern\DerivedMesh.c	3458
```

It's mostly things where the signature in the .h and the actual implementation in the .c do not match.  And a bunch functions who do not match the TaskRunFunction declaration cause they leave out the __restrict keyword.

Reviewers: brecht, juicyfruit, sergey

Reviewed By: sergey

Subscribers: Blendify

Differential Revision: https://developer.blender.org/D2268
2016-10-18 09:51:33 -06:00
3541f7c47d [windows] Create A Blender Desktop Shortcut in the msi installer , fixes T49522 2016-10-18 09:23:45 -06:00
7500f6c9d9 Fix: Append 'Object proxy' hack checking for local/linked usages before those flags were set!
Dummy mistake, to be backported to 2.78a.
2016-10-18 14:17:10 +02:00
ab4c921e82 Clarified warning in EnumProperty
Blender doesn't necessarily crash when Python doesn't keep references to
the returned strings. As a result, someone that implements this incorrectly
could be lulled into a false sense of correctness by Blender not crashing.
2016-10-18 11:24:33 +02:00
Dalai Felinto
cccd3eb5a8 Fixup for doversion (rB8d573aa0 and rBa7e74791) 2016-10-17 19:45:34 +00:00
5e92a0faad Fix T49722: Appending Bug (Groups).
One day we'll have to reconsider why some many 'real' ID usages are not
refcounting... :(

To be backported to 2.78a.
2016-10-17 15:00:31 +02:00
c2d0832c6e UV Editor: Add filter option to control what is visible when Draw Other Objects is enabled
Previously the editor will always try to only show UV faces with the same exact active
image or image texture, which is quite difficult to control on a production shaders, where
each material can have multiple objects assigned.

The idea of this commit is to bring option which allows to easily control what to display
when "Draw Other Objects" is enabled, so currently we can have old behavior ("Same Image")
or tell editor to show everything ("All"). In the future we can extend it with such filters
as "Same Material" and things like that.

Hopefully this will help @eyecandy's workflow of texturing.
2016-10-17 14:28:16 +02:00
7f19c4fdf9 Fix T49738: Hair Add Brush doesn't work
the issue was caused by wrong default value for brush particle count
which was clamped on display from 0 to 1. This is technically a regression
but how to port this to 2.78a?
2016-10-17 12:38:54 +02:00
cd843409d3 Fix T49630: Cycles: Swapped shader and bake kernels
The problem here was, as the title says, that the two kernels were swapped.
Since shader evaluation is only used for building the samling map when World MIS is enabled, rendering without it would still work fine, although baking also was broken.
2016-10-17 12:28:01 +02:00
d5dd12e56c Cycles: Improve OpenCL kernel compilation logging
The previous refactor changed the code to use a separate logging mechanism to support multithreaded compilation.
However, since that's not supported by any frameworks yes, it just resulted in bad logging behaviour.
So, this commit changes the logging to go diectly to stdout/stderr once again by default.
2016-10-17 11:51:18 +02:00
2a6ec00b9b Fix T49746: crash loading user preferences with missing operators. 2016-10-16 21:24:42 +02:00
Julian Eisel
2a53e0975c More fixes for keyframe theme options
Couple of issues here:
* Missing initialization for 3D view keyframe options for "Reset to Default Theme"
* Alpha values not reset correctly on "Reset to Default Theme"
* Alpha values of timeline keyframe options not reset correctly for old files
Also corrected old version patches even though they're overridden later, to avoid more issues in case people copy this code.

Corrections to d7af7a1e04 and 8d573aa0ec
2016-10-16 21:08:34 +02:00
Chase Willden
ad393e1e75 Fix assert in the wrong place, should be moved earlier to do anything.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2304
2016-10-16 16:02:31 +02:00
Julian Eisel
d59079c5e1 Cleanup: Unused parameters in Outliner
These were only passed to own recursion calls.
2016-10-16 15:19:18 +02:00
Julian Eisel
b659cb8dbc Fix missing outliner redraw when adding VSE strip
Needed for outliner "Sequence" display mode.
2016-10-16 14:39:06 +02:00
Scott Wu
7fec7eee20 Cycles: use near clipping distance in panorama camera.
Reviewed By: sergey, brecht, dfelinto

Differential Revision: https://developer.blender.org/D1952
2016-10-15 00:26:59 +02:00
05c727bb00 Prevent crash after OpenGL rendering animation to images. 2016-10-14 18:46:28 +02:00
8e80d2741d Fix T49571: 2d stabilize keys not visible in the Graph Editor and Dope Sheet 2016-10-14 17:22:57 +02:00
0ddb8d9b13 Cycles: Disable optimization of operator / for float3
This was giving some speedup but made intersection tests to fail
from watertight point of view.

Needs deeper investigation, but need to quickly get it fixed for
the studio.
2016-10-14 13:53:26 +02:00
3055ae5092 Fix T49657: Audio backend "Jack" should be named "JACK". 2016-10-14 13:22:22 +02:00
49c2dbc5db Fix T49601: Material menu length problem.
Regression from rB69b66d549bcc8, was supposed to be non-functionnal
change, so not sure why search menu was reduced here? For now, restore
to 2.77 width.
2016-10-14 10:29:51 +02:00
87a7149831 BPY Docs: Correct spelling (Addon --> Add-on)
Differential Revision: https://developer.blender.org/D2293
2016-10-14 01:25:05 +02:00
dc60fdd671 Fix T49646: Switching from large to small image can get stuck zoom at max zoom distance.
Allow for zooming in at max zoom distance.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D2291
2016-10-14 01:07:18 +02:00
625b504b23 Fix T49534: 2.78 Wrong texture scaling in material viewport
Seems to be a bug in original implementation of a830280: code was always
using tangent space instead of UV map because it had the same name. Now
prefer UVMap over tangent because this is how Cycles works. At least it's
closer to.

Not sure it the save+reload issue is still relevant after this fix, that
needs to be double-checked.

Thanks @dfelinto for looking into the report and simplifying the case.

Should be included into 2.78a.
2016-10-13 18:35:11 +02:00
02a1f15416 Fix OLD pre-git links in the API, add missing factory-startup option to blender executions.
Reviewers: mont29

Reviewed By: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision: https://developer.blender.org/D2290
2016-10-13 17:53:30 +02:00
78817ae95c Prevent problems when appending scene with referenced proxy
Such a "referenced proxy" could be a proxy that is used in a constraint on
another object. Brings back part of 1cdc54dc7d but without the
memory leak.
2016-10-13 17:06:24 +02:00
6027550e83 Usual UI/i18n tweaks & fixes. 2016-10-13 16:20:51 +02:00
6917de6919 Fix: Grease Pencil palettes were missing a RNA path callback 2016-10-14 01:19:30 +13:00
5c651554e2 Proxy appending: re-establish link to proxies when they are made local
This allows appending of an entire scene from another blend file into this one,
even when that blend file contains proxified armatures.

This replaces the approach from commit 1cdc54dc7d.

Thanks @sergey for the help.
2016-10-13 14:10:46 +02:00
918e6cf4c9 Fix T49635: column_flow Layout - last column is too small.
Column flow layout was abuse ui_item_fit in a weird way, which was
broken for last column items.

Now rather use own code, which basically spread available width as
equally as possible between all columns.
2016-10-13 10:23:24 +02:00
786c0966ec Cleanup: UI layout: remove unsed and confusing parameter.
Things are complicated enough like that, no need to add useless noise on
top of it!
2016-10-13 10:23:24 +02:00
Dalai Felinto
8d573aa0ec wrong alpha set for timeline theme (fixup for rBf329ebe3) 2016-10-13 00:28:07 +00:00
2d03edb458 Fix T49631: radial control operators not using DPI properly. 2016-10-12 20:21:39 +02:00
7f5441b916 Fix T49640: Cycles constant folding incorrect for texture coordinates. 2016-10-12 18:42:38 +02:00
21e65d7457 Fix build error with WITH_CYCLES_NATIVE_ONLY and recent AVX2 changes. 2016-10-12 17:35:03 +02:00
5f16382195 Fix T49636: material draw mode crash with displacement and missing group input node. 2016-10-12 16:52:42 +02:00
a54242503e FFmpeg: Fix off by one error in number of detected frames in matroska container
Seems to be rounding error. Hopefully new code handles the error fixed back in
SVN revision 28901 and still have proper frame number for Hjalti.

What could possibly go wrong here..
2016-10-12 16:17:43 +02:00
22cdf44101 Cycles: Use const reference for register variables in non-OpenCL code
This is something tested by @LazyDodo and suggested by Maxym to make
MSVC happier.
2016-10-12 14:48:59 +02:00
e588106d45 Cycles: Use more SSE intrinsics for float3 type
This gives about 5% speedup on AVX2 kernels (other kernels still
have SSE disabled for math operations) and this solves the slowdown
of koro scene mention in the previous commit.

The title says it all actually. This commit also contains
changes to pass float3 as const reference in affected functions.

This should make MSVC happier without breaking OpenCL because it's
only done in areas which are ifdef-ed for non-OpenCL.

Another patch based on inspiration from Maxym Dmytrychenko, thanks!
2016-10-12 14:43:00 +02:00
42aeb608e7 Cycles: Implement AVX2 version of triangle_intersect
This commit basically vectorizes existing code using AVX2 instructions
(without modifying algorithm itself). This gives quite nice speedups:

  BMW:        -8%
  Classroom:  -5%
  Cat:        -5%
  Koro:       +1%
  Barcelona:  -8%

That's on Linux machine, reported performance improvement on Windows
goes up to 20%.

Not currently sure why Koro is somewhat slower because it mainly uses
curve intersection tests, could be a time noise? Or osmething with the
cache utilization perhaps? In any case speedup in other scenes makes
me thinking that current state is acceptable for initial implementation.

This is again inspired by Maxym Dmytrychenko.
2016-10-12 14:11:55 +02:00
6a4ec3ca43 Cycles: Add new avxf vectorized data type
Based on existing ssef data type and to my knowledge it's also what happens in
Embree nowadays.

Inspired by Maxym Dmytrychenko and required for the upcoming triangle
intersection commit.

Hopefully the copyright message is correct.
2016-10-12 13:54:13 +02:00
fa62a989b4 Cycles: Enable SSE options of math module for AVX2 kernels
Currently this does not give measurable difference, but is required
ground work for some upcoming further optimization of AVX2 kernels.
2016-10-12 12:54:31 +02:00
87d08a5dc1 Cycles: Get rid of ifdef-ed noinline policy 2016-10-12 12:15:24 +02:00
cc95172667 Cycles: Fix use of uninitialized variable in SSS
When ray hits curve segment with SSS shader it was possible to have
uninitialized hit_P variable used for sampling.

Seems that was a reason of our headache of difference between AVX2
and SSE4 render results here, so now we can revert all the nasty
ifdef-ed inline policies.
2016-10-12 12:12:28 +02:00
edd9d89673 Cycles: Cleanup, style 2016-10-12 11:54:33 +02:00
acbbcdfbb8 Fix T49622: Grease pencil not rendering out of VSE 2016-10-12 10:01:30 +02:00
dc95c31372 Fix T49502: file browser on OS X not highlighting external drives. 2016-10-12 00:07:52 +02:00
06215c71c0 Fix T49629: Graph editor normalize function doesn't work on f-curves with a constant key value
Technically it is a regression in behavior and should be 2.78a.
2016-10-11 17:08:00 +02:00
17603b9f01 Fix objects added via py being on the wrong layer when viewport is decoupled from scene 2016-10-11 15:35:14 +02:00
5322ff3b48 Make console message more clear for --scene argument 2016-10-11 14:48:15 +02:00
4370f8ffbd Fix T49623: Immediately crash trying to render attached file in Cycles
Original fix in this area was not really complete (but was the safest at
the release time). Now all the crazy configurations of slots going out
of sync should be handled here.
2016-10-11 11:55:11 +02:00
3e460b68d9 install_deps.sh: remove libglewmx from deb for now, the package is broken in deb testing... 2016-10-10 19:29:55 +02:00
611a9b1bda install_deps.sh: first attempt to support cxx11.
For now, we merely add an option that sets CXXFLAGS envvar with
'--std=c++11' option.

There is no check done to ensure compatibility with the system
libraries, mainly because:
  - It is all but trivial to get this information in a generic and
    reliable way.
  - Currently even cutting edge distributions may still distribute some c++98
    libraries.
  - With recent stdlibc++, both ABIs are supported together, which means
    that incompatibilities are rather unlikely.

To summarize: if your system is recent and built with gcc-5.1 or more,
you should not experience too much troubles with c++11.
2016-10-10 19:29:55 +02:00
cf449d377b OpenGL animation: Fix stupid mistake form previous commit
Flagging of pool to cancel was done in the wrong place, making last
frames missing in the final video.
2016-10-10 15:52:10 +02:00
f36543c5f5 Fix viewport camera gets out of sync in certain cases
It was possible to have two viewports opened and start using Ctrl-0
to make different objects an active camera for the viewport. This
worked fine for viewports which had decoupled camera from the scene,
but if viewport was locked to scene camera it was possible to run into
situation when two different viewports are locked to scene camera but
had different v3d->camera pointers.
2016-10-10 15:05:05 +02:00
54dad5c49f OpenGL render: Fix missing file output after pressing Esc
Apparently, the whole G.is_break is not used by OpenGL render, meaning
this flag will not be clear before running the operator. This was
causing missing file output after pressing Esc once for the rest of
Blender session.
2016-10-10 12:51:01 +02:00
109192b360 OpenGL: remove GLSL support query (it's always supported) 2016-10-10 01:28:30 -04:00
ba5e2270f9 remove call to GLSL support query (it's always supported)
Reworked logic in the one place that still called this. Deleted the "GLSL not supported" fallback.

(equivalent to rB78abbdf26451 on blender2.8 branch)
2016-10-10 01:28:02 -04:00
33ef28068a BGE: remove calls to GLSL support query (it's always supported)
Reworked logic in the few places that still called this. Deleted the "GLSL not supported" fallbacks.

Also removed some nearby checks for ARB_multitexture and OpenGL 1.1. Blender 2.77 removed checks like this, but game engine still has some.
2016-10-10 01:19:10 -04:00
9ea71bc674 Cycles: Split device_opencl.cpp into multiple files for easier maintenance
There are no user-visible changes, just some internal restructuring.

Differential Revision: https://developer.blender.org/D2231
2016-10-09 15:49:50 +02:00
1fad269d07 Fix T49609: Point density textures: vertex colors are not properly averaged in BI
Nice to have in 2.78a, though not a regression.
2016-10-09 13:17:09 +02:00
4cb60b14e0 CMake changes for new macOS target 10.9 / libc++ libraries.
Differential Revision: https://developer.blender.org/D2283
2016-10-09 01:54:29 +02:00
c275870673 Ammend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.
This code is confusing, such dirty details should not sneak out of
particles' own private code. :(
2016-10-08 19:13:50 +02:00
00dc0666b3 Fix T49608: runtime-only particle's boid->ground Object pointer was left dangling to invalid value in read code... 2016-10-08 15:20:43 +02:00
74e0f900c5 Fix a few compile errors with C++11 on macOS. 2016-10-08 15:03:53 +02:00
0fe7446a30 BLI_task: fix case were some pool could work in more threads than allowed.
We were checking for number of tasks from given pool already active, and
then atomically increasing it if allowed - this is not correct, number
could be increased by another thread between check and atomic op!

Atomic primitives are nice, but you must be very careful with *how* you
use them... Now we atomically increase counter, check result, and if we
end up over max value, abort and decrease counter again.

Spotted by Sergey, thanks!
2016-10-08 14:51:33 +02:00
0a2a006775 Collision: skip expensive BVH update if the collider doesn't move.
Since the collision modifier cannot be disabled, it causes a constant
hit on the viewport animation playback FPS. Most of this overhead can
be automatically removed in the case when the collider is static.

The updates are only skipped when the collider was stationary during
the preceding update as well, so the state is stored in a field.
Knowing that the collider is static can also be used to disable similar
BVH updates for substeps in the actual cloth simulation code.

Differential Revision: https://developer.blender.org/D2277
2016-10-07 21:47:00 +03:00
2dccf5a6e8 Cycles: Fix OpenCL split kernel compilation after recent CUDA 8 performance fix 2016-10-07 18:50:43 +02:00
8e586c594f OpenGL render: Limit number of scheduled frames for write
Previously if the rendering is much faster than saving (for example,
when transcoding stuff via VSE) it was possible to have 100s of frames
in memory.

This isn't ideal because of limited amount of RAM, so need to have
some sort of limit. This is exactly what is implemented in this commit.
2016-10-07 17:46:13 +02:00
ae2471b850 OpenGL render: Fix non-deterministic order of frame writes for movies
By the design of task scheduler it was possible that tasks from somewhere
in the middle of scheduled list will be handled first.

For example, one thread might be iterating over the scheduled list and
ignore tasks because there is other thread is working on task from the
same pool. However, if that other thread finishes task before iteration
is over current thread will pick up task from somewhere in in the middle
of the list.

This isn't a problem in general case, but for movie rendering we do need
to have strict order of frames.
2016-10-07 17:12:27 +02:00
09b9e462b9 OpenGL: Don't write frames when rendering was canceled 2016-10-07 16:51:19 +02:00
c67a8acc72 Cleanup: Use more clear name for where allocation is coming from 2016-10-07 16:06:24 +02:00
33297db9de OpenGL: Do not schedule new frames for write if error happens
Also do not attempt to write any already scheduled frames.
2016-10-07 16:05:51 +02:00
90f5e61b72 Proxied → Proxified 2016-10-07 13:33:43 +02:00
1cdc54dc7d Re-establish link to proxies when they are made local after appending.
This allows appending of an entire scene from another blend file into
this one, even when that blend file contains proxified armatures.

Since the proxified object needs to be linked (not local), this will
only work when the "Localize all" checkbox is disabled. The appended
proxy object should also not be referenced from anything in a library
(for example in a constraint). Referencing it from the appended data
should be fine.

Fixes T49495.
2016-10-07 13:08:50 +02:00
0f88a3546c Datablock management: remove 'proxy_from' pointer from 'is ID used' checks.
Pretty much same reason as for the 'from' pointer of shapekeys - runtime
data creating loops and 'ghost' dependencies between datablocks.

We need to handle them in cases like remapping, but whall not take them
into account to check dependencies between datablocks... :/
2016-10-07 10:20:40 +02:00
e7981a3e93 Fix T49595: bpy - negative skin_vertices radius crashes Blender
This is unsigned value (negative radius does not have much sense anyway!).
2016-10-07 10:19:22 +02:00
Julian Eisel
ec6b593072 Fix wrong separator line width after drawing vec icon
Was visible in Dynamic Context Menu add-on.
2016-10-06 22:45:12 +02:00
b859557115 GPencil: Fix interpolate stroke keymap conflict with sculpt
The initial idea was to use Ctrl+E to interpolate stroke because this is
similar to Pose breakdown, but the Ctrl+E keymap is used to inverse
grease pencil sculpt effect.

The new keymap is Ctrl+Alt+E in order to fix the conflict
2016-10-06 22:21:10 +02:00
5a0f397eaa Fix T49523: very slow normal map tangent computation for rendering in 2.78. 2016-10-06 03:12:04 +02:00
3caa830c11 Fix T49501: Animations imported via alembic render with wrong or no motion blur 2016-10-05 12:37:09 +02:00
4f1f949877 [msvc] make.bat, no need to set the cuda path at all, cmake will figure it out on it's own. 2016-10-04 13:30:38 -06:00
cd320dbfba [msvc] make.bat remove mixed cuda 7.5/8.0 build for release since all kernels can now be properly build with 8.0 2016-10-04 11:51:04 -06:00
b7046b42ab Cleanup: Update links to online py API doc, and remove old commented stuff. 2016-10-04 16:45:29 +02:00
e5c3284467 Fix T49553: Blender 2.78 crashes when File->Data Previews ->Refresh Datablock Previews
New recursive iteration over IDs in BKE_library_foreach_ID_link() was
broken by the infamous nodetree case. We cannot really recusively call
this function in that case, so better to deffer handling of
non-datablock NodeTrees as if real IDs here.

Also fixed initial ID not being stored as handled, in rare cases this
could also lead to infinite looping.

To be backported to 2.78a.
2016-10-04 15:05:56 +02:00
b4f9766ed1 Cycles CUDA: make CUDA 8.0 the officially supported version for all platforms. 2016-10-03 22:15:26 +02:00
a3abb020e3 Fix Cycles CUDA performance on CUDA 8.0.
Mostly this is making inlining match CUDA 7.5 in a few performance critical
places. The end result is that performance is now better than before, possibly
due to less register spilling or other CUDA 8.0 compiler improvements.

On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory
usage is reduced a little too.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2269
2016-10-03 22:15:25 +02:00
49ad4215ba Fix fluid sim build error with MSVC. 2016-10-03 22:15:24 +02:00
Julian Eisel
103fbb3afc Fix memory leak caused by unknown opeartor of keymap item 2016-10-03 18:09:22 +02:00
b9e82b5bfb Fix T49548: Entering Cycles Rendered Viewport Unlinks Material from Objects.
We *always* want to increase mat user count when from Object (and not
Data), because in that case we are moving mat from object to temp
generated mesh, material can never be 'borrowed' in that case.

To be backported to 2.78a
2016-10-03 17:38:14 +02:00
Julian Eisel
853d232928 Fix missing operator-type registration
Removed in a7dbc0704f, but only should've removed default keymap entry.
2016-10-03 16:34:51 +02:00
Julian Eisel
e8c8db4833 Fix T49506: Remove unused File Browser theme settings
If I didn't miss anything these are indeed not used. Old themes should still work (will only print info on redundant theme defines into console), but updated non-contrib themes already.
2016-10-03 13:47:00 +02:00
c5e10394b4 Fix missing new eyedropper keymap entry in keyconfig_utils.py
Missing from rBe9bcdcdbbd91d9.
2016-10-03 12:29:18 +02:00
3ee5ce155c [Windows/Cycles/Clang] Fix compilation error with clang-cl on windows 2016-10-02 14:01:23 -06:00
3f9b69287d Fluids: improve multithreaded CPU usage.
Fixes for clamp-omp, fewer shared variables, fix some cases of threads writing
to the same memory location. Issue found by Jens Verwiebe, who reports 30%
speedup with 16 core CPU, when using this with a recent clang-omp version.
2016-10-02 16:38:14 +02:00
641e586b15 Fix T49520: broken vertex colors in the game engine. 2016-10-01 22:41:46 +02:00
fd2bffd22e [Fix unreported bug] Snap align with normal was not working in derivade mesh
The `use_snapp_align_rotation` option was using only the first vertex
2016-10-01 16:50:34 -03:00
11e93c5f2b [msvc] make.bat - Fix:msbuild platform wasn't set when the architecture was auto detected. 2016-10-01 11:22:09 -06:00
ad23ee761b Fix T49502: file browser on OS X not highlighting system folders and bookmarks. 2016-10-01 19:15:57 +02:00
4a423862e9 [MSVC] Make.bat updates.
- Explicitly specify the platform for msbuild, to facilitate builds with just the Visual C++ Build Tools installed.
- When vs2013 is not found, try looking for 2015 as a fallback
- Clear up any batch variables that might have been set from previous runs
2016-10-01 10:22:28 -06:00
15e756c584 Fix wrong Cycles GLSL pointiness, still not supported but should be neutral 0.5. 2016-10-01 14:47:05 +02:00
40eedd5df9 Cycles: implement partial constant folding for exponentiation.
This is also an important mathematical operation that can be folded
if it is known that one argument is a certain constant. For colors
the operation is provided as a Gamma node.

The SVM Gamma node needs a small fix to make it follow the 0 ^ 0 == 1
rule, same as the Power node, or the Gamma node itself in OSL mode.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2263
2016-10-01 14:37:03 +03:00
Sebastian Witt
95fa303efd Add default UV coordinates for torus primitive.
Fixes T47489.

Reviewed By: brecht
2016-10-01 01:56:16 +02:00
20c6d5e3cb Fix MSVC compiler warning due to using */* to start comment. 2016-10-01 01:55:34 +02:00
70a40ff65a Cleanup: Naming in EditNormals modifier 2016-09-30 12:15:18 +02:00
6a4ca1e5c0 Normal edit modifier: Fix relation builder for the new dependency graph 2016-09-30 11:13:28 +02:00
eb9521ae04 Depsgraph: Report proper error when modifier fails to create relation link 2016-09-30 11:05:01 +02:00
5845d52bf3 CUEW: Use latest upstream version
Fixes typo in README :)

Thanks to @jesterKing!
2016-09-30 10:36:11 +02:00
85d543b4ac Fix T49489: Pose marker in camera action + marker bound to camera -> crash.
'camera' Object pointer of TimeMarkers is a 'temp' hack since Durian project...
Would need to be either made definitive now, or removed/reworked/whatever.

But since we intend to use that object pointer for other needs, and current code
could lead to crashing .blend files, for now let's fix that mess (was missing
some bits in read code, and also totally ignored in libquery code).

Should be safe for 2.78a.
2016-09-30 10:14:12 +02:00
396a6d8a86 UPBGE: Fix crash when calling shade_light texture when mtex has no tex. 2016-09-30 07:41:18 +02:00
80837d06de Cycles: Support earlier tile rendering termination on cancel
It will discard the whole tile, but it's still kind of more friendly than
fully locked interface (sort of) for until tile is fully sampled.

Sorry if it causes PITA to merge for the opencl split work, but this issue
bothering a lot when collecting benchmarks.
2016-09-29 16:00:25 +02:00
333366dbcf Cycles: Fix typo in shader cancel routines 2016-09-29 15:48:10 +02:00
57a2015f56 Adopt referenced scene in the context when evaluating sequences within a Scene Strip
This change makes it so that when the sequences within a Scene strip are
evaluated, they use the Scene that they come from as the context as opposed
the Scene that the Scene strip is in. This is necessary, for example, in the
case of the MulticamSelector where it needs to reference strips in the original
Scene as opposed to the Scene where the Scene strip is located.

Patch by @Matt (HyperSphere), thanks!
2016-09-29 15:00:03 +02:00
31ebbe40a0 Cycles: Improve OpenCL line information handling
Previously it was falling back to just a path after #include
statement was finished. Now we fall back to a proper current
file name after dealing with the preprocessor statement.
2016-09-29 10:20:24 +02:00
94c919349b Cycles: Cleanup file headers
Some of the files were wrongly attributing code to some other
organizations and in few places proper attribution was missing.

This is mainly either a copy-paste error (when new file was
created from an existing one and header wasn't updated) or due
to some refactor which split non-original-BF code with purely
BF code.

Should solve some confusion around.
2016-09-29 10:11:40 +02:00
8deddba392 Update source tgz builder script
Was broken since splitting BKE_blender_version from BKE_blender.
2016-09-29 10:05:42 +02:00
78c380d3b8 [MSVC] make.bat updates.
- The build folder name used to be depended on the order of the parameters, this is now normalized to
"build_windows_[Release/Full/Lite/Headless/Cycles/Bpy]_[x86/x64]_vc[12/14]_[Release/Debug]" regardless of the order of the parameters.

-Use CUDA8 for all kernels when building the release convenience target with visual studio 2015
2016-09-28 19:57:25 -06:00
f1de438bba Revert "[Windows/MSVC] Blosc doesn't require debug libraries."
turns out it's a C++ lib now-days and it *DOES* require debug libs.

This reverts commit bde5eb8b63.
2016-09-28 17:27:35 -06:00
26d7d995db Fix Windows mouse wheel scroll speed
In Windows, event dispatching code is throwing out the wheel scroll count value.
Despite of how many fast you move the wheel, it only make one-notch scroll event.

This patch convert wheel event to multiple 1-notch wheel events.

This also correct the handling of smooth scroll mouse wheel (which can report smaller than 1-notch wheel movement) by accumulating the small wheel delta values.

Reviewers: djnz, shadowrom, elubie, #platform:_windows, sergey, juicyfruit, brecht

Reviewed By: shadowrom, elubie, #platform:_windows, brecht

Subscribers: dingto, elubie, brachi, brecht

Differential Revision: https://developer.blender.org/D143
2016-09-28 17:22:02 -06:00
344a669c41 Fix T49478: triangulate of face hangs Blender.
Another case of float imprecision leading to endless loop. INcreasing a bit 'noise threashold' seems to work OK.

Not a regression, but might be nice to have in 2.78a.
2016-09-28 20:05:46 +02:00
0ec87f1227 Cycles: Cleanup, indentation 2016-09-28 17:05:33 +02:00
e1bfb89da2 Cycles: Fix compilation error with minimal feature set 2016-09-28 17:03:59 +02:00
c5d7602925 Fix T49471: Vertex Connect randomly broken.
Not sure where this comes from, but code was converting BMEdge* to BMVert* to check oflags,
i.e. not accessing correct memory.

Regression, to be backported to 2.78a.
2016-09-28 16:58:11 +02:00
305fec8358 Fixes for pose library change 601ce6a89c
Apparently the keying sets system doesn't support subclassing
KeyingSetInfo subclasses. I have added a note to the top of the file to
indicate this to future developers.
2016-09-28 15:40:22 +02:00
dea7ef4dd9 Curve pinning: Allow pinning object data without animated object
Special case, so now we can pin tricky cases like animated camera DOF
without requiring to have animation on the object level.
2016-09-28 15:25:05 +02:00
cbd3827d83 Fix T49460: Particle group instance 'Use Count' value gets reset on file-load.
Regression caused rBbcc863993ad, write code was assuming dw->ob was always valid,
wich is no more the case right after reading file e.g.

Another good example of how bad it is to use 'hidden' dependencies between datablocks. :(
And another fix to be backported to 2.78a. :(((
2016-09-28 15:08:45 +02:00
601ce6a89c POSELIB_OT_pose_add: only create keyframes for selected bones.
Previously the pose library used the WholeCharacter key set, which ignores
selection and add keys for almost all bones in the rig. This is a very
slow operation on complex rigs. With this patch, only selected bones are
keyed, defaulting to keying all bones when none are selected.

Note that this fixes the FIXME previously mentioned in the source.
2016-09-28 13:54:57 +02:00
Julian Eisel
dbb8222baa Fix missing properties editor update when changing 3D View camera
Actually two errors here:
* Properties editor wasn't refreshing on (NC_SCENE | ND_RENDER_OPTIONS) notifiers
* Was using notifier info bits wrongly, needs to send two separate notifiers

Decided to remove ND_RENDER_OPTIONS rather than adding properties editor scene context refresh for it, this is more than a render option change.
2016-09-28 00:53:59 +02:00
13a4147c17 Dynamic Paint: Don't store duplicate adjacency links.
Duplicates can happen at UV seams in case of resolution mismatch
or other complications. It's better not to store them in case it
confuses some math later on.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D2261
2016-09-27 21:54:54 +03:00
9a66d0ad1b Dynamic Paint: Fix adjacency computations at UV seams.
1. When adding one pixel border to UV islands prefer grid directions.
   This is more logical as it means neighbor pixels will commonly
   share a border, opposed to just corners.
2. Don't subtract 0.5 when converting float UVs to int in computing
   adjacency across a UV seam. Pixels cover a square with corners
   at int positions and adding/subtracting 0.5 is only for dealing
   with the center point of a pixel.
3. Use the neighbour_pixel field from the correct pixel, and check
   it's not back to the origin point.
4. In the connected UV case, ensure that the returned index actually
   refers to a valid active pixel.

This fixes paint spread not traversing some UV seams, while at the
same time spreading to random unrelated points on other seams.
The first problem is primarily fixed by 2, while the second one
is addressed by item 4.

Differential Revision: https://developer.blender.org/D2261
2016-09-27 21:54:54 +03:00
bde5eb8b63 [Windows/MSVC] Blosc doesn't require debug libraries. 2016-09-27 10:24:09 -06:00
dd0de53d29 Fix T49466: Stupid typo in logicbricks new copy code from rB776a8548f03a
Moved that code forth and back a few times while creating rB776a8548f03a fix,
ended up forgetting to update it correctly for function where it layed down in the end.

Last-minute fixes are never a good thing... Now we already have real reason for 2.78 'a' release :(
2016-09-27 17:55:12 +02:00
b63e9a96df Fix T49423: Data Preview of group containing only group instances is empty.
Code was not getting correct boundbox in some cases (group only instancing other groups e.g.), now
compute our own bbox in those cases.

Based on patch by @lichtwerk, but extended the fix to include linked datablocks in some cases
(linked objects in local groups, linked objects in local scene, etc.), this was also broken in existing code.

Reviewers: mont29

Subscribers: duarteframos

Differential Revision: https://developer.blender.org/D2257
2016-09-27 17:03:03 +02:00
5d0de39238 fix Mac build for Xcode < 8
We need a long-term fix, but this will get 2.78 out the door.
2016-09-27 16:16:47 +02:00
2ebb367b0f cleanup: spacing & alignment 2016-09-27 14:56:58 +02:00
54ed22c843 Fix T49461: Dynamic paint wetmap flickers.
Regression from rBa4a968f, we would adjust current point's wetness without actually protecting it
in new multi-threaded context, leading to concurrent access mess.

Now delay applying wetness reduction to current point to end of function, allows us to avoid having
to lock current point twice together with neighbor one (and reducing spinlock awainting too).

To be backported to 2.78a.
2016-09-27 13:58:01 +02:00
e6dda514ba Fix T49464: Data Transfer modifier slows down redraw of window.
Never call function that might recompute a DM in an RNA itemf callback (or any UI-related func in general)!
There was an XXX comment asking if this was OK - well, no, it was not. :P

Could be ported back to some 2.78 flavour should we need it.
2016-09-27 12:03:18 +02:00
7f76f6f249 Fix export image generated by export UV layout
Was only happening with new dependency graph.

The issue here is that scene's depsgraph layers will be 0 unless
it was ever visible. Worked around by checking for 0 layer in the
update_tagged of new depsgraph. This currently kind of following
logic of visible_layers, but is weak.

Committing so studio is unlocked here, will re-evaluate this layer.
2016-09-26 16:46:08 +02:00
b23ffded08 Fix Scene datablocks being created with a real user while never having any real datablock user.
Now using new system dedicated to that kind of cases, id_ensure_real_user(), instead.
That way, usercount of Scenes is handled correctly at deletion time.

Reported by @sergey over IRC, thanks.
2016-09-26 16:37:17 +02:00
Dalai Felinto
eab3e0af1c Cleanup: stereo windowmanager code
This will make the changes in blender2.8 branch simpler
2016-09-26 13:56:45 +00:00
7c53260109 Fix crash in own recent rB776a8548f03a049.
New ID may be null, have to check this too!

Reported by @panzergame over IRC, thanks.

To be ported to 2.78 as well.
2016-09-26 09:49:34 +02:00
07de832e22 Cycles: Use correct light sampling PDF for MIS calculation with Branched Path Tracing
The light sampling functions calculate light sampling PDF for the case that the light has been randomly selected out of all lights.
However, since BPT handles lamps and meshlights separately, this isn't the case. So, to avoid a wrong result, the code just included the 0.5 factor in the throughput.

In theory, however, the correction should be made to the sampling probability, which needs to be doubled. Now, for the regular calculation, that's no real difference since the throughput is divided by the pdf.
However, it does matter for the MIS calculation - it's unbiased both ways, but including the factor in the PDF instead of the throughput should give slightly better results.

Reviewers: sergey, brecht, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2258
2016-09-25 23:16:05 +02:00
18b0738303 Cleanup: remove unused function. 2016-09-25 22:11:38 +02:00
04230e80d1 Alembic: only interpolate vertices when their number don't differ
between samples.

This could cause some crashes.
2016-09-25 22:11:37 +02:00
0b89b31a18 Cycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy is enabled 2016-09-25 22:09:38 +02:00
448ee227be Volume slice settings: tweak/fix UI enabling conditions.
It was still possible to have some properties enabled when it does not
make sense to have them so.
2016-09-25 21:55:29 +02:00
584288a97c Smoke debug draw: take adaptive domain position into account.
Eventually the various functions that deals with adaptive domain
bounding box shall de-duplicated.
2016-09-25 21:45:09 +02:00
ae69986b70 Viewport smoke: fix a couple of issues in the new display settings.
- WITH_SMOKE macro was not defined so some code was not compiled, though
it was still accessible from the UI
- some UI elements were disappearing due to bad indentation, also rework
the UI code to not hide but rather disable/grey out button in the UI
- Display thickness was not used due to bad manual merge of the code
from the patch.
2016-09-25 17:02:46 +02:00
335ee5ce5a Fix T49310: incorrect Cycles standalone normals with negative scale. 2016-09-25 05:23:52 +02:00
6dd87f2abb Curve Fitting: re-fitting heap pre-allocated too much 2016-09-25 12:19:43 +10:00
6b5ad4a4d7 Curve Fitting: 'offset' method used sign when it shouldn't 2016-09-25 12:19:42 +10:00
05dbd65098 Curve Fitting: inline dot-product (avoid temp vector) 2016-09-25 12:19:42 +10:00
d9b242f5fb Curve Fitting: de-duplicate cubic evaluation 2016-09-25 12:19:42 +10:00
5bdff9ea80 Quiet shadow warning
No need to declare new iterator for second loop.
2016-09-25 12:19:38 +10:00
d35bf3f421 Fix compile error when building without smoke support.
Also fixes possible NULL pointer dereference.

Fixes T49445.
2016-09-25 00:26:21 +02:00
14e825aa1f Viewport smoke: add options to draw velocity vectors.
This basically exposes to the UI a function that was only available
through a debug macro ; the purpose is obviously to help debugging
simulations. It adds ways to draw the vectors either as colored needles
or as arrows showing the direction of the vectors. The colors are based
on the magnitude of the underlying vectors.

Reviewers: plasmasolutions, gottfried

Differential Revision: https://developer.blender.org/D1733
2016-09-24 22:36:54 +02:00
4446acbf17 Viewport smoke: add support for axis aligned slicing.
Current approach uses view aligned slicing to generate polygons for GL
texturing such that the generated polygons are always facing the view
plane. Now it is also possible to use object aligned slicing, which
creates polygons by slicing the object perpendicular to whichever axis
is facing the most the view plane. It is also possible to create a
single slice for inspecting the volume, or for 2D rendering effects.

Settings for this, along with a density multiplier setting, are to be
found in a newly added "Smoke Display Settings" panel in the smoke
domain properties tab.

Reviewers: plasmasolutions, gottfried

Differential Revision: https://developer.blender.org/D1733
2016-09-24 22:21:02 +02:00
Peter Lu
a070a5befa Mesh: added default UVs for Monkey, improved UVs for UV Sphere and Icosphere.
Fixes T47488 and T47478.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2224
2016-09-24 16:39:23 +02:00
bf2c2d43ef Fix T49441: Grease Pencil - pie menu - brush name field crashes blender
Using context.active_gpencil_brush to access the active Grease Pencil brush
would result in a crash if trying to rename the brush, because the "ID" pointer
was not set.

To be backported to 2.78
2016-09-24 12:50:37 +12:00
36d0ea3123 Collada: Trying to get rid of some warning messages on linux 2016-09-24 01:47:55 +02:00
7a259d8422 Collada: Trying to get rif of some warning messages on linux 2016-09-24 01:27:37 +02:00
4b891b40c2 Fix: Collada Importer did not import the Blender Profile information correctly when multiple objects are bound to same armature. This caused Bone tails to be placed wrong. 2016-09-24 01:06:32 +02:00
25b61662f5 Quiet warning. 2016-09-23 19:45:33 +02:00
c3b754f9bd Alembic: only export face sets when required by the user.
Also remove deprecated face set code.
2016-09-23 19:45:33 +02:00
4e3578f470 Cycles: Prevent crash in special cases when object has less slots than mesh
This is something what was guaranteed in give_current_material(), just
copied some range checking logic from there.

Not sure what would be a proper fix here tho.
2016-09-23 15:57:39 +02:00
06b51c64ad Particles: Prevent crash when copying to an object with subsurf modifier
Probably something will be remapped wrongly, but better than crash.
2016-09-23 15:39:33 +02:00
1925b9b2fa Particle: Add option to duplicate settings together with particle system itself
This way it's possible to copy combed hair, use it as a basis for another
particle system to do some awesome artistic stuff.
2016-09-23 15:33:07 +02:00
c61cb0e076 Particle: Prevent crash duplicating hair on objects with modifiers 2016-09-23 14:51:42 +02:00
1e89a261b2 Outliner: Fix assert failure with palette ID 2016-09-23 14:49:55 +02:00
1d03bc73ce Particles: Add operator to quicly duplicate active particle system to the same object 2016-09-23 14:32:36 +02:00
776a8548f0 Fix T49430: append scene with gamelogic broken.
In fact, it was the whole remapping process that was broken in logic bricks area,
due to terrible design of links between those bricks...

Object copying was also broken in that case, fixed as well.

To be backported to 2.78.

Note that issue was actually probably there since ages, hidden behind dirty hacks
used in previous append code (though likely visible in some corner cases).

Listen kids: do not, never, ever, do what has been done for links between logic bricks. Never. Ever.
Even as pure runtime data it would have been bad, but as stored data...
2016-09-23 14:25:15 +02:00
2372e67dd6 Cycles: Don't sum up memory usage of all devices together for the stats 2016-09-23 12:43:23 +02:00
1b2b7cfa20 Cycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplaced 2016-09-22 17:44:22 -04:00
Julian Eisel
56498757ce Clip Editor: Enable Continuous Grab for view panning 2016-09-22 22:50:59 +02:00
d84c55f0fa Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file
Was an integer overflow issue when calculating offsets.
2016-09-22 17:30:31 +02:00
4e031073df Fix T49427: Drivers of Shapekeys break when Append a group.
Optimization attempt with BKE_library_idtype_can_use_idtype() was not taking into account
the fact that drivers may link virtually against any datablock...

Has to be rethinked, but for after 2.78 release, this commit is safe to backport.
2016-09-22 16:12:43 +02:00
9937f28877 Buildinfo: Improve behavior with detached HEAD
Try real hard to detect which branch we've detached from.
2016-09-22 15:01:01 +02:00
ab09a80d33 Fix T49425: Freestyle in viewport keeps updating over and over.
Regression caused by rBb27ba26, we would always tag datablocks to update in G.main,
ignoring given bmain, now always use this one instead.

To be backported to 2.78.
2016-09-22 14:57:16 +02:00
f915ee8e76 CMake: Fix copy-paste error 2016-09-22 11:01:37 +02:00
c77da24116 Fix non-finite normalization factor in certain cases 2016-09-22 10:04:51 +02:00
ca1c7a0cf7 Fix T49422: Metadata not showing in OpenGL renders
Own regression since recent optimization.
2016-09-22 09:42:09 +02:00
Julian Eisel
6f80604509 RNA/UI: Allow displaying in tooltip why RNA property isn't editable
This commit allows RNA properties to return additional info on their editable state which may then be displayed in tooltips. To show how it works, it also adds some info for the editable check of proxies. For generally un-editable properties or properties of a linked data-block, RNA returns default strings.

| {F362785} | {F362786} | {F362787} |

Reviewed by brecht, thanks!

Differential Revision: https://developer.blender.org/D2243
2016-09-22 00:10:53 +02:00
9493e3b2d6 UI: Theme options for vertex/edge bevel weight colors
Drawing used colors for select (TH_EDGE_SELECT/TH_VERTEX_SELECT) which was inconsistent with crease, seam, sharp, .. (which all had their own them color -- also was a bit hard to read).

NOTE: UI team usually doesn't allow adding more theme options, this is an exception.

Differential Revision: https://developer.blender.org/D2234
2016-09-21 23:16:38 +02:00
Julian Eisel
e9bcdcdbbd UI: Make eyedropper shortcut configurable
It's now possible to change the shortcut for invoking the eyedropper while hovering a button (E by default). Also removed the keymap editor entry for the modal eyedropper keymap, it's now automatically appended to the eyedropper shortcut.
2016-09-21 22:20:24 +02:00
Julian Eisel
f6c09eadf0 UI: Make button driver and keying set shortcuts configurable 2016-09-21 20:09:37 +02:00
a3d258bfb4 fix for potential pitfall with glMatrixMode
close D696 by @jwilkins

The matrix mode should always be left in modelview mode, since a lot of code assumes it is before setting a matrix.
2016-09-21 17:41:59 +02:00
Julian Eisel
e8d953000a UI: Configurable shortcuts for keyframe operators
Adds support for editing the shortcuts for inserting (I), deleting (Alt+I) and clearing (Alt+Shift+I) button keyframes.
2016-09-21 17:06:52 +02:00
a7e7479122 FFmpeg interface improvements
This patch changes a couple of things in the video output encoding.

{F362527}

- Clearer separation between container and codec. No more "format", as this is
  too ambiguous. As a result, codecs were removed from the container list.
- Added FFmpeg speed presets, so the user can choosen from the range "Very
  slow" to "Ultra fast". By default no preset is used.
- Added Constant Rate Factor (CRF) mode, which allows changing the bit-rate
  depending on the desired quality and the input. This generally produces the
  best quality videos, at the expense of not knowing the exact bit-rate and
  file size.
- Added optional maximum of non-B-frames between B-frames (`max_b_frames`).
- Presets were adjusted for these changes, and new presets added. One of the
  new presets is [recommended](https://trac.ffmpeg.org/wiki/Encode/VFX#H.264)
  for reviewing videos, as it allows players to scrub through it easily. Might
  be nice in weeklies. This preset also requires control over the
  `max_b_frames` setting.

GUI-only changes:
- Renamed "MPEG" in the output file format menu with "FFmpeg", as this is more
  accurate. After all, FFmpeg is used when this option is chosen, which can
  also output non-MPEG files.
- Certain parts of the GUI are disabled when not in use:
    - bit rate options are not used when a constant rate factor is given.
    - audio bitrate & volume are not used when no audio is exported.

Note that I did not touch `BKE_ffmpeg_preset_set()`. There are currently two
preset systems for FFmpeg (`BKE_ffmpeg_preset_set()` and the Python preset
system). Before we do more work on `BKE_ffmpeg_preset_set()`, I think it's a
good idea to determine whether we want to keep it at all.

After this patch has been accepted, I'd be happy to go through the code and
remove any then-obsolete bits, such as the handling of "XVID" as a container
format.

Reviewers: sergey, mont29, brecht

Subscribers: mpan3, Blendify, brecht, fsiddi

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2242
2016-09-21 15:03:11 +02:00
Julian Eisel
2476faebd7 Fix crash in space context cycling when leaving window bounds 2016-09-21 14:53:42 +02:00
Julian Eisel
bb6af17799 Make space context cycling a proper screen-level OP
This is really more of a screen level operation, UI-level is more like button handling etc.
2016-09-21 14:53:42 +02:00
Julian Eisel
d10f54ee75 UI: Support UI operators with configurable shortcuts
After all a super simple solution that allows us to get rid of hardcoded keymap items.
2016-09-21 14:53:42 +02:00
622c9ced6c Cycles: Cleanup, whitespace 2016-09-21 14:42:05 +02:00
Dalai Felinto
8ced4417f9 Fix T49393: Baking ignores backfaces
For some reason (which I can't recall), backing was doing backface
culling. Since Cycles itself doesn't ignore them (nor does Blender
Internal), they should be visible.
2016-09-21 10:39:54 +00:00
166286e6de Cycles: Make code more uniform across two versions of shadow_blocked()
Just to make it easier to research ways of possible code de-duplication.
2016-09-21 11:50:11 +02:00
e4f7bf6ccb Cycles: Remove out of date comment 2016-09-21 11:48:36 +02:00
586c58902d Fix: Grease Pencil sculpting crashes when sculpting on layers without any strokes
Reported by @loochmunz. I've also gone through checking for and fixing other places
where this was also occurring.


To be included in 2.78
2016-09-21 17:03:45 +12:00
0b9cfbf6a8 GPencil D+W Pie: Don't show editing operators when not in editmode
These operators only operate on the selected strokes, but when not in editmode,
stroke vertices are not shown.

Safe for 2.78
2016-09-21 17:03:44 +12:00
Julian Eisel
c5326958a5 UI: Fix crash using drag-toggle over window bounds with button callback
Steps to reproduce:
* Go to modifier context in properties editor
* Add modifier, collapse it
* Press down LMB over collapse button of modifier, hold it
* Drag over pin-icon in properties editor (to keep fixed data-block displayed)
* Drag outside of window bounds (should crash)

Also could've solved by getting space data from callback arguments instead of context, but this fix is much nicer (though not totally un-risky).
2016-09-21 00:44:14 +02:00
2382d1c401 regression fix for 1346482d23: The length of leaf bones should always be set to the length of the smallest bone. since the mentioned commit the importer did only recalculate the leaf bone length when the 'fix leaf bones' option was also enabled. 2016-09-20 17:33:17 +02:00
a5f14ad1a2 Cycles: Make regular bvh traversal functions close to each other 2016-09-20 16:58:39 +02:00
a6db95cd42 Cycles: Re-group ifdef so we check for particular feature only once 2016-09-20 16:58:39 +02:00
f3b94a54bc Alembic: add support to interpolate transform matrices in-between
frames.
2016-09-20 14:17:05 +02:00
386da0cc77 Cycles: Avoid conversion from bool to uint 2016-09-20 13:00:36 +02:00
Dmitry Dygalo
87c08fa681 Small speedup for blend_render_info.py
Do not close and re-open the file in case it's compressed, gzip module can now directly take a file object as parameter.

Differential Revision: https://developer.blender.org/D2235
2016-09-20 12:38:54 +02:00
075a2175d5 Fix T49391: Texture paint is not aware of disabled color management
There might be some extra missing points here, but it's all rather
a TODO than a real bug and can be tweaked further once issues are
actually discovered.
2016-09-20 12:22:50 +02:00
f64aa4e0af Fix T49343: ImageFormatSettings were not setting their rna struct path correctly
Reviewers: brecht, mont29

Reviewed By: brecht, mont29

Subscribers: brecht, sergey

Differential Revision: https://developer.blender.org/D2228
2016-09-20 12:14:53 +02:00
78c0bc52de Fix T49408: OpenGL light widget breaks viewport shading 2016-09-20 11:56:37 +02:00
f2da63cb12 Fix T49386: Blender crashes when told to load an OCIO LUT that does not exist 2016-09-20 10:48:25 +02:00
e12f5b699d OpenGL: software renderer for old Mac GPUs
We raised the minimum to GL 2.1 in Blender 2.77, and dropped support for older GPUs (pre-2012 Intel mostly). On Windows you get a popup message, but on Mac we simply crashed. Every Mac has a builtin software renderer for GL 2.1 so let's use that when the GPU is not capable!

Run blender --debug-gpu to see version detection & software fallback.
2016-09-19 20:27:12 +02:00
Julian Eisel
16ed49b26e UI Messages: Consistent spelling of term "data-block"
Was using a bunch of different spellings, mostly "data-block" though, so went with that one (would have been my #1 choice anyway ;) )
2016-09-19 16:50:45 +02:00
7d63ea4a1c Buildbot: Another attempt to have OSX builder fixed 2016-09-19 16:45:08 +02:00
12680d36f5 Buildbot: Temporary disable CUBIN compilation 2016-09-19 16:24:55 +02:00
838e0a09c7 Buildbot: Attempt to use proper Clang for CUDA binaries 2016-09-19 16:11:19 +02:00
100b2ad775 Cycles: Cleanup code style in split kernel 2016-09-19 16:05:12 +02:00
1f5cd85976 Fix T49375: align rotation with snap target isn't toggleable in edit mode.
Based on D2237, but fixed patch always hiding 'snap on self' button...

Should be safe for 2.78.
2016-09-19 15:51:05 +02:00
5c6a14f4e5 Cycles: More tweaks to make specialized BVH traversal matching 2016-09-19 15:29:37 +02:00
7901f62a9d Cycles: Avoid redundant intersection pre-calculation 2016-09-19 15:18:27 +02:00
6ba59660fb Cycles: Cleanup, sync some comments across different traversal 2016-09-19 15:18:27 +02:00
85f48216ed Cycles: Cleanup, always use parenthesis
Makes it simpler to compare different traversal algorithms.
2016-09-19 15:18:27 +02:00
Martijn Berger
cc9d0eff81 Lowercase includes for psapi.h and dbghelp.h windows includes.
This makes cross compilation a little less painful
2016-09-19 14:22:38 +02:00
25ee094226 Fix T49385: Copy buffer is not from pose mode. Report Error
Quick fix for now, need to unlock studio here as well.

Proper fix would be to modify API a bit and pass flags which will
prevent expand called on bmain perhaps. But this we should discuss
a bit,
2016-09-19 14:17:05 +02:00
2980c6ebae Cycles: Move BVH constants to an own files, so they are easily re-usable 2016-09-19 13:00:41 +02:00
b19c6f8f43 Remove null-check of argument which is attributed as non-null
This was logically incorrect and was causing warning and compilation
errors with strict compiler flags.
2016-09-19 10:18:10 +02:00
722226b610 CacheFile: make sure SpinLock is destroyed when exiting Blender.
Missed in rB62b1cdd6.
2016-09-19 09:02:41 +02:00
772dab9df1 Cycles: Fix typo that would sometimes result in subsurf modifier being disabled 2016-09-18 22:14:15 -04:00
Julian Eisel
c2d7d4764e Various cleanups related to button locking
* Rename uiBut.lockstr to disabled_info
* Remove unreachable code
* Replace duplicated check with assert
* Replace overly ambitious check with assert
* Add comments
2016-09-19 02:41:10 +02:00
Julian Eisel
976e591e93 Cleanup: Completely replace/remove uiBut.lock
Old leftover from pre 2.5 days. Now handled through UI_BUT_DISABLED button flag.
2016-09-19 01:49:17 +02:00
Julian Eisel
404a427dfd Minor corrections for previous commit
Was using wrong argument name in doxygen comment. Also reduced scope of vars.

Sorry for the noise :/
2016-09-18 21:54:24 +02:00
Julian Eisel
572bc1364c BLI_listbase: Add/use utility to move link (BLI_listbase_link_move)
We were calling BLI_remlink and then BLI_insertlinkbefore/after quite often. BLI_listbase_link_move simplifies code a bit and makes it easier to follow. It also returns if link position has changed which can be used to avoid unnecessary updates.

Added it to a number of list reorder operators for now and made use of return value. Behavior shouldn't be changed.

Also some minor cleanup.
2016-09-18 21:44:42 +02:00
6c28d3bac2 Fix T49245: Adaptive Subdivision with Auto Smooth causes weird mesh appearance 2016-09-18 13:22:54 -04:00
Julian Eisel
c0aabeede8 GPencil: Don't show error popup when strokes can't be reordered further
Was spawning error popup each time user tried to move a stroke higher or lower than the list allowed. We don't do that anywhere else and it's not really useful info for the user. So rather not bother her.
2016-09-18 19:08:20 +02:00
940f360479 Cycles: Fix update of subdivision meshes when global dice rates change
When subdivision settings were moved from meshes to objects this was missed,
should work fine now.
2016-09-18 12:44:43 -04:00
799454821e Cycles: Soft minimum for dice rates
Use 0.5 as a soft minimum for dice rates to help from setting them too
low. Lower values can still be set by typing in the value.
2016-09-18 12:44:43 -04:00
8f28441487 Cycles: Adaptive isolation
Idea here is to select the lowest isolation level that wont compromise quality.
By using the lowest level we save memory and processing time. This will also
help avoid precision issues that have been showing up from using the highest
level (T49179, T49257).

This is a pretty simple heuristic that gives ok results. There's more we could
do here, such as filtering for vertices/edges adjacent geometric features that
need isolation instead of checking them all, but the logic there could get a
bit involved.

There's potential for slight popping of edges during animation if the dice
rate is low, but I don't think this should be a problem since low dice rates
really shouldn't be used in animation anyways.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D2240
2016-09-18 12:44:43 -04:00
Julian Eisel
63b90851ce GPencil: Fix memory leak using stroke arrange OP 2016-09-18 17:25:12 +02:00
0552d5820b Fix T49384: crash in tangent space calculation with NaN mesh vertices. 2016-09-18 13:38:20 +02:00
40247ee491 [Windows/make.bat] Clean only after all parameters have been processed so the full path is known, and require a convenience target to be set. Also added a helpful error message if any of the required data is not available. 2016-09-17 09:19:54 -06:00
09925d52f5 Fix T49383: Color pickers are available if the color is locked
If the color is locked, the row is disabled, but the picker is still
available.

This error was present in older versions for layer color.
2016-09-17 09:02:03 +02:00
cade262c47 OpenGL render: Bugfix (unreported) after rB6f92604e539b2114763150fb1ace60d28e59a889
Crashes occured immediately when clicking on "OpenGL render image" because there was only a task pool created previously when it was an animation. Solved it by introducing a variable is_animation to the openglrender and omitting the task_pool call when it's no animation.

@sergey: Please check my changes, moved the pool_ok and the lock into the is_animation clause.
2016-09-17 00:21:34 +02:00
c9c933ac81 Pose Library pose list: Default to 5 rows to match the new up/down buttons
The buttons now nicely align with the pose list itself.
2016-09-16 18:21:25 +02:00
634508ca3f Buildbot: Disable QuickTime for the time being
Buildbot machine was updated to the new SDK which seems to have
QTKit removed.

For until we've installed older SDK or ported our code to a new
AVFramework disabling QuickTime.
2016-09-16 17:51:01 +02:00
716e712a83 Pose library sorting: return OPERATOR_CANCELLED when no-op
A no-op happens when trying to move the top pose further up, or the
bottom pose further down.
2016-09-16 17:33:34 +02:00
Julian Eisel
2aca1d85e6 Improve description of move operator direction properties
These may be exposed in UI (keymap editor & redo panel), so better avoid using identifiers like "UP" "DOWN". They are redundant anyway (already displayed).
2016-09-16 17:03:44 +02:00
Julian Eisel
4b39069908 Fix jumping view when expanding graph editor channel over view bounds
Didn't change versioning_250.c entries, flags will be overridden anyway.
2016-09-16 16:41:36 +02:00
Julian Eisel
df3394a386 Fix vertical scrollbar adding to region width in graph editor
Had to calculate draw region width based on region size excluding scrollbars.
2016-09-16 16:21:51 +02:00
9883899d62 Remove debug only code
Thanks Severin for spotting it!
2016-09-16 16:11:38 +02:00
9a7891da90 Tweak for pinned/always visible curves in Graph Editor
Allow such kind of pin for armature bones.
2016-09-16 16:01:38 +02:00
19268fbad3 Added buttons to move a pose in a pose library up/down.
This will break the pose library preview add-on, since that add-on uses
file indices rather than pose names.
2016-09-16 15:11:45 +02:00
Julian Eisel
661a316c72 Picky correction to previous commit
A bit nicer to do empty-string check for operator poll message as well.
2016-09-16 15:09:21 +02:00
Julian Eisel
1df115d9a3 UI: Allow showing why button is disabled in tooltip
Uses red alert color. Operators that failed poll check already did this.
2016-09-16 15:05:27 +02:00
f3058c1b66 OpenSubdiv: Remove redundant section define from shader compilation 2016-09-16 12:28:35 +02:00
a27b54f6e2 OpenSubdiv: Split shader source files
Was a bit annoying to do tweaks in a file which contained all
vertex, geometry and fragment shaders.
2016-09-16 12:28:35 +02:00
98af402357 GPencil: Remove toggle option for pop-up specials menu
According UI rules, no toggle options in pop-ups menus, so remove it.
2016-09-16 11:58:10 +02:00
b06584dbf8 Fix T49349: Baking action doesnt bake multiple objects.
Tooltip was wrong here, it can only bake a single (active) object, 'only selected' option
is for pose bones only...
2016-09-16 11:50:49 +02:00
b2f1b8ab7a GPencil: Add a new special menu for editing and replace subdivision shortcut
Replace the W shortcut for subdivision by a new menu for edit specials
in order to keep consistency in UI.

Subdivision is not used all the time, so it's better assign this
shortcut to menu.
2016-09-16 11:49:29 +02:00
4b046c530d Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output 2016-09-16 11:48:42 +02:00
ac7ff55f11 GPencil: New subdivide stroke operator
In some situations the artist needs to subdivide a stroke created with
few points before, specially for sculpting.

The subdivision is done for any pair of continuous selected points in
the same stroke.

The operator can be activated in edit mode with W key and has a
parameter for number of cuts.
2016-09-16 10:32:39 +02:00
6f92604e53 OpenGL render: Move file writing to a separate thread
The idea is to have a dedicated thread which is responsive for all the
file writing to a separate thread, so slow disk will not slow down
OpenGL itself.

Gives really nice speedup around 1.5x when exporting barber shop layout
file to h264 video.
2016-09-16 10:31:37 +02:00
04bfea0d67 Fix T49369: Blender crashes/closes down application at alembic export of
any object

There were a couple of crashes caused by stupid typos in
rB631af9f930d2fd2c76751204ff22239aa95f761d and
rB78ea06fea4a74181c25254ed72d50d8a743b6954, as well as a shamefull lack
of 'testing before committing' which only affect exporting.

One crash was due to using RNA_boolean_get instead of RNA_enum_get, the
other one was a tricky case of order of deletion happening in the
destructors of AbcExporter and ArchiveWriter.

Should not affect RC or release.
2016-09-16 09:27:44 +02:00
e156abe467 Cleanup: Redundant forward declaration 2016-09-15 16:46:19 +02:00
04e2e4fdc1 Fix mistake in previous commit
Was copying things in other way around and was not performing
proper color space conversion.
2016-09-15 16:34:10 +02:00
2d81e88865 OpenGL render: Avoid byte-float-byte roundtrip
It was annoyingly slow to do roundtrip from byte OpenGL render to
float render result and back to byte image format (which is used
in 99% of cases for the OpenGL previews),

Now we use render result's rect32 to store render result which is
already supposed to be in the display space.

Gives about 30% speed improvement for OpenGL previews here.
2016-09-15 15:56:47 +02:00
6fb874369c OpenCOlorIO: Add explicit linearSRGB -> sRGB lookup table
Previously converting from linear space to SRGB was doing rather
slow inverted 1D lookup. Adding explicit inverse LUT gives 20%
speedup of OpenGL render.

Next question is: why do we even bother with sRGB conversion here,
OpenGL is already in the proper space so in theory we can avoid
quite some color space conversions. In any case, having this case
optimized in nice anyway.
2016-09-15 15:56:47 +02:00
1af547a223 OpenGL render: Add developer option to easily enable time information 2016-09-15 15:56:47 +02:00
42c17cb769 Bring blender_release.cmake uptodate with the changes from D2227 2016-09-15 06:34:57 -06:00
f339d5a8ce [windows] add some helpers to make.bat to facilitate making release builds.
New features:
1) Release target that checks for both cuda 7.5 and 8 with WITH_CYCLES_CUDA_BINARIES=ON and CYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 options set.
2) Option to switch between x86 and x64 builds, the default remains (auto detect the architecture) but can be overridden.
3) Option to switch between vs12(2013) and vs14(2015) default is 2013.

Reviewers: juicyfruit, sergey

Reviewed By: sergey

Tags: #platform:_windows

Differential Revision: https://developer.blender.org/D2180
2016-09-15 06:27:58 -06:00
52181a26c6 Depsgraph: Avoid some false-positive time dependencies of scripted drivers
This was quite weak to consider all scripted expression to be time-dependent.
Current solution is somewhat better but still crappy. Not sure how can we make
it really nice.
2016-09-15 12:14:54 +02:00
ddbbcbbbba Fix filebrowser not getting back to valid dir in Release builds.
Stupid mistake wrapping path validation code inside a BLI_assert, which means it was
only called in Debug builds...

Found by Sergey, thanks.

Should be backported to 2.78.
2016-09-15 12:12:19 +02:00
a8ed9144a3 Fix crash in some cases when deleting particle systems.
Those 'never null' ID pointers are really a PITA to handle... luckily we don't have much of those around!

Found by Sybren, thanks.

Should be backported to 2.78.
2016-09-15 11:50:56 +02:00
a2a5ae5b54 Fix Py's IDs user mapping: do not consider ShapeKeys' from here.
This is internal pointer helper for scene evaluation and tools, though exposed to bpy API,
it can give false 'dependency cycles' in bpy.data.user_map() results.

That's followup to rBe007552442634 really, both should be backported to 2.78
2016-09-15 11:28:53 +02:00
21e9db9cf1 OpenGL render: Skip GP passes if viewport has GP visibility disabled 2016-09-15 11:23:11 +02:00
e007552442 Fix Py's IDs user mapping: do not consider proxy_from here.
This is internal pointer helper for scene evaluation and tools, it's not exposed to bpy API anyway,
and can give false 'dependency cycles' in bpy.data.user_map() results.

Found by sybren in his Splode work.
2016-09-15 10:16:54 +02:00
fe1342ab9b Use temp .blend file copybuffer for pose copy-paste
Uses similar way of storing temp data as object copy paste, just
uses different read entrypoint which does not modify current bmain.

This gives ability to easily copy-paste poses from one blender to
another one.

Hopefully doesn't introduce user-measurable differences.

Request from Peer here in the studio.

Reviewers: mont29

Reviewed By: mont29

Subscribers: hjalti, fsiddi

Differential Revision: https://developer.blender.org/D2229
2016-09-15 09:51:15 +02:00
ec54a08d30 Revert "Cycles: Tweak empty boundbox children"
This reverts commit ecbfa31caa.

Original commit broke logic in nodes re-fitting. That area can
access non-existing children momentarely. Not sure what would
be best solution here, for now simply reverting the change/
2016-09-15 09:39:33 +02:00
fe28e350e9 Fix T49179: Parts of mesh disappear with adaptive subdivision
Problem was zero length normal caused by a precision issue in patch evaluation.
This is somewhat of a quick fix, but is better than allowing possible NaNs to
occur and cause problems elsewhere.
2016-09-14 19:53:55 -04:00
b9d1852c5a Cycles: Deduplicate light pass code 2016-09-14 20:09:37 +02:00
b459d9f46c Cycles: Stop lamp sampling if the lamp isn't visible
Both spot and area light have large areas where they're not visible.
Therefore, this patch stops the light sampling code when one of these cases (outside of the spotlight cone or behind the area light) occurs, before the lamp shader is evaluated.
In the case of the area light, the solid angle sampling can also be skipped.

In a test scene with Sample All Lights and 18 Area lamps and 9 Spot lamps that all point away from the area that the camera sees, render time drops from 12sec to 5sec.

Reviewers: brecht, sergey, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2216
2016-09-14 19:45:12 +02:00
aae2cea28d Cycles: Also support the constant emission speedup for mesh lights
Reviewers: brecht, sergey, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2220
2016-09-14 18:53:35 +02:00
51e8c167f4 Fix T49352: Blender's file browser do not display previews.
Own stupid 'logical inversion' mistake in rBa2677100fef06af.
2016-09-14 17:26:42 +02:00
804f6bf31e fix Mac build with Xcode 8
Small issues in GHOST
- use NSApplicationDelegate protocol for our app delegate
- make sure NSApp is initialized before using
(cherry picked from commit df7be04ca6)
2016-09-14 16:35:01 +02:00
30a7e75089 Cleanup: Fix epic indent failure in previous commit :/ 2016-09-14 16:18:36 +02:00
3525fd605a Fix missing PaintCurves list in bpy.data
Minimal list features for now, no add/remove stuff, that we can add later...

Reported by sybren.

Should be safe for 2.78.
2016-09-14 16:14:32 +02:00
3b6ce4123c Fix memory leak in copy pose operator 2016-09-14 15:57:04 +02:00
ce952fd36e Fix T49342: TypeError when autocompleting bpy.app.something.
Regression from rB036c006cefe471. We can't use self here, self is bpy.app, not pydescriptor of python path getsetter...

So for now, do not try to replace getsetter by actual value in bpy.app's dict,
just return static var generated on first run.

Should be safe for 2.78.
2016-09-14 15:54:54 +02:00
ab6a3dd6c1 Fix T49341: Bad motion blur behavior in Cycles when using Speed effect in Sequencer
Cycles was thinking it always rendering integer frame, which is not correct.
2016-09-14 14:59:39 +02:00
66d4006f51 Attempt to fix broken path remapping in own rB443b3ca9b9cb. 2016-09-14 12:58:01 +02:00
48c4a5a4dd CMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2227
2016-09-14 12:02:44 +02:00
443b3ca9b9 Fix two issues related to 'partial' .blend files:
I) Filename was not put in temp Main generated to save selected data only,
this was breaking readcode when trying to open partial file, leading to missing
filename in final loaded Main data.

II) Read code would confuse partial .blend files with Undo ones, when they had no screen in them
(which happens to 99.999% of partial .blend files I guess).

Reported by @sybren, thanks.

Should be safe enough for 2.78 release.
2016-09-14 11:35:16 +02:00
a2677100fe FileBrowser: Always do full cache refresh while we are still listing...
Does not seem to be a problem with embeded filelisting code, but was breaking with some experimental asset engines.
2016-09-13 19:02:27 +02:00
0de69e56b4 Cycles: Implement threaded SVM nodes compilation
The title says it all actually. From tests with barber shop scene here
gives 2-3x speedup for shader compilation on my oldie i7 machine. The
gain is mainly due to textures metadata query from jpeg files (which
seems to requite de-compression before metadata can be read). But in
theory could give nice improvements for scenes with huge node trees
as well (i'm talking about node trees of complexity of fractal which
we had reports about in the past).

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: monio, Blendify

Differential Revision: https://developer.blender.org/D2215
2016-09-13 13:46:49 +02:00
f38f787448 Fix bpy.data.user_map() ignoring unused datablocks.
Should be backported to 2.78.
Found by Sybren here in studio, thanks!
2016-09-13 13:23:03 +02:00
d82710cc02 Outliner: Report linked datablock edit failure when trying to rename linked data in outliner 2016-09-13 13:12:44 +02:00
7f67885526 Fix T49323: Ineffective bone roll calculation with low rig scale
The code was expecting vector to be normalized, however after
applying inverted object matrix it was possible to have scale
applied to it.
2016-09-13 12:38:47 +02:00
0307369211 Fix T49336: Outliner allows to edit restrict flags for linked objects 2016-09-13 11:33:55 +02:00
ecbfa31caa Cycles: Tweak empty boundbox children
The idea here is to make assert failure to fail sooner on an incorrect
node address rather than later with stack overflow.
2016-09-13 11:05:11 +02:00
52038fd8c7 Fix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render
The issue was caused by some false-positive empty non-AABB intersection.
Tried to tweak it a bit so it does not record intersection anymore.

Hopefully will work for all platforms. Tested here on iMac and Debian.
2016-09-13 10:59:48 +02:00
56c798ee62 API doc update script: Fix generated zipfile name, was broken in 'release' case... 2016-09-13 08:39:01 +02:00
Julian Eisel
620724d5e2 Fix error in --debug-handlers printing
Was missing else block (and also missing newline character). Caused by e672e7a070.
2016-09-12 18:39:25 +02:00
91eb1c2e2a Fix code which was commented by accident
Well, more like some last-minute checks which i did not see before commit.

Let's increase commit ratio!
2016-09-12 16:29:54 +02:00
ad40ae1e06 Fix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images
To be backported to 2.78 release.
2016-09-12 16:14:40 +02:00
d15899cca7 Cycles: Fix compilation error after recent commits 2016-09-12 16:06:50 +02:00
98c7e75897 Graph editor: Add channel option to make it persistent on display
The idea is to allow certain animation channels to be always visible in
animation editors. So, for example, one can pin Camera animation to the
editor so it is always possible to refine/tweak camera animation when
animating something else in the scene.

There is probably some more polishing required, and some current
limitations could be solved in the future but should be a good starting
point already.

Currently only works for object without recursing into deeper datablock
(so for example, it's not possible to pin object material animation).

Studio request by Colin Levy.
2016-09-12 15:39:40 +02:00
0f8f494d63 Fix T49296, assert failure in Bevel code.
The mesh interpolation function failed to fill a fractions-of-the-way
array properly when the distances are very small but nonzero.
2016-09-12 07:29:31 -04:00
fb2c435d86 Cycles: Fix wrong SSS in combination with hair on AVX2 platform
Not sure why exactly that happened, need a closer look.
2016-09-12 12:48:35 +02:00
91e0a16f2f Cycles: Use XDG's .cache folder for cached kernels
Basically just moves cached kernels from ~/.config/blender/BLENDER_VERSION to
~/.cache/cycles/kernels. This has following benefits:

- Follows XDG specification more closely,
  not as if it's totally crucial or measurable by users, but still nice.

- Prevents unexpected sizes of config folder, makes disk space used in more
  predictable for users way.

- Allows to share kernels across multiple Blender versions,
  which makes it easier debugging at the times close to release.

- "Copy Previous Settings" operator will no longer be copying possibly
  gigabytes of cached kernels, which used to lead to really nast disk usage
  and annoying delays of copying settings.

- In the future we can have some smart logic to clear old unused cached
  kernels.

Currently only done for Linux and OSX. Windows still follows old "cache"
folder logic, but it's not really important for now because we don't
support kernel compilation on this platform yet.

Reviewers: dingto, juicyfruit, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2197
2016-09-12 09:39:05 +02:00
49df5d0980 Cycles: Fix shading and crashes resulting from constant folding on displacement
Constant folding was removing all nodes connected to the displacement output
if they evaluated to a constant, causing there to be no valid graph for
displacement even when there was displacement to be applied, and sometimes
caused crashes.
2016-09-11 13:49:34 -04:00
013b46d6bd Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED
Using ones complement for detecting if transform has been applied was confusing
and led to several bugs. With this proper checks are made.

Also added a few transforms where they were missing, mostly affecting baking
and displacement when `P` is used in the shader (previously `P` was in the
wrong space for these shaders)

Also removed `TIME_INVALID` as this may have resulted in incorrect
transforms in some cases.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2192
2016-09-11 13:49:05 -04:00
92a2c49aab Cycles: Fix bump mapping to use object space when used with true displacement
Bump mapping was happening in world space while displacement happens in object
space, causing shading errors when displacement type was used with bump mapping.

To fix this the proper transforms are added to bump nodes. This is only done
for automatic bump mapping however, to avoid visual changes from other uses of
bump mapping. It would be nice to do this for all bump mapping to be consistent
but that will have to wait till we can break compatibility.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2191
2016-09-11 11:20:21 -04:00
ac2fe8312b Revert "GPencil: Add IFACE_ macro to some strings"
This reverts commit b50a5b92c1 because BKE_report functions are already automatically handled by translation system.
2016-09-11 13:06:37 +02:00
b50a5b92c1 GPencil: Add IFACE_ macro to some strings 2016-09-11 12:28:09 +02:00
347d759c62 GPencil: Change interpolate stroke factor
Now the factor works similar to other Blender areas to make the factor
more consistent for artists. The value 0% means equal to original
stroke, 100% equal to final stroke (50% means half way). Any value below
0% or greater than 100% create an overshoot of the stroke.
2016-09-11 12:28:09 +02:00
96f28f9b50 [CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC 2016-09-10 17:58:56 -06:00
Kai Mach
56064b508b NDOF: allow view movement for modal border and circle select operators.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2167
2016-09-10 23:37:53 +02:00
Dmitry Dygalo
9fc1cfc4f1 Fix undefined variable on errors in Cycles ctests.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2201
2016-09-10 23:04:14 +02:00
d8681c99c4 Fix OpenSubdiv related buffer overrun with multiple FVar channels.
The existing code uses the input value count of the first channel
for all of them. If the first channel is the largest, it leads to
a crash-causing buffer overrun in memcpy below. Likely this was
left since the time when only one channel was supported.

As a crash fix, probably should go into 2.78
2016-09-10 21:15:52 +03:00
037df2aaa6 Fix T49303: Fix T49314: More issues with new handling of X11 shortcuts.
This commits changes two things:
* It adds more keysyms preferably taken from XLookupKeysym than XLookupString (namely, all numpad ones).
* It falls back to keysyms from XLookupKeysym in other cases, when XLookupString does not produce anything we know of.

Finding the correct balance here is far from easy, but think we are comming rather close to it now...
2016-09-10 12:38:12 +02:00
2820ab5a8f Cleanup: Indentation 2016-09-09 13:08:21 +02:00
4c1d40d87e Cycles: Add overall timing log to SVNShaderManager 2016-09-09 12:27:27 +02:00
ff1ba0861d Fix missing 'prop_required' flags in some ID RNA funcs.
Not critical, but would rather have this in 2.78 (for API doc reasons mostly).
2016-09-09 12:00:23 +02:00
70e7c0829e Cycles: Deduplicate QBVH node packing across BVH build and refit 2016-09-09 11:32:05 +02:00
d205bc3059 Fix/Workaround T49297: Crash related to custom data draw (Blender with ASAN)
Root of the issue is that active render index became wrong. This is the actual
thing to be fixed, but as usual this is quite tricky to reproduce. Since such
bad situation might have happened more and fix isn't really difficult or
intruisive let's avoid crash for now.

Can be revisited once we figure out root of the issue.

Nice for 2.78 release.
2016-09-09 10:57:25 +02:00
b27ba26b44 Fix T49299: Removing offset object in modifiers doesn't update mesh.
Own fault in new ID management work, thought rebuild the DAG itself was
enough to actually update whole scene, but we actually need to tag datablocks
for update as well, when we change (or remove) one of their ID pointers...
2016-09-09 10:44:49 +02:00
2fe0125fcd Smoke viewport: remove dead code.
OCD commit, but cleans the code a bit:
- the first `if 0` block was supposed to draw collision objects but is
vastly outdated as most of the SmokeCollisionSettings member variables
were removed a few years ago and collision objects are drawn like other
objects anyway. Also it was committed already commented out back in
2009.
- the second `if 0` block was doing pretty much the same thing as the
few lines above it.
2016-09-09 06:05:58 +02:00
0053a91165 Alembic streaming: initial support to interpolate data between frames.
Pretty self-explanatory, allows to get some slow motion type of playback
and animations.
2016-09-09 05:59:20 +02:00
631af9f930 Alembic: add option to triangulate meshes upon export. 2016-09-09 05:30:43 +02:00
78ea06fea4 Alembic, cleanup: split archive opening code in their own classes and
files.

Also helps keeping platform specific code in separate from the rest of
the code.
2016-09-09 05:06:06 +02:00
1558f5b660 Cycles: Don't run full shader evaluation for constant emission lamps
Most of the time, Lamps in Cycles are just a constant emission closure, no texturing etc. Therefore, running a full shader evaluation is wasteful.
To avoid that, Cycles now detects these constant emission shaders and stores their value in the lamp data along with a flag in the shader.
Then, at runtime, if this flag is set, the lamp code just uses this value and only runs the full shader evaluation if it is neccessary.

In scenes with a lot of lamps and with "Sample all direct/indirect" enabled, this saves up to 20% of rendering time in my tests.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2193
2016-09-09 01:39:09 +02:00
6de08f6cd1 Cycles: Fix regular BVH nodes refit
For proper indexing to work we need to use unaligned node with
identity transform instead of aligned nodes when doing refit.

To be backported to 2.78 release.
2016-09-08 15:08:35 +02:00
27e2317513 Cycles: Add asserts to BVH node packing 2016-09-08 15:03:55 +02:00
3598a3d1d5 Cycles: Cleanup: line wrapping 2016-09-08 14:26:10 +02:00
45f833c21d Fix T49283: Crash in BKE_ptcache_make_particle_key.
This is really hack-fix actually, not sure why `get_pointcache_keys_for_time()` seems to assume
it will always find key for given part index at least for current frame, and whether this assumption
is wrong or whether bug happens elsewhere...

Anyway, this is to be wiped out in 2.8, so no point loosing too much time on it, for now merely
returning unchanged (i.e. zero'ed) ParticleKeys in case index2 is invalid. Won't hurt anyway,
even if this did not crash in release builds, would be returning giberish values.
2016-09-08 10:24:56 +02:00
a2e8b7e216 Fix compilation error: Shadowing of variable 2016-09-08 09:40:25 +02:00
a6f733310b Fix strict compiler warnings 2016-09-08 09:39:18 +02:00
ace92854b2 Fix compilation error: missing forward declaration 2016-09-08 09:38:24 +02:00
18ae1504ea Fix T49286: Compilation error with XCode 7.0
Weirdly enough, this version of XCode seems to have static_assert()
even when NOT using C++11. This is totally weird and counter intuitive
since static_assert() is supposed to be C++11 onlky feature.

Can XCode stop using future, please? :)
2016-09-08 09:27:51 +02:00
7e7a9d146c Cycles: Fix OpenCL speed regression introduced with the improved bump mapping
The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not.
In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown.

Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both).

Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now.

Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code.

This fix might be relevant for 2.78, but it should be tested further before including it.
2016-09-08 01:33:41 +02:00
afd3a55e3e GPencil UI: Ensure "Move to Color" can be found from the colors panel dropdwon too 2016-09-08 01:42:16 +12:00
19e6321ac0 GP Interpolation: Mark created frames as being "breakdowns"
This brings this tool more in line with the Breakdowner for armature animation,
with which it shares many commonalities.
2016-09-08 01:24:02 +12:00
4b65662483 Fix: GPencil drawing sessions now respect limits for maximum undo steps
When drawing with Grease Pencil "continous drawing" for a long time
(i.e. basically, drawing a very large number of strokes), it could be
possible to cause lower-specced machines to run out of RAM and start
swapping. This was because there was no limit on the number of undo
states that the GP undo code was storing; since the undo states grow
exponentially on each stroke (i.e. each stroke results in another undo
state which contains all the existing strokes AND the newest stroke), this
could cause issues when taken to the extreme.
2016-09-08 01:14:53 +12:00
5b42e07e18 Code Cleanup: Deduplicate undo node freeing code 2016-09-08 01:14:52 +12:00
bcc863993a Fix T49273: Crash during access to dupli weights at launch time.
See commit's comments for details, but this boils down to: do not try to use
purely runtime cache data as a 'real' ID pointer in readcode, it's likely
doomed to fail in some cases, and is bad practice in any case!

Thix fix implies dupliweight's object will be invalid until first scene update
(i.e. first particles evaluation).
2016-09-07 12:48:22 +02:00
1263965f83 GPencil: New interpolate strokes operators
Two new modal operators to create a grease pencil interpolate drawing
for one frame or a complete sequence between two frames.  For drawing
the temporary strokes in the viewport, two drawing handlers have been
added to manage 3D and 2D stuff.

Video: https://youtu.be/qxYwO5sSg5Y

The operator shortcuts are Ctrl+E and Ctrl+Shift+E. During the modal
operator, the interpolation can be adjusted using the mouse (moving
left/right) or the wheel mouse.
2016-09-07 10:02:52 +02:00
008afa446f OpenSubdiv: Support multiple materials drawing in Cycles textured view
Consider for inclusion into 2.78.
2016-09-07 09:48:13 +02:00
d0e7c7a032 Add XK_ISO_Left_Tab to ghost's known X11 keydefines... 2016-09-06 22:32:17 +02:00
f298c9ea1a Cleanup previous commit... 2016-09-06 18:01:14 +02:00
87b3faf557 GHOST X11 keyboard: Attempt to fix issues with modifier keys on some systems.
Could not reproduce it here, but since users having the issue claims it comes from
rB16cb9391634dcc50e, let's try to use again ugly `XLookupKeysym()` for those modifier keys too...
2016-09-06 17:54:40 +02:00
049ed1f4e7 [cmake/cpack] allow override of package name
Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D2199

ammended to fix: wrong variable name in main CMakeLists.txt
2016-09-06 08:47:45 -06:00
c02f9bc569 Revert "Depsgraph: Prioritize evaluation of the new scheduled nodes"
This reverts commit 9444cd56db.

This commit caused some flickering in the bones when swapping IK to Fk.

While it's unclear why such change caused any regressions, let's revert
it to unlock the studio.
2016-09-06 16:45:03 +02:00
abd54f1ed2 [cmake/cpack] allow override of package name
Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D2199
2016-09-06 07:22:04 -06:00
b40d1c1903 Fix T41883: Strip keyframes not respected for scenes rendered by other scenes 2016-09-06 14:08:11 +02:00
e3e8ce08a6 Add script which scales splash screen down
Based on reading documentation around. This particular version
is based on the ImageMagic documentation which could be found
there:

  http://www.imagemagick.org/Usage/filter/
  http://www.imagemagick.org/Usage/filter/nicolas/

Current filter is based on measuring mean error with the current
splash screen and choosing combination of parameters which
gives minimal mean error.
2016-09-06 12:27:58 +02:00
14e47472fe cleanup: macro whitespace \ alignment
Gotta be careful mixing tabs & spaces. This commit uses 4-space indent
to align the line continuation markers.

Follow-up to 3b52c4056a
2016-09-05 13:30:57 -04:00
8f509698d7 Fix cast shadows (material option) in the viewport
Fix cast shadows options (in material tab) not working in the viewport.
An off-by-one error. See D2194 for more.

Committing for Ulysse Martin (youle) who found & fixed this.
2016-09-05 13:05:47 -04:00
56d2f4c20a Fix T49252: Crash when image textures used with true displacement 2016-09-05 12:57:33 -04:00
Julian Eisel
718bf8fd9d UI: Ctrl+Tab and Ctrl+Shift+Tab to cycle through space context "tabs"
In User Preferences, Properties Editor and toolshelf, Ctrl+Tab and Ctrl+Shift+Tab now activates the next or previous space context (or category in case of toolshelf tabs), respectively.

For Properties Editor such functionality was completely missing, only toolshelf allowed cycling using ctrl+mousewheel (or only mousewheel while hovering tab region). Ctrl+Tab and Ctrl+Shift+Tab are common web browser shortcuts, so they're a reasonable choice to go with.
Reaching the first/last item doesn't cause the cycling to stop, we continue at the other end of the list then. (I didn't add this to Ctrl+Mousewheel toggling in toolshelf since I wanted to keep its behavior unchanged.)

We could get rid of (Ctrl+)Mousewheel cycling in toolshelf, but this may break user habits.

The cycling happens using a new operator, UI_OT_space_context_cycle, for toolshelf tabs it's hardcoded in panel handling code though.
Generalized rna_property_enum_step a bit and moved it to rna_access.c to allow external reuse.

Reviewed By: venomgfx
Differential Revision: https://developer.blender.org/D2189
2016-09-05 17:28:41 +02:00
922aefba25 OpenSubdiv: Fix missing ORCO when enabling OSD but having dependency to the geometry
Was causing huge viewport lags.

Reported by angavrilov in IRC, thanks!

Safe and nice for 2.78.
2016-09-05 17:08:09 +02:00
a31eca3fdd Fix T49251: moving smoke domain with additional resolution causes crash.
This is a bug in the multithreaded task manager in negative value range.

The problem here is that if previter is unsigned, the comparison in the
return statement is unsigned, and works incorrectly if stop < 0 &&
iter >= 0. This in turn can happen if stop is close to 0, because this
code is designed to overrun the stop by chunk_size*num_threads as
the threads terminate.

This probably should go into 2.78 as it prevents a crash.
2016-09-05 15:50:12 +03:00
c51cfbbc7f Fix own mistake in recent rB8b2a45052093, broke saving render results as images in some cases.
Reported by sebastian_k over IRC, thanks.

To be backported to 2.78.
2016-09-05 13:13:49 +02:00
1df4f792db Attempt to fix compilation error with static boost on certain platforms
This was reported in T49231.
2016-09-05 13:10:19 +02:00
33fcd0444d Fix T35333: Update some WM/UI API functions docstrings.
Based on patch by @codemanx, but with slightly less verbose descriptions.

More detailed behavior etc. rather belongs to doc/python_api/examples/bpy.ops.x.py imho.
2016-09-05 11:04:33 +02:00
7f682dd704 Fix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit mode for an object with Array modifier
Was incorrect indexing done in the array. Caused by 5abae51.

Not sure why it needed to be changed here, but array here is supposed to be
a loop data, so bringing back loop index as it originally was. The shading was
wrong in edit mode with BI active as well (so it's not like it's needed for
BI only).

Patch in collaboration with Alexander Gavrilov (angavrilov), thanks!

Should be double-checked and ported to 2.78.
2016-09-05 10:20:43 +02:00
3b52c4056a Fix glUniform called from glBegin/glEnd blocks
Was causing some invalid operations in OpenGL.

After more testing should be fine for 2.78.
2016-09-05 10:14:07 +02:00
062732905a Fix T49220: Vertex paint doesn't work with OpenSubdiv
It's a bit tricky to align vertex color data between Blender and OpenSubdiv
so for now we simply disable OpenSubdiv in the paint modes.

Safe for 2.78.
2016-09-05 10:14:07 +02:00
83ae39cc2e CMake: Skip addons_contrib for release candidate builds
Nowadays release candidates are supposed to be as close to the final
release as possible.

Safe for 2.78 release branch.
2016-09-05 10:14:07 +02:00
e35a87c5ff API doc: add new pure-rsync py script to update API doc on Blender server.
The other one (sphinx_doc_gen.sh) needs an ssh account on the server to work - and I hate bash, too! :P
2016-09-05 09:38:53 +02:00
f50ddbf60a We are in bcon again, so master goes back to alpha in release cycle. 2016-09-05 09:23:49 +02:00
0bd87b1976 Cycles: Fix unreported - Missing node group for the Camera Node
Thanks to linda2 for reporting in IRC.
2016-09-05 04:08:51 +02:00
569a13f4b2 Alembic: fix parenting issues when an object has multiple curves/points
subobjects.
2016-09-05 03:46:25 +02:00
2024cd09a0 Fix T49249: Alembic export with multiple hair systems crash blender
Crash was due to a name collision in Alembic objects caused by the fact
that names derive from the one of the Blender object. An object having
multiple particles system would thus give its name to various
subobjects.

Now use the name of the particles system for the Alembic object.
2016-09-05 03:32:36 +02:00
Julian Eisel
0351e701ce Correction to previous commit (PEP 8) 2016-09-05 00:55:44 +02:00
Julian Eisel
2b240b0430 Combine all Proportional Editing options under one menu
Image of the result of this patch:

{F352849}

The only thing different from the above image and this patch is I added a colon after "Falloff" after I took the screen shot.

Reviewers: Severin, meta-androcto

Subscribers: plyczkowski

Tags: #bf_blender, #user_interface

Maniphest Tasks: T33436

Differential Revision: https://developer.blender.org/D2195
2016-09-05 00:27:11 +02:00
Julian Eisel
c126a5179f Fix menu drawing printing 'unknown operator' warning when building without WITH_BULLET 2016-09-05 00:11:12 +02:00
e76e8fcdcc Fix a few OpenCL compiler warnings. 2016-09-03 23:06:12 +02:00
95cb714511 fix: not initialised variable can crash blender (related to modifiers with cage editing enabled) 2016-09-03 18:01:04 +02:00
16cb939163 Fix T48911: Fix T48847: Issues with some shortcuts on non-US latin keyboards, and with non-first layouts.
This is a tentative fix, own tests here seem to be working OK,
but don't think it's safe enough to be backported to 2.78.
2016-09-03 17:50:56 +02:00
6c0307f888 Fix T49228: Separate by material, materials dissappear after reload.
Yet another mismatch where code would decrease usercount (of Material here) but never increase it again
when re-assigning the datablock...
2016-09-03 12:51:50 +02:00
27c64e3f46 Fix T49229: ID user decrement error when deleting group instance twice.
Another great example of inconsistency in usercount handling - dupli_group was considered
as refcounted by readfile.c code (and hence by library_query.c one, which is based on it),
but not by editor/BKE_object code, which never increased group's usercount when creating
an instance of it etc.

To be backported to 2.78.
2016-09-03 11:47:17 +02:00
ad400006d3 Point submodules to latest master branches
We did not update them for really long time and the currently used
hashes are quite old and probably wouldn't work without manually
updating all submodules.

Not as if it's something totally crucial (we ask to update submodules
all the times and that's what `make update` does) but updating hashes
will save some cloning/checkout time.
2016-09-02 11:44:22 +02:00
98d28a8a6c Blender 2.78 commit!
Includes:

- Version bump to 2.78
- Doxy file update
- New splash screen
- Wrapped some do_versions with version check
- Updated template to use proper font

After poking around a lot it seems Droid Sans was used during 2.7x series.
(or at least difference between using this font and comparing to previous
splash screens gives none visible difference).
2016-09-02 11:37:25 +02:00
b399a6d33f Fix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't Update on Frame Change
Not really ideal fix at all, but we are at RC today, so better to play really safe.
2016-09-02 09:58:41 +02:00
fce8f24628 Cycles: Silence strict compiler warning in release build 2016-09-02 09:14:34 +02:00
8b2a450520 Fix T49222: Image Save settings are overridden by the File Save Screen ones.
There were two inconsistencies in how 'save image' op initiated its settings:
* It would always use ImBuf->planes value.
* It would always use Image views settings.

Both of those settings should come from scene->r.im_format (as everything else)
when saving render/compo result...
2016-09-02 08:37:57 +02:00
e7ea1ae78c Cycles microdisplacement: Improved automatic bump mapping
Object coordinates can now be used in the displacement shader and will give
correct results, where as before bump mapping was calculated from the displace
positions and resulted in incorrect shading.

This works by evaluating the shader in two parts, first bump then surface, and
setting the shader state to match what it would be if the surface was
undisplaced for the bump shader evaluation. Currently only `P` is set as if
undisplaced, but other shader variables could be set as well, such as `I` or
`time`. Since these aren't set to anything meaningful for displacement I left
them out of this patch, we can decide what to do with them separately.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2156
2016-09-01 22:45:49 -04:00
62aecbdac1 Cycles: Store undisplaced coordinates for meshes when needed
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2156
2016-09-01 22:45:29 -04:00
9f1c42392e Cycles: remove duplicate shader storage
Storing multiple copies of a shader was needed when the displacement method was
a mesh option and could be different for each mesh. Now that its a shader option
this is unnecessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2156
2016-09-01 22:44:42 -04:00
f0159d1d48 Fix T49215 2016-09-01 14:00:20 -06:00
159ac3f638 Fix T49224: Crash due to dangling value in 'Object.proxy_from' pointer.
Why/how this may happen remains a mystery, so for now simply clearing this runtime-only
pointer on Object reading...
2016-09-01 21:16:54 +02:00
ff57589afc Curve Fitting: correct initial handle sign
In practice the initial values are almost never used.
2016-09-02 02:58:34 +10:00
2d589e8549 Math Lib: avoid char > int conversion w/ line plot 2016-09-02 02:54:16 +10:00
Julian Eisel
96dd1943af Fix crash calling wm.open_mainfile from menu with --debug-memory enabled
Didn't do any bisecting, but guess it's caused rBb54e95a5c8dcb7 (2.74 is fine, 2.75 isn't).
I think this fix makes some other hacks redundant but need to check details (will do when we're back to bcon1 to avoid regressions).
2016-09-01 16:55:01 +02:00
Julian Eisel
e240025276 Fix T49199: Combination of dialog + wm.open_mainfile causes crash
Issue was that the wm.open_mainfile OP caused all handlers to be removed and since rB45592291 cancelled (which is correct in general), the menu that triggered the OP should not be cancelled though.
Not sure if this is a nice fix or not, it's however the safest fix I found. A different fix would be to call UI_popup_block_close before WM_operator_call_ex (in dialog_exec_cb), but not sure how safe this is and want to further investigate if it makes other hacks/fixes redundant.

There's still a crash with --debug-memory that confused the heck out of me (since I always have --debug-memory enabled), but I'll commit fix for that separately.
2016-09-01 16:37:45 +02:00
40d072ca7f D2184 Stamp: Make drawing stamp labels optional.
When using metadata stamping, it's often handy to have "Camera" in
front of the camera name, "Marker" in front of the marker text, etc.,
but sometimes those get in the way. This patch allows an artist to
turn those labels on/off.

Reviewed by: sergey, mont29, venomgfx
2016-09-01 15:45:54 +02:00
718f8ae141 pydoc: added missing 'compress' parameter to b.t.BlendDataLibraries.write 2016-09-01 15:30:05 +02:00
9e39488fa6 OpenSubdiv: Fix missing object ORCO when Subsurf uses OpenSubdiv but disabled fore viewport 2016-09-01 15:27:08 +02:00
f7263b8b1a Cleanup: Reduce amount of misleading indentation
Was polluting compile output too much.
2016-09-01 12:14:16 +02:00
475b43ad4a Fix T49175: GLSL material crash with environment maps. 2016-08-31 20:13:08 +02:00
bfd8da753d Fix T49210: Issue with User Count on Images in some shader nodetrees when rendering previews
Our usercount handling was really... infuriating :|

Here, localization (i.e. 'shalow' copy that should not touch to usercounts) was incrementing
usercounts of the sole Textures IDs of lamps and worlds (on the weak and fallacious pretext
that related BKE_free... functions would decrement those counts)... Seriously...

So now, localize funcs do not increment any usercount anymore (since matching BKE_free... ones do
not decrement any either), and we do not call anymore that stupid unlink when freeing temp
localized copies of lamps/materials at end of preview generation.

Note that we probably still have a lot to do to cleanup that copy/localize code, pretty sure
we can dedpulicate a lot more.
2016-08-31 16:48:27 +02:00
8fb9f2dbe9 [Windows] Add support for code signing the final binaries.
The option is controlled with the WITH_WINDOWS_CODESIGN option and needs:

- Signtool must be found on the system, the standard windows sdk folders will be searched for it.
- The path to the pfx file (WINDOWS_CODESIGN_PFX)
- The password for the pfx , this can either be set by the WINDOWS_CODESIGN_PFX_PASSWORD variable but given that ends up in CMakeCache.txt (which might be undesirable) there is a backup option of setting the PFXPASSWORD environment variable on the system.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender, #platform:_windows

Differential Revision: https://developer.blender.org/D2182
2016-08-31 06:26:23 -06:00
b06a70323c Cycles: don't crash if OSLRenderServices::osl_ts is unset 2016-08-30 20:50:22 -04:00
23e3b9f35b Correct render pass identifier usage in toolitps 2016-08-30 22:08:09 +02:00
c5a66b7872 Fix stupid mistake in previous commit 'cleanup' part.
Thanks to sergey for spotting it.
2016-08-30 21:09:33 +02:00
a0cdebde11 Fix bad usercount handling of materials in BKE_mesh_new_from_object().
Curves and meshes (when no modifier application required) would increase their material usercount twice.

Not sure how/why it worked in previous code, but with new, stricter ID handling we need more
careful check of ID 'ownership' handling.

Reported by Sergey over IRC, thanks.
2016-08-30 20:38:53 +02:00
7aedd0e6b0 Cycles: Fix calculation of normals for subdivision meshes
Not sure what happened here. Will have only effected Cycles standalone with
linear subdivision in use.
2016-08-30 12:24:57 -04:00
959b06b3c8 Fix type mismatch causing the buffer overflow in D810 2016-08-30 17:15:26 +03:00
43dcfcb27a Fix T49201: Mesh with OpenSubdiv subsurf and a texture disappears in Material viewport mode 2016-08-30 12:12:46 +02:00
c376878e54 Fix T49187: inconsistent Normal Map node output for backfacing polygons.
There basically are two issues here: in smooth mode (and all non-tangent
normal map types) it doesn't invert the normal for backfacing polys;
on the other hand for flat shaded tangent type it is inverted too soon.

This fix does a brute force correction by checking the backfacing flag.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D2181
2016-08-30 12:48:59 +03:00
3a0c0c1b54 Fix node editor to display node group names in the bottom left corner.
Currently it pointlessly repeats the material name there, separated by
slashes. That obviously should display the nested group path instead.
2016-08-30 12:32:31 +03:00
47b87e1f3b Usual i18n/UI messages fixes... 2016-08-30 10:43:37 +02:00
de64f66a2f Fix T49158: Take II, some more untranslated UI messages... 2016-08-30 10:43:37 +02:00
062cf99fd1 Cleanup: Indentation 2016-08-30 10:29:53 +02:00
5f14bc1b47 GPencil: Fix segment fault when undo
When undo in UV/Image editor and press ESC key, there was segment fault
in Toolsettings because the reference was missing. Now the toolsetting
is loaded from context and not from local operator data.
2016-08-29 22:17:57 +02:00
fa092da377 GPencil: Replace strcpy by BLI_strncpy 2016-08-29 21:57:08 +02:00
5c04b4fdfb Fix T49196 2016-08-29 13:33:30 -06:00
2090ed164f Cleanup/refactor spacefile's 'check dir' code.
Was kinda split in two different places (one allowed to modify given path to always get a valid one,
the other only checking for validity of given path), not nice - and broken in asset branch case.

So rather extended a bit FileList->checkdirf to handle both cases (modifying and non-modifying path).
2016-08-29 16:42:49 +02:00
8f215d9b52 Fix for Bevel segments bug T49183; but doesn't fix whole report yet. 2016-08-29 08:51:04 -04:00
09dc8a7954 Fix T49181: Movie clip animation lost when invoking action which reloads the clip
Was a bug since the very beginning of movie clip animation support
which was done on Feb 2012.
2016-08-29 13:09:03 +02:00
a9f8e384f1 Movie clip: Add missing animation data RNA declaration
Was missing since the beginning of the days.
2016-08-29 13:04:24 +02:00
cc2faa409f Fix T49172: mixdown sound op not exporting full length
Thanks Flavio Perez for the fix.
2016-08-29 10:55:17 +02:00
5af58faf79 Fix compilation error caused by wrong array initialization
We usually don't silence migh-be-uninitialized warning (which is the only
thing which could explain setting matrix to all zeroes) so we can catch
such errors when using tools like Valgrind.

I don't get warning here and the initializer was wrong, so removing it.

If it-s _REALLY_ needed please do a proper initialization.
2016-08-29 09:40:15 +02:00
936a2c6459 GPencil UI: Move the "quick toggles" for colors into their own row below the list
Previously, they were in a column alongside the list, but because the lists were
rarely that long, there would always be a large gap left below the list.
2016-08-29 17:10:53 +12:00
195c7797e6 Fix: Some settings (e.g. "volumetric strokes") from old files were not getting correctly ported to GPv2 2016-08-29 17:00:18 +12:00
f5ddcd4ce9 Code Cleanup: Fixes for some issues noticed during previous fix 2016-08-29 16:39:27 +12:00
cea8f024ec Fix: GPencil Paste couldn't be used to paste strokes from one datablock to another
This was because the poll callback was checking for the presence of an active layer.
If you just create an empty datablock and try to paste, nothing would happen.

However, this check was kindof redundant anyway, as the operator would add a layer for
you if it didn't find one.
2016-08-29 16:27:23 +12:00
44524f7519 Small optimisation: Only calculate the inverse_diff_mat once per stroke instead of for every point
(Later this calculation should be moved into the iteration macro instead, since
it only needs to be applied once per layer along with the diff_mat calculation)
2016-08-29 14:51:31 +12:00
299bb019b5 GPencil: "Reproject Strokes" operator
A common problem encountered by artists was that they would accidentally move
the 3D cursor while drawing, causing their strokes to end up in weird places in
3D space when viewing the drawing again from other perspectives.

This operator helps fix up this mess by taking the selected strokes, projecting them
to screenspace, and then back to 3D space again. As a result, it should be as if
you had directly drawn the whole thing again, but from the current viewpoint instead.
Unfortunately, if there was originally some depth information present (i.e. you already
started reshaping the sketch in 3D), then that will get lost during this process.
But so far, my tests indicate that this seems to work well enough.
2016-08-29 14:51:30 +12:00
dec7145032 GPencil: Include basic brush settings in "Grease Pencil Settings" panel for 2D Editors
After the GP v2 changes, it wasn't possible to easily set the thickness of strokes
if you didn't know about the pie menus already. This just exposes the same set of
settings.
2016-08-29 14:51:29 +12:00
71eaa28d0e Code Cleanup: Just some fixes for whitespace/typos that I noticed while working on other stuff 2016-08-29 14:51:29 +12:00
20c708d471 GPencil UI: Make "Tint" settings take full width of panel in 2D editors
Parenting options are not visible there (i.e. they're only for the 3D view),
so reserving space that isn't going to be used in those editors doesn't really
make much sense. Furthermore, those property regions are often quite narrow
too, so it doesn't help too much to keep these settings so narrow there.
2016-08-29 14:51:28 +12:00
8a02c5fc62 Fix T49163: let Cycles only hide particles with missing motion data, not regular objects. 2016-08-28 21:26:03 +02:00
116bab702e Fix T47639: OpenGL render with smoke and fire incorrect when using
transparency.

The issue is that we are rendering to a 0..1 clamped sRGB buffer with
unpremultiplied alpha, where the correct thing to do would be to render
to an unclamped linear premultiplied alpha buffer. Then we would just
make fire purely emissive without affecting the alpha channel at all,
but that doesn't work here.

So for now, draw fire and smoke separately using different shaders and
blend modes, like it used to before the smoke programs were rewritten
(see rB0372b642).
2016-08-28 16:50:59 +02:00
a5261e06a3 Fix T49167: Normals in wrong coordinate space when adaptive subdivision is used
Meshes with Cycles subdivision were being transformed to world space leading to
normals to sometimes be calculated in that space, while they should be in
object space. Also caused dicing to happen at the wrong rate for scaled meshes.
2016-08-27 18:07:04 -04:00
Julian Eisel
4ebfb700ba Fix missing viewport update changing BI lamp shadow method 2016-08-27 23:23:17 +02:00
0a8344e843 GPencil: Added entry for the "Select Strokes Using Active COlor" operator to the Colors panel dropdown
It was already present in a few of the Pie Menus, but it was hard to find it,
so I've included it here too for good measure.
2016-08-28 00:09:16 +12:00
7bc9353957 Code Cleanup (Non-functional tweaks)
General reshuffling of defines and spacing/brace usage for consistency.
In particular:
* When defining types, don't mix pointers and non-pointer types on same line
  to avoid confusion
* As much as possible, have all defines at the top of each block instead of
  scattered haphazardly throughout the code
2016-08-27 22:58:09 +12:00
2a6362255d GPencil: Cleanup change color operator
It is faster to assign the color to the pointer instead to force the new
lookup in drawing function.
2016-08-27 12:52:30 +02:00
fef0cd8191 Fix T49151: ParticleSettings' usercount not decremented when removing a psys from an object. 2016-08-26 20:29:40 +02:00
5849651a46 Cycles: Make UI for subdivision more clear
Users have been getting a bit confused by the way things are worded/arranged in
the UI. This patch makes a few changes to the UI to make it more clear how to
use subdivision:

- make Subdivide UVs option inactive when adaptive subdivision is enabled as UV
  subdivision is currently unsupported
- add "px" to dicing rates in the Geometry Panel
- display the final dicing rate in the modifier
- reworded "Dicing Rate" in the modifier to "Dicing Scale" to make more clear
  that this is a multiplier for the scene dicing rate and added a note the the
  tooltip pointing the user to that setting in the Geometry Panel

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2174
2016-08-26 12:14:07 -04:00
e9c5359f43 Usual i18n/UI messages fixes... 2016-08-26 16:14:56 +02:00
1a1bcad43a Fix T49158: Untranslatable elements in UI.
We cannot skip 'collections clesse' when generating i18n messages from RNA, some of them
are visible and UI...
2016-08-26 15:46:56 +02:00
fcffb14d7b Fix linking issue with OpenEXR and Zlib.
Link Zlib after OpenEXR.

Differential Revision: https://developer.blender.org/D2176
2016-08-26 14:28:51 +02:00
62b1cdd66e Fix over creation of cache files handles (leading to memory leaks).
Multiple threads could create multiple handles for the same cache file,
so protect handle creation with a mutex, to make sure only one is
created.
2016-08-26 14:28:50 +02:00
8870c454a1 Fix cache constraint not reference counting cache files. 2016-08-26 14:28:50 +02:00
f2f107572c Fix T49168: crash when evaluating a cache constraint with a NULL cache
file.
2016-08-26 14:28:50 +02:00
1ada3231ec Depsgraph: Report number of objects to which update as flished
This is an easiest way in the new depsgraph to get an idea how much objects
were handled on update.
2016-08-26 14:05:24 +02:00
72b24d9c6c Cleanup: Remove unused variable 2016-08-26 14:01:03 +02:00
5f1b580edc Depsgraph: Report overall number of updates objects 2016-08-26 14:00:15 +02:00
86e0485b2e Cleanup: Use more meaningful names and move calculation into am if statement 2016-08-26 13:58:17 +02:00
a80977cd21 Fix T49139: Memory leak in UV image editor related to Undo (and possibly Waveform and Vectorscope).
Assigning NULL to scopes' data pointer in 'non-UI readfile' context was terribly wrong for sure,
if we'd really want to reset them here we should freed them first.

But we can rather just ignore them here, those are purely runtime data managed by image editor,
no need to touch them here.
2016-08-26 12:54:49 +02:00
f73c4b421d Fix: Use submenu for GPencil -> Select Grouped 2016-08-26 16:38:31 +12:00
274e1c4f1f Code Cleanup
* Stroke editing functions should be in gpencil_edit.c not gpencil_data.c
  (the latter is only for handling "CRUD" operations on things like
   layers, brushes, and palettes)
* Deduplicate the GP_STROKE_BUFFER_MAX define
2016-08-26 16:25:39 +12:00
2ac75fe035 Fix: Color of frame/selected object indicator in 3D View didn't indicate GPencil keyframes
when there was no active object
2016-08-26 16:15:48 +12:00
84cd137503 GPencil: Select Grouped -> By Color
Added a way to select all the currently visible strokes that use the same
color as the selected stroke. This can be accessed via the Select Grouped (Shift-G)
operator as an alternative to selecting by layer.
2016-08-26 16:15:48 +12:00
56360a3ddf GPencil RNA: Set pressure and strength to 1.0 by default for new stroke points added via stroke.points.add()
This commit adds optional "pressure" and "strength" arguments to the
stroke.points.add() method. These are given default values of 1.0,
so that old scripts can be ported over to the new API with less effort
while reducing confusion about why auto generated strokes won't appear.
2016-08-26 16:15:47 +12:00
50a44edca4 Cycles: Remove some redundant checks 2016-08-25 10:52:00 -04:00
2d1f522a74 Fixed little error in comment
"amount" is for uncountable things, "number" is for countable things.
2016-08-25 16:22:37 +02:00
9444cd56db Depsgraph: Prioritize evaluation of the new scheduled nodes
The idea here is again to finish objects evaluation as soon as possible.

Seems to be giving another 3% speedup in the barber scenes.
2016-08-25 16:08:41 +02:00
84be763be2 Depsgraph: Merge some traversal back on
After previous commit there is no longer measurable difference
in speed and doing all stuff in one go is preferrable here anyway.
2016-08-25 15:51:19 +02:00
eb2cfc3a25 Depsgrpah: Use deque for the flush queue
The idea of the change is to avoid queue growing too long
and handle all the operations as quick as possible.

Gives about 3% speedup on one of the barber shots here.
2016-08-25 15:13:36 +02:00
adfd58aa49 Fix T48788: Diffuse color in BI Textured Solid mode is not updating properly in Sculpting mode
Was caused by 6276726, so for the time being revert the optimization part of change.
2016-08-25 13:48:23 +02:00
6a48318163 Cycles: Cleanup, indentation 2016-08-25 12:33:07 +02:00
86c719f796 Cycles: Fix crash after recent subd fixes
Was happening when object only had curves (doe example, object with hair
particle system and emitter rendering disabled).
2016-08-25 11:31:36 +02:00
086ec8af48 Cycles: Support proper visibility check in single volume intersection step for QBVH 2016-08-25 11:13:35 +02:00
99451698d3 Cycles: Implement proper visibility check in QBVH volume all intersection 2016-08-25 11:09:06 +02:00
29c733e6f2 Fix T49078: Cycles tries to render volume from another render layer when camera is in volume 2016-08-25 10:55:59 +02:00
3c533be77e Fix T49112: Alembic unicode path issues on Windows.
Now we pass streams to Alembic instead of passing the filename string.
That way we can open the stream ourselves with the proper unicode
encoding.

Note that this only applies to Ogawa archive, as HDF5 does not support
streams.

Differential Revision: https://developer.blender.org/D2160
2016-08-25 05:19:41 +02:00
bfc5a94292 Windows Packaging : Make package-name confirm to the windows[32/64] naming scheme we use. 2016-08-24 09:37:42 -06:00
438bcc6d28 Cycles: Fix crash when empty mesh has subdivision
OpenSubdiv doesn't like empty meshes, so we need to be careful not to
subdivide when the mesh is empty.
2016-08-24 10:39:00 -04:00
74bd809962 Cycles Standalone: Fix support for subdivision meshes
Changes from microdisplacement work broke previous support for subdivision
meshes, sometimes leading to crashes; this makes things work again. Files
that contain "patch" nodes will need to be updated to use meshes instead, as
specifying patches was both inefficient and completely unsupported by the new
subdivision code.
2016-08-24 10:39:00 -04:00
0ca4e39424 Fix T49148: Blender Crash With B select on Skeleton Sketching 2016-08-24 14:17:26 +02:00
8d8316a057 Cycles: Consolidate the various split CL kernel feature defines within the AMD platform
Reviewers: sergey

Differential Revision: https://developer.blender.org/D2172
2016-08-24 12:32:40 +02:00
389b4feec1 Fix T49128: Ghost of Previous Mask appears in Double Edge Mask
Patch by Ted Schundler (tschundler), thanks!

Differential Revision: https://developer.blender.org/D2163
2016-08-24 11:20:13 +02:00
262adf7d91 Fix T49130: "Inner Edge" / "Buffer Edge" options in the Double Edge Mask are wired to the wrong settings
Patch by Ted Schundler (tschundler), thanks!

Differential Revision: https://developer.blender.org/D2141
2016-08-24 11:00:21 +02:00
22b913a278 Fix T49121: VSE and border render incompatible
For now just check for such incompatible configuration, real fix
requires quite some work to be done.
2016-08-24 10:24:24 +02:00
d99c513afa Cycles OpenCL: use AoS rather than SoA storage for ShaderData.
Fixes part of the performance regressions compared to 2.76b, see T49046, T48876.
2016-08-24 01:45:27 +02:00
e484fe84cd Usual i18n/UI messages fixes. 2016-08-23 22:03:18 +02:00
fe8b197269 Fix T49150: make new 'operator categories' in search menu i18n-aware. 2016-08-23 21:48:16 +02:00
7dc328e8a1 D2078 Windows : add option to prevent find_package from picking up the wrong libraries and use hardcoded paths instead. 2016-08-23 08:48:27 -06:00
36b80b185f Cycles: Fix/workaround for missing AA on Pascal (GTX10x0) cards 2016-08-23 16:32:09 +02:00
eb5cd578b8 Cleanup: Output argument name and const qualifier 2016-08-23 15:56:10 +02:00
a853367fbf Fix T49140: Noise and jitter present at some areas when using ambient oclusion in Blender internal renderer 2016-08-23 15:54:36 +02:00
f732293147 OpenCL: Support multiple ABI libraries on Linux
Solves issue reported in T49144.
2016-08-23 12:23:37 +02:00
e2f323c3ec attempt to fix compilation error on windows 2016-08-23 12:01:55 +02:00
9c3b9f6a83 2D stabilization: Fix broken auto-scale all the recent work
Auto-scale is expected to work just fine now.

Only thing changed now is the pivot point for the scale: it is now
the same as rotation pivot, so scaling happens around weighted median
of the translation tracks. This seems to be what is actually required
for the VFX workflow.
2016-08-23 11:53:35 +02:00
baaa2d6d39 Change Request: use weight centre of location tracks as pivot
Previously, this extension used the translation compensated image centre
as reference point for rotation measurement and compensation. During
user tests, it turned out that this setup tends to give poor results
with very simple track configurations.

This can be improved by useiing the weighted average of the location
tracks for each frame as pivot point. But there is a technical problem:
the existing public API functions do not allow to pass the pivot point
for each frame alongside with the stabilisation data. Thus this
change implements a trick to package a compensation shift into
the translation offset, so the rotation can be performed around
a fixed point (center of frame). The compensation shift will then shift
the image as if it had been rotated around the desired pivot point.
2016-08-23 11:53:35 +02:00
498ba756ab 2D stabilization: by default init anchor_frame to frame 1
It is common in blender to use 1-based counting for
frame sequences (while 0-based is allowed). Thus
initializing to use frame 1 as reference for stabilization
is likely to produce smooth start values in most cases
2016-08-23 11:53:35 +02:00
fd65a64930 2D stabilization: change presentation of target_scale in UI
Alongside with this change, we fix disabling of Autoscale,
because this feature works even when rotation/scale is disabled.
2016-08-23 11:53:35 +02:00
3dbe174440 2D stabilization: flip orientation of the scale parameter
values > 1 will zoom in and values < 1 zoom out

Rationale: the changed orientation is more natural
from a user POV and doing it this way is also more
consistent with the calculation of the other
target_* parameters.

Compatibility: This will break *.blend files saved
with the previous version of this patch from the
last days (test period). It will *not* break any
old/migrated files: Previously, the DNA field "scale"
was only used to cache autoscale. Only with the
Stabilisator rework, "scale" becomes a first class
persistent DNA field. There is migration code to
init this field to 1.0
2016-08-23 11:53:35 +02:00
95d3ca8bc6 Fix inconsistency: expected scale not be subject to scale influence
We should treat all three "target" ("expected") parameters in a similar way:
The "influence" control should only work on the measurement part of stabilisation,
i.e. it should only control the automatic part of stabilisation, while
the target parameters are deliberately set by the user and thus should
even be in effect when the automatic stabilsation is turned down.

It used to be so for location and rotation, but for the scale part,
I re-used the existing code for autoscale, which also had the scale influence
work on the autoscale factor. This was sensible in the old version,
since scale_influence was the only way to control the result. But now,
the user has always total control trough the "target_*" parameters
and thus we should prefer to treat all similar.
2016-08-23 11:53:35 +02:00
0dec3d6e22 Build Packaging : Set proper package name on Windows. 2016-08-22 08:15:03 -06:00
eb2ee7212e Fix T49136: full constant Curves with zero Fac input crashes in assert.
The if branches were reordered when the original patch was
committed, which broke the implicit non-NULL guarantee on link.

To prevent re-occurrence, add a couple of unit tests.
2016-08-22 11:11:45 +03:00
28cf9cfd15 NDOF: fix crash on Mac with old drivers
For best results use the latest 3Dconnexion driver. But latest is only
supported on Mac OS 10.9+. We go all the way back to Mac OS 10.6 so
have to deal with older driver versions.

See the original dlclose line for my faulty assumption. Waiting to
unload the driver later fixes the crash. Newer drivers don’t seem to
have this issue.

Also removed WITH_INPUT_NDOF guards as NDOFManager.h takes care of
this. Follow-up to b10d005 a few days ago.
2016-08-21 23:09:30 -04:00
Julian Eisel
ea69d471c8 Sculpting: Avoid calculating and chaching viewport matrices
Really couldn't find where this was used.
2016-08-21 23:59:18 +02:00
ced66f1da9 Update .gitignore to some more generated/non-git-stored files. 2016-08-21 22:40:57 +02:00
0f01f7bb54 Update sphinx_doc_gen.py to work with recent changes (GPv2). 2016-08-21 22:38:06 +02:00
81b1792fb7 Icons: Fix small alignment and shadow issue in prvicons. Add missing copyright notice. 2016-08-21 19:10:02 +02:00
ff8d16399c Cleanup: let's try to avoid too much indirect header imports, makes things harder when some cope changes... 2016-08-21 13:20:49 +02:00
43bb8f12f4 Fix T49060: crashes during render with no apparent reason...
Was a concurrent access of pointcache from both particle system and UI (time space).

Pointcache not being threadsafe is really an issue to be addressed for its next version,
for now simply locking spacetime (like we already do with 3DView), not ideal fix
but it's working and safe for release.
2016-08-20 16:03:33 +02:00
67dcad4011 Fix T49119: Batch-Generate Previews operator fails.
previews render utils needed to be updated slightly against new behavior of maindata.remove.
2016-08-20 14:49:44 +02:00
8e02b024c0 Fix OpenSubdiv driver crash due to recently added uninitialized field.
For some reason my NVidia linux driver crashes in
glDeleteTextures when the ID is total garbage.
2016-08-20 13:48:29 +03:00
0e5e53c651 Fix crash in OpenVDB highres smoke cache when seeking to frame 0.
This code obviously should also use the cache_fields flag variable,
like the code for reading the lowres data in the same function.
This is because fluid_fields actually represents the old state before
smoke was reallocated to match cache_fields read from the file, and if
it has some fields enabled that aren't allocated any more, it crashes.

This also fixes a reverse glitch: when a file was loaded with
the current frame in the middle of a baked smoke+fire simulation,
smoke appeared immediately, but the fire didn't until the frame
was changed. The reason is the same: after file load no fields
are initially allocated and thus fluid_fields is 0.
2016-08-20 12:13:20 +03:00
36ab737ef7 Alembic export UI: avoid displaying empty box. 2016-08-20 09:30:38 +02:00
cf53389425 Fix T49090: color picking draws wrong when using subsurf in material draw mode.
ccgDM_drawMappedFacesMat was missig a smooth shade model restore, some other
functions were redundantly setting it since we can assume it to be the default
state already.
2016-08-19 23:20:24 +02:00
62e3849f40 Fix T49105: Array modifier displayed in Edit mode crashes on selection, with End Cap enabled.
Origindex can be invalid, code was not fully protected against it...
2016-08-19 17:00:34 +02:00
33fbf9b7e0 Fix broken keymap loading with disabled ndof - revert part of recent rBb10d0058d72da30
ifdef’ing out defines in DNA/RNA is not a good idea, was breaking alternative keymaps loading
from splash screen e.g. (reported by Sergey over IRC, thanks).
2016-08-19 15:51:44 +02:00
793900d46c 2D stabilization: Make interface more compact
Joins some things to the same row and uses aligned columns to get
minimum use of vertical space.

Probably still some tweaks required, but getting there :)
2016-08-19 12:21:13 +02:00
5f7611a8f1 Alembic: fix crash accessing invalid objects. 2016-08-19 05:22:46 +02:00
bf4875001d Fix T49111: Automatically add file path suffix for Alembic and Collada
export.

This aligns the behaviour of the file selection with the other
exporters. The Alembic case would fail if the filepath did not have an
extension set.

Also set a default file name for the Alembic export operator in case the
Blender file was not saved before exporting.
2016-08-19 04:42:45 +02:00
Julian Eisel
4d8ac1eaa5 Cleanup: Remove redundant comment 2016-08-19 01:20:35 +02:00
ca5271e637 Cycles: Fix wrong allocator used for spatial builder 2016-08-18 20:47:48 +02:00
f4e4009afd Cleanup: some bad sizeof() usages. 2016-08-18 16:18:58 +02:00
2e6d4270cd Cleanup/security fix: do not use strcpy (at least in new code).
This function is only really secure in a very limited amount of cases,
and can especially bite you later if you change some buffer sizes...
So not worth bothering with it, just always use BLI_strncpy instead.
2016-08-18 16:06:11 +02:00
7b4ba65a87 Cleanup for previous commit (nasty IDE replacing tads with spaces, tsst)
Sorry for the noise :|
2016-08-18 15:21:53 +02:00
b4d36c77da Two fixes for optional ndof & fix bplayer for that...
Seriuosly, guys... Please always check that kind of changes with and without affected option, and in full build case.
2016-08-18 15:18:26 +02:00
7b78532950 Freestyle: fix wrong arg order, and cleanup confusing loop (both reported by coverity).
Error: `origin` and `edge` args were swapped in final `FindOccludee()` call of `ViewMapBuilder::ComputeRayCastingVisibility()`

Cleanup: main for loop in `Strip::createStrip()` was really confusing (though correct),
generated a false positive in coverity scan, now should be cleaner how it loops over its vprev/v/v2
triplet of consecutive items.
2016-08-18 14:37:48 +02:00
26f4f7edca Final UI messages fixes (for this session...). 2016-08-18 14:37:48 +02:00
8a72ec80a0 Fix bplayer (c) after NDOF changes from merwin 2016-08-18 11:28:41 +02:00
12c3002618 Cleanup: ifdef function which is only used from ifdef-ed code 2016-08-18 10:36:06 +02:00
b10d0058d7 NDOF: compile 3D mouse code only if WITH_INPUT_NDOF
When WITH_INPUT_NDOF is disabled, 3D mouse handling code is removed
from:

- GHOST (was mostly done, finished the job)
- window manager
- various editors
- RNA
- keymaps

The input tab of user prefs does not show 3D mouse settings. Key map
editor does not show NDOF mappings.

DNA does not change.

On my Mac the compiled binary is 42KB smaller after this change. It
runs fine WITH_INPUT_NDOF on or off.
2016-08-18 00:22:18 -04:00
a195dd15d4 NDOF: suppress buttons debug log
Accidentally left this in the 3D mouse code. Mac only.
2016-08-18 00:22:18 -04:00
f92a6b8d1b Fix compiler warning after fix for T48913. 2016-08-18 02:24:24 +02:00
e8b5e66db1 Code cleanup to use array.data() rather than &array[0]
(Now without the build errors)
2016-08-18 02:24:13 +02:00
7baf93c711 Revert "Code cleanup to use array.data() rather than &array[0]."
This reverts commit 40b367479c.

Didn't build or solve any known issue. Please don't push changes without
testing them first.
2016-08-17 18:49:18 -04:00
40b367479c Code cleanup to use array.data() rather than &array[0].
These latter can cause MSVC debug asserts if the array is empty. With C++11
we'll be able to do this for std::vector later. This hopefully fixes an assert
in the Cycles subdivision code.
2016-08-17 23:54:47 +02:00
c0161a1bab Fix T48913: cycles viewport render stuck in loop due to non-unique dupli ID. 2016-08-17 23:16:37 +02:00
11e9c5e10a Fix T49104: normal problem in imported Alembic objects
Recompute the normals if the normals are supposed to be varying (e.g. in
the ISchema).
2016-08-17 23:03:34 +02:00
8e7bbe66dd Alembic import: fix scene min/max time computation to take objects with
transform animations into account.
2016-08-17 22:26:50 +02:00
294b0756b4 Fix T49081: Alembic sampling times are not taking start frame into
account.

This resulted in animations always starting at frame 0.
2016-08-17 22:26:50 +02:00
c783e65762 Fix/add some tooltips to 'Object Align' operator options. 2016-08-17 21:24:13 +02:00
e3b5aa9bb1 Fix Bevel crashes T49088 and T48858.
Was calling the fast path for finding edge order in cases
where it should not have been called.
2016-08-17 11:24:31 -04:00
8cac980a28 Cycles: Fix regression where smoke wouldn't show in renders 2016-08-17 10:43:13 -04:00
ab775b6ae9 Fix T49102: Angle option of new GP brush settings is too restricted in value
Now the range is between -90 to 90 degrees to give more customization
options.
2016-08-17 16:23:30 +02:00
47e08ee924 Fix T49086: UV Along Stroke can be set as vector input for environment texture 2016-08-17 14:51:25 +02:00
294eac2991 CMake: Move main platform checks to separate files
Basically title says it all.

The goal is to make platform maintenance easier, so you don't have
to constantly scroll back and forth looking for if() branches to
check which exact platform you're currently working on.

Ideally we also would move option defaults to a platform files,
but that i'm not sure how to implement in a nice way yet.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2148
2016-08-17 14:00:29 +02:00
186ee0934f More UI messages fixes and cleanup. 2016-08-17 12:53:24 +02:00
acbef397ac 2D stabilizer: Cover rotation tracks label with enabled flag 2016-08-17 10:55:41 +02:00
1fb8bbcd3e 2D stabilizer: Use exact getter instead of regular one followed with frame check 2016-08-17 10:49:42 +02:00
1e605357b5 2D stabilizer: Remove check for markers count in the track
This would be a real disaster if track has no markers, which we should
not masquerade and detect such weird cases as soon as possible.
2016-08-17 10:47:05 +02:00
069bc4086c 2D stabilizer: Remove redundant rows from the interface 2016-08-17 10:45:52 +02:00
83d94ef4d0 2D stabilizer: One more occurrence of len() in the drawing code 2016-08-17 10:40:34 +02:00
1c633dea1c 2D Stabilizer: Use more consistent RNA naming for properties
Annoying i did not notice this originally, but for RNA we need to keep
things as much consistent as possible.
2016-08-17 10:37:55 +02:00
de28940b15 2D Stabilzier: Don't use len() for checking whether something is enabled or not
This code runs on every redraw and iterates the whole tracks list, which
is something we should avoid.
2016-08-17 10:37:55 +02:00
e392658405 Fix T49100: Replace old tooltip for GPencil brush iterations 2016-08-17 09:11:58 +02:00
34928ca98a GPencil: Change ruler line thickness to make it thicker 2016-08-17 09:05:37 +02:00
d41dfe36e5 First set of UI/i18n messages fixes (mostly new GP code). 2016-08-16 22:36:59 +02:00
b90421019b Fix T49097: GP ruler data reinstances GP_Palette Color
If the ruler is saved, a new color was created for each ruler. With the
change, a color is created for the first instance, and it reused in the
following instances. The default color is the current default color for
GP.
2016-08-16 22:29:13 +02:00
a67ca5e30c Cleanup unused return value (was making coverity sad). 2016-08-16 18:22:03 +02:00
1e4e140efb More fixes from coverity report. 2016-08-16 18:19:52 +02:00
64a6a86d57 Fix two memleaks found by coverity. 2016-08-16 16:16:22 +02:00
ae475e3554 Fix release build after recent fix for debug one
It's becoming annoying to have public API dependent on build type
and everything. Let's just always have API defined and do stubs
in the function implementation instead.
2016-08-16 15:06:16 +02:00
9368bdab01 Fix depsgraph to compute more accurate links for collision & force.
Current implementation more or less indiscriminately links physics
objects to colliders and forces, ignoring precise details of layer
checks and collider groups. The new depsgraph seemed to lack some
such links at all. The relevant code in modifiers suffers from a
lot of duplication.

Different physics simulations use independent implementations of
collision and similar things, which results in a lot of variance:

* Cloth collides with objects on same or visible layer with dupli.
* Softbody collides with objects on same layer without dupli.
* Non-hair particles collide on same layer with dupli.
* Smoke uses same code as cloth, but needs different modifier.
* Dynamic paint "collides" with brushes on any layer without dupli.

Force fields with absorption also imply dependency on colliders:

* For most systems, colliders are selected from same layer as field.
* For non-hair particles, it uses the same exact set as the particles.

As a special quirk, smoke ignores smoke flow force fields; on the other
hand dependency on such field implies dependency on the smoke domain.

This introduces two utility functions each for old and new depsgraph
that are flexible enough to handle all these variations, and uses them
to handle particles, cloth, smoke, softbody and dynpaint.

One thing to watch out for is that depsgraph code shouldn't rely on
any properties that don't cause a graph rebuild when changed. This
was violated in the original code that was building force field links,
while taking zero field weights into account.

This change may cause new dependency cycles in cases where necessary
dependencies were missing, but may also remove cycles in situations
where unnecessary links were previously created. It's also now possible
to solve some cycles by switching to explicit groups, since they are
now properly taken into account for dependencies.

Differential Revision: https://developer.blender.org/D2141
2016-08-16 15:46:36 +03:00
a74dab86ee Fix redundant declarations after recent changes in GPU debug 2016-08-16 14:40:23 +02:00
b7d656c3b2 2D stabilizer: Revert majority of UI change
For now simply reshuffle option so they keep proper dependency flow.

Benefits:

- Has an ability to hide tracks lists to work with other sliders around.
  Could be really handy to quickly get rid of lenghty lists.

- From a feedback seems to be fitting workflow better.

Things to doublecheck on:

- Feels a bit misordered: first you define whether one want to have
  rotation stabilized, then have tracks, then scale options.

  While this follows dependency flow (which is really good and which
  we should not violate) it has weird feeling on whether things are
  really where they have to be.

- Autoscale controls visibility of max-scale, can we just make it
  active/inactive instead?

- Autoscale replaces slider with label. Can it be disabled slider
  instead to reduce visual jumping (disabled slider prevents user
  input)

Hopefully we'll still want to have collapsable box after re-iterating
over this points, so we don't waste bits in DNA.
2016-08-16 14:25:55 +02:00
cd5116e914 2D stabilizer: Fix compilation error in debug mode 2016-08-16 14:24:06 +02:00
e3576c7bf4 Correct previous commit, need to indent verisoning code 2016-08-16 13:53:29 +02:00
5e8c09921e 2D stabilization: Modify interface so dependency goes strictly from top to bottom 2016-08-16 13:32:11 +02:00
b1677201f9 Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki

See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo

This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.

  - Use a weighted average of movement contributions (instead of a median).
  - Allow for rotation compensation and zoom (image scale) compensation.
  - Allow to pick a different set of tracks for translation and for
    rotation/zoom.
  - Treat translation / rotation / zoom contributions systematically in a
    similar way.
  - Improve handling of partial tracking data with gaps and varying
    start / end points.
  - Have a user definable anchor frame and interpolate / extrapolate data to
    avoid jumping back to "neutral" position when no tracking data is available.
  - Support for travelling and panning shots by including an //intended//
    position/rotation/zoom ("target position"). The idea is for these parameters
    to be //animated// by the user, in order to supply an smooth, intended
    camera movement. This way, we can keep the image content roughly in frame
    even when moving completely away from the initial view.

A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.

Own modifications:

- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
  don't use doxygen with it's weird markup and comments are supposed to
  start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.

Reviewers: sergey

Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung

Maniphest Tasks: T49036

Differential Revision: https://developer.blender.org/D583
2016-08-16 13:30:40 +02:00
c00b2d8991 OpenGL: ignore deprecated API warnings
Reduces noise from --debug-gpu so we can spot serious errors.

Blender 2.7x uses OpenGL 2.1, we don't care if features are deprecated.

I'll re-enable these warnings for blender2.8 after next merge.
2016-08-15 14:55:09 -04:00
76b6c77f2c Cycles microdisplacement: Allow kernels to be built without patch evaluation
Kernels can now be built without patch evaluation when not needed by the
scene (Catmull-Clark subdivision not in use), giving a performance boost
for some devices.
2016-08-15 11:13:18 -04:00
33c83a289d Fix Cycles OpenCL textures after recent CUDA fix.
kernel_textures.h is included in device_opencl.cpp, so we can't check
__KERNEL_OPENCL__ there.
2016-08-15 16:28:48 +02:00
ad4a01ec0f Fix OpenGL backtrace build errors, without disabling warnings. 2016-08-15 15:36:01 +02:00
988b4e2c80 Tentative compile fix after recent gpu debug changes 2016-08-15 13:46:38 +02:00
2c03d0186a OpenGL: debug context on Windows
Enable based on --debug-gpu at the command line. Linux already works
this way.

This commit in master (2.78 timeframe) is the smallest change that gets
the desired result. I did a similar commit in blender2.8. Most ongoing
GL debug work will go into 2.8, not 2.7x.

In support of T49089
2016-08-15 04:49:07 -04:00
ad6e7a0be1 OpenGL: backtrace on errors (--debug-gpu)
Backtrace so we can pinpoint where the GL error came from. Then fflush
on severe errors in case it's severe enough to crash Blender.
2016-08-15 04:10:54 -04:00
55eb8ce873 OpenGL: enhance debug output
When running blender --debug-gpu

Display which debug facilities are available. One of these, in order of preference:
- OpenGL 4.3
- KHR_debug
- ARB_debug_output
- AMD_debug_output

All messages are logged now, not just errors. Will probably turn some of these off later.

GL_DEBUG_OUTPUT_SYNCHRONOUS lets us break on errors and backtrace to the exact trouble spot.

Callers of GPU_string_marker no longer pass in a message length, just the message itself (null terminated).

Apple provides no GL debug logging features.
2016-08-15 04:06:14 -04:00
9b0f6fa7f7 Revert "Cycles: Use half storage for 16bit files (e.g. 16bit pngs) as well."
After discussion in IRC, 16bit int should not be converted to half, too much precision loss.
2016-08-15 01:01:43 +02:00
4d41d8be79 Fix CUDA compilation after OpenCL changes. 2016-08-15 00:04:19 +02:00
a18b2ba643 Cycles: Use half storage for 16bit files (e.g. 16bit pngs) as well.
Note: This only works for textures loaded from disk via OIIO, not packed textures. That's still a ToDo.
2016-08-14 22:24:29 +02:00
9396e11180 Cycles microdisplacement: Move call to tessellate() from addon to Cycles
By calling `tessellate()` from the mesh manager in Cycles we can do pre/post
processing or even threaded tessellation without concerning client side code
with the details.
2016-08-14 15:04:21 -04:00
5c0a67b325 Cycles: Add single channel texture support for OpenCL.
This way OpenCL devices can also benefit from a smaller memory footprint, when using e.g. bumpmaps (greyscale, 1 channel).

Additional target for my GSoC 2016.
2016-08-14 20:21:08 +02:00
Luca Rood
da77d9873f Prevent max stiffness values from going under normal stiffness values in cloth stiffness scaling.
When updating the max values under stiffness scaling, they clip at the normal stiffness values
as expected, however when updating stiffness values, you could set them higher than the max
values, and the max values weren't updated accordingly. As the stiffness scaling computes using
the absolute difference between the max values and the stiffness values, you got higher
stiffnesses in scaled areas even though your max is actually lower than the normal stiffness.

This diff fixes that behaviour, by updating the max values to be equal to the stiffness whenever
you set a higher stiffness than the max value.

Also, I have initialized the max values to the same as the stiffnesses, as they were previously
just set to zero, and caused the same problem described above.

Reviewers: lukastoenne

Reviewed By: lukastoenne

Tags: #physics

Differential Revision: https://developer.blender.org/D2147
2016-08-13 19:48:33 +03:00
35a6e540b1 GPencil: Cleanup code 2016-08-13 17:09:19 +02:00
c395d044fc Fix T49082: Intermediate update call when making links can change group socket layout.
Node tree update calls in the middle of a socket loop are dangerous, they can change sockets
on group nodes and link instances in particular. Updates should only happen after the operator
has finished.

Simply removed the extra convenience check for validity now. Worst case an invalid (red) link
is created which can be removed by the user as well and should simply be ignored by node systems.

The update system in nodes needs a complete rewrite to handle complex cases like this, where an
operator may need to react to changes during its execution.
2016-08-13 16:35:34 +02:00
Julian Eisel
fcb78f2402 Add DNA_struct_find (useful for version patching) 2016-08-13 01:40:19 +02:00
Julian Eisel
25872cae29 Fix error in GPencil V2 version patching
GPencil conversion would just always run for file version 2.77.3. This wasn't an issue in master, but possibly for other branches that used the 2.77.3 block.

Wasn't aware that you have to add the asterisk for pointers either, this is kinda weird. Anyway, it's running correctly now.
2016-08-13 01:35:12 +02:00
04c7d9d566 Depsgraph: tag relations for update when aterial slots changes
New dependency graph puts materials to the graph in order to deal with animation
assigned to them and things like that. This leads us to a requirement to update
relations when slots changes.

This fixes: T49075 Assignment of a keyframed material using the frame_change_pre handler
                   doesn't update the keyframe using the new dependency graph
2016-08-12 14:59:11 +02:00
82268fa100 Depsgraph: Tag relations for update when making datablocks single user
This is mainly required for the new dependency graph where non-object
datablocks are a part of dependency graph.

This solves issue when making mesh shared by multiple objects a single
user one.
2016-08-12 13:58:48 +02:00
bac1279b03 Fix T49045: splash not working correctly on OS X, after recent bugfix. 2016-08-12 01:19:22 +02:00
f3bff6a1a1 Fix T49071: Cycles OSL build problem with oslc compilers that can't find their own stdosl.h. 2016-08-12 01:01:09 +02:00
9d236ac06c Cycles: Enable half float support (4 channels and 1 channel) on CUDA.
Atm OpenEXR half files benefit from this and will use only 1/2 of the memory now. More space for HDRs!

Part of my GSoC 2016.
2016-08-11 22:47:53 +02:00
5ac7ef873b Cycles: Change code order for Image Data Types.
Now we have the 4 component ones first (float4, byte4, half4) followed by the 1 component ones (float, byte, half).
Makes code a bit more consistent and also reduces code a bit when enabling half support on GPU in next commit.

This also exposed a typo in half CPU images for 3D textures, which wasn't used yet, but good to have that one fixed anyway.
2016-08-11 22:30:03 +02:00
3aed54dbd5 Cycles: Fix change of sign warning 2016-08-11 15:09:58 -04:00
013a5c27a5 Cycles: Remove odd definition from CMake file
This was causing Cycles standalone to fail to build from Blender repo.
Hopefully nothing breaks from removing this.
2016-08-11 14:35:43 -04:00
1fe9d671cf Fix T49004 and motion blur of cloth, softbody, etc past the end frame.
Point cache read code contains checks designed to prevent it reading
stale data when the relevant simulation code should instead compute
the next frame from the previous one. However in some situations like
motion blur subframes the simulation can't possibly do it and just
exits. This causes completely incorrect motion blur at or after the
last cached frame.

To fix, add a parameter that tells the cache code whether it should
apply the checks and exit, or read what it can even if stale (true
means exactly same as old behavior).

Doing this in cache rather than clamping the frame number better in
the caller lets it handle the case of incomplete cache that stops
before the official last frame.

Reviewed By: mont29, lukastoenne

Maniphest Tasks: T49004

Differential Revision: https://developer.blender.org/D2144
2016-08-11 13:36:29 +03:00
fdc43f993d Cycles: Use static assert to control structures alignment 2016-08-11 10:12:06 +02:00
a501668cc5 Revert "Cycles Tests: Add test for correct 16 byte alignment of KernelData structs"
Using unit tests is a wrong way to control static behavior of the
application. They should only be used for checking dynamic behavior,
all the rest is easily controllable at compile time.

Doing tests at ocmpile time are actually more robust approach since
we don't have strict policy of runnign unit tests before accepting
any change.

Proper alignment control is coming shortly.

This reverts commit 7c3a06c349.
2016-08-11 10:08:23 +02:00
7c3a06c349 Cycles Tests: Add test for correct 16 byte alignment of KernelData structs 2016-08-10 20:49:45 +02:00
4d1bf1472e Cycles Standalone: Fix building after microdisp changes 2016-08-10 14:08:13 -04:00
82e65abfef Cycles: Fix KernelIntegrator padding to 16-byte boundary 2016-08-10 20:04:52 +02:00
498b7bd7ce Updated install_deps.sh to OSD 3.0.5 (and switch from git repo to download archive of sources). 2016-08-10 19:19:46 +02:00
ef27d8ec5a Cycles Standalone: Add option to set the tile size from the command line
Since the optimal values depend on the device used, this option doesn't make much sense in the XML.
Therefore, it's now specified via the command line, just like the device itself.
2016-08-10 19:17:03 +02:00
bbbc079a6c Cycles: Correct maximum number of textures on pre-Kepler CUDA cards
Commit c96ae81160 added three data textures and therefore removed three image texture slots, but the value in util_textures.h wasn't updated.
2016-08-10 17:19:16 +02:00
ebdb5490b3 GPencil: Avoid segment fault if new stroke function is called without colorname 2016-08-10 15:51:40 +02:00
774beb7c3c GPencil: Rename color name property to keep consistency in naming 2016-08-10 12:21:18 +02:00
c19d527ed8 Fix crash in id remapping of Graph editor.
dopsheet data pointer is not guaranteed to be set it seems...
2016-08-09 20:00:53 +02:00
0433ae3026 Cycles: Use proper property getter 2016-08-09 16:37:40 +02:00
02719521d2 Attempt to fix previous commit for non-c++11 builds 2016-08-09 15:47:51 +02:00
3bbf8fbaeb Fix for isfinite breaking builds when WITH_CXX11 is enabled.
This happens when cmath.h is included after math.h in cpp code.
Kudos to Sergey for pointing this out.
2016-08-09 15:34:38 +02:00
d5a0ae00d0 Fix T48916: Proxy Custom File is broken 2016-08-09 14:58:34 +02:00
1647d89cf1 Fix T49027: Sequence uses too much memory when rendering scene with lots of movie strips
Now we free sequencer cache and close all unneeded FFmpeg handles when rendering.
This is the same logic as image sequence memory freeding.
2016-08-09 14:33:00 +02:00
f990518041 CMake: Once again, don't use find_package to get hardcoded libraries 2016-08-09 12:38:09 +02:00
62b670633c CMake: Remove hardcoded DIR_ROOT for alembic and MinGW
Do it for until precompiled libraries are there so we can allow
MinGW users to compile their own library and pass it via ROOT_DIR.
2016-08-09 12:38:09 +02:00
f0bf33fd1b CMake: Use proper way to define debug/release libraries for alembic
Please do not spread platform+library specific code all over the CMake file,
we already have sections dedicated to that.
2016-08-09 12:38:09 +02:00
bccaa994f1 CMake: Do not force set root folder for Alembic
it is incorrect to set ROOT_DIR and then call find_package.

If something is expected to be in a given location use hardcoded
locations (for the precompiled libraries). Otherwise just use
find_package() and let users to set ROOT_DIT when it is required.
2016-08-09 12:38:09 +02:00
a7f6f900f3 Cycles: avoid making NaNs in Vector Math node by normalizing zero vectors.
Since inputs are user controlled, the node can't assume they aren't zero.
2016-08-09 13:20:22 +03:00
c2a7317d1f CUDA: We don't support Toolkits < 7.5, update error message. 2016-08-09 11:41:25 +02:00
151390069a Bugfix. glDisable with bad enum argument in GPU_texture_unbind
Reported by @panzergame in D1414.

`glDisable` calls with bad enum argument `GL_TEXTURE_2D_MULTISAMPLE` that came from this line:
`tex->target = (n == 1) ? GL_TEXTURE_1D : (samples ? GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D);`

Reviewers: brecht

Reviewed By: brecht

Subscribers: AlexKowel, yurikovelenov, panzergame

Differential Revision: https://developer.blender.org/D2145
2016-08-09 12:34:52 +03:00
Julian Eisel
b53eca1711 Cycles: Fix crash in empty scenes
To recreate, just delete default cube and render.

Simple fix, but @maiself or @sergey may want to double-check ;)
2016-08-09 04:32:38 +02:00
040fa75d7b Fix Cycles CUDA adaptive kernel not working correctly after recent closure changes. 2016-08-09 01:31:07 +02:00
d1b9306cd5 Alembic: fix finding boost headers for win32 2016-08-08 16:57:04 -06:00
903e9ce0c9 Make previous alembic fix only apply to MSVC 2016-08-08 14:17:43 -06:00
01350910fd Fix extra ; warning for OpenCL as well. 2016-08-08 20:01:21 +02:00
8534071521 Alembic/ msvc : Link alembic_d.lib instead of alembic.lib when doing debug builds. 2016-08-08 11:19:41 -06:00
b745a2401b Fix ID types DAG update tagging.
The first character of the ID type was used to tag IDs for updates which
is weak since different IDs can have the same first character (for
example meshes, materials and metaballs), causing unnecessary updates of
unrelated IDs.

Now we use a unique index per ID type to tag for updates, unifying IDs
arrays indexing along the way.

Reviewers: sergey, mont29

Differential Revision: https://developer.blender.org/D2139
2016-08-08 17:51:15 +02:00
5e5d3d6391 BGE: Call DNA_sdna_current_init when launching blenderplayer.
Don't calling DNA_sdna_current_init was creating a crash because a global uninitialized
variable was used when reading blender files.
2016-08-08 15:41:19 +00:00
308cc491cd Cycles: Fix compilation on Cycles unit tests after recent changes 2016-08-08 15:10:03 +02:00
f1040d7d94 Disable depth buffer writes while rendering smoke in the viewport.
Depth buffer values are used by the viewport pan and zoom code to
adjust response scaling factors between mouse and viewport movement.
Letting smoke write to the buffer confuses it and causes the camera
to get stuck and move very slowly inside smoke domains, because it
thinks it is very close to an object.
2016-08-08 13:48:59 +03:00
444422120f GPencil: Cleanup - Rename function for better naming
The old function name was not clear enough
2016-08-08 11:26:28 +02:00
31c34acff0 GPencil: Move polygon to back only if something was drawn
If the user enable polygon draw and press ESC before drawing something,
the last stroke must not be moved back.
2016-08-08 11:26:28 +02:00
5c815a6d78 Cycles: Remove set but unused variable 2016-08-08 10:50:23 +02:00
Julian Eisel
a0c187667e Cycles: Quiet warning with WITH_OPENSUBDIV disabled
Checked with @maiself, for now going with this simple solution.
2016-08-07 23:20:22 +02:00
aa30f993d2 Cycles: fix objects disappearing when starting or stopping movement.
Another issue with the modified particle motion blur fix: since
pre and post are used as validity markers, they must be set even
if there is no actual motion, like the original bool flags were.
Otherwise an object starting to move or stopping is interpreted
as having invalid blur data and hidden.
2016-08-07 22:45:28 +03:00
Julian Eisel
e635f0413d Fix local view editing broken after changing object's layer from non-local view
Wasn't copying back local view bytes to object after changing layer.

Steps to reproduce were:
* Split 3D view in default startup.blend
* Enter local view in one of the 3D views
* Move default cube to different layer *in the other 3D view* (the one that's not in local view)
* Try transforming object from 3D View that's in local view (should lag)
2016-08-07 20:58:26 +02:00
a58fe05c05 Cycles microdisplacement: Move displacement options from mesh to material settings
Displacement is now a per material setting, which means old files will have to
be updated if they had used displacement. Cool side effect of this change is
material previews now show displacement.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2140
2016-08-07 14:15:20 -04:00
dd1929754f Set WIN32_WINNT for all windows platforms, not just x64 2016-08-07 11:00:35 -06:00
0b68c68006 Cycles microdisplacement: Support for Catmull-Clark subdivision via OpenSubdiv
Enables Catmull-Clark subdivision meshes with support for creases and attribute
subdivision. Still waiting on OpenSubdiv to fully support face varying
interpolation for subdividing uv coordinates tho. Also there may be some
inconsistencies with Blender's subdivision which will be resolved at a
later time.

Code for reading patch tables and creating patch maps is borrowed
from OpenSubdiv.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2111
2016-08-07 11:13:11 -04:00
fc9747fa89 GPencil: Handle drawing on back for polygons
The polygons must move the stroke to back only when polygon is complete
2016-08-07 16:45:02 +02:00
97b0d23357 GPencil: Add option to draw new strokes on back of layer
For artist point of view is very useful to have an option to draw by
default the new strokes on back of all strokes in the layer.
2016-08-07 16:45:02 +02:00
0e25dc4acc GPencil: Fix error in arrange strokes
During code review a field was renamed, but one line was missing.
2016-08-07 16:45:02 +02:00
945b9f4c3f GPencil: Do not disable continuous drawing if click out of drawing area
Do not clear continuous drawing. This code was related to a previous
test and must be removed.
2016-08-07 16:45:02 +02:00
bc7d331767 Don't hide on/off buttons of the Softbody modifier when there's Collision.
From source code history, it seems this behavior is a relic of a very
old limitation when the same object couldn't be both a Softbody and a
Collision object. In those times if somehow both modifiers were added
to an object, Softbody auto-disabled itself and buttons were hidden.

Now however there is no problem having both modifiers on an object,
so there is no point hiding the buttons. The same exact buttons are
available on the physics tab in any case.
2016-08-07 16:45:31 +03:00
e1cdde5d14 Particles: don't output nonsense UV data for Grid distribution particles.
As reported in T48928, From Dupli UV is not supported for grid
distribution, and running the normal code as usual simply produces
nonsense data, because fuv is used to hold orco instead of
interpolation factors for uv, and num is zero.

Since support won't be added in 2.78, just stop outputting nonsense.
2016-08-07 13:48:25 +03:00
912f46d309 Fix pretty stupid mistake in last 'append fix' commit (rB50c017b6eabd). 2016-08-07 10:02:17 +02:00
566dd4e8a5 Cleanup: add missing ID types to BKE_library_idtype_can_use_idtype(). 2016-08-06 12:56:15 +02:00
b4cd289cdf Fix T49028: crash when copying a scene without grease pencil data. 2016-08-06 12:43:52 +02:00
28c3bdf50b Cleanup: better not split UI strings when possible... 2016-08-06 11:27:05 +02:00
604302a271 Cleanup some new gpencil rna functions names.
Convention for properties callback names is to prefix them with a version of the RNA struct name.
2016-08-06 11:22:34 +02:00
61050f75b1 Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.

A more in-depth documentation is to be found on the wiki, as well as a
 guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.

Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.

Reviewers: sergey, campbellbarton, mont29

Reviewed By: sergey, campbellbarton, mont29

Differential Revision: https://developer.blender.org/D2060
2016-08-06 10:58:13 +02:00
4158737cb2 Add the collision group option to the UI for boid particle physics.
The option already works, just missing from the ui since it
has completely different option set from newtonian and fluid.
2016-08-06 10:49:42 +03:00
277b1d76ff Fix T26658: particles stopped or bounced by 100% permeability colliders.
There were two issues here. One is that the fix done originally for this
bug only checks for colliding with the same face as the single preceeding
hit. If the particle hits an edge or vertex of the collider, it in fact
hits two or more faces, so the loop ends up cycling between first two
of them and reaches the max collision limit.

The fix is to disable the collider for the sim step once a permeability
roll succeeds, by adding it to a skip list. Skipping just one face causes
some particles to bounce at odd angles in case of partial permeability.

The second problem was that the collider bounced back a small percentage
of particles, and the cause seemed to be that the code was set to flip
the velocity if the particle was just past the collider but still within
collision distance. Inverting both values causes a half permeable collider
to stop particles, so it seems that this if branch shouldn't bounce at all.

Test file: {F327322}

Reviewers: lukastoenne, brecht

Reviewed By: brecht

Subscribers: brecht, #physics

Maniphest Tasks: T26658

Differential Revision: https://developer.blender.org/D2120
2016-08-06 10:11:33 +03:00
Julian Eisel
b988309028 Fix wrong property type usage
Prints error on startup.
2016-08-06 06:33:28 +02:00
cd809b95d8 Cycles: Add AttributeDescriptor
Adds a descriptor for attributes that can easily be passed around and extended
to contain more data. Will be used for attributes on subdivision meshes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2110
2016-08-05 23:49:21 -04:00
734e0aca38 Fix for Cycles particle motion blur hiding fix.
My mistake in modifying the patch.
2016-08-06 01:14:32 +02:00
df7be61438 Fix T49023: Segfault when switching brushes while renaming another brush.
rna_GPencilBrush_name_set() was trying to use a mere bGPDbrush as a complete ToolSettings,
was doomed to fail...
2016-08-05 23:36:43 +02:00
8adcd93769 GPencil: Tweaks to layout to try and get the spacing a bit nicer
Currently, the lack of spacing (or rather, odd spacing/clumping) in places
seemed a bit off.
2016-08-06 03:49:14 +12:00
3971c83c96 GPencil: Various UI name fixes
* "Flip direction" -> "Flip Direction"
* "Show drawing direction" -> "Show Directions"
* "Grease Pencil Curves" -> "Brush Curves"
  (I was considering "Brush Response Curves" instead, but that seemed like too much
   of a mouthful)
* "X" for removing a palette. The UI there was more similar to a standard datablock
  selector, so it should use the "+X" combo instead of "+-" combo for consistency.
  (Note though, presets tend to use "+-" instead - e.g. see the Render Settings)
2016-08-06 03:49:14 +12:00
83ee537398 GPencil: Added Ctrl-J hotkey for Joining strokes
(Ctrl-Shift-J is for "Join and Copy")
2016-08-06 03:49:13 +12:00
d4bdb99f26 GPencil: "Join Strokes" tool doesn't leave gaps by default now
Previously, it would insert "invisible" points after the endpoints of the strokes,
so that they wouldn't appear to be joined, but that behaviour could also get quite
confusing as you wouldn't be sure whether the strokes were really joined or not.

To keep the previous behaviour, simply enable the "Leave Gaps" option on the operator
after running it. This setting will get saved between runs of the operator.
2016-08-06 03:49:13 +12:00
50c017b6ea Fix T49022: Crash in BKE_libblock_remap_locked.
Previous check to skip non-linkable IDs resulted in not clearing those skipped ID's newid member,
wich lead to try to remap it later in code.
2016-08-05 17:09:56 +02:00
b7bf9ed2b4 Cleanup: add missing entries to library_query.c ID types switch case. 2016-08-05 16:13:11 +02:00
a2a7316d92 Fix T48366: Freestyle will unnecessary exclude some linked objects.
Group membership testing for including/excluding feature lines was not
accounting for object names possibly further qualified by library file
paths.

Also fixed a few potential (but unlikely) references of uninitialized
variables.

A big thank to Bastien Montagne for the insight on the cause of the
problem and how to fix it.
2016-08-05 22:25:16 +09:00
bed32bf004 Freestyle: minor code cleanup (whites pace). 2016-08-05 22:25:12 +09:00
a0e72a0996 Fix T49014: Append does not work in some cases.
There were actually two issues, one in recent changes and one existing... forever?

I) id_make_local() would never proceed over indirectly linked data, which is required in specific 'append' context.
II) BKE_image_copy() was not setting id->newid pointer of newly copied ID.

About II: don't really know why image copy does its own cooking instead of using generaic ID copy helpers.
Think this should be changed, but that would be after 2.78 now.
2016-08-05 14:48:22 +02:00
c5eb400b7c Cycles: Fix embarrassing typo
Spotted by Mai Lavelle, thanks!
2016-08-05 14:45:54 +02:00
61d7289023 Cycles: Correction to previous commit
The change didn't fix difference render result on CUDA as i've hoped,
so reverting change for GPU rendering for now.

Sorry for the noise.
2016-08-05 12:16:24 +02:00
470cc98945 Cycles: Fix/workaround for wrong/noise render results with GCC6 2016-08-05 11:56:20 +02:00
a8b3ff9e16 Curve Fitting: fix off by one error
In practice this wasn't likely to cause problems, but better fix.
2016-08-05 18:50:49 +10:00
633e93e270 VSE sound strips: draw either the waveform or text label, not both.
Drawing both text and the wave onto a sound strip makes both hard to read,
which is a concrete issue for Hjalti at the moment. This was the simplest
fix I could think of to give him control over what he sees.
2016-08-05 09:33:04 +02:00
1f19fba566 Cycles: hide particles with broken motion blur traces.
Currently cycles cannot correctly render motion blur for objects that appear or
disappear during the shutter window. Until that can be fixed properly, it may be
better to hide such particles rather than let them render as if they were
stationary for half of the frame.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2125
2016-08-05 01:00:41 +02:00
2ce9bab8ce Fix python error when OSL file has wrong extension. 2016-08-05 01:00:41 +02:00
7812d821a5 Add upstream information to curve_fit_nd library 2016-08-05 08:36:17 +10:00
e1a4219523 Curve Fitting: sync with upstream
Correct accidental float use
2016-08-05 08:36:17 +10:00
Julian Eisel
357480f8c3 Cleanup: Use BKE_gpencil prefix
This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.
2016-08-04 15:11:21 +02:00
5f63797c09 Cycles: copy shader node names over in the blender sync code.
This makes constant folding logs with --debug-cycles more meaningful.
A tiny fix is needed in OSL generator to match recent node refactoring.
2016-08-04 15:19:58 +03:00
29dc04d9bb Cycles: Report human-readable string of compilation error code
It is possible that compilation will fail without giving anything in the
log buffer. For this cases giving a tip about error code will be really
handy.

Patch by @Ilia, thanks!
2016-08-04 12:14:43 +02:00
Julian Eisel
14720e2e62 Cleanup: Use bool 2016-08-04 03:10:28 +02:00
Julian Eisel
9a8c572121 Minor whitespace correction for eaea4ea51f
Caused by merge conflicts, slipped throug when double checking.
2016-08-04 01:45:00 +02:00
42f6252f2d Fix T47782: popups with wrong size when switching from retina to non-retina on OS X. 2016-08-04 01:11:09 +02:00
Julian Eisel
7830ec5418 UI: Correct tooltips for properties region toggle OP
Now all consistent and using term "properties region" instead of "properties panel". Ideally we had a more generic operator for all those.

Fixes T49006.
2016-08-04 00:26:49 +02:00
eaea4ea51f Grease Pencil v2 Branch
Improve current Grease Pencil in order to get a better 2D animation tool.

More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov

Reviewed By: Severin, aligorith, campbellbarton

Patch by @antoniov, with edits by @Severin.

Differential Revision: https://developer.blender.org/D2115
2016-08-03 23:39:36 +02:00
9d4ea84277 Fix T48164: messed up interface switching between retina and non-retina display on OS X. 2016-08-03 22:45:14 +02:00
Julian Eisel
980fbb35e2 Boolean modifier UI improvement
This patch improves UI of a recently added solver preference in boolean modifier:

{F331776}

Issue with the current UI is that it shows user unnecessary information and breaks established grid layout.

Reviewers: carter2422

Reviewed By: carter2422

Subscribers: carter2422

Tags: #user_interface, #bf_blender

Differential Revision: https://developer.blender.org/D2136
2016-08-03 19:48:01 +02:00
99b1c1018a Cycles: Recent SSS inline changes broke CPU tests
Very weird, but let's just fall back a bit for now.
2016-08-03 15:27:48 +02:00
285e082a77 Fix T49010: Portals don't work in recent Blender versions 2016-08-03 12:38:25 +02:00
960db4c961 Cycles: Revert recent inline changes for CUDA 8 and sm_50+
This changes actually lead to 2x slowdown. It's getting a bit annoying
because those are the changes to make pre-maxwell cards render with the
same speed.
2016-08-03 11:41:58 +02:00
70100b4ec7 Fix T48283: on OS X, mouse clicks not working properly if application launch takes a long time. 2016-08-03 02:39:29 +02:00
Julian Eisel
75f37feb5c Viewport: Make lights in local view behave like BI and Cycles
Ignore that lights are not included in local view, always render them if they are on the correct layers. BI and Cycles do this as well.
2016-08-02 21:52:08 +02:00
41a4967b30 Fix T49003: Cycles volumes have wrong results after recent microdisp commits
Problem was that sd->prim can be -1 for volumes and was causing check in subd
code to access out of bounds
2016-08-02 15:28:07 -04:00
f593333099 Fix T43220, T47551: collider scaling or rotation causes smoke to explode.
The problem happens because smoke collides only with the surface of the
collider and uses incompressible fluid solver. This means that scaling
the collider tries to compress or decompress fluid within the volume of
the collider, which can't be handled by the simulation. Fast rotation
likely also causes transient scaling due to emulation of arcs by chords.

This can be fixed by finding compartments completely isolated by obstacles
from the rest of the domain, and forcing total divergence within each one
to be zero so that equations are solvable. Physical validity is somewhat
dubious, but without this the solver simply breaks down.

From the physics point of view, the effect of the correction should be
similar to opening a hole from every cell to another dimension that lets
an equal amount of air to pass through to balance the change in volume.

Reviewers: miikah, lukastoenne

Reviewed By: lukastoenne

Subscribers: dafassi, scorpion81, #physics

Maniphest Tasks: T43220, T47551

Differential Revision: https://developer.blender.org/D2112
2016-08-02 19:47:31 +03:00
ae9e9700c2 Fix T43782: smoke simulation problems with multiple touching colliders.
When the colliders are joined, each cell that touches them only gets
velocity contribution once. When there are multiple objects, velocities
are summed, which causes some cells to get 2x, 3x or more than the actual
object velocity.

Fix this by using the average velocity of all colliders touching a cell.

Reviewers: miikah, lukastoenne

Reviewed By: lukastoenne

Subscribers: dafassi, scorpion81, #physics

Maniphest Tasks: T43782

Differential Revision: https://developer.blender.org/D2112
2016-08-02 19:45:45 +03:00
f2d5295abf Cycles: log how many nodes were deduplicated for use in tests.
To make the number more meaningful, also skip deduplicating
obviously unused nodes with no outgoing links.
2016-08-02 19:26:57 +03:00
e54320c488 Cycles: add folding for redundant A to B to A conversions.
As a result of other folding simplifications it may happen that
two type conversion nodes end up directly connected. In some
cases it may be possible to then remove both. A realistic case
might be an optimized out Mix RGB node used to blend vectors.

It seems it's safe to optimize when B is a float3 type
(color, vector), and A is float3 or float.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2134
2016-08-02 18:41:15 +03:00
2f5db2e45b Fix T48986: Incorrect normals or tangents when using custom split normals.
(Re)-setting custom normals could cause some unwanted splitting of some of them, leading
to slightly different tangent space. Simply enlarged slightly the threshold detecting
similar normals as identical ones for now, afarid this is the kind of issue that cannot
get a full complete solution for until we drop floats...
2016-08-02 16:08:00 +02:00
08ebd72851 Buildbot: Use annoying hybrid setup of two CUDA toolkits
This is for until we'll solve issues with toolkit 8.0.
2016-08-02 15:32:03 +02:00
500e0e9a3d Cycles: Some more inline policy tweaks for CUDA 8
Makes it so toolkit does exactly the same decision about what to inline,
but unfortunately it has really barely visible difference on GTX-980.
2016-08-02 15:13:34 +02:00
b416168d85 Cycles: Cleanup, trailing whitespace 2016-08-02 14:09:34 +02:00
7b8b16a18c Cycles: Some cleanup in CUDA device file 2016-08-02 14:09:34 +02:00
ad48f13099 Cycles: Include NVCC compiler flags into md5 hash
This way we can easily switch between toolkits without worrying
whether some kernel was compiled with old or new CUDA toolkit.

It's also now possible to switch machine architecture and have
proper cached kernel detected. Not as if it happens every day,
but i did such a bitness switch back in the days :)
2016-08-02 14:09:34 +02:00
fb94f4b884 Fix T48998: 'header input' of rotation transform was clamped in [-PI, PI[ range.
Can't see any reason for this behavior (inherited from 2.4x code), so for now just removing it.
2016-08-02 12:43:03 +02:00
c6398a525d Fix T47591: Smoke keeps both .bphys and .vdb cache files
Delete old caches when changing cache type.
2016-08-02 12:20:54 +02:00
3c70c4f970 Fix T47520: Compositor Node "Filter" Outputs clear image
Make 'Laplace' filter an edge filter operation, since this what it is
typically used for, and such operation does not affect the input's alpha
channel.

Reviewers: sergey, campbellbarton

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1817
2016-08-02 11:38:03 +02:00
ca6f53d15e Cycles: tweak some folding tests to avoid unnecessary type conversion.
It's easy to connect a simple value to output without forcing
conversion to color by using the Strength socket of Emission.
2016-08-02 12:08:48 +03:00
Julian Eisel
de3181bc38 Fix tmp screen becoming permanent after going fullscreen
Doubt this is intentional.
2016-08-01 22:57:12 +02:00
4067ab38ab Fix T48991: some particles emitted at a distance from object.
The cause seems to be that despite dt_frac being computed as
1/(subframes+1) with integer subframes value, it doesn't always
add up to exactly 1.0 due to precision limitations. If the sum
is similar to 1.00000???, the last subframe is skipped, and all
particles that were supposed to be emitted in that interval are
emitted next frame, with the code working incorrectly due to
skewed time range.

To fix, separate the code from the dynamic timestep feature that
adjusts the last subframe length into a separate function, and
use it even when dynamic timestep is disabled.
2016-08-01 22:14:56 +03:00
538b30250d Audapsace: Make it work with Jack and no libjack-dev package installed
@neXyon, mind backporting it to your upstream? :)
2016-08-01 20:39:54 +02:00
8e015e30b5 Buildbot: Enable proper Pascal architecture 2016-08-01 18:26:53 +02:00
b1d0432bb7 Fix strict compiler flags with older GCC 2016-08-01 18:01:27 +02:00
138362a3c9 Cycles: add unit tests for supported constant folding rules.
Code coverage of different combinations of secondary conditions
is obviously not complete because there are so many of them, but
all main rules should be there.

The reason for CORRECT vs INVALID is that both words have the same
number of characters so calls line up, but look quite different.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: dingto, sergey, brecht

Differential Revision: https://developer.blender.org/D2130
2016-08-01 18:53:20 +03:00
473fc0cf0e Buildbot: Seems quotes are not really needed when passing list 2016-08-01 16:25:03 +02:00
98b8a68f9d Buildbot: Attempt to enable sm_60 CUDA architecture for build slaves 2016-08-01 16:05:33 +02:00
6353ecb996 Cycles: Tweaks to support CUDA 8 toolkit
All the changes are mainly giving explicit tips on inlining functions,
so they match how inlining worked with previous toolkit.

This make kernel compiled by CUDA 8 render in average with same speed
as previous kernels. Some scenes are somewhat faster, some of them are
somewhat slower. But slowdown is within 1% so far.

On a positive side it allows us to enable newer generation cards on
buildbots (so GTX 10x0 will be officially supported soon).
2016-08-01 15:54:29 +02:00
7065022f7a Fix T48901: Blender ignores xinput cursor matrix 2016-08-01 13:51:44 +10:00
a3ce64be5a Cleanup: unused vars, imports, pep8 2016-08-01 11:55:06 +10:00
83ebec7322 Replace pep8 with flake8 checker 2016-08-01 11:02:01 +10:00
8c74ebb64f Support Auto-Clamped Handle for Curve-Mapping
This patch supports auto-clamped handles for curves,
useful since without this it can be difficult to have 'flat' sections of a curve.
2016-08-01 09:06:40 +10:00
36a790653c Fix T48980: crash when loading a file that contains a custom node tree.
Syupid logical mistake in own recent rB018d336cbd51...
2016-07-31 20:07:33 +02:00
Julian Eisel
dda2d1dbea Correction to 0f2ff52c08
This info is shown while dragging, so should stay where it was.
2016-07-31 18:38:21 +02:00
Julian Eisel
0f2ff52c08 Enable Undo for "Add background Image"
Enabled the Undo option for the operation "Add background Image". This is to treat adding a background image like opening an image. This behavior is useful when a background image is add using 'drag and drop'.

Reviewers: Severin

Reviewed By: Severin

Subscribers: brecht

Tags: #bf_blender

Maniphest Tasks: T47050

Differential Revision: https://developer.blender.org/D1725
2016-07-31 17:55:32 +02:00
feac208557 Fix mistake in Cycles mix node multiply constant folding. 2016-07-31 15:00:40 +02:00
81f4bc1665 Cleanup: reduce Vector_getseters size using macros 2016-07-31 20:43:52 +10:00
4734781653 Correct own error in last commit 2016-07-31 19:12:40 +10:00
64d4d6b134 Support limiting collisions by group for softbody and particles
This feature is extremely useful for layering multiple cloth objects,
and there is no reason there shouldn't be the same kind of feature for softbody.
2016-07-31 18:57:19 +10:00
710ab5be36 Cleanup: spelling, style 2016-07-31 17:41:05 +10:00
a96c9def6f PyAPI: minor optimization for dictionary creation
Pass size when its known.
2016-07-31 17:22:04 +10:00
e97ab8347a PyAPI: fix leak in unlikely case converting idprops fail 2016-07-31 16:59:08 +10:00
2dfc954c4a PyAPI: Add PyC_UnicodeAsByteAndSize
Read the string length from Python directly when assigning id-properties
2016-07-31 16:52:44 +10:00
409316434c Docs: add initial idprop.types API docs 2016-07-31 15:40:40 +10:00
516f890b63 Docs: simplify EXCLUDE_MODULES handling 2016-07-31 15:40:40 +10:00
0ec1be1816 Cleanup: capitalize Blender & Python 2016-07-31 15:40:40 +10:00
fc36c2f70e simplify redundant conditionals
The redundant terms were harmless but check an expression we already
know to be true (from earlier in the same conditional).

Found by PVS-Studio T48917
2016-07-31 01:22:36 -04:00
6fffe6cfcc Improve description for use_self py-driver option 2016-07-31 14:23:14 +10:00
3fe7aacdf7 Curve Fitting: circular fit could give NAN handles
Fitting lines that exactly double back on themselves could give NAN length handles.
2016-07-31 13:58:14 +10:00
8fab198aae Cleanup: rename btree (incorrect & confusing) 2016-07-31 12:05:53 +10:00
b2e16c5700 Fix Cycles OpenCL compile error on Windows. 2016-07-31 02:02:28 +02:00
01d5d2853b Py-Driver: re-use self PyObject when its unchanged. 2016-07-31 11:46:36 +10:00
55f481d052 Py-Driver: use intern strings
Avoids managing strings inline
2016-07-31 11:46:36 +10:00
873a623be4 Fix for previous commit changing the addons submodule. 2016-07-31 03:23:51 +02:00
9b6ed3a42b Cycles: refactor kernel closure storage to use structs per closure type.
Reviewed By: dingto, sergey

Differential Revision: https://developer.blender.org/D2127
2016-07-31 02:34:43 +02:00
1776f75c3b Cycles: constant fold add/mul type nodes with known 0 and 1 arguments.
These values often either turn the node into a no-op, or even make it
evaluate to 0 no matter what the other input value is, thus allowing
deletion of a branch of the node graph that otherwise is not constant.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2085
2016-07-31 02:34:34 +02:00
ea2ebf7a00 Cycles: constant folding for RGB/Vector Curves and Color Ramp.
These are complex nodes, and it's conceivable they may end up constant
in some circumstances within node groups, so folding support is useful.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2084
2016-07-31 02:18:23 +02:00
f4bcc97729 Fix Cycles OpenCL not always allocating enough space for closures. 2016-07-30 23:21:03 +02:00
34a639bd0f Fix CUDA warning, due to extra ; at the line ending. 2016-07-30 21:37:20 +02:00
1e2efbc908 Cycles OpenCL: use #line directives for better error messages. 2016-07-30 18:25:52 +02:00
6dc72b3ce6 Cycles OpenCL: detect incorrect usage of SOA members in the split kernel. 2016-07-30 18:25:52 +02:00
c937a42c61 Fix Cycles OpenCL address space compile error with amdgpu-pro drivers on Linux. 2016-07-30 18:25:17 +02:00
e20d306ffa Cleanup: pep8 2016-07-30 18:41:07 +10:00
de103497c4 Fix bplayer (c) 2016-07-30 10:35:30 +02:00
8018f5bd35 Cleanup: pep8 2016-07-30 18:17:11 +10:00
6e9ad094b2 Cleanup: minor changes from last commit
Un-indent blocks, rename vars.
2016-07-30 16:48:44 +10:00
4e845e0670 Py-Driver: add 'self' option
Drivers can use this to refer to the data which the driver is applied to,
useful for objects, bones, to avoid having to create a variable pointing to its self.
2016-07-30 16:46:13 +10:00
362b3bbe58 Cloth Simulation: add time scale property
This setting can also be animated, to create a "time warp" effect.

D2122 by @LucaRood
2016-07-30 15:14:26 +10:00
7a4353160c Cloth: option to use dynamic base mesh
This adds the ability for cloth simulations to respect changes in the underlying mesh.
So you can for instance, animate shape keys, armatures, or add any deformation modifiers (above the cloth modifier).

This is mainly useful for (but not limited to) cartoon animations,
where your character might stretch or change shape, and you want the clothes to follow accordingly.

D1903 by @LucaRood
2016-07-30 14:57:48 +10:00
ca93ebee7f Cloth: UI cleanup & quality hard limit removal
D2121 by @LucaRood
2016-07-30 14:55:07 +10:00
ca983d1825 Cleanup: pep8 2016-07-30 09:00:41 +10:00
3d7cf808b8 Add copy/make_local to movieclip datablock.
As title says... Copying tracking data from movieclip was not the simplest thing...

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2126
2016-07-29 23:13:31 +02:00
4d79fa8382 Gtests: Re-apply strict compiler fixes 2016-07-29 22:19:30 +02:00
37933cb048 Cycles: Add fundamentals to test constant folding
This commit adds some easy to use way to check whether the graph
was properly optimized. The idea is based on using mock glog sync
which keeps track on all messages and expects specific log message
to appear in the logging.

This means each optimization step should report that it optimized
something (specifying what exactly was optimized) and what was used
for optimization.

There's also some ease-ish way to define shader networks which we
might want to make a bit more global and available for all tests
in the future.

For now only RGBToBW node is covered as an example, really hope
to get help from active guys in the community to finish covering
all existing optimization cases. Ready to fix any possible issues
with builder when needed tho :)
2016-07-29 22:19:30 +02:00
ac655be0e3 Add GMock library which is responsive for dealing with mock objects 2016-07-29 22:19:30 +02:00
c6f468d8ed GTests: Update to a newer Git version
Required to get GMock working with GTest.
2016-07-29 22:19:30 +02:00
Julian Eisel
574bbf5d1d Fix missing redraw of timeline when changing GPencil layer settings 2016-07-29 20:42:57 +02:00
e4255a9535 Cleanup space/tabs, Grrr. 2016-07-29 18:49:50 +02:00
8e00406261 Fix a bunch of missing expand calls in object/particle physics area, was breaking linking of those.
Initial report/patch by Alexander Gavrilov (@angavrilov), found more on the road.

Nice demo of why we should use libquery ID looper in read code too - but that's for another day
(also because read code needs to take care of some deprecated pointers sometimes)...
2016-07-29 18:47:43 +02:00
ceb03a4d32 Cycles: Fix wrong projection coordinates for points behind the camera
Points behind camera will be flipped on projection, but that did not
happen.

This solves second issue reported at T48848.
2016-07-29 17:30:24 +02:00
1d154fe271 Cycles: Fix wrong check for object is behind camera after recent fixes 2016-07-29 17:30:24 +02:00
cdc7a24d7b Fix T48971: Append creates linked image textures if object has shape keys.
Hating all those not-so-real ID types... Here there were two causes for the issue:
1) Linked shapekey ID was made local twice (once from mesh's make local, once by itself).
   Solved by not explicitely making shapekeys (nor any other non-linkable datatype) local.
2) Key->from 'back pointer' to its owner was messing 'still in used' detection of linked data
   after localization. Fixed with a hack for now, thinking correct solution might actually
   be to not consider this pointer at all in libquery ID looper, since it's nothing like
   and actual usage of mesh/lattice/curve.

Again, shapekeys as ID is a joke, those should be mere struct, they have absolutely nothing to do in Main, period. :(

Point 2) still demonstrates the need for better handling of IDs dependencies though,
so far we only hit corner cases, but think there could also be valid cases generating those
'dependency cycles' between IDs (ID a using ID b which uses ID a), this will have to be addressed some day...
2016-07-29 17:00:29 +02:00
821394937f Remove "debug build only" event printing.
This makes no sense since user usually only has release build... And those noisy printings are
behind debug flag anyway, so really no reason to only print them out in debug build.
2016-07-29 15:12:56 +02:00
c9134d86f0 Cycles: Fix strict compilation warning 2016-07-29 15:06:13 +02:00
899947c89e Fix T48679: Bone transform only alters between translation and rotation
There was some smart code in the transform which would alter between translation
and rotation based on whether bone is connected or not and whether translation is
locked or not.

It could be handy to also fallback to scale if both rotation and translation are
locked.
2016-07-29 14:47:23 +02:00
992257cfa0 Cycles: remove narrowing conversion from recent commit 2016-07-29 04:00:37 -04:00
66e2e2484c Cycles microdisplacement: move subdivision options to subsurf modifier
Subdivision options can now be found in the subsurf modifier. The modifier must
be the last in the stack or the options will be unavailable. Catmull-Clark
subdivision is still unavailable and will fallback to linear subdivision instead

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2109
2016-07-29 03:37:55 -04:00
c96ae81160 Cycles microdisplacement: ngons and attributes for subdivision meshes
This adds support for ngons and attributes on subdivision meshes. Ngons are
needed for proper attribute interpolation as well as correct Catmull-Clark
subdivision. Several changes are made to achieve this:

- new primitive `SubdFace` added to `Mesh`
- 3 more textures are used to store info on patches from subd meshes
- Blender export uses loop interface instead of tessface for subd meshes
- `Attribute` class is updated with a simplified way to pass primitive counts
  around and to support ngons.
- extra points for ngons are generated for O(1) attribute interpolation
- curves are temporally disabled on subd meshes to avoid various bugs with
  implementation
- old unneeded code is removed from `subd/`
- various fixes and improvements

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2108
2016-07-29 03:36:30 -04:00
f74645578c Missing free for single-sided edge-slide failure 2016-07-29 14:24:03 +10:00
e0c7aaf5ad Fix Cycles OSL hair BSDF inconsistencies with SVM. 2016-07-29 03:29:05 +02:00
52fb441c13 Fix Cycles ctests not always deleting fail.png files on success. 2016-07-29 03:29:05 +02:00
e30f9b04fc Fix use of uninitialized variable in Cycles, mostly harmless. 2016-07-29 03:29:02 +02:00
66552ca586 Make ID types typed enum, to easily spot missing ones in core switches of library.c
Note that all deprecated/non-real ID types are kept as defines.
2016-07-28 19:32:36 +02:00
035b40337a Fix T48965: Cannot Append Palette As Local Datablock.
Palette and PaintCurve were totally missing from id_copy/id_make_local switch... :/
2016-07-28 19:32:36 +02:00
d834759423 Cycles: Fix difference in Ashikhmin Shirley shader between CPU and GPU
The issue was caused by some NaN appearing in calculations.

Visible with scifi_armor_concept.blend from the cloud.
2016-07-28 18:46:29 +02:00
85ccdf37c0 Cleanup: Indentation 2016-07-28 14:17:35 +02:00
f86aa6a879 Fix T48838: Tiling sculpt problem with custom brush 2016-07-28 14:01:15 +02:00
cba8e03672 Fix T48962: Edge-slide, random edge switch order 2016-07-28 21:50:41 +10:00
df00529648 Cycles: Fix missing mesh flags update when tweaking shaders
This is a bit weak, but better than tagging whole mesh manager for update.

Maybe we'll solve such dual-look up in the future.

This commit finally solves T48963: Noise when changing Diffuse node to Emission node
2016-07-28 12:37:44 +02:00
9f18e3acd6 Cycles: Fix wrong order of light manager update tag
Shader's has_surface_emission will only be known for sure after compilation.
2016-07-28 12:31:01 +02:00
d3d1313ca4 Cycles: De-duplicate more checks around light emisive meshes
Once again, should be no functional changes.
2016-07-28 12:28:31 +02:00
87717c6449 Cycles: De-duplicate check for MIS shaders in meshes
Should be no functional changes.
2016-07-28 12:27:05 +02:00
aaac4e965e Cycles: Add some extra logging for light debugging 2016-07-28 12:13:11 +02:00
402d4ea0b6 DupliObject: Remove unused and confusing index argument from the context 2016-07-28 10:49:31 +02:00
3673a5adba Curve Fitting: Use normalized projection function 2016-07-28 18:33:14 +10:00
5ecc6a824a Fix T48404: Translate fails w/ snap orientation option
Rotate the object around the snap-target so it meets the snap-point.
2016-07-28 18:16:31 +10:00
8df5f97c2c Cleanup: unused transform member 2016-07-28 18:16:31 +10:00
d66a27de2e Fix T48961: Material slots become easily desynced over linked duplicates.
Own mistake in recent changes (split to test_object_materials()/test_all_objects_materials()).
2016-07-28 09:23:46 +02:00
d60acd0e94 Fix crash fitting single point curve 2016-07-28 14:37:55 +10:00
3a4c307652 Use COMPAT_ENGINES instead of RenderEngine.use_game_engine for panel poll methods
This mostly affects physics panels. Any engines relying on
RenderEngine.use_game_engine flag to show/hide panels will need to be
updated. The COMPAT_ENGINES technique is how we usually deal with this.
One issue with use_game_engine is that I cannot find a way to set it; it
appears only the BGE can set it. This means (without this commit)
external RenderEngines cannot get rid of the default physics panels.

The RE_GAME flag (the C flag behind use_game_engine) is pretty hacky
and we should look into removing its usage where possible.
2016-07-27 19:00:35 -07:00
a27acefd0c Fix T48951: Crash refreshing some popups
Fix for T48874 caused popups to be tagged to be refreshed, that didnt support it.

Tag popups that can't be refreshed.
2016-07-28 11:16:11 +10:00
Julian Eisel
8f16181e9c Add comments on behavior of spacedata and regionbase lists 2016-07-28 02:36:12 +02:00
Julian Eisel
c59b21feec Fix own mistake from c05363e889
Didn't know slink->regionbase is removed when area is active. Don't see why this is done, but it's confusing :S
2016-07-28 02:27:39 +02:00
b645e7081d Fix T48790: Cycles render bug with zero strength lights. 2016-07-27 23:09:38 +02:00
Julian Eisel
c05363e889 Fix crash closing Blender while in rendered local view
Happens because it was always using regionbase of active/visible area, not the correct one of the (possibly inactive) 3D view. Was pretty hidden because you had to be in local view to trigger it.
Could also remove ScrArea * argument from SpaceType.id_remap now, but leaving in there to avoid bigger changes (might also be useful for some case).

Steps to reproduce:
* Default startup.blend
* Enter local view with default cube (/-key)
* Render (or open a different editor where the 3D View is)
* Close Blender - should invoke crash
2016-07-27 21:05:44 +02:00
Julian Eisel
4559229163 Fix memory leak when closing Blender with operator popup open
Steps to reproduce:
* Default startup.blend
* RMB-Click on "Cube" item in outliner
* Select Remap Users
* Close Blender using window 'x' button
2016-07-27 19:45:43 +02:00
e4646c52c0 Fix T48946: Blender+Tahiti+DRI3+Unity+Linux GUI corruption/not rendering
Enable triple buffer by default for AMD cards on opensource driver.

Should be safe now, since it was only old cards causing problems,
which we don't support now most likely anyway.
2016-07-27 16:06:18 +02:00
25bd01f2f7 Avoid creating multiple outputs connected to the same socket when creating a node group
This patch fixes the annoyance that when creating a node group where one of its nodes is connected
to several other nodes, a separate output will be created for each link, even though they're all
connected to the same socket in the group.
Now, before adding an output for an outgoing link, the existing outputs are checked to find whether
any output is already connected to the same socket. If such an output is found, it is reused instead of
creating a new one.

Reviewers: Severin

Subscribers: Blendify

Differential Revision: https://developer.blender.org/D1836
2016-07-27 15:56:48 +02:00
d7bd64df5d Fix T48061: Crash with adaptive domain and cases when there's no smoke 2016-07-27 15:40:32 +02:00
ae881ddf43 Fix T48760: Changing Renderlayer Compositor node Layer does not update enabled outputs until script is finished 2016-07-27 15:17:15 +02:00
2e38c07e48 Cycles: Style, placement of asteric in pointers
Seems we are using `void *` much much more often in Cycles.
2016-07-27 14:10:09 +02:00
183874841b Cycles: Some minor tweaks to emission sharder
- Nodification of shader nodes changed default strength from 10 to 1.
  If that was intentional, IMO should happen as a separate commit.

- Fixed indentation.
2016-07-27 14:05:22 +02:00
5f95ffe350 Fix T48829: Memory leak on Blender Exit
It was possible to have missing outlink but GPUNodes in material.
2016-07-27 10:59:09 +02:00
3d8c2e25a3 Fix T48950: Movie Clip mode segfaults
Missing linking code in blenloader.
2016-07-27 10:18:54 +02:00
Julian Eisel
24b8e781f6 Correct UI names of ID types
Also correct typo.
2016-07-26 20:25:55 +02:00
Julian Eisel
3c59a5068f More useful block name for report popup blocks
Report popups simply reuse popup menu code, so their blocks got "UI_popup_menu_begin" assigned as name, which was a bit misleading. Now uses "UI_popup_menu_reports".
Ideally they'd have their own popup code.
2016-07-26 20:25:55 +02:00
c1fd97f15d Fix T45936: invalid cycles motion blur for particle rotation and children.
Commit rB709ca0ece changed how rotation was handled for particles so
that unless actual rotation physics is enabled, there is no rotation.
However it only updated ptcache_particle_read, forgetting to change
exactly the same code in ptcache_particle_interpolate.

This means that for subframes old code that computes a rotation from
velocity is used, resulting in completely different rotation than for
integer frames. This causes rotational motion blur by itself, and also
mangles motion blur paths of child particles.

Reviewers: sergey, lukastoenne

Maniphest Tasks: T45936

Differential Revision: https://developer.blender.org/D2124
2016-07-26 18:06:42 +02:00
f3f10e4515 Fix T48813: Custom icon is not drawn on header / addons prefs panel.
For now use 'brute force' and refresh whole UI when new icons get rendered.

See comment of T48813 for ideas about how to handle that in future (2.8 project ?).
2016-07-26 17:55:18 +02:00
f31f740bd0 Cycles: Proper fix for buffer overflow in volume intersect all 2016-07-26 17:16:23 +02:00
7030794171 Cycles: Revert previous fixes to intersect_all functions
While they prevent legit write past the array boundary error
those fixes introduced regression in behavior when having exact
max_hits transparent intersections and nothing else.

Previous code would have considered such case a totally opaque,
but it's not correct.

Fixes T48941: Some materials don't get transparent shadows anymore
2016-07-26 17:16:23 +02:00
b91aea6096 Fix issues in ID usages checks - we are not interested in self-usages here.
Drivers or constraints referencing self object could break deletion of proxy objects
(due to their ambiguous, half-local, half-linked status).
2016-07-26 15:12:43 +02:00
01e3141ce6 Fix T48902: MCE Dopesheet does not respect Left Click select
Make the operator consistent with animation dopesheet now.
2016-07-26 14:39:06 +02:00
711d3a8a2b Depsgraph: Use proper check whether ID is an object
Fixes bug which resulted in making it so layers from all
layers are getting updated.

Reported by Juan Pablo Bouza.
2016-07-26 10:49:54 +02:00
40a0fa8a8f Depsgraph: Use proper unsigned int bitfield for layers flags 2016-07-26 10:45:07 +02:00
eececb0d80 Curve Drawing: use more closely spaced samples
Re-fitting makes better use of more samples.
2016-07-26 06:43:59 +10:00
4da8543d0d Resolve undefined M_PI w/ MSVC2013 2016-07-26 05:28:13 +10:00
6e131ce075 Call to python3 for stand-alone scripts
Needed since Debian & FreeBSD both move away from keeping a synlink to `python`.
2016-07-26 05:18:00 +10:00
1ea410c559 OpenSubdiv: Fix opensubdiv option obscuring the interface 2016-07-25 18:36:14 +02:00
1870e166de Cleanup: factorize the 'ensure local' part of datablock copy into a single BKE_id_copy_ensure_local function. 2016-07-25 16:16:35 +02:00
d9cc3ea2c6 Cycles: Fix rays parallel to the surface in the triangle refine and MultiGGX code
In the triangle intersection refinement code, rays that are parallel to the triangle caused a divide by zero.
These rays might initially hit the triangle due to the watertight intersection test, but are very rare - therefore, just skipping the refinement for them works fine.

Also, a few remaining issues in the MultiGGX code are fixed that were caused by rays parallel to the surface (which happened more often there due to smooth shading).
2016-07-25 16:14:25 +02:00
83ae0a0e06 Cycles: Calculate differentials in the Multiscattering GGX closures
The Multiscattering GGX closures didn't set the omega_i differentials, which could cause undefined behaviour.
2016-07-25 16:14:25 +02:00
988ec3c40c OpenSubdiv: Support shadeless shading 2016-07-25 15:38:28 +02:00
c967a381fa OpenSubdiv: Fix missing support of flat shading in textured viewport 2016-07-25 15:27:38 +02:00
27db7ef81d OpenSubdiv: Use proper material index 2016-07-25 15:17:37 +02:00
e7721f5ec8 Cycles: Fix SSS with spatial splits and motion blur 2016-07-25 13:55:03 +02:00
a4db868092 Resolve build error on OSX 2016-07-25 20:30:24 +10:00
bbf62931de Cleanup: debug-only variable. 2016-07-25 09:31:56 +02:00
f4cb6d45d5 Error in curve update, uninitialized var use 2016-07-25 15:12:46 +10:00
2aa5e44b5d Curve Drawing: Use cyclic for stroke with near start/end points 2016-07-25 14:55:16 +10:00
a323d8edbf Curve Drawing: Add option to use new refit method 2016-07-25 14:55:16 +10:00
2418daede5 Curve Fitting: Add alternate 'refit' method
This is an alternative method for fitting a curve which incrementally simplifies the curve, then re-fits.

Generally gives better results, also improves corner detection.
2016-07-25 14:55:08 +10:00
f23fecf306 Fix use of uninitialized variable in recent SSS fix. 2016-07-24 16:40:30 +02:00
f283aa61c5 Fix T48397: Can not bake tweaked NLA
We need to leave tweak mode before trying to modifiy the action as doing
so will leave Blender in a semi-corrupted state.

Reviewers: #animation

Reviewed by: aligorith

Maniphest Tasks: T48397

Differential Revision: https://developer.blender.org/D2119
2016-07-24 03:18:40 +02:00
e4efa16b00 Fix T48663: The Soft Light blend type layer make the color darker in the
3D view

There was a misusage of the `outcol` and `texcol` params. The actual
formula should have been:

  incol = facm * outcol + fact * ((one - outcol) * texcol * outcol +
outcol * scr);

To make sure the result is consistent with material mode, reuse the
material blend function (mix_soft), similarly to what most other texture
blend modes do.
2016-07-24 01:04:54 +02:00
4cbefde47c Audaspace: fix incorrect parameter check in python API.
Found by PVS-Studio T48917
2016-07-23 13:35:36 +02:00
8001854083 Cleanup: style 2016-07-23 18:52:18 +10:00
6ef37faa58 Cleanup: warning 2016-07-23 18:52:18 +10:00
bd11d917c1 fix atan2f input conditional
Suspicious conditional found by PVS-Studio T48917

Original code (from Blender’s initial open-source commit!) looks like
it’s testing inputs to atan2f, to avoid undefined function values.
Passing xn=0 does *not* always evaluate to 0 though… I’m not sure if
this is a coding error or was done for a desired visual result.

Also changed xn==0 to xn>=0 to avoid function call in more cases.

Good description and visualization of atan2f function:
http://en.cppreference.com/w/c/numeric/math/atan2
2016-07-22 21:00:12 -04:00
164575af29 OpenSubdiv: Properly respect Subdivide UVs option 2016-07-22 17:53:00 +02:00
Julian Eisel
7ca4cf2be5 Fix crash using ID remapping on invalid ID pairs
Missing NULL checks caused crash in BKE_reportf formatting.
2016-07-22 17:13:23 +02:00
9c63878085 OpenSubdiv: Initial support of UV maps in material shading mode 2016-07-22 16:12:03 +02:00
b2f91d8acf OpenSubdiv: Use BLI module math functions
It became rather annoying to have those functions duplicated.

Surely, it's not really nice it's actually a bad level call,
but similar thing is happening in OCIO and Cycles.

IMO, it's better than having functions re-implemented, and
have this solved with new OpenGL pipeline.
2016-07-22 15:13:42 +02:00
165f710519 OpenSubdiv: Make drawing code a bit more flexible for FVar width 2016-07-22 15:08:18 +02:00
ccd51bb922 OpenSubdiv: Properly support active UV layer in textured view 2016-07-22 14:56:15 +02:00
48c4b700dc OpenSubdiv: Lay down fundamentals to support multiple UV maps 2016-07-22 14:56:15 +02:00
98970f71fe OpenSubdiv: Get number of UVs from topology refiner
This allows us to store more than one UV layer in the UVs array.
2016-07-22 14:56:15 +02:00
177c4aff8b OpenSubdiv: Cleanup, please don't use insanely long lines 2016-07-22 14:56:15 +02:00
adf97edc8f OpenSubdiv: Cleanup, don't use camel case for variable names 2016-07-22 14:56:15 +02:00
e8037867b6 Correct mistake comparing vertices 2016-07-22 18:18:59 +10:00
a7e742f9c4 use bool consistently, fix redundant conditional
Redundant conditional (line 939) found with PVS-Studio T48917

There’s still a lot of true/false, 1/0, SELECT/DESELECT usage nearby.
Not a problem, just confusing to read.
2016-07-22 02:17:52 -04:00
2b77b1ce46 remove double-checked conditions
Checking a condition right after we’ve checked it (and it hasn’t
changed). Most of these are trivial to understand.

split_quads in convertblender.c:
It seems quads should be processed and triangles should be marked as
not needing split. So I removed the outer vlr->v4 check.

Found with PVS-Studio T48917
2016-07-22 02:17:52 -04:00
bd52875dd6 Add Subdivide Edge-Ring to menu 2016-07-22 15:51:02 +10:00
192df299d9 Fix T48926: Subdivide edge-ring crash
Also resolves: T34294
2016-07-22 15:45:04 +10:00
08e1bba10c fix confusing operator precedence
Assigning within a conditional is confusing and error prone so I
rewrote in a more straightforward way.

Found with PVS-Studio T48917
2016-07-21 18:52:44 -04:00
9ff8d4a957 fix enum type / values mismatch
Found with PVS-Studio T48917
2016-07-21 18:26:54 -04:00
7c99b7110e fix null pointer dereferences
Found with PVS-Studio T48917
2016-07-21 18:16:08 -04:00
23f1b2073f fix comparison of identicals
Some of these check that dimensions match before running code that
assumes they do match.

For imb_stereo3d_write_anaglyph I *assume* this change reflects the
intended behavior. Before it was always grabbing alpha from buffer 0.

Found with PVS-Studio T48917
2016-07-21 18:16:08 -04:00
d1f9342e37 Cleanup: pass pointer to texture draw state 2016-07-22 07:33:29 +10:00
cddef5589a BMesh: compare face angles as angles cosine 2016-07-22 07:22:47 +10:00
875c1313b1 Fix broken proxy object deletion.
Check to ensure we do not delete last instancing of an indirectly used object (forbidden
because it creates 'ghost' objects user have no real way to re-instance) was defeated by
the backward pointer 'proxy_from', which generated a 'false' indirect usage of (local)
proxy object itself (the one we are trying to delete).

Fixed by actually considering that ID usage as local if proxy object itself is local
(because that pointer actually does not 'pertain' to the object holding it, but to its proxy).

Yeah, it's... complicated, twisted and ugly - it's proxy.
2016-07-21 23:07:14 +02:00
6ebce7e948 fix typo in condition
(A - A).norm() is always 0 so condition is always true.

(A - B).norm() and (B - A).norm() both compute the same distance so I
picked one to match surrounding code.

Found with PVS-Studio T48917
2016-07-21 15:53:39 -04:00
b5ba14ef70 Fix T48915: Wrong threshold on scaled objects and ortho view.
`ray_is_normalized` == true in DerivedMesh
2016-07-21 16:36:20 -03:00
14995c5617 Fix crash w/ auto-insert offset 2016-07-22 04:22:26 +10:00
1cc0ce58fd Cleanup: warnings 2016-07-22 04:06:10 +10:00
9279bee583 remove repeated codec-supports-alpha check
I don’t think any other codec enum makes sense here, so probably just
an extra copy/paste. Here are the video codecs:

AV_CODEC_ID_NONE
AV_CODEC_ID_MPEG4
AV_CODEC_ID_MJPEG
AV_CODEC_ID_DNXHD
AV_CODEC_ID_MPEG2VIDEO
AV_CODEC_ID_MPEG1VIDEO
AV_CODEC_ID_DVVIDEO
AV_CODEC_ID_THEORA
AV_CODEC_ID_PNG <— alpha
AV_CODEC_ID_QTRLE <— alpha
AV_CODEC_ID_FFV1 <— alpha (if enabled)
AV_CODEC_ID_HUFFYUV <— alpha
AV_CODEC_ID_H264
AV_CODEC_ID_FLV1

Found with PVS-Studio T48917
2016-07-21 13:50:35 -04:00
9d0cbbe1dd Tracking: Fix bug when tracker will keep trying tracking past the footage 2016-07-21 17:02:33 +02:00
aedff9dbef Add BKE_mesh_calc_islands_loop_poly_uvmap and use it in new OSD UV subdiv.
Also renamed BKE_mesh_calc_islands_loop_poly_uv to BKE_mesh_calc_islands_loop_poly_edgeseam,
to avoid confusion...
2016-07-21 16:54:36 +02:00
db0c2be55e BKE mesh mapping: add new BKE_mesh_edge_loop_map_create().
Maps edges to all their pair of loops.
2016-07-21 16:54:36 +02:00
d4342b3897 Fix (unreported) memleak in image copy function. 2016-07-21 16:54:36 +02:00
2969b30813 Fix stupid (harmless) mistake in recent commit. 2016-07-21 16:54:36 +02:00
77ff125232 BKE_library_make_local: clear behind us no more used linked datablocks.
This is really not elegant solution, but simplest for now.

Ideally, we'd check all IDs first and directly 'make local' (without need to copy)
those only indirectly used by other datablocks to be made local. Would also save us from the
need of the extra 'lib_local' parameter recently added to id_make_local.

Current code seems to work well enough though, and this is not high priority to fix imho.
2016-07-21 16:54:36 +02:00
af2deb5438 Fix (unreported) crash in some case when remapping armature data.
Those bone pointers in object's pose bite again - turns out they can be accessed
before pose actually gets rebuilt in some cases (e.g. from undo writefile), so
we need to clear the pointers immediately.
2016-07-21 16:54:36 +02:00
b156674251 Fix missing datablocks types in id_make_local.
Adding make_local for vfont/gpencil/group/freestyle linestyle/mask/scene/sound/text.

Note that there are still some lose ends here, since some type are not handled by id_copy
(Scene, Sound and VFont), which means in case a datablock of that type is used both
directly and indirectly, localization will fail.

Scene copying might be doable though (maybe with a simple new 'full shalow' mode to existing BKE_scene_copy?),
not sure about sounds and vfonts... Situations where this becomes an issue should be very rare corner cases anyway.
2016-07-21 16:54:36 +02:00
5dc7dc70ea Cleanup: get rid of lib_indirect_test_id.
id_make_local and later remapping are supposed to handle that already,
and in a much much saner and more complete way.
2016-07-21 16:54:36 +02:00
d8d4bef6cc Refactor/deduplicate even more make_local code (and fix part of T48907).
Turns out most BKE_foo_make_local datablock-specific functions are actually doing
exactly the same thing, only two currently need special additional operations
(object and brush ones). So added a BKE_id_make_local_generic instead
of copying same code over and over.

Also, changed a bit how make_local works in case we are localizing a whole library.
We need to do the 'remap' step (from old linked ID to new local one) in the second loop,
otherwise we miss some dependencies. This fixes main part of T48907.
2016-07-21 16:54:36 +02:00
2977dcf2f7 Tracking: Fix possible cases when tracker will try tracking failed tracks 2016-07-21 16:54:18 +02:00
1deb01a9b9 Attempt to fix compilation on Windows, take 2
Previous patch was wrong apparently... :|
2016-07-21 16:12:31 +02:00
be1c854019 Attempt to fix compilation error on Windows.
Patch from @fjuhec.
2016-07-21 15:45:07 +02:00
aa316c73e0 OpenSubdiv: Prepare majority of things to have proper subdivided UV
Mainly the changes are related on establishing API to feed UV islands
to OpenSubdiv, so it will know all the connectivity information and
will be able to do proper interpolation.

Island calculation is currently rather slow, not sure how to make it
fast and not use lots of allocations.

Shouldn't be THAT bad, since this code is only runs once when creating
OSD mesh, and it's probably still faster than our orientation code.
2016-07-21 12:34:57 +02:00
e44fa4e6a9 Fix another Cycles OSL script node issue with shaders using bump. 2016-07-21 04:40:28 +02:00
ecd33bacf0 Cleanup: use const, move comments to enum 2016-07-21 11:52:41 +10:00
1c6b8c6675 Fix Cycles OSL script node not working in shader using bump, after node type refactoring. 2016-07-21 02:56:17 +02:00
97ef8777fc Fix T48908: gray out Cycles motion vector pass if motion blur is enabled, doesn't work then. 2016-07-21 01:03:12 +02:00
a2a1b34cd1 Cleanup: warnings 2016-07-21 07:38:15 +10:00
a96c7daf80 Cleanup: unused brush DNA 2016-07-21 07:17:43 +10:00
21425e54bc Cleanup: spelling 2016-07-21 07:16:59 +10:00
5ef1821a0f Fix copy-materials resetting objects material indices 2016-07-21 06:03:02 +10:00
e0f16bdcc2 Cleanup: use BKE naming convention for object materials
Also remove unused 'material_from' function (which isn't very useful).
2016-07-21 06:02:34 +10:00
dd020caa04 Cleanup: remove completely call to test_object_materials in BKE_mesh_new_from_object.
Don't know why this was ever added to start with, BKE_mesh_new_from_object shall never affect ob->data!
2016-07-20 16:42:09 +02:00
1270ab91be Fix T48898: shaders are removed from metaballs on cycles render.
Note that issue has several levels here actually, first one was metaball's materials
not being properly copied into new mesh (code was commented out because of some crash it
seems, made it a bit closer to mesh one and got no crash at all...).

Then, we were calling test_object_materials when ob->data is actually *not* new tmpmesh!

Will remove this call completely in next commit (to make it easier to bisect), I cannot see
any case where object would be assigned with newly generated tmpmesh in this func.
2016-07-20 16:42:09 +02:00
4e5ee5b75e Fix own error in recent heap update 2016-07-21 00:35:42 +10:00
f0f60d775d OpenSubdiv: Initial work to support UV maps in textured OSD viewport
A bit work in progress, currently the following limitations:

- Texture shading only, Material shading will come later

- No UVs subdivision yet

- Always uses active UV and currently changing active UV will
  not properly update the viewport.

Well, need to start somewhere :)
2016-07-20 14:16:38 +02:00
9a0634a253 OpenSubdiv: Wrap OSD's TopologyRefier with own struct
This is a way for us to store extra data, such as UVs which we can
collect now on topology refiner stage.
2016-07-20 12:38:33 +02:00
690063edb9 Fix T48897: Flatten brush fails on first stroke
The flatten brush depended on accumulate being disabled,
Adding dynotopo support for accumulate caused problems for this tool (see T44390).
Enable for existing files.
2016-07-20 13:54:55 +10:00
f2fa73786b possible fix for crash mentioned in T48887 - Adjust the depth min to the object scale 2016-07-19 22:25:13 -03:00
5f7fd0444d BMesh: improve BM_face_splits_check_legal
- remove edge scaling, instead avoid checking intersections with connected edges.
- replace local line intersection functions with BLI_math
- center the projection for more precise calculation.
2016-07-20 10:00:35 +10:00
6ff7a891e7 Update tracker URL
Also wrap line-length
2016-07-20 06:37:21 +10:00
5f4a3785c6 Add 'reload' function to libraries' RNA API. 2016-07-19 17:49:33 +02:00
6921bb7a4a Improved warning message when creating empty export file 2016-07-19 16:34:22 +02:00
b9e4e69a4d Fix (IRC reported by Sergey) assert regarding icon_id of newly copied datablocks.
BKE_previewimg_copy() would simply copy PreviewImage's icon_id, without bothering about
ID one.

When we duplicate an ID, we want to reset its icon_id to zero (and regenerate it on-demand),
not keep same icon_id as original, so added new BKE_previewimg_id_copy helper to handle that.
2016-07-19 16:27:40 +02:00
eeedcf3892 Usual i18n/UI messages fixes... 2016-07-19 15:41:28 +02:00
0e15c20a00 Merge branch 'openvdb' into cvdb_ray_isect 2016-07-19 14:08:43 +02:00
485911f3b5 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/render/nodes.cpp
2016-07-19 14:08:24 +02:00
307250723b Fix building on NetBSD 2016-07-19 22:04:14 +10:00
eac9d2d430 OpenSubdiv: Fix wrong shading in BI texture mode
This probably makes code somewhat slower, but we can't easily know
whether we can use a shortcut and only use directional lighting from
the scene.

Need some better integration between GPU and OpenSubdiv for that.
2016-07-19 12:49:37 +02:00
c883946441 OpenSubdiv: Fix broken structure alignment when using color material 2016-07-19 12:49:37 +02:00
d8de018398 update player stub 2016-07-19 19:31:27 +10:00
95da68822b Fix missing break in libblock relink 2016-07-19 10:27:37 +10:00
3948f65686 Cleanup: style, spelling 2016-07-19 10:27:33 +10:00
bd59206b5c Cleanup: style, spelling 2016-07-19 09:16:38 +10:00
5234e9ddd3 Cycles: add ConstantFolder class for constant folding boilerplate.
Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D2089
2016-07-18 22:54:30 +02:00
10b0e33de1 Cycles: add support for motion blurring of fluid meshes.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2063
2016-07-18 22:40:08 +02:00
20ec6bc166 Fix Cycles kernel build without render passes support. 2016-07-18 22:40:08 +02:00
277cb12395 Fix T48874: Nested pop-up didn't update its parent 2016-07-19 06:01:56 +10:00
399c978a55 fix breakage caused by D2094 / rB404f41d22de46119ee8afb409011eb1ba1840092 2016-07-18 13:09:41 -06:00
ffe106a56a Docs: improve bpy.props.EnumProperty reference 2016-07-19 05:03:50 +10:00
a99dbb9aa0 Fix T48885: Wheel in image space changes wrong window 2016-07-19 02:46:12 +10:00
de0f371528 Fix missing release w/ mouse wheel over layer menu 2016-07-19 02:46:12 +10:00
404f41d22d [bf_intern_ghost/Windows] Cleanup
This patch addresses the following issues in bf_intern_ghost

```
Warning	C4312	'type cast': conversion from 'GHOST_TEmbedderWindowID' to 'HWND' of greater size	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	179
Warning	C4312	'type cast': conversion from 'GHOST_TEmbedderWindowID' to 'HWND' of greater size	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	198
```

GHOST_TEmbedderWindowID is defined as long, handles are however of pointer size,
so this should have been an issue when we moved to 64 bits, guess we got lucky.
fixed by turning GHOST_TEmbedderWindowID from long into void*

```
Warning	C4302	'reinterpret_cast': truncation from 'HKL' to 'LANGID'	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_ImeWin32.cpp	67
```

reinterpret_cast emits warnings on truncation, LOWORD does the job just
as well with no warnings.

```
Warning	C4838	conversion from 'int' to 'DWORD' requires a narrowing conversion	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_ContextWGL.cpp	734
Warning	C4838	conversion from 'int' to 'BYTE' requires a narrowing conversion	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_ContextWGL.cpp	734
```

Weird warning, it does a really bad job at telling you what parameter is
causing the warning , tuns out there's a bunch of parameters that cause it
but it still only yields a single warning, the problem is that every
(somevar ? a : b) construct results in an integer type. which needs to be
properly cast to get rid of the warning.

```
Warning	C4996	'GetVersionExA': was declared deprecated	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	105
Warning	C4996	'GetVersionExA': was declared deprecated	bf_intern_ghost	K:\BlenderGit\blender\intern\ghost\intern\GHOST_WindowWin32.cpp	107
```

The warning was clear, the code not as much. The version check in place
here is quite convoluted and could be replaced by including VersionHelpers.h
and calling IsWindows7OrGreater, However, CreateInstance will just return NULL
in m_Bar if the interface is not supported, so the whole check is useless.
This however did require that the CreateInstance call actually asked for
ITaskbarList3 and not ITaskBarlist . (You're not really allowed to assign
different interface types to each-other, a roundtrip through QueryInterface
is required there, we were violating spec here by asking for ITaskBarlist and
storing it in ITaskbarList3*  )

Reviewers: sergey

Reviewed By: sergey

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2094
2016-07-18 15:48:51 +02:00
a76e69f5f7 Additional Waveform Drawing Mode
This diff adds a 6th drawing mode to the Waveform Scope.

The new mode shows the RGB colour channels overlaid as a "Full colour" waveform.

The old "Red Green Blue" mode is renamed "Parade" which is the standard industry
term for RGB channels shown side-by-side.

This full colour style of waveform is very much more useful for colour grading than the
Parade mode and is the default waveform for many artists.

Files from older Blender versions which show scopes open as expected.

Patch by John Cox (johnedwardcox), thanks!

Reviewers: sergey

Reviewed By: sergey

Subscribers: campbellbarton, tmw, Blendify

Differential Revision: https://developer.blender.org/D1936
2016-07-18 15:42:21 +02:00
3e882c91e0 [MSVC2015/Cycles] MSVC2015 before update 3 produce invalid builds
I'm not quite sure where the codegen bug gets triggered but it's easily
noticeable in the barcelona scene. (extra saturated leafs and illumination
on the right ledge of the pool)

2013 buildbot reference image:
{F320792}

2015 With no updates (compiler version 19.00.23026)
{F320793}

2015 With Update 2 (Compiler version 19.00.23918)
{F320794}

2015 With Update 3 (Compiler version 19.00.24210)
{F320795}

This patch blocks all compiler builds before update 3 in a similar way we
did for msvc 2013 update 4

Reviewers: campbellbarton, brecht, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2100
2016-07-18 15:26:52 +02:00
6239afd36f [MSVC/LNK4199/Cleanup] Delay loading is causing linker warnings.
We recently added delay-loading of the openmp dll's so we no longer had to use
the stub loader, we however put these linker flags on the global linker flags
causing any sub projects not using openmp to spit linker warning 4199 while building,

```
Warning	LNK4199	/DELAYLOAD:vcomp140.dll ignored; no imports found from vcomp140.dll	datatoc	k:\BlenderGit\build_windows_2015a\source\blender\datatoc\LINK	1
```

This patch makes the delay-load only apply to the blender project.

Reviewers: sergey

Subscribers: sergey

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2092
2016-07-18 15:20:29 +02:00
65e7caf950 Fix (unreported) ED_region_tag_redraw_partial() could override a previously defined partial redraw, instead of extending it.
Probably not an issue currently, since partial redraw is not much used
(only from sculpt code and box-rendering it seems?), but logic was broken here.
2016-07-18 14:41:56 +02:00
bbc1507871 Fix T48848: Cycles - Camera Culling - Camera Culling removes objects which are still in frame 2016-07-18 14:29:37 +02:00
6533d72056 Fix T48877: Lightmap Pack fails w/ 1-3 faces
Unnecessary limit was applied.
2016-07-18 19:44:51 +10:00
d42cb44ea2 CMake: correct py-module on OSX 2016-07-18 19:30:32 +10:00
9946cca146 Fix T48860: Cycles SSS artifacts with spatially split BVH
The issue was caused by SSS intersection code gathering all
intersections without check for duplicated ones. This caused
situations when same intersection will be recorded twice in
the case if triangle is shared by several BVH nodes.

Usually this is handled by checking intersection distance
after sorting intersections (in shadow_blocked for example)
but for SSS we don't do such sorting and using number of
intersections to calculate various things.

Didn't find anything smarter than to check intersection
distance in triangle_intersect_subsurface().

This solves render artifacts in the cost of 1.5% slowdown
of extreme case rendering (SSS object filling in whole
FullHD screen).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2105
2016-07-18 10:04:20 +02:00
a2c82f5e5d Cycles: Fix OpenCL compilation after the recent numerical fixes 2016-07-17 19:24:53 +02:00
c974def837 BLI_heap: replace memarena w/ local allocator
- Since element size its known it's less work to do inline.
- In test with high-poly model, gave ~9% overall speedup for decimate modifier.
2016-07-17 19:29:30 +10:00
c57d823683 Cleanup: minor edits to BLI_heap 2016-07-17 19:29:30 +10:00
d9281a6332 Cycles: Fix three numerical issues in the fresnel, normal map and Beckmann code
- In fresnel_dielectric, the differentials calculation sometimes divided by zero.
- When the normal map was (0.5, 0.5, 0.5), the code would try to normalize a zero vector. Now, it just uses the regular normal as a fallback.
- The approximate error function used in Beckmann sampling sometimes overflowed to inf while calculating r^16. The final value is 1 - 1/r^16, however,
  so now it just returns 1 if the computation would overflow otherwise.
2016-07-16 20:54:14 +02:00
5ba78d76d4 Cycles: Deduplicate geometric factor calculation in the Beckmann distribution
Also, this fixes a numerical issue where A would be inf.
Since later G is set to 1 if A is larger than 1.6, the code now checks the reciprocal of A for being smaller than 1/1.6 - same effect, but no inf involved.
2016-07-16 20:54:14 +02:00
a40073ffcc Fix use after free error from ab993e37 2016-07-17 03:03:22 +10:00
c885cea7bb Cleanup: spelling 2016-07-16 17:48:57 +10:00
f0f9a87614 Cleanup: line length 2016-07-16 17:29:08 +10:00
4e9409c087 Use the value VIEW_PROJ_PERSP in the remaining places
also changes the name of the callbacks:
- walk_parent_snap_project_cb to cb_walk_parent_snap_project;
- cb_leaf_snap_vert to cb_walk_leaf_snap_vert;
- cb_leaf_snap_edge to cb_walk_leaf_snap_edge;
- test_vert_depth_cb to test_vert_ray_dist_cb;
- test_edge_depth_cb to test_edge_ray_dist_cb;

and cleanup:
2016-07-15 21:25:44 -03:00
ac061de20d Cycles: Fix refitting of regular BVH
Was causing CUDA issues on viewport edits.
2016-07-15 18:12:34 +02:00
69787cb7bd UI: modifier keys now trigger number button updates
Number buttons & sliders weren't updating when shift/ctrl were pressed.

Note that this is a regression in 2.77 but hard to track down since it worked unreliably for some time.
2016-07-16 01:20:16 +10:00
12cdc67d83 Bump maximum threads number to 1024
This commit contains all the changes required for most optimal maximum threads
number bump. This is needed to avoid possibly unneeded initialization or data
allocation on systems with lower threads count.

TODO: Still need to review arrays in render data structures from render_types.h,

P.S. We might remove actual bump of max threads from this patch, so when we'll
be applying the patch we can do all the preparation work and then do actual
bump of max threads.

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Maniphest Tasks: T43306

Differential Revision: https://developer.blender.org/D1343
2016-07-15 16:47:30 +02:00
6cd675af30 Cycles: Add option to disable new Hair BVH
While it's an extra option added to the interface which might not be
fully obvious for artists, it allows to save up to 20% of memory in
hairy scenes.

This is high enough memory saver in my opinion which might become
handy for some production files where it's more important to make
scene to fit into memory rather than trying to use more optimal BVH
structure but go into swap or crash.

Reviewers: dingto, brecht

Reviewed By: dingto, brecht

Differential Revision: https://developer.blender.org/D2090
2016-07-15 16:29:28 +02:00
b679767656 fix T48857: Improved the handling of Material Alpha, based on patch D1949 with some small modifications 2016-07-15 16:14:53 +02:00
27641b51e7 Collada: changed specification of material alpha from using transparency to using transparent with opaque=A_ONE 2016-07-15 16:14:51 +02:00
e3b79544be Re-initialize source/tools submodule 2016-07-15 15:12:51 +02:00
711fca1db5 missed from last commit 2016-07-15 20:00:18 +10:00
fafb8aaaf1 Object Snap: make normal argument optional
Often its not needed, setting correctly takes some extra calculation - so allow for it to be left unset.
2016-07-15 19:46:59 +10:00
e68f068682 Fix T48855: Ruler thickness broken in ortho view
Don't do ray-casts from the view unless cursor coords are passed.
2016-07-15 19:27:45 +10:00
3eb7d41c67 Object Snap: replace perspective bool with enum
Allows to set the projection as none,
to make it more obvious when we don't want to handle viewport projections in some cases.
2016-07-15 19:27:23 +10:00
dec59618b4 Correct error in snap commit 2016-07-15 18:40:16 +10:00
e5e128e30c Cleanup: use BLI_math for paint smooth-stroke 2016-07-15 17:17:42 +10:00
0deb7e6c15 Cleanup: rename snap vars 2016-07-15 17:12:43 +10:00
91556cb973 Add "Snap Selection to Active" option in menu
D1963 by @wisaac, re-worked to de-duplicate logic
2016-07-15 17:11:58 +10:00
ccee251a40 Support for loading multiple images from the file selector
D2035 by @jside, extended to support mixing single images and sequences in the one selection.
2016-07-15 16:06:11 +10:00
e56aa5d788 Fix select grouped parent, extend option was ignored
D2067 by @mangostaniko
2016-07-15 15:56:28 +10:00
97f894f3fa UI: Remove spaces around '/'
D2093 by @Blendify
2016-07-15 15:50:42 +10:00
10f5a6a57e Sequencer: Remove add effect strip filesel properties
D2096 by @chadf

Unused, copy-paste error.
2016-07-15 15:47:42 +10:00
3bfa8d9fd4 Fix py-driver in startup.blend crash in background mode
Obscure regression in own commit from b34929786.
While this could be considered correct, it introduces a crash so disable the update call.
2016-07-15 15:41:38 +10:00
71bbf0e1b5 Code cleanup: show unused arguments names for ShaderNode::constant_fold. 2016-07-14 22:59:44 +02:00
558f85473e fix T48857: Added support for transparency (used Patch D1949 from bwrsandman with some slight changes) 2016-07-14 21:43:26 +02:00
902d4c92ac Use BMesh solver for new boolean modifiers 2016-07-15 02:46:04 +10:00
8343518272 Cleanup: comment blocks 2016-07-15 02:39:45 +10:00
39dee8a201 Fix T48844: Nodetrees of appended materials/textures/etc. were not correctly made local.
Previous commits now allow to use id_make_local() here, as one would expect.

Note that I also checked T36003 case, working fine as well with new code.
2016-07-14 18:33:12 +02:00
bcfd8d9ab8 Correct recent own fix to id_clear_lib_data_ex().
Datablocks' nodetree are *never* in main, while shapekeys are...
2016-07-14 18:33:12 +02:00
e7d4d661f3 Cleanup/refactor: handle shapekeys exactly like 'owned' nodetrees in make_local process. 2016-07-14 18:33:12 +02:00
018d336cbd Cleanup: use BKE's ntreeFromID in readfile instead of local same function.
Also, no need to set ntree->id.lib to NULL after BKE_libblock_copy_nolib(),
generic datablock copy function always make copy local.
2016-07-14 18:33:12 +02:00
54ed0bb653 Fix bad handling of datablock's nodetree id_clear_lib_data_ex().
Those data blocks are never shared, exactly as with shapekeys, much simpler
to also clear their lib_data (especially since they have no user!).
2016-07-14 18:33:12 +02:00
e10ddc7a91 Get rid of BKE_key_make_local().
This function was only a wrapper around id_clear_lib_data(), and shapekeys
are not linkable nor shareable anyway, no point keeping this currently,
was only adding confusion about shapekey 'status' as a datatblock.
2016-07-14 18:33:12 +02:00
f87603662d Add option to id_make_local to force localization of datablock, even if not used locally.
Will be used by link/append code.
2016-07-14 18:33:12 +02:00
f2509e764e Fix T48843: Sequencer crash with many effects
Switch from a fixed stack to a linked list,
since guessing the maximum possible size may fail with invalid/overlapping strips.
2016-07-15 02:30:37 +10:00
3ba83e247a Add developer tools submodule
This is intended for utilities to help with development,
which aren't needed for building.

See https://wiki.blender.org/index.php/Dev:Doc/Tools/Blender_Tools_Repo for details
2016-07-15 01:28:00 +10:00
7faf76a618 Cleanup: line length 2016-07-15 01:26:26 +10:00
34642fe532 PyAPI: minor cleanup with library linking 2016-07-15 00:06:33 +10:00
17e40f821e Consolidate multiple checks for out->rect_float in prepare_effect_imbufs()
Many checks for out->rect_float being [non-]NULL are done back-to-back.
Combining them into a single check for slightly more efficient code and
less code clutter for easier readability/understanding.

Differential Revision: https://developer.blender.org/D2097
2016-07-14 14:17:54 +02:00
Julian Eisel
3a5eff95c5 Cleanup: Use BKE_scene_base_add for creating bases
And use __func__ macro.
2016-07-14 14:00:24 +02:00
274795045c Cycles: Give better idea which OpenCL kernel is currently compiling 2016-07-14 12:49:20 +02:00
95a0bff83a Cycles: Avoid strings passed by value in OpenCL device
Also use more const qualifiers in the code.
2016-07-14 12:46:57 +02:00
af53fee4b4 Make --debug-all include --debug-cycles and --debug-libmv 2016-07-14 12:14:55 +02:00
c183f0c94e Libmv: Fix some strict compiler warnings
One of them was a real bug!
2016-07-14 11:49:38 +02:00
56c9c1ab43 Cycles: Fix wrong size of sobol texture
After reformulation of SSS indirect rays it became possible to
try accessing dimension higher than was pre-calculated on scene
preparation.

This is because we're traversing rays backwards, which means we
are using higher dimensions first now.
2016-07-14 11:26:20 +02:00
3637cbbcf8 Cycles: Fix wrong termination criteria in intersect_all functions
It was possible to miss bounces termination criteria in this functions,
mainly when max_hits was set to 0.

Made the check more robust in traversal functions (which should not
affect performance, it's an operation of same complexity AFAIK).

Also avoid doing ray-scene intersection from shadow_blocked when
limit of transparent bounces was already reached.
2016-07-14 11:26:20 +02:00
103a515043 CMake: per-target CFLAG & CXXFLAG support
Applying cflags globally can be problematic especially with extern, intern libs.

Now flags from target named will be used when defined,
allowing for developers to define flags for modules they maintain.

Convention is CMAKE_CFLAGS_${UPPERCASE_TARGET_NAME}, (CXXFLAGS for C++).

eg: CMAKE_CFLAGS_BF_BLENDER, CMAKE_CFLAGS_MAKESDNA, CMAKE_CXXFLAGS_CYCLES_KERNEL

On Linux run `make help` for full list of names, MSVC shows these in the solution.
2016-07-14 19:17:34 +10:00
036c006cef PyAPI: Leak fix caused crash w/ attr swap trick
Accessing `bpy.app.binary_path_python does search, then swaps its getset with the string it finds.
This caused a freed pointer to be stored in bpy.app's dictionary.

Fix by using the same string for get/set access.
2016-07-14 18:32:28 +10:00
b00bc3cbc1 PyAPI: fix leak linking library data 2016-07-14 17:38:22 +10:00
f5e020a7a6 PyAPI: fix memory leaks in dictionary assignment
Thanks to Kévin Dietrich for spotting driver leak,
checked other uses of PyDict_SetItem and found more.
2016-07-14 17:30:52 +10:00
cca57bf04c PyAPI: Use module names on initializaton
No need to re-convert from C strings to PyUnicode.
2016-07-14 15:51:56 +10:00
06908955c3 Improves the accuracy of snap to edges
Recently the snap to edges has been changed to work with coordinates 2d. Thus, the lambda of the snap pointon on edge becomes different from the actual lambda in a 3d edge.

The solution to correct the lambda was this:

```
if (is_persp) {
	const float fac = depth_a / (depth_a + depth_b);
	lambda *= (1.0f + (fac - 0.5f) * (1.0f - lambda));
````

...
But the lambda was still not very accurate.
Now the function uses the `dist_squared_ray_to_seg_v3` to get the coordinate of the snap point on the edge. And then tests that point.

The accuracy returned to normal values.
2016-07-14 00:47:32 -03:00
6771165229 Cleanup: style 2016-07-14 13:37:49 +10:00
1b8e7b5cb0 Use BLI_endian_switch in dna_genfile 2016-07-14 13:28:24 +10:00
b014f03077 Simplify snapping functions
from D2104: reference all repeated (and strange) equations (example: mul_m4_m4m4(pmat_local, pmat, obmat)) in the function `precalc_project.

This is useful for maintenance.
2016-07-14 00:02:21 -03:00
743f931584 Fix T48846: Ruler/Protractor crash in ortho mode
Error in recent snap changes.
2016-07-14 11:14:03 +10:00
91bda21cfe Fix T48845: Crash when right-clicking on a curve property
Caused by typo in rBd2312602125a452e6562a76ab91779943c67396d
2016-07-14 00:24:31 +02:00
029de800a4 Fix T48734: Driver not updating when using Single From Driver within same object 2016-07-13 15:00:57 +02:00
afe954e64c Fix T48839: Selection from pose mode gives wrong snap results
Current code changes the selection then then runs ED_armature_sync_selection
to copy to the bones rootsel flag from the parents tipsel.

Use this logic for entering edit-mode too.
2016-07-13 22:24:20 +10:00
2aa0569861 Boolean Modifier: Add back BMesh option
There are still issues with overlapping geometry,
however some of the issues reported are are causing problems,
or fail entirely with Carve too.
2016-07-13 19:55:31 +10:00
95b1cf6f7d Depsgraph: Make proxy behavior closer to old depsgraph
Fixes possible missing update of proxy_from pointer before using
it in relations builder.
2016-07-13 10:55:35 +02:00
c0d8166f82 Revert "Depsgraph: Russian electric tape bodge to have multiple proxies work"
This reverts commit 47d0d9cca4.

Reverting the commit. Not only it did not solve all the cases of proxy popping,
but also broke real cases with single proxy involved.
2016-07-13 10:41:09 +02:00
527674b316 Depsgraph: Accumulate object layers from all bases
This solves bug when same object is instanced from multiple bases.
2016-07-13 10:07:09 +02:00
8939787bfb Use BLI_bvhtree_walk_dfs for snapping
The snapping functions when performed in the perspective view,
have some problems in the threshold (a distortion) and in the clip plane (the normal is incorrect).
These problems can be only observed when making the snap to edges or to vertices (nearest to ray function).

This patch propose a totally different solution.
The idea is to project the edges of bvh nodes and test the 2d projection of the snap element.

For this it used the BLI_bvhtree_walk_dfs function.

It is important to pay particular attention also to the changes in `ED_transform_snap_object_project_view3d_ex`
2016-07-13 14:45:35 +10:00
7a633d7c4f Vertex/Weight Paint: Support view-selected on last-stroke
D1875 by @lichtwerk
2016-07-13 13:57:46 +10:00
eb04908ccd Fix 48831, Step II: UI icon code was not able to update/generate 'auto ID icon' from non-ID icon draw code.
Now using generic icon rendering system in that case too, instead of custom code
which was only handling 'deferred' custom file-loaded icons.
2016-07-12 21:11:38 +02:00
51812fb502 Fix 48831, Step I: Mismatch issues bewteen ID icon and preview system.
- icon_id from ID and PreviewImage were not guaranteed to be in sync.
- PreviewImage one was not reset on file read.
- Through RNA e.g., it was possible to ensure an ID icon via its preview image,
  which was running code designed for custom previews/icons system, instead
  of generating correct 'auto ID icon'.
2016-07-12 21:11:38 +02:00
5fae2503bf Revert "OpenJPEG: update to 2.1 from 1.5"
This reverts commit f12204196f.

Campbell, sorry. have to revert this for the time being.

We've missed some very important bits, such as:

- FFmpeg is usually linked against OpenJPEG
- OIIO needs OpenJPEG as well.

For FFmpeg issues we can either disable OpenJPEG there (since
we don't really use it), or bump FFmpeg to version 3.1.1 which
can use either of OpenJPEG 1.5 or 2.1.

For OIIO we do need OpenJPEG support (otherwise Cycles will
not be able to use j2k/j2c textures) and currently there is
NO solution to make OIIO working with OpenJPEG 2.1.

According to Matthias Fauconneau (aka mfv) Larry is working
on the patch to get OIIO work with OpenJPEG 2.1, but it'll
take some time still.

I've tried to look into support of some sort of build system
flag and do ifdefs, but it all becomes quite nasty, especially
with bundled OpenJPEG bumped to 2.1.

Surely such an update is something we'll have to apply to
but at this exact moment it causes quite some pain for all
developers.

Suggest to wait for until OIIO supports OpenJPEG 2.1 and then
go with the updates for real.
2016-07-12 17:38:26 +02:00
51b274a6be Fix T48818: Objects with alpha maps cast wrong ray shadows in BI 2016-07-12 15:41:00 +02:00
f12204196f OpenJPEG: update to 2.1 from 1.5
Stream handling has changed so this required changes to how files & memory are accessed.
2016-07-12 23:13:30 +10:00
5798301291 Fix saving jpeg2k images from Python
Quality was defaulting to lowest and no codec was set.
2016-07-12 20:35:02 +10:00
59c59cc402 Cleanup: remove redundant check 2016-07-12 17:59:25 +10:00
b8f217ef21 Fix T48830: Outliner draw crash, missing NULL check
Fix from @cheleb
2016-07-12 14:44:59 +10:00
0708b9aba8 writefile: reuse SDNA between writes
Avoids decoding the SDNA string every undo step.
2016-07-12 13:03:04 +10:00
4db1db327a readfile: report SDNA decoding errors on file read
This was printed to the stdout, however the error case wasn't checked or well supported.
Also, errors decoding SDNA would sometimes call exit(1).
2016-07-12 12:28:06 +10:00
0b3183d13c writefile: remove SDNA last-hit, optimize DNA reconstruct
- Move last-hit index out of SDNA struct
  (allows for access by multiple threads).
- Replace O(n^2) search with hash lookup in DNA reconstruction.
2016-07-12 11:56:45 +10:00
7212ebd09f Remove usercount handling from BKE_id_expand_local.
Idea looked good, but we have too much custom situations here (some half-fake-sub-ID
being copied with their 'owner', animdata, etc.), let's let datablock copy functions
handle that themselves.

Also allows to safely call BKE_id_expand_local from all copy functions now (only when
copying linked data).
2016-07-11 21:30:02 +02:00
3b8e0606e1 Cleanup: remove call to BKE_id_lib_local_paths() in make_local functions.
This one is already called by matching copy functions, no need to call it twice!
2016-07-11 21:30:02 +02:00
5b2bc1d713 Use new generic BKE_id_expand_local() for make_local() for object. 2016-07-11 21:30:02 +02:00
3c8f22a528 Use new generic BKE_id_expand_local() for make_local() for image/material/texture/world.
As said in previous commits, did not touch to copy functions for now, due to ntree issues...
2016-07-11 21:30:02 +02:00
c3996b792a Revert 'use new BKE_id_expand_local()' change for Lamp's copy function.
ntree is once more time a PITA - actually, all sub-IDs that get copied together with the 'main' one are
(shapekey was workedaround, as was animdata/action issue, but nodes are more touchy).

For now, better not to touch that, needs careful check & rethink.
2016-07-11 21:30:02 +02:00
eac7faa0e6 Use new generic BKE_id_expand_local() for make_local() for nodetree.
Did not changed ntree copy for now, this func is a mess of expand/non-expand/bmain/non-bmain cases...
Keep it for later!
2016-07-11 21:30:02 +02:00
13f0b59f11 Use new generic BKE_id_expand_local() for both make_local() and copy() functions of actions, brushes and particles.
This greatly simplifies said code, once again no change expected from user PoV.
2016-07-11 21:30:02 +02:00
2ec17e655c Use new generic BKE_id_expand_local() for both make_local() and copy() functions of obdata
(armature, mesh, curve, mball, lattice, lamp, camera, and speaker).

This greatly simplifies said code, once again no change expected from user PoV.
2016-07-11 21:30:02 +02:00
439ccca1e0 Add an exception/hack to new BKE_id_expand_local(), to ignore actions datablock in its usercount handling.
Reason is, typically those actions datablock usercounts have already been adjusted in BKE_animdata_copy()
(called by generic iddata copy function).

Think this needs to be reworked a bit too, there are way too much ways to copy animdata currently,
it's rather confusing. But not the goal here, so for now we'll live with the hack!
2016-07-11 21:30:02 +02:00
62ea383622 Fix (unreported) memory leak when making local linked databock which has a preview image.
Also cleaned-up/synchronized code across al ID types that support preview.
2016-07-11 21:30:02 +02:00
4569e19b83 Add generic 'BKE_id_expand_local' to BKE_library,
will be used by both make_local() and copy() datablock functions.

Note that this new func make 'extern' all IDs used by localized datablock,
not only refcounted ones as it used to be in each type's functions (with a few exceptions).
2016-07-11 21:30:02 +02:00
c06d3b6c36 Cycles: Fix compilation error on Windows with OSL enabled
Seems there's some conflict around `near` identifier in that configuration.
2016-07-11 18:15:51 +02:00
7602b6bf62 Cycles: Fix typo 2016-07-11 18:01:40 +02:00
ea32a03801 Fix T48824: Crash when having too many ray-to-volume intersections
Code might have writing past the array boundaries.
2016-07-11 17:59:46 +02:00
8bc6f8bf20 Fix T48812: Brush size invalid with HIDPI
Missed from c5b2f12b
2016-07-12 01:19:07 +10:00
bbe33ecc88 Depsgraph: Fix crash in Weight VG modifier 2016-07-11 15:15:26 +02:00
0f457a3f8d Depsgraph: Fix shape key nodes trying to be added multiple times 2016-07-11 15:07:39 +02:00
96dd4cdb9e Cleanup: line length 2016-07-11 23:06:14 +10:00
b99f7a9b2a Cycles: Fix Extend image extension mode on OpenCL 2016-07-11 14:46:42 +02:00
cb3b19730c Cycles: Use utility define for restrict pointers
This way restrict can be used for CUDA and OpenCL as well.

From quick tests in areas i've been testing this it might give some
barely measurable %% of speedup, but it increases registers pressure.

So use of this qualifier is still really limited.
2016-07-11 13:58:47 +02:00
cf82b49a0f Cycles: Cleanup, variables name
Using camel case for variables is something what didn't came from our original
code, but rather from third party libraries. Let's avoid those as much as possible.
2016-07-11 13:58:47 +02:00
2ecbc3b777 Cycles: Add _all suffix to shadow traversal file
Matches better naming of volume traversal files, where we've got
optimized versions of a single step of volume intersection and
traversal which will gather all volume intersections.
2016-07-11 13:58:47 +02:00
4355603790 Cycles: Move BVK kernel files to own directory
BVH traversal is not really that much a geometry and we've got
quite some traversals now. Makes sense to keep them separate in
the name of source structure clarity.
2016-07-11 13:58:47 +02:00
c58ae20f6c Dyntopo: fix lop-sided edge collapse
When an edge was collapsed, one of the vertices would be removed.
Edges attached to the deleted vertex wouldn't be considered for collapsing again,
making the outcome from collapsing edges depend on the edge-vertex order.

Use a hash to lookup the final vertex when collapsing edges, instead of skipping them.
2016-07-11 21:59:15 +10:00
6ea43f9aca Fix sculpting high poly meshes
Attempted to free unallocated memory,
interestingly nobody noticed this for ~7 years (error from 3078c806).
2016-07-11 17:17:08 +10:00
0eb61baecc Dyntopo: possible modified option was incorrectly set 2016-07-11 17:17:08 +10:00
12d2329d0e Dyntopo: remove redundant existing face check
Gives minor speedup
2016-07-11 17:17:02 +10:00
b32408eff8 BLI_math: move interp_*_cubic to its own function 2016-07-11 17:16:35 +10:00
e41abdb907 CMake: suppressing indentation warning for extern 2016-07-11 17:16:35 +10:00
47c47c7e78 Fix T48822: Crash when I try to use "Join" (Ctrl Key + J) with two meshes.
Own stupid typo in recent refactor work...
2016-07-10 20:12:58 +02:00
8df92988cf Refactor/enhance BKE_action_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
406309cd8c Refactor/enhance ntreeMakeLocal().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
ad5918d278 Refactor/enhance BKE_image_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
f35320bddf Refactor/enhance BKE_material_make_local() and BKE_image_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
8932b5945e Refactor/enhance BKE_lamp_make_local() and BKE_camera_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
0f0eeffece Refactor/enhance BKE_brush_make_local() and BKE_speaker_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
c8c00636bf Refactor/enhance BKE_particlesettings_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10 17:14:45 +02:00
bb8bfdd4b6 Cycles: Fix failed assert with isotropic Ashikhmin-Shirley distribution in the Glossy node
The shader sync code used the anisotropic version of the Ashikhmin-Shirley closure for both
Anisotropic and Glossy BSDF, which caused a failed assert because the anisotropic closure
expects an addiitonal SVM node.
2016-07-10 16:41:21 +02:00
e0c163661d Add missing braces 2016-07-11 08:45:16 +10:00
885870be51 Fix T48815: Translate node's 'Relative' checkbox has the same tooltip as blur node's 'Relative' checkbox.
Differential Revision: https://developer.blender.org/D2099
2016-07-10 14:57:31 +02:00
87b974caa1 Cleanup/Refactor: pass Main pointer to all ID copy functions.
Also allows us to get rid of a few _copy_ex() versions...
2016-07-10 14:52:00 +02:00
ae2033aca2 Add BKE_key_copy_ex() that takes a Main as parameter. 2016-07-09 15:44:12 +02:00
429394078b Refactor/enhance BKE_lattice_make_local(), and add BKE_lattice_copy_ex() that takes a Main as parameter.
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-09 15:44:12 +02:00
338121e2a0 Refactor/enhance BKE_mball_make_local(), and add BKE_mball_copy_ex() that takes a Main as parameter.
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-09 15:44:12 +02:00
11f64f494b Refactor/enhance BKE_curve_make_local(), and add BKE_curve_copy_ex() that takes a Main as parameter.
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-09 15:44:12 +02:00
9044ccec5f Cleanup to shapekeys' make_local (and copy) functions.
Mostly pass bmain and do not check for NULL key, keys' make_local is
suspiciously simple in fact, but think until those behave like real
full-featured IDs, it's doing enough!
2016-07-09 15:44:12 +02:00
8bb7a339f7 Minor fix/cleanup to object's make_local. 2016-07-09 15:44:12 +02:00
1b45c52734 Fix: Apply Scale to Delta Scale was doubling the effect 2016-07-09 12:00:28 +12:00
245f97d7dc Clear Transforms and Deltas
* Alt-G, Alt-R, Alt-S  --> These don't clear delta transforms by default anymore,
  making it possible to use these to properly store a "rest" pose

* Alt-Shift-G, Alt-Shift-R, Alt-Shift-S  --> These WILL clear both the normal
  transform and the delta, should you need to do so.
2016-07-09 12:00:28 +12:00
8662f583da Fix (unreported) broken shapekeys after 'make_local' of datablocks used both directly and directly.
At first thought it was own recent work, but think issue is there since ages actually...

Basically, id_make_local() would always localize mesh/curve/lattice shapekeys, even in case
obdata localization actually made a local copy instead of localizing original datablock.

This was causing shapekeys being localized twice, and other odd nasty effects.
2016-07-08 19:53:57 +02:00
282de867d4 Initial fix for proxy issues regarding new libquery/libremap ID handling code.
libquery now passes an extra flag info to the callback, in case that specific
ID usage is considered as indirect.

In most cases, it's just set from ID_IS_LINKED_DATABLOCK() result on datablock owner,
but in proxy object case we also consider ob->data, materials and pose usages as indirect.

Does not fixes all issues yet, but should already make behavior with proxy object saner.
2016-07-08 19:33:22 +02:00
77680abaf9 Refactor/enhance BKE_mesh_make_local().
Now using modern features from libquery/libremap areas.

Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).

Note: this enlightened broken case of proxy objects regarding make_local
(and also whole remapping, in fact). Will be fixed in near future.
2016-07-08 18:19:34 +02:00
db79537dbc Fix own very stupid mistake in BKE_library_idtype_can_use_idtype() usage (inverted arguments). 2016-07-08 18:11:20 +02:00
f34fc60aa4 Libquery: fix missing image pointers from Mesh's UV layers.
Not really happy with this, could lead to a **lot** of callback executions...
But libquery foreach looper must go over **all** ID pointers,
otherwise remapping & co is broken!

A possible fix for future would be to have 'image slots' defined at root of poly/facetex layers,
and just a (short) index in each face/poly item - would also save a reasonable amount of memory...
2016-07-08 18:11:20 +02:00
d1a4ae3f39 Refactor/enhance BKE_object_make_local().
Now using modern features from libquery/libremap areas.

Also, it should handle much better cases where localized ID was also indirectly used by non-refcounting users
(typical case: object used as modifier/constraint/whatever target from another linked object, previous
code would not take those into account and just localize original object instead of making a local copy.
Would result in local object used by linked one, which would be partially 'undone' on next file reload... Crappy behavior).

And it fixes some obvious errors too (nullifying all proxy pointers unconditionnaly,
some missing refcounted usages cases in extern_local_object(), etc.).
2016-07-08 18:11:20 +02:00
f3fe1f9c44 Refactor: pass Main to id_make_local.
Totally stupid to not pass it, and then let (some) BKE_foo_make_local() use G.main!

Note: unused for now, much more refactoring still to come in make_local area!
2016-07-08 18:11:20 +02:00
cf19055236 Fix (unreported) missing special updates in case we are remapping obdata (mesh/curve/metaball at least). 2016-07-08 18:11:20 +02:00
ab993e373c Rework/split test_object_materials().
Now test_object_materials only handles one object. New test_all_objects_materials
checks the whole bmain->object list for cases where it is actually needed.

Should avoid some useless looping over all objects!
2016-07-08 18:11:20 +02:00
71f5df9f44 Refactor remapping's pre/post process of special cases.
Main issue was that BKE_libblock_relink_ex was pretty much ignoring all those...
Also, unlinking of objects was not handling correctly indirect-related flags.

Refactored code into helper functions to avoid too much duplicated code.
2016-07-08 18:11:20 +02:00
3b7bce42d7 Fix T48799: Particles set as objects cast wrong ray shadows in BI 2016-07-08 18:10:47 +02:00
8bb69b6157 BMesh: add decimate edit-mode tool
Support applying decimate to the mesh selection.
2016-07-08 23:38:52 +10:00
c206b7cbb6 Correct error in non-uniform scale IK commit
Rename arg to avoid confusion
2016-07-08 21:13:19 +10:00
a62967787c Fix T48808: Regression: Cycles OpenCL broken after Hair BVH commit 2016-07-08 09:41:36 +02:00
d5d26338b5 Mesh/Curve Join: remove edit-mode toggle
Toggling edit-node after joining objects is redundant as far as I can see -
(dates back to first revision).

Also caused all edges to be drawn w/ meshes, redundant undo step w/ curves.
2016-07-08 16:52:10 +10:00
83fe139b2b Undo: use system memcmp
`my_memcmp` didn't work properly comparing memory sizes not aligned to 4 bytes,
this worked while we used guarded-alloc (which always wrote a guard at the end of each allocation).
Since moving to lockfree allocator it could read uninitialized memory.

It also consistently performed ~10-30% worse then glibc's.
This is typically well optimized, no need to do ourselves.
2016-07-08 15:54:34 +10:00
dda96e3472 Fix T48807: Each stroke halves brush size
Missed from c5b2f12b
2016-07-08 14:51:12 +10:00
a02915c0f3 writefile: optimize undo memory use
Slop-space on Linux wasted ~20% of memory for undo storage.
2016-07-08 14:36:55 +10:00
a92fc348f4 Fix/Workaround non-uniform scaled bones failing w/ IK solver
Scaling a bone on the Y axis (for a stretch effect), wasn't supported by the IK solver.

Support this by solving as uniform scaled bones by matching the X,Z axis to the Y.

Requested by @pepeland, see D2088 for details.
2016-07-08 10:28:07 +10:00
7a3ea87bbf Cleanup: use normalize_v#_length 2016-07-08 10:14:49 +10:00
6035cf05bf BLI_math: add normalize functions which fit to a length
Convenient since its common to normalize then scale,
since these are inlined, use for regular normalize w/ 1.0 length.
2016-07-08 09:52:29 +10:00
30d951ce34 Cleanup: spelling 2016-07-08 09:49:01 +10:00
3fb2c1e4a2 Make use of new 'idtype can use idtype' check (in ID usages code, and ID remapping one too).
Reduces calls to BKE_library_foreach_ID_link() from 312 to 105 when relocating a library in a
rather simple lib reload test...
2016-07-07 21:21:33 +02:00
e2d469f878 libquery: add new 'BKE_library_idtype_can_use_idtype()' helper.
This should allow us to avoid a lot of useless processing when iterating over the
whole main database (unlink/remap/usages checks/etc.).

Note that some ID types report they can use any type for now, due to
fuzzyness/indefined nature of some usages (like constraints/modifiers/game logic,
or ID pointer of nodes...). Maybe we could address this (like e.g. adding defines
in relevant headers to restrict ID types used by constraints, by modifiers, etc.).
But don’t think this is top priority for now.
2016-07-07 21:21:33 +02:00
b651812721 Cleanup/fix animsys 'id_type_can_have_animdata()'.
This func now actually takes an ID type as argument, added new 'id_can_have_animdata()'
to check whether a datablock may be animated or not.
2016-07-07 21:21:33 +02:00
25e3657970 Extend libquery checks to test wether an ID is used locally and/or indirectly. 2016-07-07 21:21:33 +02:00
f36741c2eb Fix T48793: Bilinear filter clamps at edge pixels 2016-07-08 02:14:54 +10:00
1bb145e023 Fix single threaded compositor define 2016-07-08 01:41:36 +10:00
4beae09bae Cycles: Enable unaligned BVH builder for scenes with hair
This commit enables new unaligned BVH builder and traversal for scenes
with hair. This happens automatically, no need of manual control over
this.

There are some possible optimization still to happen here and there,
but overall there's already nice speedup:

                      Master                 Hair BVH
  bunny.blend         8:06.54                 5:57.14
  victor.blend       16:07.44                15:37.35

Unfortunately, such more complexity is not really coming for free,
so there's some downsides, but those are within acceptable range:

                      Master                Hair BVH
  classroom.blend     5:31.79                5:35.11
  barcelona.blend     4:38.58                4:44.51

Memory usage is also somewhat bigger for hairy scenes, but speed
benefit pays well for that. Additionally as was mentioned in one
of previous commits we can add an option to disable hair BVH and
have similar render time but have memory saving.

Reviewers: brecht, dingto, lukasstockner97, juicyfruit, maiself

Differential Revision: https://developer.blender.org/D2086
2016-07-07 17:25:48 +02:00
a08e2179f1 Cycles: Implement unaligned nodes BVH traversal
This commit implements traversal of unaligned BVH nodes.

QBVH traversal is fully SIMD optimized and calculates orientation
for all 4 children at a time, regular BVH might probably be optimized
a bit more.
2016-07-07 17:25:48 +02:00
b03e66e75f Cycles: Implement unaligned nodes BVH builder
This is a special builder type which is allowed to orient nodes to
strands direction, hence minimizing their surface area in comparison
with axis-aligned nodes. Such nodes are much more efficient for hair
rendering.

Implementation of BVH builder is based on Embree, and generally idea
there is to calculate axis-aligned SAH and oriented SAH and if SAH
of oriented node is smaller than axis-aligned SAH we create unaligned
node.

We store both aligned and unaligned nodes in the same tree (which
seems to be different from what Embree is doing) so we don't have
any any extra calculations needed to set up hair ray for BVH
traversal, hence avoiding any possible negative effect of this new
BVH nodes type.

This new builder is currently not in use, still need to make BVH
traversal code aware of unaligned nodes.
2016-07-07 17:25:48 +02:00
1a2012145d Cycles: Switch node address to absolute values in BVH tree
This seems to be straightforward way to support heterogeneous nodes
in the same tree.

There is some penalty related on 4gig limit of the address space now,
but here's are the thing:

Traversal code was already using ints to store final offset, so
there can't be regressions really.

This is a required commit to make it possible to encode both aligned
and unaligned nodes in the same array. Also, in the future we can use
this to get rid of __leaf_nodes array (which is a bit tricky to do since
trickery in pack_instances().
2016-07-07 17:25:48 +02:00
17e7454263 Cycles: Reduce memory usage by de-duplicating triangle storage
There are several internal changes for this:

First idea is to make __tri_verts to behave similar to __tri_storage,
meaning, __tri_verts array now contains all vertices of all triangles
instead of just mesh vertices. This saves some lookup when reading
triangle coordinates in functions like triangle_normal().

In order to make it efficient needed to store global triangle offset
somewhere. So no __tri_vindex.w contains a global triangle index which
can be used to read triangle vertices.

Additionally, the order of vertices in that array is aligned with
primitives from BVH. This is needed to keep cache as much coherent as
possible for BVH traversal. This causes some extra tricks needed to
fill the array in and deal with True Displacement but those trickery
is fully required to prevent noticeable slowdown.

Next idea was to use this __tri_verts instead of __tri_storage in
intersection code. Unfortunately, this is quite tricky to do without
noticeable speed loss. Mainly this loss is caused by extra lookup
happening to access vertex coordinate.

Fortunately, tricks here and there (i,e, some types changes to avoid
casts which are not really coming for free) reduces those losses to
an acceptable level. So now they are within couple of percent only,

On a positive site we've achieved:

- Few percent of memory save with triangle-only scenes. Actual save
  in this case is close to size of all vertices.

  On a more fine-subdivided scenes this benefit might become more
  obvious.

- Huge memory save of hairy scenes. For example, on koro.blend
  there is about 20% memory save. Similar figure for bunny.blend.

This memory save was the main goal of this commit to move forward
with Hair BVH which required more memory per BVH node. So while
this sounds exciting, this memory optimization will become invisible
by upcoming Hair BVH work.

But again on a positive side, we can add an option to NOT use Hair
BVH and then we'll have same-ish render times as we've got currently
but will have this 20% memory benefit on hairy scenes.
2016-07-07 17:25:48 +02:00
1eacbf47e3 Cycles: Support visibility check for inner nodes of QBVH
It was initially unsupported because initial idea of checking visibility
of all children was slowing scenes down a lot. Now the idea has changed
and we only perform visibility check of current node. This avoids huge
slowdown (from tests here it seems to be withing 1-2%, but more tests
would never hurt) and gives nice speedup of ray traversal for complex
scenes which utilized ray visibility.

Here's timing of koro.blend:

                  Without visibility check         With visibility check
Original file           4min 20sec                      4min 23sec
Camera rays only        1min 43 sec                       55sec

Unfortunately, this doesn't come for free and requires extra data in
BVH node, which increases memory usage of BVH nodes by 15%. This we
can solve with some future trickery of avoiding __tri_storage created
for curve segments.
2016-07-07 17:25:48 +02:00
a19da5c10d Quiet gcc warning-as-error about non-const pointer passed to const parameter. 2016-07-07 17:23:59 +02:00
b9dbcf406e Fix T48802 Unwrap buttons, can't add hotkey in 3DView's UV Unwrap menu.
Those unwrap operators are a bit tricky, some are available from both 3DView and UVEditor, others only from 3DView...

Hacked around this by returning Mesh keymap for UV_OT ops for specific 3DView/MeshEditMode context.
2016-07-07 17:06:53 +02:00
c8be112523 RNA: rename sorting -> sort
Shorter and consistent with other RNA.
2016-07-08 00:56:01 +10:00
6e6073e13c Skip the ID part of object names when comparing
Also no need to calloc arrays which are immediately filled
2016-07-08 00:50:08 +10:00
124bfa4d2d Cleanup: spelling, style 2016-07-08 00:48:45 +10:00
bef034e154 Cleanup: use static sets, remove redundant copy 2016-07-08 00:28:41 +10:00
91533b6f34 Revert "ChildOf Constraint: Hide the Loc/Rot/Scale toggles"
This reverts commit 4fd78bb06f.

After further testing, it turns out that these options are less-broken than
I remember them being (and have been hearing about). Specifically, as long
as you disable all 3-axes of a transform component (i.e. all location, all
rotation, all scale) you're not likely to have problems, whereas if you only
disabled one axis (i.e. y-rotation), you may have problems in some cases.

So, restoring these to the UI.
2016-07-08 01:59:43 +12:00
4bf19e163f Code Cleanup - Split out the FCurve auto-color code into a separate function 2016-07-08 01:49:27 +12:00
7793d1d26f Fix T48747: Stuck in edit mode after selecting another object in the animation editors 2016-07-08 01:49:26 +12:00
7f03c9de7e Fix: Keyframe click-selection threshold in Dopesheet was still hardcoded to 7px 2016-07-08 01:49:25 +12:00
f3b3eb70a6 Dopesheet: Added "Moving Hold" as a keyframe type
Currently "long keyframes" are only useful for indicating where stationary
holds occur. If however you try to create a "moving hold" (where the values
are slightly different, but in terms of overall effect, it's still a hold)
then it could get tricky to keep track of where these occur.

Now it's possible to tag such keyframes (using the keyframe types - RKEY)
as being part of a moving hold. These will not only be drawn differently
from normal keyframes, but they will also result in a "long keyframe"
being drawn between each pair of them, just like if they had been completely
stationary instead.

Currently the theming/styling of these is a bit rough. They reuse the existing
theme colours for long keyframes.
2016-07-08 01:49:25 +12:00
2ba2860e11 Transforms to Delta Transforms
* Added new operators to take the current transform value (loc/rot/scale or all 3)
  and convert/apply that transform to a corresponding delta transform value. By default,
  the transform value will be zeroed out again afterwards, so you don't end up with a
  double transform.

* These operators can be found in the "Apply" menu (Ctrl-A)

* The "Animated Transforms to Deltas" (which does a similar job, except it adjusts all
  existing animation data instead of the current transform) has also been moved to the
  Apply menu (it was in the Transform menu instead)
2016-07-08 01:49:24 +12:00
92c9bdbbb9 Animation Editors: Object datablocks are now sorted alphabetically by default
A long requested feature has been to have objects appear in alphabetical order
in the animation editors, so that it is easier to find where they occur. This
commit implements support for this.

The main sticking point has been the performance impact of having this sorting
happening all the time (as the actual list of "bases" cannot be modified, as the
old depsgraph still needs random-looking unsorted order of objects for scheduling
updates). However, it recently occurred to me that perhaps by restricting it to
the one case where the ordering actually matters (i.e. when we're getting the channel
list for drawing all channels, vs operating on them), and adding a toggle to turn the
sorting off in heavy scenes when it might bog down things, that it will probably
be acceptable enough in general.  Furthermore, if things get really bad, we can investigate
putting in place some sort of caching scheme for this too - though hopefully the
new depsgraph will make that unnecessary (i.e. it doesn't sort the bases directly anymore).
2016-07-08 01:49:23 +12:00
2910e288ab Code Cleanup: Move out logic for checking if an object can be included in the dopesheet 2016-07-08 01:49:23 +12:00
095c8dbe69 Dopesheet: Keyframe size can be adjusted as part of theme settings
This commit introduces a scale factor setting for scaling all keyframe indicators
in the Dopesheet Editor up/down, in order to make them easier to select. It is perhaps
most useful for keyframe types which are usually indicated using smaller keyframes
(e.g. breakdown), which may get tricky to quickly select.
2016-07-08 01:49:22 +12:00
fab4b907f6 NLA: Indicate position of action-local markers on strips
To make it easier to synchronise timing across multiple strips, if you add
markers locally to an action, these will show up in the NLA strip in the
NLA Editor. These markings can then be used to line up the start/end of
another strip, or even to make sure that the markers from two different
strips end up lining up.

By default, this is turned on, but it can be disabled (via the View menu)
if it adds too much visual noise.
2016-07-08 01:47:32 +12:00
514700b307 Fix (unreported) crash when remapping armatures.
Objects' Pose holds references to the armature bones, so we have to force POSE_RECALC in those cases...
2016-07-07 15:07:51 +02:00
e3556f339d Comment. 2016-07-07 14:25:06 +02:00
02a07894a4 Try to sample VDB volumes through the attribute node. 2016-07-07 14:18:15 +02:00
fdc6c21d17 Fix compile error. 2016-07-07 14:06:27 +02:00
8034371106 Merge branch 'openvdb' into cvdb_ray_isect 2016-07-07 13:24:17 +02:00
fe2cfed20c Merge branch 'master' into openvdb
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-07-07 13:23:12 +02:00
8443628e66 Outliner: Match search length w/ id name length 2016-07-07 16:36:25 +10:00
dac125b8ec writefile: call undo flush after writing the windowmanager
Data here is constantly changing, avoids outliner data being included in those changes for undo.
2016-07-07 16:27:33 +10:00
2b5c93d8fe Cleanup: move write flush into its own function
No point passing dummy args to existing function, split out logic instead.

Also add flush after writing mesh data too.
2016-07-07 16:10:51 +10:00
fd43b7077f Fix memory leak switching sculpt mode + dyntopo
Auto-enabling dyntopo w/ mode switching leaked memory when undo was used.
2016-07-07 15:48:25 +10:00
003365df0e Transform Snap: fix vert & edit object in ortho view
The callback used in `BLI_bvhtree_find_nearest_to_ray` was wrong and could result in crash.

Also de-duplicate vert/edge logic.
2016-07-07 15:24:58 +10:00
74518b6e88 Fix failing script_load_addons test after recent code cleanup. 2016-07-06 21:57:53 +02:00
04b3d682bb Cycles tests: Don't create fail file on idiff warning 2016-07-06 17:39:09 +02:00
d501d0f91e Revert rB961ebfa8c40b9909 - do not set Main's versions directly in do_versions().
This breaks any post-versionning (like IPO conversion, python handler, etc.).

rB961ebfa8c40b9909 mentions some Main being do_versionned several times (which is not desired for sure),
will try to reproduce again and find another fix.
2016-07-06 17:16:34 +02:00
Dalai Felinto
1640796ccc Fix Python API error message (do_unlink, instead of unlink) 2016-07-06 11:32:46 -03:00
2fcb9ef919 writefile: add flushes
Flush on grease pencil and data with image preview or packed data.
2016-07-06 23:28:52 +10:00
a0793765ef writefile: avoid adding SDNA to every undo step
Since SDNA was allocated for each undo step,
the new address meant it was considered different and included again.

Add an option not to duplicate the DNA string when calling DNA_sdna_from_data,
as well as avoiding a redundant copy, it writes the same address each time.
2016-07-06 23:07:37 +10:00
94e84f5be4 Fix memleak with recent Outliner writefile changes. 2016-07-06 14:45:06 +02:00
b7e84f32ad Cleanup/simplify/fixes BKE_object_is_libdata and BKE_object_obdata_is_libdata.
Removed checks for ob->proxy from the equation, you can totally have proxy objects
linked into another .blend file!
2016-07-06 14:37:03 +02:00
d231260212 Replace of (id->lib != NULL) check by meaningful macro.
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender
by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly,
to easily change it (see work done in asset-engine branch).

Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer,
and not a check whether ID is linked or not. Will have a closer look at it later.

Reviewers: campbellbarton, brecht, sergey

Differential Revision: https://developer.blender.org/D2082
2016-07-06 14:11:01 +02:00
b98b331d04 writefile: simplify outliner treestore workaround
Instead of keeping a list of allocations, write to unique addresses
based on the BLI_mempool address since we know this is unique.
2016-07-06 21:58:47 +10:00
95ff9e9904 Cleanup: redundant 4th index in sculpt PBVH
Since moving to MLoopTri this is no longer needed.
2016-07-06 19:15:47 +10:00
674756bfce Dyntopo: optimize edge collapsing
Checking if faces exist was a bottleneck,
use a simpler version of this function for triangles.

Gives approx 1.6x overall speedup (when many edges are being collapsed).
2016-07-06 16:43:29 +10:00
8f1b8611f5 Cleanup: group dyntopo utility functions 2016-07-06 16:32:17 +10:00
950c2eaf61 Transform Snap: Replace pixel limit w/ 'dist_to_ray_sq'
When snapping to edge/vert, check the distance to the ray
instead of the screen-space pixel projection.

This also corrects the conversion of `dist_to_ray_sq` to `dist_px` which was being done incorrectly.

While this change was planned, it fixes T48791, caused by error in b01a56ee.
2016-07-06 11:42:26 +10:00
1d81f69f5e Code cleanup: for Cycles compatible panels, use exclusion rather than inclusion list.
This shortens the list, and Blender render specific panels are added less often
than other panels anyway, so less chance to miss things.
2016-07-05 22:26:15 +02:00
5b99dd5859 Render border: don't disable when drawing around the entire camera.
Differential Revision: https://developer.blender.org/D712
2016-07-05 21:59:02 +02:00
29c38335a1 Render border: skip unnecessary uncropping if the border covers the entire image. 2016-07-05 21:59:02 +02:00
7fcab3324b Render border: make it work together with with cache result / save buffers / full sample.
Differential Revision: https://developer.blender.org/D2080
2016-07-05 21:59:02 +02:00
037aa544cc Dyntopo: missing PBVH update collapsing an edge
PBVH-nodes attached to the vertex to be deleted were updated,
but not nodes attached to the other vertex in the edge.
2016-07-06 03:47:18 +10:00
06c1e782b0 Dyntopo: avoid redundant vector copy 2016-07-06 03:17:06 +10:00
4a61d21f61 Dyntopo: inline lookups, remove type check
This was checking vert/face for every lookup,
so far the type is always known, do a direct lookup instead.
2016-07-06 03:17:06 +10:00
3c7f3d27e0 Dyntopo: use inline iterators
Gives small performance boost.
2016-07-06 03:16:56 +10:00
8a648c1913 Dyntopo: compare masks when collapsing
Was just checking the value of the first
2016-07-05 18:56:21 +10:00
020a420fe3 Dyntopo: verify had over zealous asserts 2016-07-05 18:56:21 +10:00
39ae324918 Cycles: remove extended precision hacks, no longer needed with SSE2 requirement.
Differential Revision: https://developer.blender.org/D2079
2016-07-04 18:22:11 +02:00
1ba90582f5 Fix a few compiler warnings on OS X / clang.
Two were actual bugs, though they existed only in unused code:
* In Freestyle it was unintentionally copying a scene rather than referencing it.
* In BLI_array_store_is_valid there was use of uninitialized memory.
2016-07-04 18:22:10 +02:00
439fe6568f Fix use of uninitialized variable introduced in fix for T48755. 2016-07-04 17:30:52 +02:00
99683f25e8 And one more fix to particle distribution!
As pointed by Brecht, previous fix in rB61b49de44940 was actually incomplete,
we could still hit float rounding issue and hence same value in more than one consecutive
items of element_sum.

New solution is a bit different, we remove the 'minimal weight' check, and rather simply
ignores an item when the sum of its normalized weight to previous item's sum does not add
anything. Shall be safe and 100% effective this time!
2016-07-04 16:10:40 +02:00
d3b27bd19c Fix bmesh test after recent refactor. 2016-07-04 11:48:48 +02:00
d4eb28ab7e BI Viewport(GLSL): support for envmap in Texture node
This patch is another step to achieve BI and it's Viewport consistency for cubemap textures.
{F318879}

To test world_space_shading flag D2072 is required.

Alexander (Blend4Web Team)

Reviewers: campbellbarton, brecht

Subscribers: homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D2074
2016-07-04 11:19:13 +03:00
4aaf5baccf Fix input for Texture node (envmap+world_space_shading)
This patch fixes shortcoming of D2046.
The original behavior without world_space_shading flag is that Texture node expects the reflected vector in view space. But with world_space_shading it should be in world space.

In attached file you will see a simple material setup and a node material analogue.

Simple material must have the same behavior regardless world_space_shading flag.

{F318866}

Alexander (Blend4Web Team)

Reviewers: brecht

Reviewed By: brecht

Subscribers: campbellbarton, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D2072
2016-07-04 11:08:48 +03:00
fe44eacf78 Environment lighting for the GLSL mode
Environment lighting (aka ambient) is a key component of any renderer.
It's implemented like the Environment lighting of BI render for Approximate Gather mode. It support "Sky Color" and "White" Environment lighting modes.

It would be great if the user could see actual lighting conditions right in the Blender viewport instead of waiting for the renderer to complete the final image, exporting for external renderer or for a game engine.

Before:
{F113921}

After:
{F113922}

Example file: {F319013}

Original author: valentin_b4w

Alexander (Blend4Web Team)

Reviewers: valentin_b4w, campbellbarton, merwin, brecht

Reviewed By: brecht

Subscribers: panzergame, youle, duarteframos, AlexKowel, yurikovelenov, dingto, Evgeny_Rodygin

Projects: #rendering, #opengl_gfx

Differential Revision: https://developer.blender.org/D810
2016-07-04 11:01:32 +03:00
9269574089 Quiet warnings w/ USE_VERIFY define 2016-07-04 14:55:29 +10:00
b27322e71e Curve: utility to evaluate entire curve 2016-07-03 23:28:13 +10:00
b084003e88 Update pacman pkgbuild 2016-07-03 21:14:28 +10:00
8cc123a387 Fix T48783: OSL render errors after recent refactoring. 2016-07-03 13:08:21 +02:00
2c9add965b Fix use of uninitialized variable in Cycles OpenCL image textures. 2016-07-02 21:54:49 +02:00
0d4961cc52 Fix typo in bgl.Buffer report function
A GL_INT buffer was reported as GL_BYTE.
2016-07-02 18:38:05 +02:00
ee90badbd5 Install Deps: Use OSL 1.7.3, latest bugfix release. 2016-07-02 18:07:20 +02:00
aef72125da Correction for MSVC 2016-07-02 20:22:07 +10:00
b1047640ad BMesh: utility function to resize bmesh elements
This can be used to re-allocate bmesh data with/without tool flags.
Needed for Symmetrize since it uses bmesh operators from dyntopo.
2016-07-02 18:18:47 +10:00
9f5621bb4a Cleanup: comment blocks 2016-07-02 10:08:33 +10:00
1077514896 Cleanup: style 2016-07-02 10:00:30 +10:00
5c249fac9a Fix Cycles OpenCL not taking Extend and Clip extension types into account.
(See T48720).
2016-07-01 23:48:31 +02:00
85c9aefe0f "Fix" crash when deleting linked object which has indirect usages.
This is in fact very hairy situation here... Objects are only refcounted by scenes,
any other usage is 'free', which means once all object instanciations are gone Blender
considers it can delete it.

There is a trap here though: indirect usages. Typically, we should never modify linked data
(because it is essencially useless, changes would be ignored and ost on next reload or
even undo/redo). This means indirect usages are not affected by default 'safe' remapping/unlinking.

For unlinking preceeding deletion however, this is not acceptable - we are likely to end with
a zero-user ID (aka deletable one) which is still actually used by other linked data.

Solution choosen here is double:
I) From 'user-space' (i.e. outliner, operators...), we check for cases where deleting datablocks
should not be allowed (indirect data or indirectly used data), and abort (with report) if needed.
II) From 'lower' level (BKE_library_remap and RNA), we also unlink from linked data,
which makes actual deletion possible and safe.

Note that with previous behavior (2.77 one), linked object would be deleted, including from linked data -
but then, once file is saved and reloaded, indirect usage would link back the deleted object,
without any instanciation in scene, which made it somehow virtual and unreachable...

With new behavior, this is no more possible, but on the other hand it means that in situations of dependency cycles
(two linked objects using each other), linked objects become impossible to delete (from user space).

Not sure what's best here, behavior with those corner cases of library linking is very poorly defined... :(
2016-07-01 18:29:12 +02:00
ad717fe737 Outliner: pass operator's reports to all operation callbacks.
Also define single callback func typedef, cleaner this way!

Note: maybe we want to do that for the other callbacks too (data, etc.), but will be enough for now.
2016-07-01 18:29:12 +02:00
158679c9cc Fix T48666: Segfault on boolean operation when exiting edit mode of instanced operand
This is quite tricky situation which combined:

- Boolean modifier which accesses other object's derived mesh
  (in fact, it's nothing to do with boolean modifier, any other
  modifier which uses other's DM will have same bug).

- Dependency cycles in the scene which is rather russian-roulette
  from the cycle solver point of view.

- Multiple instanced objects used as boolean operand.

With all this things combined boolean modifier was accessing operand's derived
mesh which was referencing data from Mesh datablock. The issue is that those
references are becoming invalid after EDBM_mesh_load().

This function already had code to make sure object itself does not end up with
dangling pointers from derived mesh. Make it now so no possible instanced objects
are left with dangling pointers.

And who said it's a good idea to reference something from derived mesh..
2016-07-01 14:25:30 +02:00
50d715f970 UI: take zoom into account w/ curves widget
The Curves widget has buttons to zoom in on the curve. However the
click detection code doesn't take it into account, and at full zoom
in click on curve is detected very far from the actual visible curve.

Change it to compare the position to the actual line segments
in the UI coordinate space, i.e. with curve zoom applied.
2016-07-01 22:13:53 +10:00
b558fa6715 Add wait cursor toggling dyntopo 2016-07-01 21:50:53 +10:00
ff0079b40a UI: move dyntopo button to header
This looks a bit odd, but being able to see if dyntopo is enabled
when the panel is collapsed is handy.
2016-07-01 21:44:31 +10:00
85bdbd7653 Sculpt: skip normal calculation entering dyntopo
When no triangulation runs we can skip re-calculating normals.
2016-07-01 21:14:33 +10:00
dbd38e969f BGE: Display Hardware infos only in standalone.
This patch moves the PrintHardwareInfo() function in standalone only, not in embedded. Why? Because you can need this infos for debugging
purpose in "compiled" blender files but it was boring to have it displayed each time you launched embedded. So you can have this infos when you
click standalone or when you run your executable app from a console.

Reviewers: moguri, kupoman, panzergame.
2016-07-01 11:56:26 +00:00
c08f0ceeb7 Enable dyntopo re-entering sculpt mode 2016-07-01 19:49:13 +10:00
0a026033ae BMesh: make toolflags optional
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
4b0aeaf327 Fix T48757: Broken in D1120 normal baking 2016-06-30 12:40:35 +03:00
260da0cd91 Fix T48728, part 2: Vertex colors not shown in texture mode 2016-06-30 14:20:20 +05:00
b01a56ee5c Transform Snap: Optimize edge-snap using BVH tree
changes in BLI_kdopbvh:

- `BLI_bvhtree_find_nearest_to_ray` now takes is_ray_normalized and scale argument.
- `BLI_bvhtree_find_nearest_to_ray_angle` has been added (use for perspective view).

changes in BLI_bvhutils:

- `bvhtree_from_editmesh_edges_ex` was added.

changes in math_geom:

- `dist_squared_ray_to_seg_v3` was added.

other changes:

- `do_ray_start_correction` is no longer necessary to snap to verts.
- the way in which the test of depth was done before is being simulated in callbacks.
2016-06-30 17:52:03 +10:00
9d5661c9e8 CMake: list buildinfo.h as buildinfo.cmake's output
Keep the fake header to ensure we always run.
2016-06-30 08:53:25 +10:00
72792406c9 Correct fix for MSVC 2016-06-30 08:10:49 +10:00
94a80a1fb1 Fix bplayer (c) 2016-06-29 17:57:41 +02:00
903cb13bb8 Cleanup: use const 2016-06-29 23:22:54 +10:00
0971749f4c Cleanup: spelling, indentation 2016-06-29 20:37:54 +10:00
2e41df6847 Fix T48695: Slowdown w/ edit-mesh & shrinkwrap
0b5a0d84 caused regression since edit-mesh BVH wasn't cached,
each shrink-wrap modifier created its own BVH.
2016-06-29 19:43:08 +10:00
68fcc3b1f6 Correction to previous commit: Only skip colors for texture paint
This way we avoid regression of sculpt mode shading.

Hopefully now it's all fine.
2016-06-29 13:31:45 +05:00
9e173afca3 Cleanup: endian tests 2016-06-29 18:14:45 +10:00
2f532c7844 Fix T48728: Vertex colors not shown in texture mode
Regression caused by own changes to make texture paint more efficient
from workflow point of view.

Now the idea is to use vertex color outside of paint mode, so we don't
break any compatibility here.
2016-06-29 13:08:12 +05:00
c7eb5eeaa9 Cleanup: warning 2016-06-29 17:12:48 +10:00
e6d947f037 BMesh Intersect: use flags to keep track of verts
For simple cases bitmasks were OK, but didnt work for vert/edge, vert/edge tests.

Tag verts instead, makes logic easier to follow and gives minor speedup.
2016-06-29 16:09:58 +10:00
29a73106b4 UI: prevent softrange from becoming nan
Quiets assert
2016-06-29 12:09:00 +10:00
20f634cfc2 Fix T48755: Crash UV unwrapping 2016-06-29 11:51:36 +10:00
a21549f822 Usual i18n/UI messages cleanup & fixes. 2016-06-28 21:34:18 +02:00
Martijn Berger
5b325abf60 [msvc2015/OpenEXR] Linker hackery is no longer required in vc2015
Reviewers: juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D1892
2016-06-28 16:02:12 +02:00
23cc453975 Fix T48732: New GGX breaks OpenCL kernel
Make sure we don't perform any implicit address space conversion.

A bit annoying, but less intrusive approaches (like using temp private
variable in .cl kernel) do not work correct here.

Using generic address space will help from code side here, but will
be somewhat slower due to extra things happening as far as i know.
2016-06-28 17:15:35 +05:00
0d7817d1a4 Cleanup: use bool for writefile 2016-06-28 21:00:00 +10:00
55546b4e13 writefile: replace most struct lookups /w constants
Removes many hash lookups per file-save and undo-step.
2016-06-28 20:25:52 +10:00
f181839c57 Cleanup: code-style
Other changes here planned which touch many lines, so run cleanup first.
2016-06-28 20:05:04 +10:00
72fc2b6afe Fix T48753: VSE must restart for international fonts 2016-06-28 16:25:49 +10:00
6ce0ddae96 GHOST/X11: Hotplug support for xinput
Allows to plug/unplug different tablets while Blender is running.

Also fixes crash unplugging tablet while Blender runs (T48750).
2016-06-28 16:08:39 +10:00
e5a1f3142e RNA: resolve assert w/ no languages available 2016-06-28 12:36:21 +10:00
66054caa1b RNA: perform reverse search on operators
In most the last added operator is being handles.
2016-06-28 12:13:43 +10:00
3569ea03d8 Cleanup: Python imports 2016-06-28 12:13:16 +10:00
5806268051 Fix MSVC error, co_return now a reserved word
D2073 by @LazyDodo
2016-06-28 08:35:05 +10:00
f738f66f1b Fix (unreported) wrong ID type check in Text editor's ID remap callback. 2016-06-27 17:42:38 +02:00
14f056144e Bendy Bones Instability Fix - Second Attempt
So the error seems to be in cubic_tangent_factor_circle_v3(),
which was introduced with D2001.

I've tweaked the most obvious culprit here - the epsilon factor.
It used to be 10^-7, but I've reduced it down to 10^-5 now,
and it's looking a lot more stable now :)

---------

BTW, about the derivation of the magic 0.390464 factor I briefly subbed back
as a workaround for this bug, see:
    http://www.whizkidtech.redprince.net/bezier/circle/
2016-06-28 02:52:20 +12:00
9466d1579d Bendy Bones: Temporary workaround for instability caused by D2001 when using custom handle bones
It's probably some numeric precision issue, but until we figure out exactly what's
going wrong here, let's just revert back to the hardcoded value that was used here
successfully for years without issues.
2016-06-28 02:20:54 +12:00
e2c7ee7733 Fix T48740: User could remap indirect libdata usages from outliner.
Remapping indirect usage of IDs is forbidden from user space, this is calling for
nice nightmare with libraries handling (and undo crash, among other things).

Not sure why I was 'laxist' about indirect usage cases detection like that,
for now just consider any ID used by another linked datablock as indirect usage case!

Also, added some error/warning reports to Outliner's remap code.
2016-06-27 15:46:43 +02:00
34024c7cd8 FCurve Auto Colours: "XYZ to RGB" works for Quaternions too now
The "W" channel will get a yellowish colour (i.e. a blend between the X/R and
Y/G axis colours), while the XYZ will behave as they do for other transforms.
2016-06-28 00:27:51 +12:00
f4e492ad71 Partial fix for T48734
The create drivers operator should not use the "Transform Channel" variable type
when driving one transform with another on the same object/bone. Otherwise, you
end up with a situation which technically results in a bit of a pseudo-dependency
cycle.
2016-06-28 00:27:50 +12:00
b6483a25f2 Code Cleanup: Use bools not shorts 2016-06-28 00:27:50 +12:00
de6064eab1 Ctrl-Shift-C: Made it easier to add constraints between bones in different armatures
The Ctrl-Shift-C operator to add constraints between a pair of selected items,
for example, between two objects, or between two bones (in the same armature).

This commit makes it possible to use this operator to add a constraint where the
target is a bone from another object - e.g. to make a deform bone follow the control
bone in another armature, or to make an object use a bone as a tracking target.

Usage:
1) Ensure you are in Pose Mode, then select the bone to use as the target
2) Shift-Select the other object and/or the bone that's going to get the constraint
3) Ctrl-Shift-C
2016-06-28 00:27:49 +12:00
ab921321e1 Fix (unreported) potential buffer overflow with BLO_library_path_explode() usage.
Also added warning to func doc, let's try to avoid this in future (for until we
pass string length systematically...).
2016-06-27 12:38:12 +02:00
5f77266baf Fix T48741: File browser back button doesn't work from inside Blend (library) file.
Problem was in fact slightly wider, File space was nearly not taking into account
library navigation case and its 'virtual' directoris, except in a few places.

Add a wrapper around BLI_is_dir that also check for lib paths, and used it in
ED_file_change_dir(), such that we now always check path is a
valid directory - in the filebrowser context, not filesytem context. ;)
2016-06-27 12:26:14 +02:00
4a641e3cbc Cycles: Fix corner case of human readable number returning empty string 2016-06-27 13:49:25 +05:00
f1253f5d2b Fix T48717: Modal operators called from Py omit reports from the UI 2016-06-27 17:09:52 +10:00
6021cc4007 Rename script stub
Was clear from name this is to run external scripts.
2016-06-27 16:04:59 +10:00
5181f085eb Fix T48733: World background fails in 3d-view
Missing from fix for T48555.
Unfortunately duplicates code.
2016-06-27 15:36:28 +10:00
936c176a71 Fix T48743: Broken menu key accelerators
Regression caused by fc96110b
2016-06-27 14:15:48 +10:00
538a70c9b6 Cleanup: unnecessary NULL check 2016-06-27 13:21:14 +10:00
c7a6ff0981 Docs: arg names 2016-06-27 13:21:14 +10:00
6e193c42cb Docs: minor edits to writefile comments 2016-06-27 12:39:28 +10:00
2a69b09b62 Fix T48732 v2: New GGX breaks OpenCL kernel
As far as I can see, the second issue there was that the functions receive a pointer to a member variable of the
ShaderData, which is stored in global memory. However, this means that the pointer points to global memory as well,
therefore OpenCL requires the ccl_addr_space "keyword" in front of the pointer.
With this commit, the OpenCL kernels build on Linux with the Intel CPU OpenCL runtime - however, they already did
without the change and I don't have an AMD card, so I can't really test whether the AMD runtime is happy as well now.
2016-06-26 00:51:16 +02:00
aff81c6393 Cleanup: Get rid of remaining 'BKE_<id>_unlink()' functions, no more used anyway. 2016-06-25 18:36:27 +02:00
1b6cf7a99b Cleanup: get rid of BKE_text_unlink(), replace by usage of generic BKE_libblock_... API. 2016-06-25 18:12:23 +02:00
42872656d8 Cleanup: remove RNA's ID.destroy() function.
We already have Main's ID lists' `remove()` function, better not do the same thing
in two different places!
2016-06-25 17:10:33 +02:00
d4e435836d Cleanup/refactor RNA IDs' remove functions.
Those (one per ID type!) were uselessly duplicated, and badly inconsistent
(some types were actually unlinking before deletion, others were only working if already unlinked!).

Now we use same func and same API for all types, by default deletion is performed only if ID is no more used,
set `do_unlink` parameter to True to always delete ID even if still in use.
Only exception now is with Scene, since we always want to keep at least one!

Note that this will change default behavior of some types (since unlinking is never done anymore by default).
2016-06-25 17:10:33 +02:00
bfcf8c8e03 CMake: exclude gitignore & arcconfig for addons
These files were included in releases
2016-06-25 21:57:54 +10:00
9c96585f3c Cleanup: remove bad-level call 2016-06-25 21:19:54 +10:00
0a99072f0d GPU: move select index code out of WM
This avoids bad-level calls.
2016-06-25 21:13:33 +10:00
28dbd572a4 Exclude obsolete static pythonlibs from install 2016-06-25 12:40:19 +02:00
99088f8b55 Fix T48732, OpenCL compile failure after Multiscatter GGX commit.
Use OpenCL "all" builtin type for conversion, according to OpenCL 1.1 spec 6.3e.
2016-06-25 11:14:06 +02:00
05a60aaa07 Fix T48723: Curve bevel creates invalid geometry 2016-06-25 13:57:35 +10:00
8f0a44a5d5 Cleanup: use BLI_bitmap for bevel-split 2016-06-25 11:24:25 +10:00
c376ff26be Fix T48725: UI message typo. 2016-06-24 11:00:19 +02:00
a10117562f BMesh: avoid redundant calculations comparing angles 2016-06-24 19:01:35 +10:00
73a9c56607 Fix T48716: Knife cut creates inverted normals
In the case of having 3+ boundary edges, we need to find the best.
2016-06-24 18:58:42 +10:00
823ab66eca Avoid memory leaks on exit during argument parsing
Exiting Blender during argument parsing would leak memory
(tests, documentation generation, utilities).

While harmless, it hides real leaks which should be resolved.
2016-06-24 10:05:23 +10:00
25866aa149 BKE_blender: Add own atexit functions
Runs before guarded-alloc leaks print.
2016-06-24 10:05:18 +10:00
4fc1510dd8 Cleanup: use return argument prefix 2016-06-24 10:05:09 +10:00
23c276832b Cycles: Add multi-scattering, energy-conserving GGX as an option to the Glossy, Anisotropic and Glass BSDFs
This commit adds a new distribution to the Glossy, Anisotropic and Glass BSDFs that implements the
multiple-scattering microfacet model described in the paper "Multiple-Scattering Microfacet BSDFs with the Smith Model".

Essentially, the improvement is that unlike classical GGX, which only models single scattering and assumes
the contribution of multiple bounces to be zero, this new model performs a random walk on the microsurface until
the ray leaves it again, which ensures perfect energy conservation.

In practise, this means that the "darkening problem" - GGX materials becoming darker with increasing
roughness - is solved in a physically correct and efficient way.

The downside of this model is that it has no (known) analytic expression for evalation. However, it can be
evaluated stochastically, and although the correct PDF isn't known either, the properties of MIS and the
balance heuristic guarantee an unbiased result at the cost of slightly higher noise.

Reviewers: dingto, #cycles, brecht

Reviewed By: dingto, #cycles, brecht

Subscribers: bliblubli, ace_dragon, gregzaal, brecht, harvester, dingto, marcog, swerner, jtheninja, Blendify, nutel

Differential Revision: https://developer.blender.org/D2002
2016-06-23 22:57:26 +02:00
2af4c80be6 GPencil: Eraser respects "Selection Mask" when in EditMode 2016-06-24 03:33:31 +12:00
9839aba84f Fix minor typo - Was m[3][4] instead of m[4][4] for a 4x4 matrix 2016-06-24 03:18:38 +12:00
4fd78bb06f ChildOf Constraint: Hide the Loc/Rot/Scale toggles
The RNA properties are still there (in case you really need them), except now
they will not be shown in the UI anymore, as this constraint really didn't
work well/at all when any of those was disabled. Most people shouldn't really
need to worry about this change.

If anyone wants a matrix-math challenge, they're welcome to try getting those
working for real, so that we can show these toggles again.
2016-06-24 03:18:37 +12:00
9466829ead DopeSheet Mask Mode: Circle/Lasso support
Adapted from the code for Grease Pencil (just like the whole mode was)
2016-06-24 03:18:36 +12:00
833e69ff7e DopeSheet: GPencil-Mode supports Circle and Lasso Select
To get this working the least effort, I've had to expose the helper functions
used by the lasso and circle select keyframe-test callbacks (which are generic)
and expose them for use by the GP keyframe editing code too. Hopefully in time
we clean this all up and just write the code once to operate on "keyframes"
2016-06-24 03:18:36 +12:00
7e53f9fb1a Dopesheet: Lasso and Circle Select tools work for selecting keyframes
This only works in the Action and Dopesheet modes (which operate on FCurve keyframes).
Support for Grease Pencil and Mask Keyframes though is still pending.
2016-06-24 03:18:35 +12:00
58acc184c4 Code Cleanup - Circle/Lasso select in the Graph Editor 2016-06-24 03:18:34 +12:00
b6a898b3db GPencil UI: Streamline toolbar options a bit
As suggested by mendiobox:

* Don't show "enable editing" in the 3D view. You can already do this by switching
  into stroke editing mode here, so no need for the duplication. (In other editors
  though, this can't be done yet, so we don't do it)

* Make the "Convert" button into a dropdown so that you don't need to deal with a
  a separate popup menu

* In the 3D view, don't show the selection + transform operators that can be easily
  found in the menus too (as well as having commonly used shortcuts)
2016-06-24 03:18:33 +12:00
ec7603d6f1 GPencil: Added a new version of the "delete active frame" operator which deletes on all editable layers
This new operator will delete any GP frame it finds on the current frame, regardless
of whether it's on the active layer or not. It will only remove the frames if the
layer is editable, but otherwise, it will just go for it.

The existing operator is great for use in the panel (where it only applies to the active
frame), but it was not so good for all the other places where tools can be invoked
(e.g. D-X, or Delete) as you're typically thinking about the whole scene more holisticaly
than just caring about a particular layer.
2016-06-24 03:18:33 +12:00
37560e77e8 Fix T48689: Transform proportional size was not seriously clamped.
Now use same, reasonable min/max values, to avoid getting inf or zero values when
using shortcuts during transform operation...
2016-06-23 16:45:06 +02:00
d9a01a1d04 Fix T48707: Edit-mesh intersect crash
In rare cases intersect would attempt to add edges with the same vertex twice
from edge-vert / edge-edge intersections.

Solve by checking for duplicates when creating vertex-array for these types of intersections
(always under 3x comparisons, so not much overhead).
2016-06-23 22:20:40 +10:00
57744df38f Correct recent change to edge-net
Need account for cases where vertex connects a single edge.
2016-06-23 22:20:40 +10:00
097611a92a Fix T48710: 'velocity' particle settings were incorrectly using 'speed' in their tooltips.
Not the same thing, velocity is a vector conveying both speed *and* direction...
2016-06-23 13:09:32 +02:00
219a8d046a Use hard min/max for view clipping
In rare cases its useful to have far clip below 1.
2016-06-23 18:47:55 +10:00
a8898d3105 Correct assert 2016-06-23 12:26:26 +10:00
fad0c336e4 RNA: Expose hook inverse matrix
Needed so scripts don't need to use operators to adjust hook modifiers.
2016-06-23 11:52:44 +10:00
475b7f5a2c BLI_array_utils: add BLI_array_rfindindex
Array search from back to front.
2016-06-23 11:36:49 +10:00
9bce807d0b Cycles: Fix the Convert Node type registration
The function that assigns names to socket types missed an entry, therefore all entries after it were mapped to the wrong name.
Long-term, it might be a better solution to use a map to avoid issues like these, but for now this fix works.
2016-06-23 03:15:57 +02:00
29448bd99b Fix T48658: Cycles render & render preview corrupts particles
Replaces `G.is_rendering` with `use_render_params` argument.

This is needed for Cycles, which attempts to restore render-preview settings from particles,
after it gets its own particle data, but fails to restore because
`G.is_rendering` was being checked in psys_cache_paths (and other places).
2016-06-23 07:54:35 +10:00
af9123d3aa Merge branch 'openvdb' into cvdb_ray_isect 2016-06-22 19:26:16 +02:00
f3400ebb90 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/app/cycles_xml.cpp
2016-06-22 19:25:38 +02:00
7547c6a250 ID-Remap, step two: add some user-level tools.
This commit adds operators and Outliner menu entries to reload or relocate a library,
and to delete or replace a datablock.

RNA ID API is also extended to allow ID deletion and remapping from python.

Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
2016-06-22 18:05:55 +02:00
fb1f7fad78 Cleanup: use proper RNA struct type for ListBase type
(otherwise all code using RNA has to link DNA_listbase.h, not clean at all!).
2016-06-22 18:04:04 +02:00
897e97f078 ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing
processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock
was pretty much impossible, except for a few special cases.

Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite
a few ID usages were missed or wrongly handled that way).

One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling
by using library_query utils to allow generic handling of those, which is now the case
(now, generic ID links handling is only "knwon" from readfile.c and library_query.c).

This commit also adds backends to allow live replacement and deletion of datablocks in Blender
(so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one,
or NULL one in case of unlinking).

This will allow nice new features, like ability to easily reload or relocate libraries, real immediate
deletion of datablocks in blender, replacement of one datablock by another, etc.
Some of those are for next commits.

A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core.
Though it was tested rather deeply, being totally impossible to check all possible ID usage cases,
it's likely there are some remaining issues and bugs in new code... Please report them! ;)

Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
2016-06-22 17:53:50 +02:00
73cfbb0ab9 Cycles: Fix crash with Environment Texture and OSL
In the OSL node compilation code for the Environment Texture, is_linear was used as a socket.
However, there was no socket for it, which caused Blender to crash.
Adding a socket doesn't really make sense since it's an internal value and not a parameter
of the node, so it now just uses the variable directly.
2016-06-22 16:12:40 +02:00
b204bdad47 EditMesh: Avoid creating deform-vert layer every redraw
Getting a new edit-derived-bmesh was always creating a deform-vert array, even when it wasn't needed.
Since this was called on redraw, in many cases it was doing it unnecessarily.

Now pass in a custom-data mask and only fill in deform-verts when needed.

Gives noticeable drawing speedup (~10-30% here).
2016-06-22 21:31:00 +10:00
493c6b622f Cleanup: style 2016-06-22 14:02:51 +10:00
435fa9a015 Cleanup: remove unused Image space curves
Caused leaks reading old files, was read/written but not freed,
remove since its unused.
2016-06-22 09:50:53 +10:00
e0f314d750 readfile: use BLI_endian_switch
Replace inline endian switching
2016-06-22 09:38:23 +10:00
68040359d1 Remove module reloading for preview operators
This can be kept on file level but best keep out of operator functions.
2016-06-22 08:47:40 +10:00
63006c88a1 writefile: use const for old address
Also remove temp preview overwriting.
2016-06-22 08:44:26 +10:00
6fbe6eb033 Fix T48703: Name inconsistency w/ area maximize/fullscreen
Name operator based on default behavior.
2016-06-22 07:47:30 +10:00
a5b474e352 Docs: use doxy formatting for readfile 2016-06-22 07:47:30 +10:00
1fd773ed14 T48694: fix bge.texture.Texture.refresh() documentation
first parameter is mandatory and must be a bool indicating if the image
source should be refreshed after updating the texture.
2016-06-21 23:23:05 +02:00
8ae74ece9a Fix null-pointer free
Own error in recent decimeter commit
2016-06-22 05:34:04 +10:00
e783fddc01 Fix T48700: Crash when window creation fails
Check if Python is initialized before calling BPY_python_end.
2016-06-22 04:17:02 +10:00
028ba31903 Fix T48698: Rays from SSS act as diffuse for normal objects but have an undefined type for lamp objects
The problem here was that there are five path types internally (diffuse, glossy, transmission, subsurface and volume scatter), but subsurface isn't exposed to the user.
This caused some weird behaviour - if all four types are disabled on the lamp, Cycles doesn't even try sampling it, but if any type was active, the lamp would illuminate
the cube since none of the options set subsurface to zero.
In the future, it might be reasonable to add subsurface visibility as an option - but for now the weird and inconsistent behaviour can be fixed simply by setting both
diffuse and subsurface to zero if the user disables diffuse visibility.
2016-06-21 20:09:48 +02:00
db4a46bc3c Cleanup: hide debug print behind proper debug defines instead of using comments... 2016-06-21 16:19:08 +02:00
e34ade4eb3 Fix T48412: Blender 2.77a crashes on Undo in some specific multi-level linked libraries cases.
Good old dead-brain stupid error when iterating over a linked list from which you remove some items...
2016-06-21 16:12:33 +02:00
8dec4a0e79 Fix for string buffer overflow in DepsNode identifiers.
Layer flags can go up to 2^n-1 for n layers, requiring *at least* 9 chars + 1 terminator for 20 layers.
2016-06-21 12:51:18 +02:00
1abf7dd835 Fix T48697: Brush curve-stroke snaps strangely
Support Snapping screen-space 2d curves, (was applying world-space coords in screen-space).
Also show snap settings in header.
2016-06-21 16:19:45 +10:00
7cbd1285a5 Fix T48196: Crash enabling modal operator in exec
Not good practice, but better not crash.
2016-06-21 15:02:10 +10:00
994dd5c7c1 Cleanup: rename curve align-x flags 2016-06-21 12:45:25 +10:00
Dalai Felinto
cb5a77253a Text Object: Vertical Alignment
A new option for Font/Text objects vertical alignment:

* Top Base-Line (current mode)
* Top
* Center
* Bottom

The Top is the equivalent as the Top-Baseline with an empty line at the begin of the
text. It's nice to have this option too though, since if we are driving
the alignment via Python we don't want to add extra lines to the text
only to accomodate to the desired vertical alignment.

The Center and Bottom are as intuitive as their name suggest.

When working with text boxes, the vertical alignment only work for
paragraphs that are not vertically full.

Many thanks to Campbell Barton (ideasman42 / @campbellbarton) for the
code review, code comments, and overall suggestions and changes :)

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D2061
2016-06-20 23:21:24 -03:00
1c19940198 Fix T48688: Crash loading particle effector weights 2016-06-21 09:44:35 +10:00
29ce3dfeb6 Fix T48691: Cycles - OpenCL - HDR Image mapping does not match CUDA rendering
The OpenCL texture code didn't offset the coordinates by half a pixel like the CPU code does.
2016-06-21 00:49:25 +02:00
93c6cf496e Cycles: Deduplicate Vector and RGB Curve nodes
Since most of the code for these two nodes was identical, this commit
now instead uses a common base class that implements all the functionality.
2016-06-21 00:19:51 +02:00
a170607578 Fix T48683: Knife cut creates hole
BM_face_split_edgenet wasn't correctly detecting boundary vertices to walk over,
since vertices may be attached to boundary edges not part of the newly created face.
2016-06-21 08:10:56 +10:00
ed225d4517 BMesh: avoid verts-of-edge iterator
Since this function is called a lot, loop over data directly.
2016-06-21 08:10:51 +10:00
dfa7ddd4a8 Cycles: Add svm_util_color.h file to CMake
The file wasn't included in CMake and therefore not installed into the addon folder.
2016-06-20 19:07:22 +02:00
Dalai Felinto
72273b08cc Fix building for Windows after 57cff46v (booleans unitialized) 2016-06-20 13:02:53 -03:00
61b49de449 Fix once more time particle distribution.
rB046adde64f16 was actually pretty useless (and broken), since issue ends up not being
in binary search code, but in generation of the 'summed weights' array used to distribute
particles over mesh items - looks like very small weights could lead to null accumulated
weights, wich was breaking binary search.

Fixed simply by adding a minimal, non-zero weight for mesh items to be allowed to emit particles.

Hopefully we are done with this distribution mess!
2016-06-20 11:12:33 +02:00
2e553f77b8 Cleanup: Remove todo comment, this is fine as is. 2016-06-19 21:09:54 +02:00
f7bada00a7 Cycles: add constant folding for more color operation nodes.
Invert, brightness & constrast, separate/combine and Mix RGB blend modes
and clamping.
2016-06-19 20:17:28 +02:00
81e391a727 Fix issues with node deduplication in Cycles shader graph.
It is not possible to use a set split by name as valid input to
check_node_input_traversed - it needs a complete set of all nodes visited so
far. On the other hand, the merge comparison loop should only check nodes that
were not just visited, but found unique. This means that there should really be
two separate data structures.

Without the fix, check_node_input_traversed actually never returns true, so
only nodes without any inputs are processed.
2016-06-19 20:17:27 +02:00
98547e8817 Fix Cycles RGB and Vector Curves node Fac handling. 2016-06-19 20:17:27 +02:00
34a42788e7 Code refactor: small code simplification for Cycles constant folding. 2016-06-19 20:17:27 +02:00
c87f7865b2 Fix Cycles OSL image texture issue after recent refactor. 2016-06-19 20:17:26 +02:00
e26eb9c93b Cycles: reduce CUDA stack memory access for Maxwell and up, increasing max registers.
For non-branched path tracing with a GTX 960 and CUDA 7.5, this gives a small reduction
in stack usage but mainly: 8% faster render on BMW, 5% on pabellon, 13% on classroom.
2016-06-19 20:17:26 +02:00
9b618c1a5a Cycles tests: raise failure threshold, copy failed image for comparison. 2016-06-19 20:17:26 +02:00
48caadfdd5 Fix Cycles assert after recent half changes. 2016-06-19 20:17:25 +02:00
600f7df71b Fix return type in case of single channel half. 2016-06-19 17:38:39 +02:00
6311a9ff23 Cycles: Support half and half4 textures.
This is an initial commit for half texture support in Cycles.
It adds the basic infrastructure inside of the ImageManager and support for these textures on CPU.

Supported:
* Half Float OpenEXR images (can be used for e.g HDRs or Normalmaps) now use 1/2 the memory, when loaded via disk (OIIO).

ToDo:
Various things like support for inbuilt half textures, GPU... will come later, step by step.

Part of my GSoC 2016.
2016-06-19 17:31:16 +02:00
7da189b4e8 Fix broken combine XYZ node after recent refactoring. 2016-06-18 22:37:18 +02:00
2465bd90d5 Cleanup: style, whitespace, doxy filepaths 2016-06-19 06:33:29 +10:00
d67c07ea49 Fix T48671: Cycles crash with OSL nodes and bump after recent refactoring. 2016-06-18 12:32:40 +02:00
7ac126e728 Fix T46492: GGX distribution produces black pixels
The issue was caused by some numerical instability.
2016-06-17 16:30:29 +02:00
bcde045b32 Fix T48667: Bisect-fill crash
BMO iterator would loop over removed faces.

Recent changes to mempool FREEWORD size exposed this bug.
2016-06-17 21:45:56 +10:00
ca01fe58e1 Fix T48662: Blender crash using node groups connected with displacement output in some situations 2016-06-17 12:14:36 +02:00
f0c7a2a25c Fix T48657: Incorrect render with Cycles (CPU) using texture
The sockets of the RGB to BW node were set to the wrong type after the recent node refactor.
2016-06-17 05:20:47 +02:00
d747bfbe29 Fix/cleanup BKE libquery's ID looper.
Some area were still not in sync with readfile.c, now should be better.

Note that readfile.c has been used as référence here re us refcounting,
not sure how accurate it is, time will say :|
2016-06-16 21:12:12 +02:00
503315111e readfile.c: fix some wrong usages of newlibadr_us.
There are most likely some more still, but think this should now be inline with
libquery looper...
2016-06-16 20:31:11 +02:00
d05014f844 Readfile cleanup: add new newlibadr_real_us helper. 2016-06-16 19:23:09 +02:00
42e2398ae3 Vertex paint color operations
D2050 by @metaraptor with edits

Adds levels, brightness/contrast, hsv & invert operations.
2016-06-17 01:56:59 +10:00
3f744a16c4 Correct error in recent commit 2016-06-16 22:18:59 +10:00
046adde64f Fix some rare asserts with new simple/random particle distribution code.
Optimization in binary search could lead to equality instead of expected strictly greater than value.
Harmless but noisy, and better be strict here.

reported by sergey on irc (with koro cycles benchmark file), thanks.
2016-06-16 14:08:44 +02:00
5ea27bec1f BMesh Decimate: use doubles to calculate optimized position
This allows the error threshold for calculating the optimized location to be much lower.

Resolves visible artifacts w/ 1m-tri happy-buddha example.
2016-06-16 19:25:02 +10:00
47a5d7d1bc BLI_math: Add double versions of functions
- mul_v3_m3v3_db
- mul_m3_v3_db
- negate_v3_db
2016-06-16 19:20:08 +10:00
ef515822ce Fix ruler crash using stale snap-context
Since ruler allows other operators to run (such as mode-switching).
Only cache snap-context while dragging.
2016-06-16 18:49:39 +10:00
57cff46cec BMesh Decimate: support ngons 2016-06-16 04:30:59 +10:00
9285bbe484 Fix error splitting convex faces
Created double faces, leaked memory.
2016-06-16 03:43:22 +10:00
3c64696972 Fix T48654: outline text visible while renaming
Both button and rename text would draw while renaming,
caused issues with some themes.
2016-06-15 21:46:32 +10:00
Dalai Felinto
e0db647d35 Fix region_2d_to_origin_3d not working with ortho view
In some cases when:
* the viewport was in the camera mode
* the camera was ortho
* the view was not fitting (as oppose to use HOME)

region_2d_to_origin_3d would misbehave (and consequently region_2d_to_location_3d).

Sample addon to test it:
```
import bpy

from bpy_extras.view3d_utils import (
    region_2d_to_location_3d,
    )

from mathutils import (
    Vector,
    )

class MoveXYOperator(bpy.types.Operator):
    """Translate the view using mouse events"""
    bl_idname = "view3d.move_xy"
    bl_label = "Move XY"

    @classmethod
    def poll(cls, context):
        return context.object

    def modal(self, context, event):
        if event.type == 'MOUSEMOVE':
            self.move(context, event)

        elif event.type in {'LEFTMOUSE', 'RIGHTMOUSE', 'ESC'}:
            return {'FINISHED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.space_data.type == 'VIEW_3D':
            self.ob = context.object
            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "Active space must be a View3d")
            return {'CANCELLED'}

    def move(self, context, event):
        xy = region_2d_to_location_3d(
                context.region,
                context.space_data.region_3d,
                (event.mouse_region_x, event.mouse_region_y),
                Vector(),
                ).xy

        self.ob.location.xy = xy

def register():
    bpy.utils.register_class(MoveXYOperator)

def unregister():
    bpy.utils.unregister_class(MoveXYOperator)

if __name__ == "__main__":
    register()
```
2016-06-14 18:03:07 -03:00
09da51e603 Text Editor: auto-complete removed entire word on undo 2016-06-15 04:28:13 +10:00
81f435202a VSE: minor drawing glitch with meta's
Meta contents could obscure meta selection outline, draw after.
2016-06-15 04:08:03 +10:00
28398f654d Correct update issue caused by recent commit
VSE effects within a meta-strip could fail to update on cancel.
2016-06-15 04:08:03 +10:00
eaf894db6d Fix VSE updating effects within metas
Missing update caused internal lengths to be wrong.
2016-06-15 02:44:34 +10:00
a3a7e46318 Cleanup: Remove outdated comment, visibility layers in kernel have been removed. 2016-06-14 16:46:44 +02:00
9182e07c0e FileSpace cleanup: make ED_path_extension_type public.
Maybe we should move it to BLI, but not sure how, and where (and its defines
are SpaceFile's ones, meh :| ).
2016-06-14 16:30:16 +02:00
c7e7c1b241 Write .blend file: refactor & fixes re ID block itself.
Factorized writing of ID block's data (so far, only IDProps) into own helper func.
This also fixes missing IDProp (aka custom data) saving from GreasePencil and Library
datablocks (and add comment about why we do not save WM IDProps).

Finaly, it ensures all ID-related data are written immediately after the ID itself
(was not the case for all data types previously, some were writting their own data
before IDProps). This is not a fix (.blend file format does not enforce any order
on sub-data of datablocks, they only have to be after datablock struct itself in file),
but makes things more consistent.
2016-06-14 15:03:49 +02:00
424f41ad1c Fix T48649: VSE meta-strip overlap shuffles recursively 2016-06-14 21:57:55 +10:00
180aad5e0b Correct sequencer transform check
Check to avoid operating on same strip multiple times wasn't working.

Harmless but better make it functional.
2016-06-14 21:57:55 +10:00
a47937454c fix T48602: Changed The Collada validator to treat faces with < 3 verts as Warning and let the Mesh Validator take care of the cleanup 2016-06-14 13:09:10 +02:00
6d111a233c Fix T48613: Bump mapping in cycles is not shown on the viewport when the material use node groups 2016-06-14 11:31:00 +02:00
51cb4ea2cf Fix T48154: Decimate topology changes with scale
This can't be avoided completely, however the threshold used can be much lower.
2016-06-14 17:12:29 +10:00
049f715d1c Usual UI/i18n message fixes. 2016-06-14 00:16:39 +02:00
Phil Gosch
9c600435fa Made incremental snapping intervalls smaller for UV editor
Before the intervall was set to 0.125 which effectively resulted in 8 positions across the UV space (per axis).
I halved that value, holding shift enables an even finer movement.

This change was ported over from my soc-2016-uv_tools branch after talking with howardt, ideasman42 and hackerman-
2016-06-13 18:35:32 +02:00
abb9d0b0ad Curve Fitting: add high-quality flag
When this flag is set - even when the curve error is under the threshold,
keep attempting a better fit.

Enable this for freehand drawing, since it gives nicer results and isn't noticeably slower.
2016-06-14 02:27:32 +10:00
b0985b393c Fix T48595: UI glitch with driver menu re-opening
Holding Ctrl-D would keep opening driver menus.
2016-06-14 01:52:35 +10:00
520691e591 Bevel segments also changeable with mouse (S toggle).
Also, can use numeric input to set segments and profile when
in those respective value-adjusting modes (as per S or P toggle).
Finally, fixed problem with previous bevel commit: when changing
value-adjusting mode, would like to start off resumed value adjustment
where it was before.
2016-06-13 09:14:13 -04:00
08baf3ea79 Keymap: include 'Dopesheet Generic' 2016-06-13 23:03:00 +10:00
5be4d0b328 Fix misleading indentation in ImBuf 2016-06-13 14:46:04 +02:00
f87611622d Fix typo in variable name as well. 2016-06-13 14:08:06 +02:00
f2c5ea2516 Fix own error w/ undefined behavior
This happened to work for me but caused issues on OSX.
2016-06-13 21:57:22 +10:00
2566652ae6 Cycles: fixed a typo that would crash shaders that use the "Is Diffuse Ray" output of the LightPath node 2016-06-13 13:33:56 +02:00
617c4d6adb Fix glShadeModel being left flat in edit-mode draw 2016-06-13 19:21:46 +10:00
8d8c5a542c Cycles: Fix unhandled enumerator in OSL switch
Unsigned int is not supported by OSL as far as i concerned, so should not
really matter here. However, might be wrong and perhaps more proper idea
would be so set it as regular int?
2016-06-13 10:15:39 +02:00
1883dbd8c3 Fix T48616: Auto-merge selects extra edges
Auto-merge caused all edges between selected vertices to be selected.
This only makes sense in vertex-select-mode.

Correct edge-flag merging code, which now merges flags from multiple edges.
2016-06-13 18:07:59 +10:00
cefbe8fe54 Fix build error with GCC 6.1. 2016-06-12 21:29:19 +02:00
24d53f79b2 Fix Cycles debug build assert on some platforms, tighten checks to avoid this in the future. 2016-06-12 17:35:15 +02:00
055001111e Fix T48604: Crash on undo due to bad drawing code.
Short story: draw_lamp would add itself to delayed transp drawing list from 'xray' drawing step.
This was broken, since delayed transp drawing list is always handled **before** delayed xray one.

After undo it lead to segfault crash, v3d->afterdraw_transp still having reference to old freed scene's base.

Also added asserts that those afterdraw list are empty at end of drawing step, should help
avoiding that kind of issue in future.
2016-06-12 17:06:50 +02:00
2033f47e55 Curve Fitting: offset based fallback to calculate cubics
Add a new fallback method that uses offset distance from the curve to the line between both points,
for freehand drawing it typically only fives minor improvements (1-3% fewer points),
for curve dissolve the improvements are more noticeable.
2016-06-12 22:25:43 +10:00
66b12ef4ab BLI_math: cleanup arg names
project functions arg naming made it hard to tell which vector was projected onto.
2016-06-12 15:39:04 +10:00
65df2fd997 bmesh py api: expose BM_face_calc_tangent_*
D1988 by @wisaac, with own edits and improvements.

This improves on existing tangent calculation functions too.

- BM_face_calc_tangent_auto: Chooses method based on number of sides, used by manipulator (not exposed to Python).
- BM_face_calc_tangent_edge: from longest edge.
- BM_face_calc_tangent_edge_pair: from longest edge-pair (most useful with quads).
- BM_face_calc_tangent_edge_diagonal: edge farthest from any vertex.
- BM_face_calc_tangent_vert_diagonal: vert farthest from any vertex.

Also optimize BM_vert_tri_calc_tangent_edge* functions to avoid sqrt.
2016-06-12 15:12:34 +10:00
421ec97276 Docs: Support out-of-source reference-API builds
This was originally supported, however relative links to examples & templates made it fail.
Now files in the source tree are copied to the build-dir, with ".." replaced with "__"
to avoid having to mirror Blender's source-layout in the Sphinx build-dir.

Also skip uploading the built docs when an SSH user-name isn't passed to sphinx_doc_gen.sh
instead of aborting (so people w/o SSH access to our servers can use the shell-script).
2016-06-12 11:31:28 +10:00
2b15a588a1 Cleanup: API docs (whitespace/line length) 2016-06-12 10:05:35 +10:00
1cd3676d4d Cleanup, remove unneeded variable. 2016-06-12 00:01:57 +02:00
324bed3843 Fix compiler warning for unused variables. 2016-06-11 23:58:12 +02:00
ebdd2e0b6d Cycles: make shader node enums consistently lower case, update OSL shaders accordingly. 2016-06-11 23:50:11 +02:00
b8112a8960 Fix OS X build after Decklink changes, it is not supported yet so don't enable it. 2016-06-11 23:50:06 +02:00
eea89417f4 BGE: DeckLink card support for video capture and streaming.
You can capture and stream video in the BGE using the DeckLink video
   cards from Black Magic Design. You need a card and Desktop Video software
   version 10.4 or above to use these features in the BGE.
   Many thanks to Nuno Estanquiero who tested the patch extensively
   on a variety of Decklink products, it wouldn't have been possible without
   his help.
   You can find a brief summary of the decklink features here: https://wiki.blender.org/index.php/Dev:Source/GameEngine/Decklink
   The full API details and samples are in the Python API documentation.

bge.texture.VideoDeckLink(format, capture=0):

   Use this object to capture a video stream. the format argument describes
   the video and pixel formats and the capture argument the card number.
   This object can be used as a source for bge.texture.Texture so that the frame
   is sent to the GPU, or by itself using the new refresh method to get the video
   frame in a buffer.
   The frames are usually not in RGB but in YUV format (8bit or 10bit); they
   require a shader to extract the RGB components in the GPU. Details and sample
   shaders in the documentation.
   3D video capture is supported: the frames are double height with left and right
   eyes in top-bottom order. The 'eye' uniform (see setUniformEyef) can be used to
   sample the 3D frame when the BGE is also in stereo mode. This allows to composite
   a 3D video stream with a 3D scene and render it in stereo.
   In Windows, and if you have a nVidia Quadro GPU, you can benefit of an additional
   performance boost by using 'GPUDirect': a method to send a video frame to the GPU
   without going through the OGL driver. The 'pinned memory' OGL extension is also
   supported (only on high-end AMD GPU) with the same effect.

bge.texture.DeckLink(cardIdx=0, format=""):

   Use this object to send video frame to a DeckLink card. Only the immediate mode
   is supported, the scheduled mode is not implemented.
   This object is similar to bge.texture.Texture: you need to attach a image source
   and call refresh() to compute and send the frame to the card.
   This object is best suited for video keying: a video stream (not captured) flows
   through the card and the frame you send to the card are displayed above it (the
   card does the compositing automatically based on the alpha channel).
   At the time of this commit, 3D video keying is supported in the BGE but not in the
   DeckLink card due to a color space issue.
2016-06-11 22:26:05 +02:00
c0bf881ebf BL_Shader.setUniformEyef(name)
defines a uniform that reflects the eye being rendered in stereo mode:
    0.0 for the left eye, 0.5 for the right eye.
    In non stereo mode, the value of the uniform is fixed to 0.0.
    The typical use of this uniform is in stereo mode to sample stereo textures
    containing the left and right eye images in a top-bottom order.

    python:
      shader = obj.meshes[0].materials[mat].getShader()
      shader.setUniformEyef("eye")

    shader:
      uniform float eye;
      uniform sampler2D tex;
      void main(void)
      {
         vec4 color;
         float ty, tx;
         tx = gl_TexCoord[0].x;
         ty = eye+gl_TexCoord[0].y*0.5;
         // ty will be between 0 and 0.5 for the left eye render
         // and 0.5 and 1.0 for the right eye render.
         color = texture(tex, vec2(tx, ty));
         ...
      }
2016-06-11 22:24:18 +02:00
fa9bb2ffe9 Atomic ops: Fix atomic_add_uint32 and atomic_sub_uint32 in Windows
The assembler version in Windows used to return the previous value
    of the variable while all the other versions return the new value.
    This is now fixed for consistency.
    Note: this bug had no effect on blender because no part of the code
    use the return value of these functions, but the future BGE DeckLink
    module makes use of it to implement reference counter.
2016-06-11 22:15:25 +02:00
40f1c4f343 BGE: Various render improvements.
bge.logic.setRender(flag) to enable/disable render.
    The render pass is enabled by default but it can be disabled with
    bge.logic.setRender(False).
    Once disabled, the render pass is skipped and a new logic frame starts
    immediately. Note that VSync no longer limits the fps when render is off
    but the 'Use Frame Rate' option in the Render Properties still does.
    To run as many frames as possible, untick the option
    This function is useful when you don't need the default render, e.g.
    when doing offscreen render to an alternate device than the monitor.
    Note that without VSync, you must limit the frame rate by other means.

fbo = bge.render.offScreenCreate(width,height,[,samples=0][,target=bge.render.RAS_OFS_RENDER_BUFFER])
    Use this method to create an offscreen buffer of given size, with given MSAA
    samples and targetting either a render buffer (bge.render.RAS_OFS_RENDER_BUFFER)
    or a texture (bge.render.RAS_OFS_RENDER_TEXTURE). Use the former if you want to
    retrieve the frame buffer on the host and the latter if you want to pass the render
    to another context (texture are proper OGL object, render buffers aren't)
    The object created by this function can only be used as a parameter of the
    bge.texture.ImageRender() constructor to send the the render to the FBO rather
    than to the frame buffer. This is best suited when you want to create a render
    of specific size, or if you need an image with an alpha channel.

bge.texture.<imagetype>.refresh(buffer=None, format="RGBA", ts=-1.0)
    Without arg, the refresh method of the image objects is pretty much a no-op, it
    simply invalidates the image so that on next texture refresh, the image will
    be recalculated.
    It is now possible to pass an optional buffer object to transfer the image (and
    recalculate it if it was invalid) to an external object. The object must implement
    the 'buffer protocol'. The image will be transfered as "RGBA" or "BGRA" pixels
    depending on format argument (only those 2 formats are supported) and ts is an
    optional timestamp in the image depends on it (e.g. VideoFFmpeg playing a video file).
    With this function you don't need anymore to link the image object to a Texture
    object to use: the image object is self-sufficient.

bge.texture.ImageRender(scene, camera, fbo=None)
    Render to buffer is possible by passing a FBO object (see offScreenCreate).

bge.texture.ImageRender.render()
    Allows asynchronous render: call this method to render the scene but without
    extracting the pixels yet. The function returns as soon as the render commands
    have been send to the GPU. The render will proceed asynchronously in the GPU
    while the host can perform other tasks.
    To complete the render, you can either call refresh() directly of refresh the texture
    to which this object is the source. Asynchronous render is useful to achieve optimal
    performance: call render() on frame N and refresh() on frame N+1 to give as much as
    time as possible to the GPU to render the frame while the game engine can perform other tasks.

Support negative scale on camera.
    Camera scale was previously ignored in the BGE.
    It is now injected in the modelview matrix as a vertical or horizontal flip
    of the scene (respectively if scaleY<0 and scaleX<0).
    Note that the actual value of the scale is not used, only the sign.
    This allows to flip the image produced by ImageRender() without any performance
    degradation: the flip is integrated in the render itself.

Optimized image transfer from ImageRender to buffer.
    Previously, images that were transferred to the host were always going through
    buffers in VideoTexture. It is now possible to transfer ImageRender
    images to external buffer without intermediate copy (i.e. directly from OGL to buffer)
    if the attributes of the ImageRender objects are set as follow:
       flip=False, alpha=True, scale=False, depth=False, zbuff=False.
       (if you need to flip the image, use camera negative scale)
2016-06-11 22:05:20 +02:00
5b061ddf1e Fix Gradient Texture and OSL after refactor. 2016-06-11 21:40:00 +02:00
0b415700f4 Attempted fix for T48625: tablet button configured to right click not working on OS X. 2016-06-11 20:32:24 +02:00
42aec3b355 Cycles: nodify shader nodes
Differential Revision: https://developer.blender.org/D2038
2016-06-11 20:32:24 +02:00
4df6474f01 Fix T48617: VSE: Do not draw backdrop in Seq + Preview mode, only makes sense when no preview is available... 2016-06-11 17:28:32 +02:00
dccf5afbef BLI_rand: add BLI_rng_get_char_n
Use to fill an array of bytes to random values.
2016-06-12 00:41:02 +10:00
4ec1c76afc Fix T48634: Interpolation and distribution of Children Particles breaks.
Own stupid off-by-one regression in rB019ce363b01bba0afe1 and later...
2016-06-11 14:37:47 +02:00
07925b6316 UI Font: Fix bad kerning of Thai font.
Thai font is a complex script that assumes full featured unicode layout engine,
while Blender only knows about basic kerning (offset of a char based on the previous one).

So this commit edits Thai part of our i18n font to fix the very bad spacing of thai chars
we had in Blender so far.

Work done by Hồ Châu, many thanks!
2016-06-11 10:47:53 +02:00
a99c03a0ad VSE: select by group: add option to select by group on same channel only. 2016-06-10 18:40:31 +02:00
25f3c0a395 Install_deps: add '--no-build' option to prevent compiling anything. 2016-06-10 18:09:34 +02:00
54343b821d GPU: use basic-shader for line-stipple 2016-06-10 07:50:49 +10:00
af077706fb Remove redundant GL attribute push/pop
Stipple isnt left on during object drawing
2016-06-10 07:50:49 +10:00
b07508a362 Fix GPU logical error changing stipple 2016-06-10 07:50:49 +10:00
a5788a9c47 Cleanup: brace-placement 2016-06-10 07:50:45 +10:00
8529b2f925 BGE: alpha on frame buffer and precedence of MSAA over swap.
A new option '-a' can be passed to the blenderplayer. It forces the
framebuffer to have an alpha channel.
This can be used in VideoTexture to return a image with alpha channel
with ImageViewport (provided alpha is set to True on the ImageViewport
object and that the background color alpha channel is 0, which is the
default).
Without the -a option, the frame buffer has no alpha channel and
ImageViewport always returns an opaque image, no matter what.
In Linux, the player window will be rendered transparently over
the desktop.
In Windows, the player window is still rendered opaque because
transparency of the window is only possible using the 'compositing'
functions of Windows. The code is there but not enabled  (look for
WIN32_COMPOSITING) because 1) it doesn't work so well 2) it requires
a DLL that is only available on Vista and up.

give precedence to AA over Swap copy:

Certain GPU (intel) will not allow MSAA together with swap copy.
Previously, swap copy had priority over MSAA: fewer AA samples would be
chosen if it was the condition to get swap copy. This patch reverse the
logic: swap copy will be abandonned if another swap method (undefined or
exchange) will provide the number of AA samples requested. If no AA
samples is requested, swap copy still has the priority of course.
2016-06-09 22:15:13 +02:00
5da02ab9e2 GPU: only call glShadeModel when needed 2016-06-10 06:11:14 +10:00
efd547f3da GPU: avoid multiple bind calls in GPU_draw_pbvh_buffers
Also add utility functions: GPU_basic_shader_bind_enable/disable
so we don't have to get the previous state every time and manipulate it
2016-06-10 06:09:11 +10:00
6798809c7e Flat shading for basic shader
The purpose of the patch is to replace deprecated  glShadeModel.

To decrease glShadeModel calls I've set GL_SMOOTH by default

Reviewers: merwin, brecht

Reviewed By: brecht

Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1958
2016-06-10 05:38:17 +10:00
d733826708 Fix T48614: Blender from buildbot crash when Separate selection in this particular scene.
Regression from recent rB2c5dc66d5effd4072f438afb, if last item of last chunk of a mempool was valid,
it would not be returned by mempool iterator step, which would always return NULL in that case.
2016-06-09 17:53:51 +02:00
20f0e2f342 Compilation error fix after recent cleanup
Please do not do cleanups in minimal configuration, doing that has been
proven to only cause issues without solving anything meaningful ;)
2016-06-09 09:53:35 +02:00
88ac2d390b Cleanup: GPU arg wrapping 2016-06-09 05:44:25 +10:00
5065343074 Cleanup: GPU headers 2016-06-09 05:38:43 +10:00
d01499a45c GPU: avoid disabling basic-shader for lasso
Replace glDrawPixels w/ glaDrawPixelsTex
2016-06-09 05:17:43 +10:00
69bf7a44aa Fix armature stick draw, unpack-alignment was set but never restored
Drawing a single stick bone set the alignment to 1, applying this setting to the rest of Blender.
2016-06-09 05:17:43 +10:00
b41cfb590c glutil: add glaGetOneInt helper 2016-06-09 05:17:43 +10:00
b32fd196a0 Depsgraph: Avoid redundant connection from IK solver to chain
Could give barely measurable speedup on a complex rigs.
2016-06-08 17:33:04 +02:00
c683c3805e Depsgraph: Remove unused code
Became obsolete after recent changes.
2016-06-08 17:33:04 +02:00
bdd855ac1a Depsgraph: Optimize flush update when there's few objects and fewzillions of bones
Avoid annoying checks form inside operations loop, gives few percent speedup in
files like army_of_blenrigs.
2016-06-08 17:33:04 +02:00
b9de44f458 GPU: fix texface image w/ basic-shader 2016-06-09 00:44:20 +10:00
Julian Eisel
fc96110bb5 Make uiLists placed in popups usable
It's still not completely working - there are still some glitches - but far better than before.
To make buttons of the uiList work, you have to add a 'check' callback to the operator that invokes the menu. Only if it returns True, the uiList gets refreshed. To avoid this we have to make the region refresh tagging in the entire button handling a bit smarter.

Changes I had to do:
* Call uiList handling from menu/popup handling if needed.
* Make uiList handling use special popup refresh tag if placed in menu.
* Allow popups invoked from py operator to tag for refresh by using operator 'check' callback.
* Tag popup for refresh when resizing uiList.

Mostly fixes T48612.
2016-06-08 16:05:23 +02:00
37fc4b575f Fix FPE exception happening when converting linear<->srgb using SIMD 2016-06-08 16:00:34 +02:00
6ca6d3c4fd Cleanup: typo 2016-06-08 22:31:35 +10:00
e02679f71e Cleanup: typos 2016-06-08 22:25:23 +10:00
5e063ce6c9 Fix edit-mesh draw not disabling stipple
Caused problem w/ basic-shader
2016-06-08 21:37:34 +10:00
6307e823ca Cycles: Fix crash after recent zero scale instance optimization 2016-06-08 12:25:35 +02:00
438bdccff3 Buildobt: Update master config 2016-06-08 12:17:18 +02:00
b7a0340414 Buildbot: Give 2015 builds different name 2016-06-08 12:01:26 +02:00
4845736e41 3D Text: Use BLI_array_store for undo storage 2016-06-08 19:26:49 +10:00
94057b15d1 3D Text: Store separate arrays for undo data
Don't store maximum length of text per undo step,
or attempt to pack all data in a single array.

Was storing 32766 characters per undo step, irrespective of actual text length.
2016-06-08 19:21:18 +10:00
c6864c408b 3D Text: move undo into its own file 2016-06-08 19:12:23 +10:00
0a029e3dd1 BLI_array_store: move helper functions into their own API 2016-06-08 19:12:23 +10:00
e623d6b223 Fix cloth stability when in perfect rest shape.
The way cloth is coded, structural springs are only effective when stretched, while bending springs act only when shrunk. However, when cloth is exactly in its rest shape, neither have any effect, and effectively don't exist for the implicit solver.

This creates a stability problem in the initial frames of the simulation, especially considering that gravity seems to act so precisely that it doesn't disturb the strict equality of lengths, so in parts of the cloth this springless state can continue for quite a while.

Here is an example of things going haywire because of this and some suspicious logic in collision code acting together: {F314558}

Changing the condition so that structural springs are active even at exactly rest length fixes this test case. The use of >= is also supported by the original paper that the cloth implementation in blender is based on.

Reviewers: lukastoenne

Reviewed By: lukastoenne

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D2028
2016-06-08 10:32:11 +02:00
1345865dcd Buildbot: Trickery for MSVC2015 and NVCC 2016-06-08 10:31:04 +02:00
fc60689a25 Correct assert 2016-06-08 16:31:40 +10:00
eaa19177e7 GPU: fix/workaround basic shader font-color
All text was displaying black.

BLF uses alpha-only textures which aren't supported by the basic-shader,
Workaround this by using texture swizzle so the RGB components of the texture are set to 1.
2016-06-08 15:20:57 +10:00
654019fa01 Cycles: Fix two numerical issues in the volume code
This hopefully fixes T48383 by avoiding two numerical problems that I found in the volume code.

Reviewers: sergey, dingto, brecht

Reviewed By: sergey, dingto, brecht

Maniphest Tasks: T48383

Differential Revision: https://developer.blender.org/D2051
2016-06-08 03:17:19 +02:00
Julian Eisel
a506f4c74e Cleanup: Add comment on behavior of tweak events
It's not obvious that they use the mouse coordinate of the initial key-press event (behavior since rBf1f33ba7be2d), so added comment.

Also corrected other comments.
2016-06-07 23:13:27 +02:00
38f07a81b3 Fix T48600: VSE strip 'side selection' fails in 'Both' case.
Looks like a line was forgotten in the 'BOTH' case in code...
2016-06-07 22:37:31 +02:00
9081adf097 Cleanup - size_t is unsigned, so always >= 0! 2016-06-07 21:53:17 +02:00
5bd9e83289 GPU: Fix triple buffer w/ basic glsl shader
Needed to add GL_TEXTURE_RECTANGLE support to basic-shader.
2016-06-08 05:40:21 +10:00
91c146c42e Cuda 7.5 cannot be made to work with a supported cl.exe version in the same way as cuda 6.0 does allow, disabling cuda kernels on buildbot for now 2016-06-07 20:58:53 +02:00
d16635e497 Cuda 7.5 cannot be made to work with a supported cl.exe version in the same way as cuda 6.0 does allow, disabling cuda kernels on buildbot for now 2016-06-07 20:56:44 +02:00
f3d33a1a0f GPU: Fix for glDrawPixels drawing w/ glsl shader
The basic shader needs to be temporarily disabled in this case.
Add macros for temp store/restoring the state.
2016-06-08 04:13:21 +10:00
cf8a0d08b0 GPU: make using the glsl basic-shader a flag
This allows for it to be more easily tested.
2016-06-08 04:13:16 +10:00
bf54dcc3c9 Fix T48589: Compositor Backdrop crashes Blender 2016-06-07 16:44:15 +02:00
b595a692c8 Cycles: Limit degenerated triangle check got CUDA only
OpenCL seems to work fine here, and for some reason that comparison was
giving compilation error on OpenCL here.

Better to compile OpenCL kernel than to be fully robust to weird corner
cases.
2016-06-07 15:48:56 +02:00
b6954c8da1 Cycles: Fix regression introduced in c96a4c8
A few places still needed to be updated to use the new Mesh::num_triangles()
method; wrong number from triangles.size() was causing crashes.
2016-06-07 07:38:09 -04:00
f08018f928 Fix (unreported) EditNormal modifier: broken 'flip poly' feature.
Newly computed custom normals were forgotten during poly flipping, leading
to wrong custom normals being assigned to wrong loop...

Dead simple, but was tough to track down this one!
2016-06-07 13:07:01 +02:00
ce659fe09e Merge branch 'openvdb' into cvdb_ray_isect
Conflicts:
	intern/cycles/kernel/kernel_textures.h
	intern/cycles/kernel/kernel_volume.h
	intern/cycles/render/attribute.cpp
	intern/cycles/render/scene.h
	intern/cycles/render/session.cpp
	intern/cycles/render/shader.cpp
	intern/cycles/util/util_task.cpp
2016-06-07 12:41:54 +02:00
2ad44606a1 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/kernel_globals.h
	intern/cycles/kernel/osl/osl_services.cpp
	intern/cycles/kernel/svm/svm_types.h
	intern/cycles/render/svm.cpp
	intern/cycles/util/util_task.cpp
2016-06-07 12:36:14 +02:00
0036ffb3e6 Cleanup: warning 2016-06-07 19:23:43 +10:00
0da13ad1eb World space switch for BI nodes.
At the moment light shading in Blender is produced in viewspace. Apparently, that's why
shader nodes work with normals in camera space. But it is not convenient for artists.
The more convenient approach is implemented in Cycles where normals are represented in world space.
Blend4Web Team designed the engine keeping in mind shader parameters readability,
so normals are interpreted in world space as well. And now our users have to use some tweaks, like
empty node group with the name "Replace", which is replacing one input by another on the engine side
(replacing working configuration in Blender Viewport by the configuration that has the same behavior in the engine).

This patch adds the ability to switch to world space for normals and lamp vector in BI and Viewport.
This patch is very important to us and we crave to see this patch in Blender 2.7 because
it will significantly simplify Blend4Web material creation workflow.

{F315547}

{F315548}

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D2046
2016-06-07 10:42:29 +03:00
441a440cbb readfile: optimization for undo
Was using O(n^2) lookup on ID's with undo.

This caused undo to hang with 1000's of data-blocks
(especially with heavy scenes & outliner-space, which doesn't even need to be visible to cause a slow-down).

Internally this uses a ghash per id-type, which is lazy-initialized.
Each key uses the name and library since there may be name collisions between libraries.

Developer Notes:

- Adds small `BKE_main_idmap_*` API.
- Needed to change linking order for this to build.
2016-06-07 17:27:52 +10:00
3054e33d67 BLO_idcode: Move ID_ID last
This lets us use MAX_LIBARRAY to loop over id-codes in Main.
2016-06-07 16:42:11 +10:00
2d9d17c031 readfile: avoid library lookups for every id on undo
Instead index libraries, makes minor speedup when using many libraries.
2016-06-07 14:13:22 +10:00
f12c55d2b8 Correct exit-code check 2016-06-07 14:02:32 +10:00
7a5a02509b Cycles: Use faster ray-quad-intersection test
The original quad intersection test works by just testing against the two triangles that define the quad.
However, in this case it's actually faster to use the same test that's also used for portals: Determining
the distance to the plane in which the quad lies, calculating the hitpoint and checking whether it's in the
quad by projecting onto the sides.

Reviewers: brecht, sergey, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D2045
2016-06-06 23:38:50 +02:00
ac7feaed3d EditNormal modifier: add some 'maximum angle' limit.
Allows to avoid generating flipped faces when using extreme normal modifications.

Related to T48576.
2016-06-06 21:42:47 +02:00
c8e9e6dda0 Added P key toggle to allow mouse movement to control bevel profile (modal).
The Shift key can be held while adjusting profile to make finer changes
to the profile (just as it already does when adjusting offset).
2016-06-06 13:15:13 -04:00
78f7d0b714 Cleanup: remove unused Library.idblock 2016-06-07 00:34:54 +10:00
420bd15262 Cleanup: warning 2016-06-07 00:34:16 +10:00
14f9a5aa1d Fix T48571: Cycles/GPU - A lot of fireflies on SSS+Volume
Was some accumulated precision error happening.
2016-06-06 15:56:22 +02:00
122c59fba4 Fix T48582: Rigidbody simulation issue with new depsgraph
Being granular means we need to re-build depsgraph a bit more often..

The issue was caused by rigidbody requiring some special nodes to
handle physics which were not created with just tagging object for
update.
2016-06-06 14:38:12 +02:00
c276480b0f Fix compilation error on 32 bit Windows 2016-06-06 14:01:49 +02:00
fd7068ee28 Fix T48550: Imperfections when Bake displacement map to plane if camera is not in front
The issue was caused by non-watertight nature of intersection, which is now addressed.

Hopefully it doesn't cause any regression caused by uninitialized precalculated storage.
2016-06-06 13:55:04 +02:00
b277ba5c0d Cycles: Fix compilation error on OSX 2016-06-06 13:52:57 +02:00
47d0d9cca4 Depsgraph: Russian electric tape bodge to have multiple proxies work
Makes behavior of proxy_from backlink working similar to the old dependency graph.

it's nasty, but needed here in the studio to get proxies fixes ASAP.
2016-06-06 12:09:04 +02:00
24049c8196 readfile: add assert to check libmap isn't sorted 2016-06-06 19:12:13 +10:00
5d45ffc755 readfile: minor optimization, no need to count flags
in this case we only need to check if any id's need to be read.
2016-06-06 19:05:21 +10:00
894d24fb16 Cleanup: use const for old member in OldNew struct 2016-06-06 18:04:13 +10:00
a97bcc2985 Cleanup: rename flag -> tag
ID's have a flag member too, best avoid confusion here.
2016-06-06 18:04:13 +10:00
6046c03f5c Cycles: Ignore zero size instances in BVH
In certain types of animation it's possible to have some objects
scaling to zero. In this case we can save render times by avoid
traversing such instances.

Better to do ti ahead of a time, so traversal stays simple.

Reviewers: lukasstockner97, dingto, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2048
2016-06-06 09:23:53 +02:00
b62faa54de Cycles: Add support of processor groups
Currently for windows only, this is an initial commit towards native
support of NUMA.

Current commit makes it so Cycles will use all logical processors on
Windows running on system with more than 64 threads.

Reviewers: juicyfruit, dingto, lukasstockner97, maiself, brecht

Subscribers: LazyDodo

Differential Revision: https://developer.blender.org/D2049
2016-06-06 09:14:37 +02:00
9d090ed1cd RNA: disable animating object dimensions 2016-06-06 12:57:17 +10:00
7f57c99be8 Fix T48579: RNA shadows new custom properties 2016-06-06 12:23:01 +10:00
04bcaf07dc Fix T48580: path / branched path UI grayed out with OpenCL device that is not used. 2016-06-04 23:21:44 +02:00
234801c8dc Fix T48587, constant fold should only be done for Mix Type. 2016-06-04 21:39:07 +02:00
1d8637ec69 buildbot work around cuda / msvc compatibility issues attempt 2/ passing a string from python to cmake to nvcc is harder then it looks 2016-06-04 17:41:11 +02:00
ebbfd92859 buildbot work around cuda / msvc compatibility issues 2016-06-04 12:37:46 +02:00
50f432b1e0 CMake, minor changes to make Visual studio 2015 use a compatible numpy and
the standard cmake CUDA/NVCC arguments flag allowing 2015 build to use
msvc 2013 for cuda
2016-06-04 11:42:48 +02:00
17fbce9549 Cleanup: avoid temp string edit 2016-06-04 10:55:14 +10:00
38410e6e25 changed use_connect from bool to a 3 state value (-1,0,1) 2016-06-03 18:31:51 +02:00
b000a01725 fix T48389 (wip) added warning for loops that define holes (polygons with holes not supported) 2016-06-03 18:31:49 +02:00
fac9f1c840 Workaround MSVC error 2016-06-04 01:00:40 +10:00
c6cc599311 Fix T48234: Glitch w/ action constraints sharing an action
FCurve evaluation depended on FCurve.curval, which isn't threadsafe.
Now only use this value for debug display,
and pass the value instead of storing in the FCurve for all but debug-display.
2016-06-04 00:57:44 +10:00
398180439b Fix Playercompile 2016-06-03 12:05:01 +02:00
b406b7be00 Cycles: Mark which CUDA device is used for display
It is really handy to know which one is display when having two cards of
same type in the machine.
2016-06-03 11:52:08 +02:00
f71feb34a3 Make playback invoked form animation editors more usable
This covers the following workflow. Animator will disable Update All 3D views
in order to get quick playback in a particular 3D editor. However, it also
handy to see playback in all editors and image editors to see comparison of
animation and reference footage.

So the idea here is to refresh reasonable editors when playback is invoked
from animation editors.

Commit to make Hjalti happy.
2016-06-03 11:46:57 +02:00
f54a98a1c5 Cycles: Simplify check for degenerated faces on GPU
Still not sure how to properly solve the issue, needs some trickery to get
actual optimized values from intersection function (using printf() avoids
some optimization and makes stuff render correct).

For the time being let's just simplify check.
2016-06-03 10:36:04 +02:00
e370806b38 Cleanup & simplify snapping functions
- the name of the enumerator `SNAP_NOT_OBEDIT` was changed to `SNAP_NOT_ACTIVE`.
- the parameter `snap_to_flag` was moved to outside `SnapObjectParams`.
- the member `use_object_edit` was renamed to `use_object_edit_cage`.
- added the arg `params` in `ED_transform_snap_object_project_ray`.
- simplifications in the loop of the function `snapObjectsRay`.
2016-06-03 16:56:16 +10:00
e9363483ca Fix possible uninitialized variable in snapping
Introduced in 0b5a0d84, thanks to Brecht for spotting.
2016-06-03 16:26:27 +10:00
8c154d67b2 Fix T48111: Auto-run fails w/ empty paths
Enabling auto-run, then excluding a path but leaving it set to a blank value would ignore all paths.
2016-06-03 15:28:32 +10:00
528539ef59 Fix T48575: Particle crash using 'Parting' setting 2016-06-03 15:13:20 +10:00
cd768a8df1 Add upstream information to wcwidth library 2016-06-03 02:43:24 +10:00
a055523899 Theme: 2.4x, correct graph region color 2016-06-03 01:59:53 +10:00
c5b2f12b36 Fix T48456: 2x pixel size clamps min brush size
Using double pixel size prevented 1px brushes

D2044 by @jeske
2016-06-03 01:11:12 +10:00
68d1348ca2 Fix T47637: Multiple multires objects in Sculpt mode make blender crash.
That was a nice and funny hunt, albeit rather time consumming!

To summarize, so far code was using a static global gpu_buffer for pbvh vbo drawing
of 'grid' types (multires mostly?).

There were two issues here:
1) Global gpu buffer was assigned to GPU_PBVH_Buffers->index_buf, but then nearly no
check was done when freeing that buffer, to ensure we were not freeing the global one
(not totally sure this one was actually causing any issue, but was bad and unsafe anyway).
Was solved by adding a flag to GPU_PBVH_Buffers to indicate when we are using some
'common' buffer here, which freeing is handled separately.

2) Main issue: if several multires objects in sculpt mode with different grid size
were present simultaneously, the global gpu buffer had to be resized for each object draw
(i.e., freed and re-allocated), but then the pbvh nodes from other objects storing freed reference
to that global buffer had no way to know that it had been freed, which was causing the segfault & crash.
Was solved by getting rid of that global buffer, and instead allocating one 'grid_commmon_gpu_buffer' per pbvh.

Told ya baby, globals are *PURE EVIL*!
2016-06-02 16:14:21 +02:00
ac8246cd89 Fix for GLSL uniform being update from inside glBegin/glEnd
This seems to be illegal and not productive anyway. Do it ahead of
a time now, which solves shading issues in edit mode and prevents
assert from happening.
2016-06-02 14:01:07 +02:00
Julian Eisel
664e854af7 Fix leak using UI_BTYPE_TEXT button w/o a callback
Moving ownership of the string to the button's 'rename_orig'
leaked when the button didn't have a uiAfterFunc.
2016-06-02 20:31:48 +10:00
64663b1f73 Cleanup: warnings in previous commit 2016-06-02 19:48:45 +10:00
cc7b817099 Minor edits to last commit
Failed with chunk merging disabled
2016-06-02 18:42:09 +10:00
0ce98b1ffb BLI_array_store: Move writing many chunks into a function
Minor optimization, avoid some checks each iteration.
2016-06-02 18:13:13 +10:00
7980c7c10f BLI_array_store: store max size in BArrayInfo 2016-06-02 18:05:11 +10:00
0bd8d6d194 Add extra validation checks to array-store 2016-06-02 16:41:41 +10:00
d931e958a1 Minor changes to help text
D2040 by @Blendify, also move 'Experimental Features' above more general help text.
2016-06-02 15:29:53 +10:00
1e9b222322 ShapeKey was missing lattice-flag
missed from 7a8bd2eae
2016-06-02 15:12:29 +10:00
c4b23a57a9 Fix T48566: Render-border minor offset issue 2016-06-02 12:53:04 +10:00
24712b1c0b Usual UI/i18n message cleanup (get rid of last remaining 'addon' too). 2016-06-01 20:38:30 +02:00
57d5ddc251 Revert "BLI_ghash: Fix initial over-allocation of mempool chunks."
Useless change in fact, sorry for the noise.

This reverts commit b08473680e.
2016-06-01 17:38:50 +02:00
6befc76265 Fix T48466: Multiple passes starting with 'Diffuse' in EXR file breaks its loading in Blender.
Issue here is that for Blender, any pass which name starts with 'Diffuse' is considered
a diffuse pass - and it does not really support several passes of the same type in renderresult.

So for now, passtype_from_name() is now checking whether a pass of same type already exists
in render layers, and return 0 (uknown passtype) in this case.
2016-06-01 17:31:42 +02:00
2c5dc66d5e Optimize mempool iteration
Around ~10% improvement in own tests.
2016-06-02 00:07:18 +10:00
b1704d18a1 Fix T48415: Segfault on opening .blend in which a 'surface' force object was saved in Edit mode.
In that case, surface modifier won't run (until surface object goes back to Object mode),
and its bvhtree remains NULL.
2016-06-01 15:29:19 +02:00
8cf8679b53 Revert "Correct invalid pointer-pair compare check"
This reverts commit d5e0e681ce.

Tsk, these functions return false on a match.
2016-06-01 23:08:40 +10:00
543c64ef74 Fix bug where corner boundary was straight when it should curve.
Some adjustments to how bevel edge 'profiles' are adjusted in some
cases. For the bug fix, wanted to handle cases of middle of three
coplanar beveled cases to make profile curve rather than linear
interpolate.
Also undid an earlier decision to make profile plane be perpendicular
to beveled edge i the non-coplanar case.
2016-06-01 08:51:08 -04:00
b08473680e BLI_ghash: Fix initial over-allocation of mempool chunks.
Code intended to create only one pool by default here, but code in `mempool_maxchunks()` would make it two.
2016-06-01 12:58:59 +02:00
9ed4233d9d Fix wrong vertex colors in edit mode 2016-06-01 11:53:28 +02:00
d0de2733d5 BI: fix counting of tangents, that was reset during recursion of init_render_nodetree 2016-06-01 12:28:48 +03:00
0e8570b415 GLSL: Attempt to fix errors in setting UV attributes 2016-06-01 10:26:18 +02:00
334d823b2b Depsgraph: Fix missing updates when modifying armature 2016-06-01 10:10:39 +02:00
1c292c9730 Fix/Workaround T48560: Color picker V fail w/ user defined RNA
Set the maximum soft-max to 1.0 when its left at FLT_MAX.
Since this causes problems using the slider.
2016-06-01 16:11:47 +10:00
Dalai Felinto
d85271572b Increase range of Font object textboxs
The current values were arbitrary. I'm keeping them as ui_range, but
internally there is no reason we can't use larger values.
2016-05-31 19:11:16 -03:00
aedeca7d1c BLI_mempool: Use an 'odd' FREEWORD for big/little endian
This also changes freeword to an intptr_t to ensure
not only the first 4 bits of a pointer are tested on 64bit systems.
2016-06-01 02:54:47 +10:00
d2bb0e660b Fix T46207: Slow OpenCL GPU bake and blown out baking Cycles render 2016-05-31 17:48:42 +02:00
Dalai Felinto
ad1c3bef8b Small API typo found while reading the API 2016-05-31 12:39:58 -03:00
a430c688ee Cleanup: unused defines 2016-06-01 00:26:14 +10:00
3df30c1a6e Cleanup: parenthesize defines 2016-06-01 00:19:01 +10:00
a0e91ef040 Fix T48554: Absolute grid snap fails w/ cursor pivot
Use center of selection when using absolute grid snapping and cursor pivot.
2016-06-01 00:01:17 +10:00
d5220d23f9 Cycles: Fixes for recent refactor
- add_vertex() can be called from split_vertex() which does not guarantee
  to have properly pre-allocate arrays.

- Need to check whether Cycles is compiled with OSL in XML reader.
2016-05-31 15:32:31 +02:00
230cf2e46d Buildbot: Attempt to fix buildbot after recent change 2016-05-31 15:28:32 +02:00
9e77a03f63 Buildbot: Use proper list management function
Spotted by Campbell, thanks!
2016-05-31 15:20:14 +02:00
f1f7f6d4b1 Buildbot: Pass proper generator for MSVC 2015 builder 2016-05-31 14:42:18 +02:00
e9c8917e10 Properly handle vertex color color space for Cycles GLSL
A bit tricky, need to pass additional information about what the attribute
is and how to deal with it.

BI path stays unchanged, just to make things simplier for now.

Fixes T48555: Cycles GLSL- Incorrect Vertex Color results from Attribute node
2016-05-31 14:41:51 +02:00
19cfc84328 CMake/ Visual Studio 14 2015, Use one library name for openal for both 2013 and 2015 2016-05-31 14:16:29 +02:00
9725661c60 Cycles GLSL: Make it work with software opengl mode 2016-05-31 12:31:16 +02:00
4388b29e98 Cycles: Add human readable sizes to debug output
Some of these values can get quite large and are hard to read, adding this
makes it easy to read them at a glance.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2039
2016-05-31 06:13:54 -04:00
a2aa44370b Fix T48556: Missing transparent shadows on AMD OpenCL
We had transparent shadows disabled for some time because they were causing
drivers to crash. Can't reproduce that issue anymore with current drivers,
so will enable them and see how it goes.
2016-05-31 11:48:07 +02:00
ea8a7397e4 Fix T48553: Cycles GLSL Box projection produces strong artifacts 2016-05-31 09:50:24 +02:00
4f730b4708 Fix T48552: Ctrl-D to add drivers shows disabled menu items 2016-05-31 16:30:44 +10:00
5186143d2c Theme: 2.4x disabled menu text wasn't greyed out 2016-05-31 14:55:55 +10:00
3ed5da0479 Fix T48547: Shrinkwrap fails w/ auxiliary target
Error in 0b5a0d84
2016-05-31 14:37:06 +10:00
0d4a7d50c6 Fix broken Cycles curve motion radius after recent refactor, and fix warnings. 2016-05-31 00:21:33 +02:00
1482826075 Add 'multi small' testcase to performance Ghash tests.
This new test simply inserts and lookup a lot of time on very small ghashes
(most are < 17 items).
2016-05-30 20:04:43 +02:00
7e120f3a74 Shrinkwrap: OMP->BLI_task.
Gives little to no speedup (a few percents at best).
2016-05-30 17:30:55 +02:00
06969fdf1b Depsgraph: Small optimization to update flushing
Gives about 5% speedup in scene with lots of nodes (army_of_clones.blend)
2016-05-30 16:56:05 +02:00
1e7e183787 Fix T48527: Maya keymap fails w/ knife snap 2016-05-30 22:45:46 +10:00
c9799b68f1 Depsgraph: Fix compilation with new depsgraph disabled 2016-05-30 14:44:56 +02:00
f0ee7f9544 CMake: Workaround to get Libmv compiled with latest Gcc 2016-05-30 14:37:33 +02:00
ce13a7b609 Fix: Add a hard upper limit for fontsize of Text Strip's text
Although there is a "UI limit", it's necessary to have the hard limit on the
property too. I noticed this bug first hand just now, when, after accidentally
setting the size to 8188 (due to a combination of typos and sluggish UI refresh)
my machine locked up completely when trying to jump to that frame. It got so bad
that I had to do a hard reset to fix it - so, it's possible that even 1000 or 2000
as used now are actually way too large still.
2016-05-30 23:45:58 +12:00
da975c59c2 GLSL: Fix voronoi texture giving different results form rendered 2016-05-30 13:07:11 +02:00
673fabbb64 Depsgraph: Fix wrong layers flush form children to parent
It was possible to have issues in cases when several child dependencies
goes to IDs with different layers. In this case order of flushing was not
really well defined, which could lead to cases when indirect dependency
via invisible object wouldn't work.

Need some sort of barrier to prevent scheduling of parent nodes for until
all children are done, but that's becoming quite nasty thing to implement.

Added a temp field to component for now. maybe it's not so crazy actually
and we might use it for evaluation as well, so we wouldn't flush updates
to components which does not affect visible stuff.
2016-05-30 12:35:03 +02:00
Ralf Hölzemer
4aaf7b0c7a Support all Cycles image texture projections in the GLSL viewport
This patch enables Tube, Sphere and Box projections in GLSL for the image texture node.

Reviewers: sergey

Projects: #nodes, #opengl_gfx

Differential Revision: https://developer.blender.org/D2036
2016-05-30 10:29:46 +02:00
0f86a545e7 GLSL: Fix magic colors being off 2016-05-30 10:22:18 +02:00
163e46bbea GLSL: Brick texture uses bit operations, which seems to be a failure on some Intel cards 2016-05-30 10:22:18 +02:00
665cb1b291 Change the hash-table to be 3x total items to hash 2016-05-30 18:00:03 +10:00
bd6a64ced7 Remove accidental static var 2016-05-30 17:27:06 +10:00
91bfdacde2 Editmesh undo memory optimization
Previously a whole mesh was stored between undo steps,
This commit uses BLI_array_store to de-duplicate memory use between undo steps.

Memory saving depends entirely on kinds of edits performed,
in own tests 5x-15x less memory use is common.

Compacting the memory does give some overhead however its done in a background thread
so its not blocking in most cases.

New behavior and threading can be ifdef'd out to check for regressions.

See D2026 for details.
2016-05-30 16:27:15 +10:00
8a7d1f3b3c BLI_array_store tests
Ensure the data is valid once expanded,
and that de-duplication is working as expected.
2016-05-30 16:27:12 +10:00
53b60eed45 Add BLI_array_store copy-on-write API
This supported in-memory de-duplication,
useful to avoid in-efficient memory use when storing multiple, similar arrays.
2016-05-30 16:18:24 +10:00
11b0874db0 Code refactor: store ShaderNode enums as enum rather than ustring. 2016-05-29 20:30:16 +02:00
a70a435f28 Code refactor: centralize OSL node creation in shader manager. 2016-05-29 20:30:16 +02:00
af073e149b Code refactor: pass ShaderInput to constant_fold, so it supports arbitrary types. 2016-05-29 20:30:16 +02:00
9bd2820aaf Code refactor: add separate RGB to BW node and rename some sockets. 2016-05-29 20:30:16 +02:00
eac7ed8d04 Code refactor: minor node and node type utility functions and changes. 2016-05-29 20:30:16 +02:00
7cd18dda7d Fix debug mode assert in subd code after recent refactoring. 2016-05-29 20:30:16 +02:00
e1003c2ead BKE's DerivedMesh: get rid of last OMP usage.
Not replacing with some BLI_task_stuff here, tests show this is pointless
(in absolute best case - i.e. single huge mesh in scene - parallelizing here switches
from 0.8ms to 0.5ms for that piece of code - with something like 750ms per frame update...).
2016-05-29 20:14:42 +02:00
3ed2b11a4d Fix T48507: Symmetrize doesn't work properly on Bendy Bones 2016-05-29 19:37:40 +12:00
df76d60267 Fix: Flip logic order for autokeying checking to cope with files where the flags have been set incorrectly
Sometimes the autokeying flags don't get set correctly (i.e. the "mode" flags
used for 'Add + Replace' vs 'Replace Only' aren't set), meaning that the old logic
would always fall through to the "replace only" case. When this happens, the resulting
behaviour can be quite strange and hard to debug. This fix prevents problems like
this from continuing to be an issue...
2016-05-29 19:08:45 +12:00
cd4d80fac6 added missing include 2016-05-29 01:38:14 +02:00
af185e1154 fixed some incompatible definitions (to make this work also on linux) 2016-05-29 01:30:20 +02:00
5366900ace Added support for non numeric bone layer labels (could happen when importing from other tools)
Differential Revision: https://developer.blender.org/D2037
2016-05-29 00:37:46 +02:00
8b2c67c3c3 collada exporter: fixed wrong check for bone roll value 2016-05-28 20:52:32 +02:00
362bd116d9 Fix T48529: NLA : viewport not updated after Track muted/unmuted.
Not sure why, but ANIM_animdata_update() totally ignored NLAStrip type of bAnimListElem.

For now only added support for ANIM_UPDATE_DEPS type of update, don't know whether
others are needed in this case or not... time will say.
2016-05-28 19:52:31 +02:00
8e26111020 Collada: Adding support for bone roll and bone layers
Differential Revision: https://developer.blender.org/D2034
2016-05-28 19:22:06 +02:00
001ba5bdf5 Code refactor: nodify object and mesh, but not used for XML yet.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 18:40:09 +02:00
c96a4c8a2a Code refactor: modify mesh storage to use arrays rather than vectors, separate some arrays.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 18:31:00 +02:00
b94bfe4cd8 Code refactor: make ShaderNode match Node a bit more, reusing types and enums.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 15:49:15 +02:00
a9f7bbc9f8 PyRNA: Fix repr used /w arrays
RNA arrays now display their index, with support for multi-dimensional arrays.
2016-05-28 22:30:25 +10:00
98ad473324 Code refactor: nodify Cycles camera and fix some mistakes in XML node read.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 14:07:19 +02:00
9d5aead88f Fix T48534: color picker hex #RRGGBB input allows typing one character too many.
Fix suggested by Daniel Rivera.
2016-05-28 12:38:21 +02:00
4ae507180e Fix T48498: stereo camera interocular distance should not have a hard max limit. 2016-05-28 12:22:34 +02:00
62f85add48 Fix T48526: Cycles viewport render incorrectly influenced by pixel aspect ratio.
This reverts 72592cfb, needs more refactoring to do that cleanup.
2016-05-28 11:57:27 +02:00
Ralf Hölzemer
739bf147a9 Fix T48533: camera node view vector wrong for Cycles GLSL.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2033
2016-05-28 11:38:10 +02:00
94e18c59f8 Add missing include 2016-05-28 10:25:46 +10:00
dc07a5561f Cleanup: Further tweaks for consistency and simplifications.
Now I can start adding half float without adding even bigger mess to all these functions. ;)
2016-05-27 23:35:29 +02:00
2f457b7649 Cleanup: Simplify and de-duplicate assignements in the ImageManager constructor. 2016-05-27 23:12:13 +02:00
2ee063868d Cleanup: Shorten texture variables, tex and image was kinda redundant.
Also make prefix consistent, so it starts with either TEX_NUM or TEX_START, followed by texture type and architecture.
2016-05-27 22:58:33 +02:00
bd678f179b ndof: detect SpaceMouse Enterprise
New device! Lots of buttons!
2016-05-27 15:34:40 -04:00
9449126d7a Depsgraph: Accidentally removed one line too much 2016-05-27 18:30:01 +02:00
55b24bef55 Depsgraph: Cleanup and code simplification
This is mainly a maintenance commit which was aimed to make work with
this module more pleasant and solve such issues as:

- Annoyance with looong files, which had craftload in them
- Usage of STL for the data structures we've got in BLI
- Possible symbol conflicts
- Not real clear layout of what is located where

So in this commit the following changes are done:

- STL is prohibited, it's not really predictable on various compilers,
  with our BLI algorithms we can predict things much better.

  There are still few usages of std::vector, but that we'll be
  solving later once we've got similar thing in BLI.

- Simplify foreach loops, avoid using const_iterator all over the place.

- New directory layout, which is hopefully easier to follow.

- Some files were split, some of them will be split soon.

  The idea of this is to split huge functions into own files with
  good documentation and everything.

- Removed stuff which was planned for use in the future but was never
  finished, tested or anything.

  Let's wipe it out for now, and bring back once we really start using
  it, so it'll be more clear if it solves our needs.

- All the internal routines were moved to DEG namespace to separate
  them better from rest of blender.

  Some places now annoyingly using DEG::foo, but that we can olve by
  moving some utility functions inside of the namespace.

While working on this we've found some hotspot in updates flush, so
now playback of blenrig is few percent faster (something like 96fps
with previous master and around 99-100fps after this change).

Not saying it's something final, there is still room for cleanup and
API simplification, but those might happen as a regular development
now without doing any global changes.
2016-05-27 18:01:18 +02:00
3d86a5bc72 more correct Normal Map node behavior for tangent mapping in Cycles Viewport 2016-05-27 14:45:13 +03:00
108b36f1ce Add upstream information to libraries 2016-05-27 20:03:27 +10:00
7dae62cde0 Cycles: Simplify code around debug stats in BVH traversing 2016-05-27 10:55:48 +02:00
c3eb7c4e9d Add some more information about extern libraries 2016-05-27 09:27:44 +02:00
1e32951477 OpenGL: use EXT version of FBOs
Blender 2.7x supports OpenGL 2.1 which has FBO only as an extension.

It was working fine, but this is more correct.
2016-05-27 00:19:32 -04:00
ab4aa2e3fb fixed collada api call for blenderplayer 2016-05-26 19:16:18 +02:00
1346482d23 moved is_leaf_bone() to collada utils for reuse in exporter and importer 2016-05-26 18:22:36 +02:00
29aa13cfa2 fix: Import of meshes with holes is now reported as WARNING (unsupported)
improved: add support for bone tail export/import using Blender Collada profile

Differential Revision: https://developer.blender.org/D2031
2016-05-26 17:53:25 +02:00
6a7ce064ad fix: Import of meshes with holes is now reported as WARNING (unsupported) 2016-05-26 17:41:41 +02:00
f87842a73a Image viewer scopes update: OMP->BLI_task.
Gives over 50% faster scope update (from 4.5ms to 2.2ms here with SD shot)!
Probably mostly due to more clever usage of thread-local data (which avoids any lock,
when OMP code had a rather stupid critical section for minmax)...
2016-05-26 14:33:26 +02:00
d5e0e681ce Correct invalid pointer-pair compare check 2016-05-26 22:20:12 +10:00
7424ded9c7 Cleanup: glsl style 2016-05-26 18:53:09 +10:00
fe766d9c7a BMesh: don't alloc zero sized select elem array 2016-05-26 15:56:12 +10:00
f2ba13964d Fix T48514: Cycles toon glossy BSDF not respecting reflective caustics option. 2016-05-25 21:13:24 +02:00
b49185df99 Cycles CUDA: reduce branched path stack memory by sharing indirect ShaderData.
Saves about 15% for the branched path kernel.
2016-05-25 21:13:24 +02:00
7928030eff Fix T47257: bevel crash when there are internal faces.
Bevel had assumed that when rebuilding a face that touches
a vertex with beveled edges, the edges of the face at that vertex
would be adjacent in internal order. That is not necessarily true
if there are edges with more than two faces attached.
We could just prohibit beveling any edges that touch a vertex
where this happens (we already don't bevel non-manifold edges)
but the use case in the model of T47257 seems reasonable.
Also had to fix the edge-ordering code, and the face reconstruction
code to take care of cases where the face normal may not be as expected.
2016-05-25 08:48:46 -04:00
cb2b776332 dd upstream information to libraries 2016-05-25 22:27:53 +10:00
cec629ae42 Depsgraph: Simplify some loops using foreach() 2016-05-25 13:52:02 +02:00
f83f7bb988 Add warning to Mesh.from_pydata 2016-05-25 21:35:45 +10:00
dcd2136f95 Depsgraph: Solve wrong datamask calculated by depsgraph
This is a weak concept, but nice t support it for now, so we can enable
new depsgraph by default earlier.
2016-05-25 13:00:30 +02:00
84c7f427f2 Cycles: Yet another fix for textures limit 2016-05-25 12:49:02 +02:00
15911eebda Move editmesh undo into its own file 2016-05-25 19:12:43 +10:00
18b418e8e0 Cycles: Fix wrong cuda textures limits 2016-05-24 17:02:19 +02:00
dc5a6a0aed Cycles: Fix wrong render results when using multiple OpenCL devices 2016-05-24 16:57:57 +02:00
5494ea1d08 Fix own mistake in D1120: wrong indexing of UV maps during tangent calculation 2016-05-24 17:43:57 +03:00
42b26206c6 Fix T48508: Cycles Regression / Crash 2016-05-24 14:53:34 +02:00
2e190abf70 Fix T48496: Viewer function in NodeWrangler addon don't work in Material Shading mode 2016-05-24 14:39:28 +02:00
800de8bffd Cleanup: indentation 2016-05-24 20:34:53 +10:00
e1dd83b399 Fix T48486: Not enough precision in Volume Sampling Step Size input
Volumes might be small, makes sense to use more precision here.
2016-05-24 12:17:06 +02:00
a7c3ec4feb GHOST cleanup (null check before delete, and 0 -> NULL for pointers).
Based on patch from Lawrence D'Oliveiro (ldo) in T48499.
2016-05-24 11:49:30 +02:00
0b588f0905 Forgot this in previous commit 2016-05-24 11:48:19 +02:00
8f04a228f7 Add upstream information to libraries 2016-05-24 11:46:53 +02:00
93b3f1c856 Sequencer's histogram view: OMP -> BLI_task.
New code using loop/finalize model is about 45% faster (from 4.4ms tp 2.4ms per frame,
overall playback of single shot in sequencer in this preview mode goes from 40 to 45fps).
2016-05-24 09:34:55 +02:00
886349fd98 ndof: build system cleanup
Only Linux needs a lib linked in (libspnav).

ghostndof3dconnexion refers to an obsolete Mac driver shim.
2016-05-24 01:57:17 -04:00
84e0839537 ndof: enable Linux support by default, unless libs missing 2016-05-24 00:35:17 -04:00
999d5a6785 Cycles CUDA: reduce stack memory by reusing ShaderData.
57% less for path and 48% less for branched path.
2016-05-23 22:29:24 +02:00
af4a04eae0 Fix T48487: Physics cache names allow (back)slashes, which breaks its handling.
For now, just validate new pointcache names as if they were filnames.

Ideal solution would be rather to validate names in `ptcache_filename()`, but it would
likely break some existing caches - and we'd also have to ensure we still have
uniqueness of name after it has been cleaned up, wich would not be trivial at this stage.

So let's go for simple solution for now, especially since this part of code is to be
fully rewritten in 2.8...
2016-05-23 17:45:44 +02:00
Ralf Hölzemer
a6b218af2e Enable correct GLSL output for cycles normalmap node
See T48453 for details and test scenes

Reviewers: a.romanov, sergey

Reviewed By: a.romanov, sergey

Projects: #opengl_gfx, #nodes

Differential Revision: https://developer.blender.org/D2011
2016-05-23 16:25:44 +03:00
66dceb2bed Add TODO about vertex color linearization to GLSL code
It's not really clear at this moment how we can detect cases
when attribute needs linearization. For now added a comment
so we don't forget about this, hopefully.
2016-05-23 14:43:03 +02:00
12f86a4e48 Fix wrong scale of vertex color values when doing border render of Cycles viewport 2016-05-23 14:40:04 +02:00
6d84a4ecfd Fix wrong vertex color in BI GLSL mode
The issue was caused by recent normalization added to the GLSL attributes.
2016-05-23 14:29:08 +02:00
2aa4b6045a Cycles: Fix wrong closure counter in feature adaptive kernel
Some closures were missing from calculation, leading to an array
under-allocation, presumable causing memory corruption issues with
emission shaders on OpenCL and was causing issues with Volume 3D
textures with CUDA.

The issue was identified by Thomas Dinges, the patch is different
from the original D2006. See the brief discussion there. Current
approach is similar (or the same) as Brecht suggested.
2016-05-23 14:09:27 +02:00
6894bb0555 Fix T48334: Cycles standalone xml import of uv coordinates
In Cycle standalone, the xml import of uv's is done in a way that
a vertex could only have one unique uv coordinate. In practice it
is most of the time not the case.

Patch by Laurent Boiron, thanks!
2016-05-23 13:38:15 +02:00
Stefan Werner
7a35a0f419 Fixed a rare case of NaN in Cycles
This fixes a rare case where NaNs could exist inside Cycles.

When certain invalid meshes were passed in, Cycles would try too normalize
a zero length normal during its setup stage. While it does check against
division by zero, it still returns a zero length normal and passes it on to
the path tracing kernel. The kernel then operates under the assumption that
normals are valid, and in the case of such a zero length normal, would
eventually create NaNs that propagate through and result in black pixels.

Reviewers: #cycles

Subscribers: brecht, sergey

Projects: #cycles

Differential Revision: https://developer.blender.org/D2008
2016-05-23 13:34:14 +02:00
cdcb0826ee B-Bones improve handle calculation
This changes the bezier handles b-bones to fit to a circle more closely.
2016-05-23 21:35:54 +10:00
a17cba339c BLI_math: Add function to calculate circular cubic curve tangents 2016-05-23 21:35:54 +10:00
abe98de63c Cycles: Fix missing feature reported by the Volume node 2016-05-23 12:58:25 +02:00
065c052cfb Cycles: Fix missing volumes support for feature-adaptive viewport render 2016-05-23 12:36:31 +02:00
cbbb021596 Fix for all OpenGL lights affecting Cycles viewport, regardless of their Enabled state
Was a regression since e1b8a5d.

Probably not very optimal fix, but better than a regression anyway.
2016-05-23 12:10:53 +02:00
de8494b54e Cleanup: glsl indentation, line length 2016-05-23 19:56:50 +10:00
caec6f3d41 Code cleanup, stick closer to a blender code style in GLSL shader 2016-05-23 10:31:36 +02:00
a830280688 Support Vertex Color in GLSL viewport for Cycles
The title says it all actually.

Added special custom data type, because we don't know in advance
whether we're referencing UV or Color layer. Also made it so vertex
attributes are normalized.

TODO: Border render in viewport ignores the normalization of the
attribute array for some reason, will be looked into still.

Reviewers: mont29, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D2022
2016-05-23 10:23:43 +02:00
a2669b0cbf Cleanup: Deduplicate image loading functions using templates. 2016-05-22 23:24:26 +02:00
84a9d171da Cleanup: Use short condition style. 2016-05-22 22:47:37 +02:00
27e4ce0cf6 Fix Cycles warning in release builds. 2016-05-22 19:42:45 +02:00
f7c28a66e2 Fix Cycles compile errors with GCC due to double promotion as errors. 2016-05-22 19:17:22 +02:00
2f978656ab Support Musgrave texture for Cycles GLSL viewport
Only for non-OSX viewport!
2016-05-22 19:10:15 +02:00
22ff9c5568 Fix T48497: Stupid typo in recent own BLI_task forloop work that broke non-parallelized case. 2016-05-22 18:35:44 +02:00
ca03eddfcc Cleanup: remove Cycles layer bits checking in the kernel.
At some point the idea was that we could have an optimization where we could
render multiple render layers without re-exporting the scene, by just updating
the layer bits. We are not doing this now and in practice with the available
render layer control like exclude layers it's not always possible anyway.

This makes it easier to support an arbitrary number of layers in the future
(hopefully this summer), and frees up some useful bits in the kernel.

Reviewed By: sergey, dingto

Differential Revision: https://developer.blender.org/D2020
2016-05-22 17:36:38 +02:00
9b9921b765 Code refactor: nodify Cycles shader and lights.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
e7d13b8a1d Code refactor: nodify Cycles background and film.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
0062d9f58c Code refactor: nodify Cycles integrator.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
226dc75e77 Code refactor: add generic Cycles XML node read and write functions.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
ec51175f1f Code refactor: add generic Cycles node infrastructure.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:24 +02:00
841d008b98 Fix missing Ignore option for GLSL bump 2016-05-22 16:47:06 +02:00
309f26014b Use previous shading mode for border render in viewport
This way we can have border rendered part in the viewport and have
everything else material/texture shaded.
2016-05-22 16:23:26 +02:00
0cc514ec84 Make Shift-Z in viewprot a toggle between current shading mode and rendered one
This way it is now possible to toggle between material and rendered shading
while previously rendered viewport will always go back to solid shading.
2016-05-22 15:44:18 +02:00
120492ace9 Cycles: Support bump mapping in GLSL viewport
This commit implements Bump node in GLSL, making it possible to
see previews of bump mapping in viewport without need to render.
Nothing really fancy going on here, just uses internal dFdx/dFdy
functions to get derivatives of the surface and map itself.
Quite basic but seems to behave correct-ish.

This commit also makes Displacement material output to affect
viewport shading by re-linking unconnected Normal input to a
node which was used for displacement output (via Bump node).

Intention of all this is to make it really easy to do bump map
painting with Cycles as an active render engine.

Reviewers: campbellbarton, mont29, brecht, psy-fi

Reviewed By: brecht

Subscribers: Blendify, eyecandy

Differential Revision: https://developer.blender.org/D2014
2016-05-22 15:12:14 +02:00
6115267a84 CMake: Solve compilation error with pre-compiled libraries and new GCC-6
Since version 6 G++ switched to C++11 by default, which breaks some logic
around WITH_CXX11 checks in out CMake files, leading to compilation errors.
This is easy to solve by explicitly enabling older C++ standard when C++11
was not explicitly enabled by CMake options.

However, G++-6 will also use new ABI by default even if older standard was
specified in the compiler options. This is being addressed by a special
define flag.

This tricks made it possible to use new G++-6 without need to recompile
any of pre-compiled libraries.

However, this might break compilation with existing system libraries, which
might already be using new ABI. We can't address this automatically, so
now we simply default WITH_C11 and WITH_CXX11 options to whatever defaults
of the current compiler are. This means, for G++-6 we'll set WITH_CXX11 to
truth. This should make linking with system libraries working just fine,
but to make pre-compiled libraries we still might need to disable CXX11.

This should work fine work for a new environments with G++-6 and install_deps
script run from scratch there, because C++ standard will be the same for
both Blender dependencies and Blender itself.
2016-05-22 13:48:52 +02:00
e21af38f69 Fix T48476: 'Recalculate Bone to Cursor' fails 2016-05-22 17:47:39 +10:00
24a3a9e8a3 Cleanup: remove unused doxy config 2016-05-22 17:15:08 +10:00
9bf09200d2 ndof: simplify Mac build
We don’t require the 3Dconnexion driver framework at build time.

No special link flags or include paths needed.
2016-05-21 18:29:55 -04:00
Sebastian Ullrich
6bd248cd65 Python API: add material to uniforms from gpu.export_shader.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1457
2016-05-21 16:46:42 +02:00
4bbc0731a0 Forgot to remove omp header include... 2016-05-21 16:12:30 +02:00
951db20862 Dynamicpaint: fix (unreported) missing progress bar in early baking stage.
Nothing was shown in UI during pre-bake step, while it can take several minutes
to complete with heavy geometry.
2016-05-21 16:09:35 +02:00
c1b7acda4c DynamicPaint: massive refactor, replace all OpenMP usage by BLI_task and other optimizations.
This commit makes Dynamicpaint modifier evaluation (during playback) a few percents quicker.
However, it makes dynapaint's 'image sequence' baking about 33% quicker (from 119 to 77 seconds
in own heavy test), partly due to switch to BLI_task itself (about 20%), and partly due to
optimizations (remaining ~13%).

As usual, did a lot of tests here to ensure nothing is broken, but a lot more users' testing would definitively
be welcome too! ;)

Note that some quite meaningless omp forloops have been removed (parallelizing thousands of vec copy does
make it two or three times quicker, but the few hundreds of microseconds gained do not make any difference
in a hundreds millisecond process).

Also, this code could still use a lot more cleanup (naming etc.), the way it (tries to) handle malloc faults
is also totally flacky and makes the code horribly verbose and convoluted in some places - without actually
catching all possible faults (memarena could make it more easy to handle here), etc.
2016-05-21 16:01:09 +02:00
3a73d31c56 BKE Mesh mapping: add 'vert to looptri' mapping generator. 2016-05-21 15:20:06 +02:00
92a3ac4dd2 GPencil: Add hotkeys for the "Delete Active Frame" operator
Usage:
* D+X     - Works anytime, anywhere
* Shift-X - Works in EditMode only
* Via Delete Menu - EditMode only

Often doing video tutorials or perhaps during dailies/shot review you want to
quickly get rid of a quick scribble you made for making a point, without having
to undo (i.e. maybe you edited some objects in between) and/or without having
to use the eraser (i.e. it'd take too long to cover the entire area).
2016-05-21 18:34:06 +12:00
b730238e6d GP Sculpt: Make the cursor more visible on light backgrounds
On light coloured backgrounds (especially on white), it was impossible to see
where the cursor was. This commit adds a second ring (black) to the cursor so
that on light backgrounds, even if the light ring isn't visible the black one
will be.
2016-05-21 18:34:05 +12:00
2203444f3f Hopefully fix OMP/MSVC crap... 2016-05-21 00:54:37 +02:00
a055395487 Dynapaint: Serious cleanup and optimization of dynamicPaint_createUVSurface (mostly).
Gives 3-4% speedup in pre-bake step (from 112 to 108 seconds with own heavy test file).

Note that here we have a huge potential performance boost if we replace the flat
`Bounds2D *faceBB` array of UV tris bounding boxes by a real 2D AABB tree (right now,
we can loop over all UV triangles times the number of pixels of the surface times 5...).
2016-05-20 23:18:15 +02:00
f5a4beffdd Fix GLSL shader failing to compile on OSX
Bit operations are not supported on legacy profile of OSX.
2016-05-20 22:54:27 +02:00
79d69bb9e3 Makefile: Use hidden FORCE target 2016-05-21 05:48:10 +10:00
ecf534e4c5 Support Cycles wave texture in GLSL viewport. 2016-05-20 21:21:57 +02:00
d5b843ba9d Support Cycles noise texture in GLSL viewport 2016-05-20 18:58:56 +02:00
bff095184a Cleanup: Don't use f suffix for values in GLSL
Was giving an issues in the past, will avoid it for now.
2016-05-20 18:14:04 +02:00
c6ea288bcf Support voronoi texture in GLSL shading
It gives some slight differences on the plane corners, but can't
really figure out source of the issue here yet.

It's still better than fully white texture for the previews anyway.

At this point we should perhaps ifdef chunks of the code in order
to have faster GLSL compilation and probably even faster compiled
code. Will look into this shortly.
2016-05-20 18:05:29 +02:00
ca8419ed6e Support Cycles magic texture in GLSL viewport 2016-05-20 16:58:56 +02:00
a5a05fc291 Cycles: Fix long compile time with MSVC.
Compile time per kernel increased alot after recent image commits, re-shuffle some code to fix this.

Patch by "LazyDodo".

Differential Revision: https://developer.blender.org/D2012
2016-05-20 16:50:29 +02:00
7ab55d8947 Support gradient Cycles texture in GLSL viewport 2016-05-20 16:39:45 +02:00
b79214bbc5 Support Cycles brick texture in GLSL viewport 2016-05-20 16:13:44 +02:00
0405bbeae2 Support Cycles's checker texture in GLSL shading 2016-05-20 15:18:40 +02:00
9d19533117 Fix T48472: issue in array refactor, causing performance regression in BVH build. 2016-05-20 10:58:11 +02:00
6e416b6bdf Fix T48470: Bendy Bones: Custom Handle References not being cleared when bone deleted
In addition to the original bug report, I've gone through cleaning up a range of
related bugs which only became clear when hunting around the code...

* Custom Handle References weren't getting cleared when the bones they used got
  deleted.  But, neither was the custom bone shape location/transform reference.

* Various places where posebone settings are copied around were also missing code
  to handle the new Bendy Bone properties.

  (WHY DO WE HAVE SO MANY VARIATIONS OF COPYING POSE DATA!?!?)

* If duplicating a Bendy Bone with custom references, and the custom references
  are also selected/duplicated, the new Bendy Bones will use the corresponding
  duplicated bones
2016-05-20 19:09:27 +12:00
75a31c3670 Add Peak Memory as render stamp option
This commit adds Peak Memory to the stamp options, the value is the same one that is already shown in the image viewer.

Requested by @nutel.

Reviewers: campbellbarton

Subscribers: campbellbarton, nutel

Differential Revision: https://developer.blender.org/D1989
2016-05-19 22:57:38 +02:00
ad14c471eb Cycles: Add XML parsing of MappingNodes to Cycles Standalone
Reviewers: dingto, sergey

Differential Revision: https://developer.blender.org/D2009
2016-05-19 21:28:57 +02:00
01e86b2c7d Cleanup: warnings 2016-05-20 05:14:17 +10:00
38f65c500c Fix T48204: Generic Tablet on Linux - Erratic strokes with pressure sensitivity enabled.
Once and for all - I hope!

So, for the records: Xinput1 events' valuators have a first_axis and axis_count defining the 'range'
of valid axes for that event - but valid data in the valuator's array **always** start at zero
(which means that, if event reports first axis as being axis 2, axis 2's value is in axis_data[0]).
2016-05-19 20:30:48 +02:00
dedc995018 Cycles / CUDA: Don't use bundled kernel if Adaptive is enforced by the user. 2016-05-19 16:32:57 +02:00
c5893db5cc Cleanup: misleading indentation 2016-05-19 23:37:23 +10:00
a4a968fd99 Dynapaint: parallelize drip effect.
Was not so far, because this effect is not modifying its 'own' PaintPoint, which means
it's not threadsafe. Since a global lock (mutex or spinlock) would not be much efficient
(we need to lock a given point pretty much all the computaion cycle), and since locking
a same PaintPOint from different threads at the same time is *very* unlikely,
solution here is to use an 'array of locks', one for each PaintPoint (same thing as BLI_bitmap,
using atomic ops to set/clear bits).

Here in own test (complex dynapaint over a huge sphere combining all dynapaint types), it gives
20% speedup of the whole dynapaint simulation!

Note: maybe we'd want to move that kind of bitlock into BLI lib some day - not totally sure how,
so let's keep it local for now...
2016-05-19 14:44:37 +02:00
4b810127ba Dynapaint: fix use of normal normalization in dynamicPaint_generateBakeData().
Vertex's normal is always normalized - and its conversion from short to float should not change that!
On the other hand, linear interpolation of three normals **does not give a normalized vector**
(unless all three inputs are exactly the same).

Also, minor optimization, avoid recomputing that interpolated normal twice for each PaintUVPoint.
2016-05-19 14:44:37 +02:00
c9f1ed1e4c Cycles: Add support for bindless textures.
This adds support for CUDA Texture objects (also known as Bindless textures) for Kepler GPUs (Geforce 6xx and above).
This is used for all 2D/3D textures, data still uses arrays as before.

User benefits:
* No more limits of image textures on Kepler.
 We had 5 float4 and 145 byte4 slots there before, now we have 1024 float4 and 1024 byte4.
 This can be extended further if we need to (just change the define).

* Single channel textures slots (byte and float) are now supported on Kepler as well (1024 slots for each type).

ToDo / Issues:
* 3D textures don't work yet, at least don't show up during render. I have no idea whats wrong yet.
* Dynamically allocate bindless_mapping array?

I hope Fermi still works fine, but that should be tested on a Fermi card before pushing to master.

Part of my GSoC 2016.

Reviewers: sergey, #cycles, brecht

Subscribers: swerner, jtheninja, brecht, sergey

Differential Revision: https://developer.blender.org/D1999
2016-05-19 13:14:37 +02:00
03f846ea12 Ignore vertex color when doing texture paint
It was totally useless to multiply diffuse color with the vertex color
when doing texture painting. It was masking actual texture and only was
forcing artists to create an empty vertex color layer to work this around.
2016-05-19 11:11:21 +02:00
89df6720be CMake: use signed char for recastnavigation
External libraries may need char to be signed.
2016-05-19 07:36:32 +10:00
20678138f7 Cleanup: CMake indentation
Also remove outdated comment
2016-05-19 07:12:14 +10:00
6988061bf1 Cuda wrangler: Fix very nasty bug with multiple scalar type qualifiers 2016-05-18 18:01:37 +02:00
3289f174ee Fix missing modifiers for mesh objects
All modifiers for all non-lattice objects were disabled after recent commit.
2016-05-18 17:36:52 +02:00
e34e5ce332 Theme Color Sets - Dynamically generated icons
The theme color set selector (for Bone Groups) will now show previews of
what each color set looks like. It does so using a 3-color band icon.
2016-05-19 03:25:38 +12:00
f74c7fcca2 Fix T47727: Weird bake results with non integer color values 2016-05-18 15:11:05 +02:00
7a8bd2eaea Fix T47737: Lattice crashes w/ smooth modifier
Add flag for modifiers that support lattice
2016-05-18 22:46:29 +10:00
cade8e25c6 Revert string splitting
Caused error on OSX
2016-05-18 22:05:53 +10:00
1283c66146 Revert part of 4adffde02c to get Windows (MSVC2013) compiling again 2016-05-18 23:42:53 +12:00
41a6829021 Depsgraph: Fix rest pose still using bone constraints 2016-05-18 11:38:52 +02:00
792e147e2c Cycles: Fix compilation error of CUDA kernels after recent volume commit
Apparently the code path with malloc() was enabled for CUDA.
2016-05-18 11:15:28 +02:00
cbe7f9dd03 Cycles: Pole merging for spherical stereo
The idea of pole merge is to fade interocular distance after a certain
altitude to zero when altitude goes closer to a pole. This should prevent
annoyances looking up in the sky or down to the bottom.

Works for both panorama and perspective cameras when Spherical Stereo
is enabled.

Reviewers: dfelinto, brecht

Reviewed By: brecht

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1998
2016-05-18 10:56:57 +02:00
7b356a8565 Cycles: Reduce amount of malloc() calls from the kernel
This commit makes it so malloc() is only happening once per volume and
once per transparent shadow query (per thread), improving scalability of
the code to multiple CPU cores.

Hard to measure this with a low-bottom i7 here currently, but from quick
tests seems volume sampling gave about 3-5% speedup.

The idea is to store allocated memory in kernel globals, which are per
thread on CPU already.

Reviewers: dingto, juicyfruit, lukasstockner97, maiself, brecht

Reviewed By: brecht

Subscribers: Blendify, nutel

Differential Revision: https://developer.blender.org/D1996
2016-05-18 10:14:24 +02:00
2433a537fa Cycles: Explicitly mark arguments as unused 2016-05-18 09:12:47 +02:00
e3218ded41 Fix T48395: Grease Pencil, pressing Ekey to sculpt don't work for left click configurations
When using Left Click select, it wasn't possible to sculpt using E+LMB.

I've changed the order of things in the keymap so that the select operator won't
end up catching and blocking all these events.
2016-05-18 17:23:16 +12:00
1139e51be6 Fix: "Whole Character" Keying Set should not include Location on bones with "connected" joint 2016-05-18 16:29:18 +12:00
4adffde02c Cleanup: cmake, indentation, line length 2016-05-18 11:58:08 +10:00
6f29dbd045 Fix issue in with multiple importance sampling in recent code refactor. 2016-05-18 01:51:30 +02:00
9dc5367c89 Cleanup code style inconsistency in last commits. 2016-05-17 23:41:45 +02:00
2630207ada Fix GCC/Linux build error after finite/isfinite changes. 2016-05-17 23:40:25 +02:00
21fddf7d1c C99/C++11: replace deprecated finite() by isfinite(). 2016-05-17 21:39:16 +02:00
2b73402547 Fix C++11 build issues on OS X, remove references to outdated libs. 2016-05-17 21:39:16 +02:00
0e8cd14dfe Code refactor: use shader pointers rather than shader indexes. 2016-05-17 21:39:16 +02:00
08670d3b81 Code refactor: use dynamic shader node array lengths now that OSL supports them. 2016-05-17 21:39:16 +02:00
93e4ae84ad Code refactor: add some array utility methods, fix leak in assignment operator. 2016-05-17 21:39:16 +02:00
df8097ea2a Bendy Bones: Small ui tweak
Change the order of the bending controls ("Curve XY Offsets") so the user can activate both InX and OutX by holding down the left mouse button. This way, it's easy to bend symmetrically on X or Y.
2016-05-17 18:08:04 +02:00
6cf7cc3393 Fix T48434: Missing meta support in new depsgraph 2016-05-17 17:52:23 +02:00
49aeee5a3d Bendy Bones: Advanced B-Bones for Easier + Simple Rigging
This commit/patch/branch brings a bunch of powerful new options for B-Bones and
for working with B-Bones, making it easier for animators to create their own
rigs, using fewer bones (which also means hopefully lighter + faster rigs ;)
This functionality was first demoed by Daniel at BConf15

Some highlights from this patch include:
* You can now directly control the shape of B-Bones using a series of properties
  instead of being restricted to trying to indirectly control them through the
  neighbouring bones.  See the "Bendy Bones" panel...

* B-Bones can be shaped in EditMode to define a "curved rest pose" for the bone.
  This is useful for things like eyebrows and mouths/eyelids

* You can now make B-Bones use custom bones as their reference bone handles,
  instead of only using the parent/child bones. To do so, enable the
  "Use Custom Reference Handles" toggle. If none are specified, then the BBone will
  only use the Bendy Bone properties.

* Constraints Head/Tail option can now slide along the B-Bone shape, instead of
  just linearly interpolating between the endpoints of the bone.

For more details, see:
* http://aligorith.blogspot.co.nz/2016/05/bendy-bones-dev-update.html
* http://aligorith.blogspot.co.nz/2016/05/an-in-depth-look-at-how-b-bones-work.html



-- Credits --
Original Idea: Daniel M Lara (pepeland)
Original Patch/Research: Jose Molina
Additional Development + Polish: Joshua Leung (aligorith)
Testing/Feedback: Daniel M Lara (pepeland), Juan Pablo Bouza (jpbouza)
2016-05-18 03:19:06 +12:00
29a17d54da Fix CUDA MEMCPY condition, it should only copy 3D, 2D or 1D.
Found by Brecht, thanks!
2016-05-17 00:37:34 +02:00
99d861169f Cycles / Requested Features: Volume was missing in logging print. 2016-05-17 00:36:22 +02:00
b90cc984f7 Usual i18n/UI messgaes fixes... 2016-05-16 21:46:55 +02:00
886ff72301 Remove strict header, gives issues with gcc5x 2016-05-17 05:26:09 +10:00
0096bae8c4 Cleanup: use const args 2016-05-17 03:07:40 +10:00
42f8232046 CustomData: Support for >2gig layers 2016-05-17 03:02:55 +10:00
2b02e03973 Cleanup: simplify checks calculating tangents 2016-05-17 02:18:11 +10:00
688858d3a8 BLI_task: Add new 'BLI_task_parallel_range_finalize()'.
Together with the extended loop callback and userdata_chunk, this allows to perform
cumulative tasks (like aggregation) in a lockfree way using local userdata_chunk to store temp data,
and once all workers have finished, to merge those userdata_chunks in the finalize callback
(from calling thread, so no need to lock here either).

Note that this changes how userdata_chunk is handled (now fully from 'main' thread,
which means a given worker thread will always get the same userdata_chunk, without
being re-initialized anymore to init value at start of each iter chunk).
2016-05-16 17:15:18 +02:00
5a7429c363 BLI_task: Add back lost 'push_from_thread' change to BLI_task_parallel_range() & co. 2016-05-16 17:00:15 +02:00
19955bd152 Fix T48447: Inactive menu items don't grey-out icons 2016-05-17 00:17:26 +10:00
575d7a9666 BLI_task: make foreach loop index hleper lockfree, take II.
New code is actually much, much better than first version, using 'fetch_and_add' atomic op
here allows us to get rid of the loop etc.

The broken CAS issue remains on windows, to be investigated...
2016-05-16 15:57:19 +02:00
75a96f8325 Atomic ops: add 'fetch_and_add_uint32' op.
Needed for next commit.
2016-05-16 15:56:39 +02:00
460d944493 Cleanup rna_Brush_direction_itemf()
Some variants of gcc compilation were reporting 'control reaching end of non-void function' error
in this switch/case maze. Either use break everywhere or not at all (which is simpler, since we
only always return anyway...).
2016-05-16 15:54:18 +02:00
22d53e558d Cycles: Cleanup after recent refactor
Wrong indentation, wrong spacing.
2016-05-16 10:55:50 +02:00
f70b548630 Revert "Docs: smoke typo corrections"
This reverts commit b13bc48932.

Wasn't only typo fixes, broke compiling
2016-05-16 09:28:49 +10:00
b13bc48932 Docs: smoke typo corrections
patch by @Blendify
2016-05-16 07:52:56 +10:00
a1a640f614 Curve Fitting: correct circular tangent length calculation
Method for scaling is still not perfect but quite close.
2016-05-16 07:45:50 +10:00
bb7da630ba Fix T48422: Revert "BLI_task: nano-optimizations to BLI_task_parallel_range feature."
There are some serious issues under windows, causing deadlocks somehow (not reproducible under linux so far).

Until further investigation over why this happens, better to revert to previous
spin-locked behavior.

This reverts commits a83bc4f597 and 98123ae916.
2016-05-15 21:14:40 +02:00
23bdcfe560 BGE: Fix KX_LightObject python API documentation.
Replace "..attribute::" by ".. attribute::".
2016-05-15 14:56:40 +00:00
20714889bf Fix T48425: Armature Symmetrize is flipping Custom Shape parameter.
In case not all bones are selected, not all possible mirrors are set in editbone->temp.ebone,
so we need to search them...
2016-05-15 12:35:01 +02:00
a83bc4f597 Fix an error in new lockfree parallel_range_next_iter_get() helper.
Reading the shared state->iter value after storing it in the 'reference' var could in theory
lead to a race condition setting state->iter value above state->stop, which would be 'deadly'.

This **may** be the cause of T48422, though I was not able to reproduce that issue so far.
2016-05-14 18:06:05 +02:00
b9996a3cc3 Fix Cube generated UV's rotated incorrectly 2016-05-14 23:01:59 +10:00
b1e2f8be23 Fix T48426: Use same length for all header message strings.
Some languages like Chinese or Japanese take three or four bytes per char...

Also fixed some missing translation markers for UI header messages.
2016-05-14 10:00:52 +02:00
ede742917a Correct BM_iter_mesh_bitmap_from_filter return 2016-05-14 04:49:42 +10:00
eeca6372d0 Correct asserts 2016-05-14 04:05:18 +10:00
24e887cd93 Fix script_paths(check_all=True) missing script paths
BLENDER_SYSTEM_SCRIPTS wasn't included in bpy.utils.script_paths()
2016-05-14 03:27:35 +10:00
89c6b58ef5 Fix compilation with strict compiler flags
Some const qualifier was discarding.
2016-05-13 17:37:39 +02:00
8b92d728ae Fix T48421: AO pass broken, only works when AO in cycles is enabled 2016-05-13 17:33:40 +02:00
141c0f8ad1 Cleanup: rna naming, indentation 2016-05-14 01:33:27 +10:00
a91a49ba8e Fix T48416: Impossible to copy a linked object from a file to another one mantaining the linked library.
When writing temp blenbuffer file, libraries of linked datablocks where not tagged correctly, which
means they were not put in the temp Main used to write the buffer, resulting in implicit localization
of linked data.
2016-05-13 14:12:10 +02:00
5e0ec49570 Fix T48416: Impossible to append from another file without localizing also all indirectly linked data.
Previous to 2.77, this used to be default behavior, was changed in rB591f4549c958b.

However, in most append cases, you do want a full localization of your data, so this new behavior
is kept by default, but there is now an option in append operator to only localize the 'first level'
of data (i.e. datablocks from linked library itself, and not those from other 'sub-libraries').
2016-05-13 14:12:10 +02:00
6276726bc4 Fix T47652: Texture shading mode fails to update material colors 2016-05-13 22:16:14 +10:00
029ccca0fe Armature meshdeform evaluation: parallelize computation of bbones deform matrices.
On big and complex rigs like blendrig or koro, it can give up to ~10% more FPS in best cases.
Hard to tackle all cases in tests though, so please report any unexpected slowdown
in armature animation playback!
2016-05-13 12:06:15 +02:00
868cfc5a4a BLI_task: add support for listbase parallelized for loops.
Code by @sergey, with small edits and doc by @mont29.
2016-05-13 12:06:15 +02:00
990fab73ea Cleanup: fix inconsitency in dynamicPaint_outputLayerExists()
Dyna WPaint indeed only uses first output layer, but better be consistent in those cases...
2016-05-13 12:06:15 +02:00
d4b8aa476b Dynapaint: cleanup of BKE code.
Line lengths, monolined 'if' statements, int -> bool, etc.

Also, replaced some internal cooked stuff by BLI helpers (most notably, the
'is inside UV triangle' code in `dynamicPaint_createUVSurface()`), and some
other minor optimizations.
2016-05-13 12:06:15 +02:00
ba6519f0a7 BLI_math: add 'equals_m4m4' (and 'm3' variant) helpers. 2016-05-13 12:06:15 +02:00
0903ee6ce2 Cycles: Scale debug pass with number of samples
This way it's easier to compare different renders together without
worrying about scale too much.
2016-05-13 11:22:18 +02:00
958d613f66 Image editor: Show actual value of single-channel buffer in sample info
Previously if image only had single channel only z buffer value was displaying.
This isn't handy for cases when you've got single channel buffer which is not
a z buffer.

Also fixed possible read past the array.
2016-05-13 11:22:18 +02:00
b72aef92c4 install_deps: Avoid conflicts on Arch-based systems when gcc-multilib is installed
install_deps can fail due to conflict between gcc (referenced by base-devel) and
gcc-multilib if the latter is installed. This avoids the conflict by filtering
the contents of base-devel when needed.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D1944
2016-05-12 18:17:14 -04:00
3c85e1ca1a Cycles: Add support for single channel byte textures.
This way, we also save 3/4th of memory for single channel byte textures (e.g. Bump Maps).

Note: In order for this to work, the texture *must* have 1 channel only.
In Gimp you can e.g. do that via the menu: Image -> Mode -> Grayscale
2016-05-12 14:51:42 +02:00
cde10e774c Fix array bounds compile warning. 2016-05-12 14:20:12 +02:00
86b509229f Fix T48413: editmesh intersect tool crash
Its important to add tri-edge intersections from both sides.
2016-05-12 21:00:08 +10:00
8d3f367c01 Correct debug prints 2016-05-12 20:59:48 +10:00
ea41207c3b Fix depsgraph tagging during the relations build pass.
Followup commit to 18e5e2fa1a. Needs the same
treatment in the second pass when ID tags are reset again.
2016-05-12 09:55:48 +02:00
80b1adf8c2 BMesh: avoid calling delete operator w/ face dissolve
In nearly all cases this isn't needed.
2016-05-12 16:47:30 +10:00
031715f743 Fix missing piece in recent rBce65fae8f32c (support for '+' key).
Thanks to Daniel Rivera (Dr2d4) for the headup!
2016-05-12 08:15:59 +02:00
689e45284b Recent bmesh face-join caused regression (T48407) 2016-05-12 16:11:42 +10:00
8de3303a03 Cleanup: Fix typo. 2016-05-12 02:11:36 +02:00
c5ddbf181e Armature outline drawing used single width line
Only set line width in pose-mode
2016-05-12 07:14:44 +10:00
d3ed8233ff BMesh: use active face fallback w/ select-path
From user perspective, last selected face is the same as the active face,
use this as a fallback.
2016-05-12 07:11:19 +10:00
16ce1b78b0 Cleanup: Remove outdated comment and add new one about slot IDs. 2016-05-11 22:25:48 +02:00
4a4f043bc4 Cycles: Add support for single channel float textures on CPU.
Until now, single channel textures were packed into a float4, wasting 3 floats per pixel. Memory usage of such textures is now reduced by 3/4.
Voxel Attributes such as density, flame and heat benefit from this, but also Bumpmaps with one channel.
This commit also includes some cleanup and code deduplication for image loading.

Example Smoke render from Cosmos Laundromat: http://www.pasteall.org/pic/show.php?id=102972
Memory here went down from ~600MB to ~300MB.

Reviewers: #cycles, brecht

Differential Revision: https://developer.blender.org/D1981
2016-05-11 21:58:34 +02:00
544b76ac9c BMesh: ignore non-manifold face connections
Was showing an error message,
now dissolve the faces that and delimit at non-manifold boundaries.
2016-05-12 06:00:05 +10:00
a46d930d8b BMesh: add BMW_ISLAND_MANIFOLD
An island walker that only walks over manifold edges.
2016-05-12 05:59:59 +10:00
f6948083e9 BMesh Island Walker: use direct loop access 2016-05-12 05:30:20 +10:00
135064c45e BMesh: remove exception from face-join function
Callers need to check for NULL, if we need to know exact cause it could be a return arg.
2016-05-12 04:42:45 +10:00
1b003511be BMesh: boundary walker, skip non-manifold loops
Instead of setting an exception, treat non-manifold edges as boundaries.
2016-05-12 04:39:01 +10:00
674bf2fe58 BMesh: add check for manifold loop 2016-05-12 04:37:36 +10:00
5d93836a61 Cleanup: only use r_ prefix for return args 2016-05-12 04:36:16 +10:00
fbbac6807a Cleanup: unused win32 headers 2016-05-12 04:35:40 +10:00
8dea74bb4f error in last commit 2016-05-12 01:43:56 +10:00
725a088ef9 Correct check for tree being in BVH cache 2016-05-12 01:40:50 +10:00
79d01de6b0 Remove pointer typedef from BVHCache
Used ** arguments unnecessarily,
also replace BLI_linklist_apply with while loop.
2016-05-12 01:40:46 +10:00
63432f1424 Fix crash snapping to mesh with no geometry 2016-05-12 01:00:43 +10:00
92774ff792 Cycles: Use explicit qualifier for single-argument constructors
Almost in all cases we want such constructors to be explicit, there are
exceptions but only in few places.
2016-05-11 16:51:14 +02:00
7df993425b Fix assert failure. 2016-05-11 14:18:47 +02:00
3d56c890e8 Clear map when releasing memory, add some debug prints. 2016-05-11 13:52:36 +02:00
cf18ebba7d Fix thread_ids vector having the wrong size. 2016-05-11 13:48:04 +02:00
d57f416e47 Fix incorrect FLT_MIN use 2016-05-11 21:36:42 +10:00
82aa159b85 Fix crash derefencing nullptrs. 2016-05-11 13:31:11 +02:00
1fd8c3e3f1 Merge branch 'openvdb' into cvdb_ray_isect 2016-05-11 12:48:58 +02:00
75976a24d7 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/kernel_globals.h
	intern/cycles/util/util_task.cpp
2016-05-11 12:48:42 +02:00
67d2de8828 Transform Volume rewrite/refactor
Take advantage of the efficiency provided by the snap_context.

Also fixes errors:
- volume snap fails based on view angle (T48394).
- multiple instances of dupli-objects break volume calculation.
2016-05-11 20:20:25 +10:00
4a135ad2b7 BMesh: correct fix for face-join removing attached faces 2016-05-11 20:12:52 +10:00
de72dcadbb Fix for inline documentation of FOREACH_NODETREE.
Was missing id macro variable.
2016-05-11 10:53:11 +02:00
18e5e2fa1a Fix for node tree ID tagging in new depsgraph.
Nested node trees are not handled in BKE_main_id_tag_all.
2016-05-11 10:53:11 +02:00
b4b269f38e Depsgraph: Add some missing relations
Those cases requires not only geometry component, but also a transform one
to be ready before evaluation can start.
2016-05-11 09:24:16 +02:00
35531657e5 BLI_kdopbvh: Use distance for BLI_bvhtree_ray_cast_all
Pass distance argument so its possible to limit the range we get all hits from.

Other changes:

- Use boundbox test before calling callback, avoids redundant calls.
- Remove meaningless return value.
- Add doc string, explaining purpose of this function.
2016-05-11 15:01:27 +10:00
a18f4d2bc6 CMake: optional date/time overrides for reproducible builds 2016-05-11 02:47:38 +10:00
c1e4aaa289 Fix T48387: Mirror weights keeps groups assigned
Swapping the weights kept zero weight verts assigned.
2016-05-11 02:47:38 +10:00
e525a06800 BMesh: only remove loose geometry when joining faces
Joining faces could remove faces that happened to share an edge that would normally be removed.
2016-05-11 02:47:38 +10:00
98123ae916 BLI_task: nano-optimizations to BLI_task_parallel_range feature.
This commit makes use of new taskpool feature (instead of allocating own tasks),
and removes the spinlock used to generate chunks (using atomic ops instead).

In best cases (dynamic scheduled loop with light processing func callback), we
get a few percents of speedup, in most cases there is no sensible enhancement.
2016-05-10 17:57:53 +02:00
fdd999042b Depsgraph: A bit of experiment with skipping where_is_bone if channels is taged as done
This is what old dependency graph was doing and apparently this avoids some updates,
however it's not really clear why those nodes are considering done. Maybe just because
of the way how relations are working. But needs a closer investigation.
2016-05-10 17:30:19 +02:00
e343e4a5ba Avoid per-constraint-target call of strlen
It's enough to do one single comparison to see if the string is empty or not.
2016-05-10 17:15:16 +02:00
2786b0bc9d Optimize action constraint by avoid memory allocation 2016-05-10 16:45:27 +02:00
e1a254d8de Attempt to fix blenplayer after recent changes 2016-05-10 16:14:24 +02:00
335274192e Revert "Task scheduler: Avoid mutex lock in number manipulation functions"
Appears mutex was guarateeing number of tasks is not modified at moments
when it's not expected. Removing those mutexes resulted in some hard-to-catch
locks where worker thread were waiting for work by all the tasks were already
done.

This reverts commit a1d8fe052c.
2016-05-10 15:43:03 +02:00
f501dfb085 Depsgraph: Use some more threading when tagging and finalizing evaluation
Also don't reset values there which were re-set on the next evaluation anyway.
2016-05-10 15:42:44 +02:00
a1d8fe052c Task scheduler: Avoid mutex lock in number manipulation functions
It seems using atomic operations here we can avoid having mute without
breaking anything.

Thanks Bastien for double-checking the changes!
2016-05-10 14:59:19 +02:00
9239257806 Fix T48393: Blender player doesn't start on files saved with with cyrillic letters in path 2016-05-10 14:31:00 +02:00
fcc2175710 Fix own mistake in rBd617de965ea20e5d5 from late December 2015.
Brain melt here, intention was to reduce number of tasks in case we have not much chunks of data to loop over,
not to increase it!

Note that this only affected dynamic scheduling.
2016-05-10 13:10:21 +02:00
898d040b0c Depsgraph: For big graphs update pending parents in threads
Gives additional speedup from ~88 to ~91 fps with a test rig.
2016-05-10 13:02:54 +02:00
288bbee5b1 Depsgraph: Comment evaluation priority out for now
It uses some additional compute power and the evaluation priority is
not even used.

This brings fps 88.2 with blenrig_for_debugging.blend on this desktop.
2016-05-10 12:05:09 +02:00
ce2c15deaf Depsgraph: Avoid multipel editors update per same ID
Simple thing, and apparently fps goes up to 80 with the demo file from jpbouza.

Not sure why at this point fps is so much higher than the old dependency graph
here now. And it's definitely something what others should verify as well.
2016-05-10 11:25:57 +02:00
12a20b78d3 Depsgraph: Don't leave active thread if there's only one children node
This reduces stress on the task scheduler and avoids some unwanted overhead
caused by all the threading business in the cases when there's only one
children node. We try to immediately switch to it's evaluation now, keeping
active thread up and running.

This bumps FPS from 58 to 64 on the blenrig test file from jpbouza.
2016-05-10 10:39:38 +02:00
7efa34d078 Task scheduler: Add thread-aware task push routines
This commit implements new function BLI_task_pool_push_from_thread()
who's main goal is to have less parasitic load on the CPU bu avoiding
memory allocations as much as possible, making taks pushing cheaper.

This function expects thread ID, which must be 0 for the thread from
which pool is created from (and from which wait_work() is called) and
for other threads it mush be the ID which was sent to the thread working
function.

This reduces allocations quite a bit in the new dependency graph,
hopefully gaining some visible speedup on a fewzillion core machines
(on my own machine can only see benefit in profiler, which shows
significant reduce of time wasted in the memory allocation).
2016-05-10 10:01:24 +02:00
401e710807 Correct armature-sketch snap context use
Use scene snap mode.
Also allow passing NULL ray-depth which falls back to BVH_RAYCAST_DIST_MAX.
2016-05-10 16:47:57 +10:00
ce65fae8f3 Fix T48369: Missing suport for main '+' key.
Many keyboard layouts (italian, spanish, german...) have direct access to '+' key on main
keyboard area (not the numpad one), ans x11 has own define for this key, so use it instead
of generating an unkown key event.

Note that we most likely have much more missing 'specific' keycodes for non-US keyboard layout,
but think since we already had a 'minus' keyevent, supporting 'plus' one is totally consistent.
And we had a spare space in our defined values just for it even!

This keyevent is only supported/generated by x11 and cocoa Ghost backends for now,
neither SDL nor win32 seem to have matching key events...
2016-05-10 08:29:03 +02:00
76481eaeff Cycles: Add support for float4 textures on OpenCL.
Title says it all, this adds OpenCL float4 texture support.

There is a bug in the code still, I get a "Out of ressources error" on nvidia hardware here, not sure whats wrong yet.
Will investigate further, but maybe someone else has an idea. :)

Reviewers: #cycles, brecht

Subscribers: brecht, candreacchio

Differential Revision: https://developer.blender.org/D1983
2016-05-10 02:53:50 +02:00
dc82c2cd48 View selected support for grease-pencil 2016-05-10 04:37:00 +10:00
119230b565 Cleanup: header, style 2016-05-10 03:03:34 +10:00
d8cf14fa67 Fix T48388: Undo history sculpt mode not visible 2016-05-10 02:42:14 +10:00
9513bdcaea Buildbot: Attempt to make sure install folder is always clean for Win and OSX 2016-05-09 17:34:02 +02:00
ba3ae9ea27 Cleanup and refactor our atomic library.
This commit:
* Removes most of all dirty internal details from public atomi_ops.h file, and move them into /intern private subdir.
* Removes unused 'architectures' (__apple__ and jemalloc).
* Split each implementation into its own file.
* Makes use of C99's limits.h system header to determine pointer and int size, instead of using fix hardcoded list of architectures.
* Introduces new 'faked' atomics ops for floats.

Note that we may add a lot more real and 'faked' atomic operations over integers and floats
(multiplication, division, bitshift, bitwise booleans, etc.), as needs arise.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1982
2016-05-09 17:03:08 +02:00
299a25cb35 Fix weight-mirror reporting invalid failed mirror verts
Use vertex tagging instead of clearing mirror index.
2016-05-10 00:57:00 +10:00
f616caa315 CMake: Fix compilation error when toolkit gives empty result
Should we also check whether toolkit exist perhaps?
2016-05-09 16:05:02 +02:00
df07303fbb Depsgraph: Avoid unneeded relations update when canceling transform
This was originally done for T46320 in order to re-store depsgraph state
after all the constraint modifications.

However, it relations were updated if there's any IK chain the the pose,
which is a bit too annoying.
2016-05-09 16:04:26 +02:00
5ae4487351 Missed last commit 2016-05-09 23:51:42 +10:00
6172bdbde8 Remove redundant error checks in grease-pencil tessellation 2016-05-09 23:47:57 +10:00
8b13555b24 Docs: comment polyfill2d functions 2016-05-09 23:47:57 +10:00
9ac35be63a Task scheduler: Don't calloc in performance-critical areas
Majority of the fields are being overwritten anyway, so calloc it
kinda waste of CPU ticks.
2016-05-09 14:54:24 +02:00
86a57b04bf Depsgraph: Store node input/output links in a vector rather than in set
Set is much slower to iterate through (due to cache misses and such) and
the only advantage of using set is faster removal of link. However, we are
iterating links much much more often than removing them, and even when we
are removing links we don't really need to remove link from nodes which it
connects -- we don't support partial depsgraph updates, so removing links
from nodes on destruction is a waste of time.

If we ever want to support partial updates we can have dedicated function
to remove link from nodes it connects.

This gives a surprising increase of fps from 42 to 56 with test file from
Mr. J.P.Bouza (blenrig_for_debugging.blend). Surprising because old DEG is
actually slower here (52 fps). Didn't see any regressions (and don't see
why they will happen), so let's ask our riggers and animators to perform
further speed tests ;)
2016-05-09 12:42:53 +02:00
5dbeea95d0 Depsgraph: Avoid having per-node lock when scheduling children
Use atomic operations instead, should in theory improve timing of
scheduling. However, probably not so visible yet because actual
task scheduling still have some locks and memory allocations.

Baby steps, what would i say.
2016-05-09 11:58:36 +02:00
dc5e02c42c Atomics: Add atomic_fetch_and_or_uint8() function
Hopefully it compiles on all platforms still..
2016-05-09 11:45:43 +02:00
a27772cd66 Fix makesdna not checking alignment for a non-native platform
This was causing alignment issues which were only visible on a platform
of particular bitness, so it was easy to break stuff for 32bit when
working on 64bit platform and vice versa.
2016-05-09 09:54:51 +02:00
3ce3163379 Fixes for GPencil Copy and Paste
* Fix "Attempt to free NULL pointer" when copying strokes for the first time

* Fix poll callback on "paste" operator, so that it is possible to paste
  strokes when there are no editable strokes visible.
2016-05-09 19:42:34 +12:00
d6555d936c Cleanup: Avoid duplicative defines for CPU textures, use the ones from util_texture.h
Also includes some further byte -> byte4 renaming, missed that in last commit.
2016-05-09 09:16:41 +02:00
e0e7d94f79 Fix error introduced by removing faces before executing bridge
Commit 86abddc9, caused an error when the face-region included boundary edges.
Since removing the faces first, caused the edges along the boundaries to be removed.

Add support for deleting faces and internal edges, that keeps boundaries.
2016-05-09 16:21:00 +10:00
69be8d7cbd Fix error in recent snap refactor
Crash in edge snapping
2016-05-09 15:46:34 +10:00
73fab5bb3f Fix crash introduced w/ snap refactor
Create snapping context when in the 3d view,
transforming pose bones and grease-pencil crashed.
2016-05-09 15:46:34 +10:00
dc4c3ce592 GPencil: Added operators to select first and last points of strokes
These are useful for removing overshoots at the end of closed strokes (for fills)
2016-05-09 17:23:36 +12:00
0578d3ef3e Graph Editor: Ctrl-Click keyframing now deselects all existing keyframes by default
Now, when creating new keyframes in the graph editor by ctrl-clicking, only
the newly created keyframes will be selected. This is a little workflow tweak
to make it faster to work, as you no longer have to deselect all, and then
re-select the newly added keys in order to manipulate them.

The old behaviour (not modifying the selection status of the old keys) has been
kept, but is now available via Shift-Ctrl-Click.

Feature request from @Shhlife
2016-05-09 17:23:35 +12:00
9a1e11260c Cleanup: More byte -> byte4 renaming for consistency. 2016-05-09 02:22:01 +02:00
5fe1bea2da Info Header / URLs: Fix community link + https'ification. 2016-05-08 23:38:41 +02:00
98e2135a2d Fix T48380: fix for recent image manager code cleanup. 2016-05-08 21:41:25 +02:00
a815e10211 Code cleanup: use special type instead of node names. 2016-05-08 20:21:04 +02:00
dfe9aa25c3 Code cleanup: tweaks to image manager code found while looking into previous bug. 2016-05-08 20:20:53 +02:00
e362b04c43 Fix T48377: Cycles crash removing float image texture node during viewport render. 2016-05-08 19:48:22 +02:00
5fde5616e0 Fix T48372: missing OS X trackpad scroll support for increasing loop cut / bevel segments. 2016-05-08 19:06:48 +02:00
2d8db0de79 Docs: explain some details of RNA enums 2016-05-09 02:37:34 +10:00
cbaa25eb88 Cycles: Fix two small memory leaks and deduplicate table freeing
This commit makes remove_table skip the freeing if the offset is
already set to invalid - or, if it wasn't, set it to invalid after freeing.

That's what the current code was already doing in the Manager classes,
this change allows them to just call remove without the additional code.

Also, two potential memory leaks where new tables were always allocated
without freeing the old ones are fixed.

Reviewers: sergey, dingto, brecht

Differential Revision: https://developer.blender.org/D1974
2016-05-08 17:44:03 +02:00
6100c2d262 Cleanup: warnings 2016-05-09 01:16:58 +10:00
e2b79a0a24 GPencil Onion Skinning: Setting before/after to -1 will turn off onionskinning in that direction
This is an experimental option that I found would have been useful to have,
when making my earlier anim test. The only contentious point is whether it's
better to use a separate boolean flag (perhaps bound to the labels) instead
of overloading this setting (and describing the usage in the tooltip).
2016-05-09 03:03:40 +12:00
d6fd6d18d7 Fix: Toggling "lock layer" for GPencil layers in the dopesheet didn't update the layers UI 2016-05-09 02:49:32 +12:00
c4a5c26a59 Fix: Lasso select for Grease Pencil doesn't work in the Nodes Editor
In the nodes editor, Ctrl-LMB-drag is taken by "Cut", and it seems impossible
for any other keymap to override that. Instead, the default lasso select hotkey
there is Ctrl-Alt-LMB-drag instead.

To get Grease Pencil lasso select (in GP Editmode) to work in the Nodes Editor too,
this commit adds the Ctrl-Alt-LMB-drag binding here too. However, to make things easier,
this extra binding will be part of the Grease Pencil keymap everywhere. There doesn't
seem to be any conflicts with having this in place - until we find them, this should
be ok to have.
2016-05-09 02:44:21 +12:00
491ad6664e Tweak to GPencil layers UI layout
I'm still not happy with this layout as it is now, but it seems a bit less unbalanced
than what I'd been trying before. So, let's leave this as-is for now.
2016-05-09 02:04:28 +12:00
3f934b06a6 Tweaks for a tooltip I missed during earlier review for D1886 2016-05-09 02:00:23 +12:00
d4ed5c398e A "better" (?) fix for msvc silliness - used in one other place in all of Blender 2016-05-09 01:46:18 +12:00
e43ee5563b Fix compiling on MSVC - M_PI undefined 2016-05-09 01:31:13 +12:00
81c302bbff Action Editor: Initial support for a Properties Region
This commit adds some of the initial support for a properties region in the
Action Editor. There are currently no panels to display, as there is still
a lot of work required to port over the required internal architecture to
support the panels seen in the Graph Editor.
2016-05-09 00:53:52 +12:00
9dbe7bbe9a D1886: GPencil - Add smooth iterations parameter to get better quality
After some test, a new iteration parameter has been added in order to
apply repetitive smoothing to the stroke. By default 1 iteration is applied,
but can used any number between 1 and 3.

The repetition uses different levels of intensity from 100% of the defined smooth
factor for the first loop, 50% for the second and 25% for the third. We use in each
loop a smaller value in order to avoid deform too much the stroke.
2016-05-09 00:53:51 +12:00
dc78e47b77 Fix for D1705: Update to fix the bug with extra triangles that produces glitches in some situations 2016-05-09 00:53:51 +12:00
011786a3f8 GPencil Fills: Small reshuffle of UI buttons
Now, stroke-related things (thickness, volumetric, points) and fill-related things
(HQ fill) are in the relevant columns, instead of having some in each column.
2016-05-09 00:53:50 +12:00
b88535ed28 Code Cleanup: Just a bit more tidying up comments/whitespace/etc.
There is still some instability in how the triangulations are happening,
where the triangle count of the resulting triangulation fluctuates resulting
in weird artifacts sometimes.

To reproduce, try drawing some U-shapes, and keep reloading the file.
2016-05-09 00:53:49 +12:00
af8a54bd8d Fix for potential bug with new GP Fill
While trying to track down why I still keep getting some random "extra" triangles
showing up when reloading files with fills, I noticed that there's an index mismatch
here that may cause problems in some rare cases:

There are "gps->totpoints" items in tmp_triangles, but there should only be
"gps->tot_triangles" triangles in the gps->triangles array. If for whatever reason
some of the triangles in tmp_triangles are invalid, this could have meant that
while a tmp_triangles candidate was skipped, a corresponding slot for a valid
triangle also got skipped.
2016-05-09 00:53:49 +12:00
f5ddcfeb03 Code Cleanups: A bunch of tweaks to tidy up things from the GPencil Fill patch 2016-05-09 00:53:48 +12:00
1d5c71bca7 D1705: Fix Grease Pencil Fill for Concave Shapes
Improve filling for concave shapes using a triangulation of the stroke.
The triangulation information is saved in an internal cache and only is
recalculated if the stroke changes.

The triangulation is not saved in .blend file.

Reviewers: aligorith

Maniphest Tasks: T47102

Differential Revision: https://developer.blender.org/D1705
2016-05-09 00:53:47 +12:00
0411cfea9d Fix T48373: Crash when using dynamic paint with brush material.
`dynamicPaint_doMaterialTex` was called from inside an omp parallel section with brush->dm
itself, and not the local dm copy. Generating looptri data is not thread safe at all...
2016-05-08 11:39:45 +02:00
1955754934 Cycles: Cleanup: Swap order of the RNG-state-initializing for-loops
Swap the for-loops in the RenderBuffer reset code to follow the convention
of looping over y in the outer loop.
The improved cache performance won't really be noticable here, but it's nicer
if it follows the usual style.
2016-05-08 01:22:28 +02:00
e5b4e6b0a3 Clamp dot-product to avoid precision error
Would only happen in degenerate cases.
2016-05-08 00:04:05 +10:00
1c46ecd86b Cleanup: Remove unneded (void) line, we don't have ifdefs here anymore. 2016-05-07 15:55:28 +02:00
a3b42d638b Cleanup: whicespace 2016-05-07 23:58:04 +10:00
b132f3ac7b Correct render-border line width 2016-05-07 23:53:35 +10:00
6d402610c1 Correct error in wrapped array-span-iteration 2016-05-07 23:48:53 +10:00
f5930759a6 Fix T48368: Cycles mix RGB constant folding bug after recent refactor. 2016-05-07 14:21:15 +02:00
68e856da03 Curve Fitting: better fallback when least-square solution fails
Take curvature into account when calculating handle length.

Gives significantly better results for curve dissolve and 10-20% more efficient freehand drawing.
2016-05-07 21:48:00 +10:00
d2296cd5ec Fix error copying cubic data 2016-05-07 21:38:48 +10:00
65dd1d7d08 Fix T48362: Spin tool broken after recent commit.
Typo in rBrBa48d74079, spin tool was now using the wrong view axis.
2016-05-07 11:58:33 +02:00
Martijn Berger
0a277f7428 Fix cycles-xml with OSL support after changes inroduced in 1422f0dd16 2016-05-07 10:50:21 +02:00
4422b3f919 Some fixes for CUDA runtime compile:
* When Baking wasn't used we got an error.
* On top of Volume Nodes (NODES_FEATURE_VOLUME), we now also check if we need volume sampling code,
so we can disable that as well and save some further compilation time.
2016-05-06 23:13:33 +02:00
734d1aec3f Cycles: Make CUDA adaptive feature compile a Debug flag.
If the CUDA Toolkit is installed and the user is on Linux,
adaptive, feature based CUDA runtime compile is now possible to enable via:

* Environment flag CYCLES_CUDA_ADAPTIVE_COMPILE or
* Debug menu (Debug value 256) in the Cycles UI.
2016-05-06 23:13:33 +02:00
bd335f13fe Fix T47657: Using template_list() with invoke_props_dialog()
popups have no wm_region in context, using wm_menu here.

Not working perfect, but at least it prevents crash.
2016-05-06 21:56:54 +02:00
8c2cec937b Fix T48262: Crash when trying to render a scene without camera. 2016-05-06 21:41:56 +02:00
e074554f8f Image Editor: Add border zoom
Use Shift-B, UV border-select-pinned is now Ctrl-B.

Patch from @rav66
2016-05-07 04:32:08 +10:00
ddbc351dd3 Fix recent issue in recent BVH snap/cache
The derivedMesh could free a tree stored by the cache.
Now check the cached tree is valid.
2016-05-07 02:59:19 +10:00
9c6f33c405 Correct in-range assert (zero is valid) 2016-05-07 02:16:21 +10:00
9f96976e59 DerivedMesh: don't allocate a new material array each draw 2016-05-07 02:16:21 +10:00
bd309603c5 Clip invisible parts of image when drawing in 2D textures and GLSL Modes
This commit avoids draw of invisible parts of image in image editor,
making it faster to re-draw the image.

Especially handy when painting on a high-res image when zoomed-in.
2016-05-06 16:54:07 +02:00
dd52bf8fb9 Cleanup: Move full SVM statistics to VLOG(2) verbosity level. 2016-05-06 14:39:41 +02:00
3807bcb3a8 Cleanup: Rename texture slots to float4 and byte, to distinguish from future float (single channel) and half_float slots.
Should be no functional changes, tested CPU and CUDA.
2016-05-06 14:37:35 +02:00
36d8a70b00 Code refactor: Change Cycles ImageManager arrays.
This commit simplifies the code for the image arrays. Instead of having 2 arrays for float and byte textures,
we now use an array here. This simplifies the code (avoids code duplication), and makes it possible to easily extend it
with float1 and half-float types in the future.

Only tested with CPU yet, plus some cleanup / code de-duplication is still possible here.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: jesterking, sergey

Differential Revision: https://developer.blender.org/D1969
2016-05-06 13:20:09 +02:00
8aa3bac7af Tweak precision for interocular distance and convergence plane
Previous number of digits after point was not really useful, especially
for the interocular distance where it's quite common to go sub-cm precision.
2016-05-06 12:32:23 +02:00
ef0c02cb4d Speedup of regular 2D painting
Yet another commit which makes painting aware of multi-threaded systems.
2016-05-06 11:49:09 +02:00
204f55c189 Cloth: Fix shrinking to properly respond to animated min/max and weight.
Enable dynamic restlen recomputation based on sew flag and update the
shrink factor math within it to call the new utility function.
2016-05-06 11:40:20 +03:00
2a9ddc808d Cloth: Change ClothVertex::xrest to actually store the rest position.
Originally the value was only needed when building the springs,
so a pointer to the input data was somewhat ok. However, recalculating
spring length dynamically requires keeping the actual value around.
2016-05-06 11:40:19 +03:00
Luca Rood
fcfbe27826 Part of D1903: Dynamic base mesh for cloth simulation
A function that recalculates cloth spring lengths.
2016-05-06 11:40:19 +03:00
8e1ab9b137 Cloth: Ignore zero-restlen sewing springs in average length computation.
The average length is used to adjust self-collision and stiffness
to match mesh density, and in either case considering the always zero
restlen sewing springs doesn't actually make much sense.

The struct_springs variable is also used for other things like total
spring count, so a new one needed for the true struct springs.
2016-05-06 11:40:19 +03:00
b481e886e5 Cloth: Use Geometrical Mean for averaging cloth shrink factor.
This comes out of considering a one-dimensional transition in weight
on a rectangular cloth grid. At the transition face loop, one side
of each rectangular face would be scaled by k1, and the opposite one
by k2, thus turning the rectangle into a trapezoid. Averaging would
be used to choose the scale factor for the remaining two sides.

If Geometrical Mean, i.e. sqrt(k1*k2) is used, it so happens that the
diagonals of the trapezoid also end up scaled by sqrt(k1*k2) compared
to the original rectangle. This means that the same scale factor is
correct for both structural and shear springs, which is not the case
with simple average.
2016-05-06 11:40:19 +03:00
8d22a8afa0 Cloth: Fix the shrink feature to be controlled by the sewing spring flag.
Previously it was all over the place: without a vertex group it was
always enabled, and with it it depended on the Self Collision option
due to a likely editing mistake. Now it should be in sync with what
disables the fields in the UI.

The verts->shrink_factor field is changed to just cache the vertex
weight, with the shrink_min/shrink_max interpolation done later.
This is because cloth_apply_vgroup only runs if there are vertex
groups, and thus the factor may not update after property changes.

In addition, bending springs are now also affected by the shrink
factor to avoid visible distortion in object shape at high shrink.
2016-05-06 11:40:19 +03:00
ae3f68109d Cloth: Invalidate cache when sewing springs are toggled on or off. 2016-05-06 11:40:19 +03:00
7ecc159f37 Force Fields: Fix Texture with both Use Coordinates and 2D enabled.
From description, Use Coordinates evaluates the texture using
target coordinates in the local space of the force field object.
2D is supposed to ignore the Z coordinate. Thus one would assume
that if both are enabled, the force field effect would move with
the force field object, and Z would be 0.

However, instead first the 2D option projects points onto a plane
passing through the global zero and orthogonal to the local Z,
and only then the resulting point is transformed into local space.
Z is not locked at 0, so procedural textures like Spherical Blend
don't work as expected.

To fix this, apply local transform first, and then just clear Z if 2D.
2016-05-06 11:40:18 +03:00
8cc4f3f52a Implement threaded partial display buffer update
This speeds up update of display buffer when affected area is big enough.

Mainly helpful for cases when doing long fast strokes when painting.
2016-05-06 10:04:29 +02:00
bc1a7d9283 Cleanup: warnings
Values set but not used
2016-05-06 16:49:25 +10:00
304501193b Fix T48356: Bridge tool creates self-intersecting loop
When loops are planar to eachother, initialize their winding based on surrounding geometry.
2016-05-06 10:22:02 +10:00
86abddc96a Fix error bridging edge loops flipping
Calculating the winding failed when faces exist on both sides of the edge.
2016-05-06 08:53:51 +10:00
37ad451b8e Cycles: Comment out unused function arguments 2016-05-05 23:47:22 +02:00
9b89071c9c Multi-thread generated image creation
Gives about 2x speedup on laptop when creating new hires generated image,
regardless of it's type (color, color grid, uv grid).
2016-05-05 23:47:22 +02:00
3064270e13 Correct snap checks for edges & faces
Snap targets can't contain vertices which are being transformed
2016-05-06 07:44:07 +10:00
5e72ea4397 Don't overwrite existing snap context
Re-activating transform would overwrite previous context, leaking memory.
2016-05-06 06:47:21 +10:00
d12378da11 Cleanup: style 2016-05-06 06:34:25 +10:00
ee5eb2a26a Missed last commit 2016-05-06 06:28:36 +10:00
55c4889864 bvhutils: remove bitmap counting
All callers pass in valid number
2016-05-06 06:14:36 +10:00
c5a26bef5d Cleanup: rename getepsilon -> get_epsilon 2016-05-06 06:14:36 +10:00
cc650c3d07 Add asserts to check bvhutils args are correct
Would have prevented previous error going unnoticed.
2016-05-06 06:14:36 +10:00
7efdee7517 Fix crash adding byte color grid images 2016-05-05 22:05:09 +02:00
7b7e7ac4c1 Code cleanup: simplify SVM stack assignment. 2016-05-05 21:43:46 +02:00
0f943337bc Code cleanup: remove some unused functions. 2016-05-05 21:43:46 +02:00
dd8bfa0929 Code refactor: reduce special node types, use generic constant folding. 2016-05-05 21:43:46 +02:00
2cfadecf97 Fix Cycles emission node being unnecessarily tagged as spatially varying. 2016-05-05 21:43:46 +02:00
9a20ff2b52 Fix OS X build error after SSE changes, BLI_math_base.h conflicts with EXR headers. 2016-05-05 21:43:46 +02:00
4aaafcbc45 Fix for fix, sorry for the noise 2016-05-06 05:46:07 +10:00
2812a8f7eb Missed last commit 2016-05-06 05:42:33 +10:00
7122b05ac3 Correct own mistake int recent transform API edits
Need to return number of enabled elements.
2016-05-06 05:40:07 +10:00
46ccc54faf Fix error not using the cached BVH tree 2016-05-06 05:17:34 +10:00
0b5a0d8412 Transform/Snap: EditMesh/BKE_bvhutils API improvements
Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh.
This was meant to simplify the API, but didn't work out so well.

`bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`.
This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh.

In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once
bvhtree is being used in functions that change(tag) the DM cleaning the cache.

- Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled.
- Remove em_evil.
- bvhtree of EditMesh is now really cached in the snap functions.
- Code becomes organized and easier to maintain.

This is an important patch for future improvements in snapping functions.
2016-05-06 05:01:51 +10:00
88b72925d0 Optimize linear<->sRGB conversion for SSE2 processors
Using SSE2 intrinsics when available for this kind of conversions.

It's not totally accurate, but accurate enough for the purposes where
we're using direct colorspace conversion by-passing OCIO.

Partially based on code from Cycles, partially based on other online
articles:

  https://stackoverflow.com/questions/6475373/optimizations-for-pow-with-const-non-integer-exponent

Makes projection painting on hi-res float textures smoother.

This commit also enables global SSE2 in Blender. It shouldn't
bring any regressions in supported hardware (we require SSE2 since
2.64 now), but should keep an eye on because compilers might have
some bugs with that (unlikely, but possible).
2016-05-05 19:46:06 +02:00
bb6fbc64ae Docs: scanfill.c purpose 2016-05-06 00:45:38 +10:00
c8e9832be3 Fix T48320: Freestyle renders wrong edges of objects which in the other RenderLayer.
FSAA sample files in EXR format are no longer always updated (after some
changes between 2.73 and 2.74 releases), and the reported bug was caused
by old samples from a previous frame that were being merged by mistake.

The present revision addresses the documented issue by entirely skipping
the rendering of auto-generated scenes when there are no Freestyle strokes
to render, which suppresses sample merging of the render layers that were
not rendered.
2016-05-05 23:15:52 +09:00
6f83710af9 Optimize projection painting with big brushes
Multi-threaded partial buffer update, gives about 2x speedup with
big brushes.

Thanks Campbell for testing and benchmarking!
2016-05-05 14:45:00 +02:00
c81d9fda46 Optimize threaded scanline processor
Avoid memory allocation for task data.
2016-05-05 14:18:11 +02:00
c795d31a1f Simplify scanline threaded processor used by GPU_verify_image
Just avoid some unneeded initialization functions when the threaded
processor is simple enough to only depend on current chunk start
scanline and number of scanlines.
2016-05-05 13:16:56 +02:00
f5dcb137f1 Fix project paint using uninitialized edit-region
First stroke always had the minimum rectangle set to 0,0 which could cause a largre region of pixels to be
unnecessarily updated.
2016-05-05 20:57:54 +10:00
9b8bf57361 Curve Fitting: avoid clamping fallback handles. 2016-05-05 20:31:13 +10:00
d0818dbae1 Optimize Blank and Color Grid generated images
Avoid unnecessary pixels linearization gives nice speedup.
2016-05-05 12:04:42 +02:00
dd73d9c54e Correct error in recent smoothview edits 2016-05-05 19:58:45 +10:00
043486e2bc Fix typo in previous commit
Thanks Julian Eisel (Severin) for the heads up!
2016-05-05 11:33:13 +02:00
9aff51661c Optimization for initial display of high res textures in viewport
Multi-thread all the color space conversion operations.

Gives speedup from 0.8 to 0.1 seconds on a model with 4k etxture on it.
2016-05-05 11:28:50 +02:00
8c3c669c2d Image Paint: fix for calls to GPU_free_image while painting
The width and height of of the region to update are often zero,
skip calling GPU_paint_update_image in this case.
2016-05-05 18:52:11 +10:00
08be000637 Fix T48210: Editing all selected buttons fails to auto-key 2016-05-05 02:37:46 +10:00
10bbce30a9 UI: avoid getting the active button when its already known 2016-05-05 02:22:23 +10:00
6601680e8d View3D: apply smoothview before modal view operations 2016-05-05 02:01:18 +10:00
bd1378b56b Cleanup: rename ED_view3d_smooth_view_finish (to force_finish) 2016-05-05 01:51:25 +10:00
e30f0427a5 Fix error in BM_face_exists_overlap_subset
Was re-using loop index, thanks to @bzztploink for spotting!
2016-05-05 01:35:09 +10:00
875df1e2b9 Cycles: Fix hair minimal size doesn't work on GPU and SSE2 only CPUs 2016-05-04 17:14:43 +02:00
ddd6be1834 Compositor: negative color support for ASC-CDL offset
Since the color wheel can't handle negative colors usefully, use a basis value for the initial RGB.
2016-05-05 00:06:55 +10:00
980f3c3693 Fix T48346: Transparent shadows do not work for instanced objects 2016-05-04 14:46:30 +02:00
6f2797b50b Curve Draw: option to apply absolute offset
Offset used curve radius, which isn't useful drawing without any bevel radius.
2016-05-04 15:45:55 +10:00
568514c875 Fix T48340: Smooth view cancels previous view action
Previously users needed to wait for view orbit to finished,
so quickly pressing keys would gave different result.
2016-05-04 03:38:20 +10:00
Julian Eisel
9d3d9ac0b9 Fix 3D View panel header color wrong after theme reset
Caused by wrong alpha value in rB34b30f847429ac (used 0.01, should've been 0.1). Also made sure all editors initialize same default theme values for panels and cleaned up code a bit.
Works fine with old userpref.blend files.
2016-05-03 18:31:37 +02:00
645047708d Fix broken build without IME and/or I18N (caused by rBcb6307162b4c12). 2016-05-03 16:56:52 +02:00
9151095dbe Fix T48328: Outliner: Armature EditMode: crash when selecting bone of a shared amrature in another object's bone list.
Basically, issue is that outliner stores editbones for an edited armature, which are only valid during EditMode.

When more than one object use the same armature, selecting ebones from same armature but under non-edited object
would first select that object (and hence switch out of editmode), and then try to select editbone while editdata
no more exist.

Solution for now is to not change active object in this case - it's not totally ideal (not consistent),
but other solutions (like switching edited object without leaving editmode, or rebuilding (part of)
outliner tree in-between) are horribly hackish and most likely prone to epic failure anyway.
2016-05-03 15:11:42 +02:00
cb6307162b Cache whether current translation language supports IME or not
Solves the weak point mentionedi n previous commit.
2016-05-03 12:38:21 +02:00
b34f177a39 Fix T47841: Shift-space doesn't type space in type-in fields on Windows
Shift-space was reserved for IME support, however IME will only
be enabled on certain languages. We can avoid any IME-related
exceptions form other languages without too much trouble.

There's one weak point around ui_ime_is_lang_supported() tho,
which is it might be doing string comparison a bit too much
often now, this we can avoid by handling those checks from BLT.
2016-05-03 12:20:40 +02:00
bff15770a9 Fix T47424: Blender Internal material node 'mapping' not showing results of animation
Not very efficient solution -- it'll update mapping node on init ntree exec and will
not work for viewport GLSL shading perhaps, but it's as good as it could be within
current dependency graph.

The issue here is that manual edit of values will cause cached matrix re-evaluation.
but using animation does not use rna update callbacks hence no matrix update was
happening.
2016-05-03 11:44:17 +02:00
3dcc05c591 Cleanup: no need to cast for pointer comparison 2016-05-03 18:20:33 +10:00
c2f28864d6 Fix T48169: 1 pixel offset painting 2D textures
Painting at negative locations was using int-rounding.
2016-05-03 17:49:18 +10:00
ead2496e67 Cleanup: use offset macro 2016-05-03 16:40:14 +10:00
1fb17fcf23 UI: limit listview arrow/wheel bindings
Allow Ctrl-Up for eg to be used when in a list view.
2016-05-03 16:17:14 +10:00
e2a6fb1f0b UI: don't show tips when navigating ui-list 2016-05-03 14:59:45 +10:00
9953eeb012 Cleanup: use const for units API
Also make return args explicit.
2016-05-03 13:52:07 +10:00
48d3a8b54b Math Lib: inline project_plane_v3_v3v3 2016-05-03 13:48:00 +10:00
a58a8ebea7 Missed setting handles in curve dissolve 2016-05-03 00:06:12 +10:00
122496dda1 Correct header (can't use uint here) 2016-05-02 21:08:02 +10:00
f28c626574 Fix bl_load_py_modules test
- scripts that execute directly need to include their basedir in the sys.path
- modules which are in a directory without an __init__.py weren't importing.
2016-05-02 21:06:15 +10:00
143f6c4bb2 Curve: new dissolve tool
removes vertices, re-fitting the surrounding handles.
2016-05-02 18:50:12 +10:00
ec9cb57b01 Curve Fitting: expose function for fitting a single curve 2016-05-02 18:50:04 +10:00
915e9eeff1 BLI_array_utils: helper for stepping over contiguous ranges 2016-05-02 18:49:22 +10:00
c1ca667d4a Fix compilation error on Armel architecture
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_n are not defined on this architecture
for some reason, however those functions are available.

Adding a workaround for newly used __sync_fetch_and_and() function.
2016-05-02 09:55:08 +02:00
4e4ff72d13 Fix T48325: Data transfer modifier vertex group selector doesn't work with freestyle data.
Freestyle edge/face marks are (afaik) our only actual customdata bitflags... Original work
kinda assumed we had no such things. :P
2016-05-01 15:36:09 +02:00
1422f0dd16 Fix Cycles external OSL shader not working with relative file paths. 2016-05-01 01:44:52 +02:00
abf6f9f6cf Fix T48118: Vertex Groups not masking particle hair emission correctly
Own regression from rB019ce363b01bba0af, not totally sure why removing the heading
zero value in element_sum broke binary search distribution in random branch, but...

New code makes thing sooo much simpler, by simply getting rid of all zero-weight
items in element_sum (at the cost of adding a temporary extra index mapping array),
that way neither random nor 'even ordered' distribution code has to wory anymore
about skipping zero-weighted items!
2016-04-30 16:56:19 +02:00
b1f6cd5a6a Slight adjustment to curve fitting tangents
Don't let the point spacing give bias to a side.
2016-04-30 16:27:43 +10:00
6ab22064c2 Fix for typo comparing double events
Also remove doubles when filling the final array.
2016-04-30 16:21:06 +10:00
ac163447f8 Cleanup: warnings. spelling 2016-04-30 04:10:34 +10:00
461604c0d5 Fix (unreported) bad 'NULL freeing' with placeholder images.
Looks like code expects some initialized Image data after all, so do it
for placeholders as well (using default generated UV grid).
2016-04-29 18:05:49 +02:00
57eb8539fc Fix crash (segfault) in node editor.
In some cases, we can have nodegroups without attached nodetree, this case is checked
in top `node_group_has_output()` entry point, but not in recursive `node_group_has_output_dfs()`.

Issue appeared after rB42824f4403db3a35, presumably because check on node flag itself
was skipping that case, which is no more possible when using ID tags.

Reported by sebastian_k over IRC, thanks.
2016-04-29 17:37:00 +02:00
467e12514e Fix broken Collada from rBrB6d0cae56e84306ed. 2016-04-29 16:56:20 +02:00
2ba7b3ea1a install_deps: add support for OpenVDB.
Note that recent DEB-based distro have packages for this, even simpler!

Differential Revision: https://developer.blender.org/D1933
2016-04-29 16:45:09 +02:00
de0b480629 install_deps: add check for glew version, too old ones are not compatible with OSD.
In case too old system glew is detected, use the one shipped with blender.

Part of D1933.
2016-04-29 16:43:28 +02:00
3ccc61c03a install_deps: bunch of cleanups, tweaks and micro-fixes.
This commit mostly:
* removes some (very) old messages or hacks (like those for ubuntu 10.4...).
* Moves lib-specific dependencies installations to upper level
  (simpler to manage, and those are small enough packages).
* Uses new dnf package manager for fedora (sigh, we now have tree different commands for fed/suse/rehl).
* fixes or enhances some options for commandline tools.
* Force anew building of oiio package, due to insane dependencies of this one in recent distro.

Part of D1933.
2016-04-29 16:35:37 +02:00
6d0cae56e8 Fix T48290: Hook fails after deleting geometry
Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used.

This also fixes a bug where undo would loose key-index data.

Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.
2016-04-29 23:39:50 +10:00
b5ce2bbef7 BMesh: when multiple vertices have the same key-index, use the first
Simple error case where many vertices share an original index,
now use the first match instead of the last.
2016-04-29 21:52:09 +10:00
3e32f8e601 Fix T48298: Cycles World environment Texture node, movie doesn't update frame 2016-04-29 10:54:40 +02:00
9e1a9fa5bb Remove redundant selection flush call 2016-04-29 17:29:23 +10:00
d3344ca7b1 Minor optimization to bmesh shape key conversion
Avoid linked linked loop and custom-data lookups per vertex,
use a table of shape-keys with array offsets instead.
2016-04-29 15:02:04 +10:00
636195e402 Fix T48301: Cycles incorrect render with CMJ and viewport samples 0.
Max samples 2147483647 was causing integer overflow.
2016-04-28 23:57:20 +02:00
a48d740798 Fix T48300: 3D view tools outside the 3d view crash 2016-04-29 00:00:43 +10:00
6976be7723 Python: install pyconfig.h on OSX, needed for PIP 2016-04-28 20:46:58 +10:00
94a6019a7b Fix T47715: EXCEPTION_ACCESS_VIOLATION crash when removing modifiers or rendering
The issue was caused by missing indirect dependencies from other scenes in the
current scene depsgraph, which was causing some threading conflicts.

Not sure what would be ideal solution here, for now use stupid but rather robust
approach to solve that. Maybe there's something better to do here tho.
2016-04-28 12:32:59 +02:00
c01c47f79d Depsgraph optimization: Don't schedule tasks for empty "NOOP" nodes.
Currently a lot of the nodes in the new dependency graph are empty placeholders
for organizational purposes. These nodes would, however, still be assigned a task
which gets scheduled and takes up some time for worker threads to pop from the
queue and run. This can be avoided by skipping these nodes during depsgraph
scheduling, and scheduling their childrent right away. Gives a few percent speedup
in BlenRig.
2016-04-28 12:10:58 +02:00
aaf5ee73f0 Fix for O(N^2) runtime tagging in the new depsgraph.
Some of the tagging functions would be called for every operation, and then
in turn tag their ID nodes with all their operations again. With extensive rigs
we get ID nodes with a lot (10,000+) operation nodes, which leads to millions
of unnecessary tagging calls.
2016-04-28 12:03:26 +02:00
8a379e3460 3D Text: avoid checking null character's text on path
Redundant and causes complications when improving text code.
2016-04-28 15:56:41 +10:00
42e6477129 Image view selected didn't account for region size
Now fit the selection with a 1.4x margin (matching 3d view).

Also move border fitting into own function.
2016-04-28 13:46:51 +10:00
6e94ec623d BMesh: limited-dissolve, add check for wire edges
Recent degenerate check crashed on chains of wire edges
2016-04-28 12:50:12 +10:00
2b485e21f4 Minor code simplification in previous commit. 2016-04-27 22:58:00 +02:00
cc692c0924 Fix compiler warning on OS X / clang. 2016-04-27 21:41:40 +02:00
dd8a7342bc Nodes: sort builtin compositor/shader/texture nodes alphabetically in menus
Reviewed By: lukastoenne, dingto, Severin, carter2422

Differential Revision: https://developer.blender.org/D1957
2016-04-27 21:37:14 +02:00
c0ae38f656 Fix artifacts w/ low near clear in bglPolygonOffset 2016-04-27 19:53:24 +10:00
7f0cf3ab38 Sequencer: skip text-effect rendering w/ no alpha 2016-04-27 15:55:50 +10:00
0912bffb84 Sequencer text strip color options
D1930 by @NiKoZLaB
2016-04-27 15:49:13 +10:00
01cdd22a52 Fix alpha blending w/ font drawing & byte buffer 2016-04-27 15:47:49 +10:00
d74957d38c Fix mask active-point being lost on load/undo 2016-04-27 14:34:54 +10:00
ed0db62a3d Mask: always add a new spline when adding a new vert
Previously, adding a new vertex with Ctrl-LMB would move an existing
when there was an active spline but no active point.

This function is used as a fallback, extending an existing active point is already handled.
2016-04-27 14:11:07 +10:00
32e20369a5 New mask points now compensate parent offset 2016-04-27 13:54:48 +10:00
6483b9cb07 Fix T48282: Newly added mask points don't follow parent 2016-04-27 13:12:55 +10:00
9bd51735a1 Cleanup: use const, duplicate header 2016-04-27 13:12:55 +10:00
c2cdc67375 Fix Cycles GLSL image texture node not respecting color space property. 2016-04-27 00:26:06 +02:00
2b3657a838 Code cleanup: minor cleanups for GPU_link return values, normal map node. 2016-04-27 00:09:44 +02:00
1da0d0042a Fix Font filebrowser not showing thumbnails when those are enabled by default in userpref.
Reported by Leon Cheung over IRC, thanks.
2016-04-26 17:18:37 +02:00
bb74e0774c Fix T47992: Stereo 3D Anaglyph rendered Images saved too light 2016-04-26 17:15:33 +02:00
f172f2b146 Cycles: Improve logging about motion blur a bit 2016-04-26 16:17:11 +02:00
ab500eb3f3 Hair edit: Add operator to uniform length of selected hairs
Request by Andy, should help him a lot doing weird and wonderful hair styles.

A bit experimental yet, details of behavior might be changed after some real
usage feedback.
2016-04-26 16:08:06 +02:00
96392c33ef Correct error in recent snap-context commit
Edges currently don't use a BVH-tree,
but would still create and attempt to free the tree.
2016-04-26 23:02:44 +10:00
680b135ec1 Fix T48176: Shrinkwrap crashes when multiple objects uses same target
Annoying bug caused by temp nature of looptri layer for CCGDM.

Fixed in a similar to CCG loops by using lock when allocating and
filling looptri arrays.

Real fix would be to make sure this array is allocated on object
evaluation using DAG's eval_flag, but that's more involved change
which we'll work on later.
2016-04-26 14:44:49 +02:00
86b8c8a042 Fix (unreported) possible freed memory usage when reloading a .blend file.
Operator would call `WM_file_read()` directly whith G.main->name as filepath, which
gets freed whith main during new reading of file... Now use a local copy instead.
2016-04-26 14:27:32 +02:00
2a63ef03f0 Fix missing pose bone hash table in stub poses of action constraints.
This is a follow-up fix for rBa10b2fe. The Action constraint uses a hackish
stub object and pose, which doesn't have a hash table for fast lookups.
This doesn't seem to be a big issue with the old depsgraph, but in the new
depsgraph it creates a large number of cache misses and significant slowdown,
possibly because of additional threading and less simple bone loops.
2016-04-26 14:16:28 +02:00
5abae51a6e Support multiple tangents for BI render & viewport
Normal Map node support for GLSL mode and the internal render (multiple tangents support).

The Normal Map node is a useful node which is present in the Cycles render.
It makes it possible to use normal mapping without additional material node in a node tree.
This patch implements Normal Map node for GLSL mode and the internal render.

Previously only the active UV layer was used to calculate tangents.
2016-04-26 20:43:29 +10:00
98babfa2b8 Fix T48211: Modifying an F-Curve modifier property is not updating the 3D window 2016-04-26 12:15:05 +02:00
2942a492f4 Fix T48259: Vertex painting doesn't trigger refresh of cycles rendered viewport 2016-04-26 11:15:28 +02:00
0f8290ad0e Fix UI message typo. 2016-04-26 10:13:02 +02:00
7b9743261d Minor cleanup in object select code
- break when object in hit-buffer.
- don't measure distance to object centers that can't be projected.
- take pixelsize into account for distance pixel distance limit.
2016-04-26 14:33:31 +10:00
bd40ded9f6 Fix T48203: Pose-Mode overrides Alt-RMB menu select
Now always use menu-select when using Alt-RMB
2016-04-26 14:24:52 +10:00
5b28fdb635 Cleanup: use const for outliner args
Also c99 edits for outliner_find_id
2016-04-26 13:09:42 +10:00
27cc015581 Outliner: "Show Active" support for active bone
Resolves T48229
2016-04-26 12:56:47 +10:00
45d9c9de35 UI messages fixes - no final point ;) 2016-04-25 20:16:34 +02:00
6a7378f50f Cycles: Proper pack of leaves which are bigger than single float4 2016-04-25 18:57:37 +02:00
a10b2fefab Fix for missing pose bone hash in the new dependency graph.
The hash table is used to look up bone poses, particularly during constraint
evaluation. Without this the default BLI_findstring method on a plain ListBase
is used, which is really slow for extensive rigs.
2016-04-25 15:41:03 +02:00
3ac2028df0 Fix T48202: Project paint hangs on UV's w/ sharp corners
Using 'shell-thickness' to offset UV's meant very sharp corners would offset far outside the image
causing project-paint to hang while collecting all pixels for each UV face.

Clamp the maximum offset to prevent this.
2016-04-25 22:21:30 +10:00
42fd1b9abe Cycles: Fix issues with stack allocator in MSVC
Couple of issues here:

- Was a bug in heap memory allocation when run out
  of allowed stack memory.

- Debug MSVC was failing because it uses separate
  allocator for some sort of internal proxy thing,
  which seems to be unable to be using stack memory
  because allocator is being created in non-persistent
  stack location.
2016-04-25 13:50:27 +02:00
34f4c31692 Cycles: Move vector re-allocation out of loops 2016-04-25 12:25:30 +02:00
beaa57d269 Refactor BKE_blender into separate headers
- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).
2016-04-25 19:27:45 +10:00
935998312c Fix T48085: Select linked w/ seam delimit gives random results
This changes behavior so seams aren't used for the bmesh walker.
2016-04-25 18:44:11 +10:00
975a224f12 Cycles: Don't pass RNA pointers by vlaue 2016-04-25 10:04:06 +02:00
fc5a37b94e Recent pydriver update missed setting 'curval'
Using PyObject's for drivers (82b0a9e36) still needs to set the 'current value'
for debug info to display in the UI.

Resolves T48251
2016-04-25 15:27:51 +10:00
45835e227e Cleanup: use bool 2016-04-25 14:57:25 +10:00
e76f94e0fb Fix T48263: Armature modifier crash w/ non-armature objects 2016-04-25 14:41:11 +10:00
727f15f7d8 Docs: note that BMesh loops are accessed via faces
Resolves T48258
2016-04-25 11:57:52 +10:00
Julian Eisel
26564ff343 Event system: Let event pass through after menu poll fails
Part 2 of Fix for T48200. Without this, it's not possible to exit GPencil edit mode using tab key with pies enabled.

Menus are somehow similar to operators, which let the event pass through too after operator poll returns 0. So think we should handle them similar here.
Can't guarantee this is totally safe though ;)
2016-04-23 17:24:00 +02:00
35be6d87e8 Cleanup: cmake 2016-04-24 00:16:44 +10:00
39873891bf Fix T48250: suppress CMake ranlib warnings to avoid issue with Qt Creator
Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D1942
2016-04-23 15:52:38 +02:00
Julian Eisel
16316115da Fix weird wording in driver operator tooltip 2016-04-23 15:12:20 +02:00
57d98a8048 PyAPI: support writing compressed library blends 2016-04-23 22:08:42 +10:00
a3d67456cd GHOST/X11: print description of error event 2016-04-23 18:44:17 +10:00
ab3c1de56d Fix T48173: event.mouse_prev_x/y unreliable. 2016-04-23 03:05:48 +02:00
23a9fede69 Fix T48216: Cycles light fallof node gives black emission in baking. 2016-04-23 02:59:40 +02:00
c41b2bd7c6 Fix T48223: 3D View not refresh after changing Blending mode in NLA.
This fixes a lot of things in NLA RNA update handling (which basically did not update anything previously).

There are more update issues with this editor though...
2016-04-22 16:48:57 +02:00
f69b364b88 Fix (unreported) crash when listing available fmodifier types.
Some types are defined but not yet implemented...
2016-04-22 15:23:59 +02:00
a2779a4606 Fix T48230: Home key when only one keyframe makes the DopeSheet acting weird.
Simply apply same minimal range as in graph editor when we get a zero one from keyframes.
2016-04-22 14:39:37 +02:00
f4ecd24f96 Fix curve snap to surface w/ offset & taper
Adjusting the pressure wasn't re-adjusting the offset.
2016-04-22 21:34:04 +10:00
c12e1a09ec BLF: use float vector passing color args 2016-04-22 20:02:41 +10:00
a9729e6d75 Fix T48236: OpenVDB smoke cache glitches out with smokeless flames.
Issue was that before writing to disk grids are clipped against the
density field's tree to optimize for memory/disk space, which in the
case of simulations with no density field results in all grids having
empty trees.

For now avoid clipping against empty grids, but perhaps in the future it
can be interresting to have some UI parameters to let the user choose
the grid used for clipping.
2016-04-22 11:46:02 +02:00
87dcee0c0c Silence some annoying warnings when doing full build with strict flags
This mainly touches extern libraries and few debug-only places in intern.

Some summary:

- External libraries are not strict at all about missing declarations,
  so we can rather safely remove such warning together with other strict
  flags.

- Bullet has some static functions which are not used.
  Those were commented out.

- Carve now has some unused debug-only functions commented out as well.
  While we're on the way of getting rid of Carve, it makes sense to make
  things a bit cleaner for the time being.

- In LZMA we have some parts disabled which gives some set but unused
  variables which is rather correct.

- Elbeem had quite some variables set and never used because their usage
  is inside of debug-only code which is commented out.

Note about patching upstream libraries: surely one might say that we
have to make local patchset against this, but own experience says it
only gives extra work trying to merge such tweaks to a new upstream
version and usually it's just faster to re-apply such fixes again after
bundling new upstream library.
2016-04-22 10:59:15 +02:00
d2cb0f955b Cycles: Reduce verbosity of logging
Mainly makes logging less verbose when doing progressive sampling in viewport.

Such kind of verbosity is not really possible to be filtered out with `grep`
so let's reshuffle few lines of code.
2016-04-22 10:55:26 +02:00
31632e7f74 NDof device: Check for socket exists before connecting to spnavd
This allows us to get rid of annoying and misleading error printed to the console
about being unable to connect to something.
2016-04-22 10:14:30 +02:00
599b7ad13b Transform Snap: optionally cache the BVH tree
Use the SnapObjectContext to store the bvh tree for reuse.
2016-04-22 16:38:49 +10:00
19e5540ff7 Transform Snap: initial snap context refactor
This introduces a snap-context that can be re-used for casting rays into the scene
(by operators such as walk-mode, ruler and transform code).

This can be used to cache data between calls too.
2016-04-22 16:36:53 +10:00
8dcdde52b1 Cleanup: warnings (double promote, string format) 2016-04-22 12:22:58 +10:00
0b349871d8 Fix T48212: Typos in bpy enum props examples. 2016-04-21 12:16:32 +02:00
7205bac989 Update install_deps.sh for ArchLinux.
The script is updated for ArchLinux, since all dependencies are included in Arch's official repositories.

I've made a few changes, such as enabling OCIO and OSD without requiring locally installed lib-path, and a fix to ''get_package_version_ARCH()' so it ignores package epoch (as in the case of ffmpeg).

I intend to look at OpenVDB next.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D1901
2016-04-21 10:44:46 +02:00
c0943babdf Cleanup: math lib use w/ walk mode 2016-04-21 12:43:35 +10:00
22f2405d1b Mesh Deform Modifier - leave bind settings visible after binding
The 'precision' and 'dynamic' settings for binding are now always visible.
The settings that can not be edited after binding are disabled (not inactive).

I find it useful to see with what settings a mesh was bound, in case
the file is not mine or if I simply lost track of it.
2016-04-20 19:51:59 +01:00
9bd1c8caf7 Cycles: Multi-thread object transform update
Simple idea, use threads when dealing with "Copying Transformations to device"
scene update step. Only do it if there's enough objects in the scene.

Hopefully only brings less synchronization time and doesn't break anything.

From tests on my desktop this brings down transform update time from 58sec to
11sec on victor_cpu.blend scene from out benchmark.
2016-04-20 18:17:24 +02:00
02213b867e Cycles: Stop rendering when bad_alloc happens
This is an attempt to gracefully handle out-of-memory events
and stop rendering with an error message instead of a crash.

It uses bad_alloc exception, and usually i'm not really fond
of exceptions, but for such limited use for errors from which
we can't recover it should be fine.

Ideally we'll need to stop full Cycles Session, so viewport
render and persistent images frees all the memory, but that
we can support later, since it'll mainly related on telling
Blender what to do.

General rules are:

- Use as less exception handles as possible, try to find a
  most geenric pace where to handle those.

  For example, ccl::Session.

- Threads needs own handling, exception trap from one thread
  will not catch exceptions from other threads.

  That's why BVH build needs own thing.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1898
2016-04-20 16:19:49 +02:00
e3544c9e28 Cycles: Throw bad_alloc exception when custom allocators failed to allocate memory
This mimics behavior of default allocators in STL and allows all the routines
to catch out-of-memory exceptions and hopefully recover from that situation/
2016-04-20 15:49:52 +02:00
d7e4f920fd Cycles: Use threads to sort reference arrays when searching for split
This commits implements threaded sorting of references when looking for
object spatial split. It mainly useful when doing initial binning, which
happens from main thread.

Gives nice speedup of BVH build for Bunny.blend: 36sec vs. 55sec for
the Rabbit mesh BVH build.

On more complex scenes the speedup is probably minimal, but still nice
to have more instant rendering for simplier scenes.

Some further tests with production scenes would be interesting.

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1928
2016-04-20 15:21:44 +02:00
96dc96f0a5 Cycles: Avoid reference copy 2016-04-20 15:03:39 +02:00
48c9208d56 Fix T46903: Missing Render Border Menu items
While other borders are more like a toggle, it is an intrinsic behavior
of those operators. Render Border is intrinsicly split into two operators
and trying to expose it as a toggle will end up with rather confusing
situation when shortcut listed in the menu changes depending on the
context.
2016-04-20 15:02:03 +02:00
e50d229273 Fix T47794: Point density sometime seems stretched when rendered on GPU 2016-04-20 14:42:19 +02:00
b9d9d93ff9 Fix T48162: GPU render gives wrong results in certain volume setups
ideally this part of code should be de-duplicated across __VOLUME_INTERSECT_ALL
and regular code.
2016-04-20 13:49:54 +02:00
4cdd6b9bdd Fix T47812: GPU renders have warmer colors than CPU renders
Seems was a mistake in f2c54df, volume attributes are not supposed to
have repeated texture type.
2016-04-20 12:29:08 +02:00
75c9fe428f Update bundled openjpeg from 1.5.0 to 1.5.2
Solves following issues:

- Quite reasonable amount of paranoid warnings were solved by an upstream
- Upstream seems to have all fixes needed for FreeBSD and OSX already
- Brings all fixes and such from upstream
2016-04-20 10:36:58 +02:00
81a477f4dc Fix T47891: Edges throw shadow in edit mode 2016-04-20 12:59:00 +10:00
4ee5ba41bb Fix T48086: Smart UV Project fails w/ small faces
Epsilon for small faces was too large.

Also suppress exception when all faces area are below the epsilon.
2016-04-20 11:51:03 +10:00
dbf1257b14 Minor optimization for scanfill
Replace angle with with cosine calculation.
2016-04-20 09:53:40 +10:00
38442ae2dc Fix image-space mask-transform crash w/o an image 2016-04-20 09:37:51 +10:00
2ca4d21976 Cleanup: rename cos-angle to match BLI_math 2016-04-20 07:50:48 +10:00
bde7439816 Minor optimization for limited-dissolve
Use dot product instead of angle.
2016-04-20 07:50:48 +10:00
ccbfbeba74 Fix crash in rB37493fb9f - there is no guaranty CTX_wm_foo() will return a valid pointer! 2016-04-19 22:53:18 +02:00
11c9ff1edd Cleanup unused header includes from previous commit. 2016-04-19 22:53:18 +02:00
52e09ed4f9 Cleanup: move operators & related code of files & append/link to relevant dedicated source files.
This commit adds a new `wm_files_link.c` which contains everything related to append/link code,
moved from `wm_operators.c` (rather small currently, but will expand quite a bit with future reload & asset works).

It also moves all load/save .bland files (and related userpref/startup stuff) from `wm_operators.c`
to `wm_files.c` (some helper funcs were already there).

This also makes `wm_operators.c` significantly lighter.
2016-04-19 22:53:18 +02:00
Julian Eisel
dd423a6818 Fix T48198: Missing plus sign to open the tool shelf in text editor
Did not happen when using screen layout saved in default startup.blend
2016-04-19 21:01:55 +02:00
Julian Eisel
37493fb9fe Toggle to standard cursor when opening menus/popups
Cursor is now set to standard arrow-cursor when opening menu, and reset to previous one when closing it. Previously it just stayed as it was before, e.g. the edit mode cross-cursor stayed active even if a menu was opened.

Fixes T48192.
2016-04-19 16:17:34 +02:00
9b48f2b27c Cycles: Improvements and fixes for the resumable render
- Fix wrong current sample reported in the log
- Also includes fix for progressive refine log
- Explicitly print to the stdout that resumable render is enabled
- Print error message and abort when passing wrong values for the
  resumable render. Never waste someone's compute power for wrong
  render!

Fixes T48185: Cycles resumable num chunks breaks sample counter
2016-04-19 12:56:33 +02:00
376c8dd95e Fix T48193: Incorrect keyframe_insert docs 2016-04-19 18:25:56 +10:00
7cc9f6b6f8 Minor edits to last commit
Avoid redundant tests
2016-04-19 13:07:01 +10:00
12b0c03e49 Fix T47998: Limited dissolve fails /w holes
Holes with flat surfaces could have their edges dissolved causing degenerate faces.
Now check that collapsing a vertices isn't creating self-overlapping faces.
2016-04-19 12:18:19 +10:00
74b0591d42 Cleanup: pass event args as const 2016-04-19 12:18:19 +10:00
3068ea34e4 Cycles microdisplacement: add max subdivision setting
This is to prevent situations such as when the camera gets very close to a mesh
and causes it to be tessellated into an excessive amount of micropolygons. In
REYES this is known as the eye-splits problem.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1922
2016-04-18 22:47:24 +02:00
71588300d2 Cycles microdisplacement: fix handling of triangles in DiagSplit
Theres still more room for improvement but this makes things useable.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1921
2016-04-18 22:31:12 +02:00
c42a796e9f Fix: Make it easier to tell if Color Swatches are greyed out or not
This commit makes disabled/inactive color swatches look more obviously disabled
by halving their alpha values. It is necessary because the results of
ui_widget_color_disabled() (which is usually used when disabling widgets)
get overwritten by the color filling code here.

To avoid confusion, the checkerboard background (when the color genuinely has
alpha) will still only show in those cases. That is, when disabled, color swatches
won't show the checkerboard unless the color actually has an alpha component if it
wasn't disabled.
2016-04-19 00:42:59 +12:00
2aafadd4ac Fix T48186: Grease Pencil Smooth brush doesn't work properly - "erase" the stroke thickness
As soon as you started trying to smooth a stroke, the thickness of the stroke
would quickly drop right down to near zero, if "affect pressure" was enabled.

This step got accidentally missed when restoring the affect pressure functionality to
the stroke smoothing brush code, following cleanups from the stroke quality patch.
2016-04-19 00:18:46 +12:00
9f39619dda Cycles microdisplacement: scene level render and preview dicing rates
This makes it easier to control overall dicing rate without having to tweak
every object. The preview rate makes viewport editing more interactive. The
default preview rate of 8 is roughly 64 times faster for some operations.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1919
2016-04-17 20:38:50 +02:00
facc127e72 "View Frame" now works in the sequencer too 2016-04-17 12:27:12 +12:00
1dfbcd88d5 Fix a few compiler warnings with OS X / clang. 2016-04-17 01:05:50 +02:00
667a5ef48e Fix T48171: activating spacebar search menu over text button activates it or shows tooltip. 2016-04-17 00:40:01 +02:00
557544f2c4 Cycles: Refactor Image Texture limits.
Instead of treating Fermi GPU limits as default,
and overriding them for other devices,
we now nicely set them for each platform.

* Due to setting values for all platforms,
we don't have to offset the slot id for OpenCL anymore,
as the image manager wont add float images for OpenCL now.

* Bugfix: TEX_NUM_FLOAT_IMAGES was always 5, even for CPU,
so the code in svm_image.h clamped float textures with alpha on CPU after the 5th slot.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1925
2016-04-16 20:49:59 +02:00
b973911fee Anim Editors: "View Frame" Operator - Code Cleanups/Reshuffling + NLA/Timeline Support
* Reshuffled code for existing "View Frame" implementations, and removed leftover
  comment from some of the the copy-and-paste used to build it.
* Added support for this operator in the NLA and Timeline
2016-04-17 03:44:10 +12:00
5d6b695f00 Assorted enum tweaks
* Knock out "Python" FModifier entry - It really hasn't been coded yet!
* Add icon for "Match Indices" driver eyedropper mode. It should help provide
  a bit more of a hint of what it does, but it also doesn't look quite as nice now.
2016-04-17 03:29:29 +12:00
b49fd60060 Experimental Drivers UI Tweak: Use icons for variable types
This commit aims to streamline the driver variables layout a bit
* Each variable type now has an icon. (The loc diff and rot diff ones are placeholders,
  which could deserve something better/dedicated if we continue to use this)
* Instead of taking up an entire row, the variable type dropdown now only shows
  an icon, and is located before the variable name field.

Feedback wanted: Is this more/less confusing than it was?
2016-04-17 03:29:28 +12:00
4572d4d861 Tweaks to Streamline Drivers UI - Don't use uiTemplateAnyID for properties where only objects can be used 2016-04-17 03:29:28 +12:00
64c7306cdb Cycles: Insert util_texture.h in CMakeLists to make Cycles compile again after recent refactory. 2016-04-16 11:58:38 +02:00
9c916b0172 Cleanup: Move texture definitions to util, to avoid bad level include. 2016-04-15 23:02:44 +02:00
34c99fa30a Curve draw fix w/ surface offset + only-first enabled
In this case the initial offset needs to be applied to the rest of the stroke.
2016-04-16 06:47:37 +10:00
6bc2ba2111 Fix T48157: 3D view's depth of field isn't displayed correctly with scene units scale.
focus distance is given in BU, no need to scale it at all.
2016-04-15 16:24:19 +02:00
3165e8740b Fix T48139: Checker texture strange behavior in cycles
Seems particular CUDA implementations has some precision issues,
which made integer coordinate (which was expected to always be
positive) to go negative.
2016-04-15 15:30:30 +02:00
177d051126 UI: copy to selected: add 'single'/'all' options to buttons' menu when relevant.
Same as reset or anim keyframe/driver operators... Inconsistency reported by Leon Cheung
through IRC, thanks.
2016-04-15 15:19:19 +02:00
bce4b7c868 Code Cleanup: Fix up various odds and ends 2016-04-16 01:12:50 +12:00
88c071fbb5 Code Cleanup: Remove unused define left over from earlier versions of this code 2016-04-16 01:12:50 +12:00
209cd5db96 Remove a leftover from older code 2016-04-15 15:06:08 +02:00
3130f4167d Cycles: Optimization to spatial BVH build
Simple fix: release lock earlier.

Reduces spatial split build time from 96 to 53sec on the Bunny.blend
(using studio Intel for benchmark).

NOTE: Timing difference is not that spectacular when comparing numbers
with builds before memory optimization, but even then it's about 20%
faster build.
2016-04-15 14:35:42 +02:00
10320891f0 Fix T48151: Brush texture overlay won't refresh automatically in UV editor when changed in buttons window.
Simple solution is to get rid of this stupid `rna_TextureSlot_brush_update` func, and do what it was doing directly
in BR case of `rna_TextureSlot_update`. That way, all updates to brush texture will invalidate correctly the overlay.

Note that this double definition of texture pointer for brushes looks rather fishy, am really not convinced this helps
keeping things simple and clear at all (what happened here is that texture selector in image paint editor was using
'texture' member of brush itself, which was performing correct RNA update, while context-based brush texture selector
from buttons space was using 'texture' member of the TextureSlot struct, which had default texture update callback
which was not invalidating overlay).
2016-04-15 13:19:41 +02:00
8ac662c77a New freehand curve drawing tool
- Access with Shift-LMB or from the 'Create' toolbar tab.
- Uses curve fitting for bezier curves, with error and corner angle options.
- Optional tablet pressure to curve radius mapping.
- Depth can use the cursor or optionally draw onto the surface,
  for the entire stroke or using the stroke start.
- Stroke plane can optionally be perpendicular to, or aligned to the surface normal.
- Optional radius tapering and for start/end points.
- Supports operator redo and calling from Python.
2016-04-15 20:36:38 +10:00
e56e7bd1ec Add lib for n-dimensional cubic curve fitting
This will be used for calculating bezier curves from freehand drawing,
may be used for other areas too.

Original code from GraphicsGems, 1990 (FitCurve.c),
with updates from OpenToonz, under 3 clause BSD license.
with own minor modifications for integration with Blender:
- support adding extra custom-data.
- improved handle clamping.
2016-04-15 20:33:58 +10:00
f951cc36e2 Cycles: Support heat volume attribute
Similar to velocity, it was kind of supported by the mesh manager but
was missing a code in BlenderSession to get actual values.

In Cycles Heat is an attribute which goes from -1 to 1, where -1 is
the coldest ever temperature, 1 is the hottest ever one.
2016-04-15 12:02:31 +02:00
a52b4378b2 Cycles: Improve error print a bit 2016-04-15 11:24:59 +02:00
3fcbb2bb58 Tests: Fix wrong hash after "no redundant zeroes" commit 2016-04-15 10:37:57 +02:00
69ee6c9866 Drivers Editing: Added "Copy/Paste" buttons beside "Add Variable" for copying all variables from one driver to another
This was a feature request from a few years back (IIRC from ZanQdo?) to make it
easier to reuse one set of driver variables across several different drivers.

Dev Notes:
* Finally it's done! All that trouble for two little buttons.
* Grr... cmake... grrr!
2016-04-15 20:05:09 +12:00
c97b0b14e3 NLA Copy/Paste Modifiers: Apply similar fixes as those done in Graph Editor 2016-04-15 20:05:08 +12:00
344c17f439 Fix T42148: Copying/Pasting FModifiers copies to all selected FCurves, not just active one 2016-04-15 20:05:08 +12:00
26e8798561 FModifiers: Various tweaks for consistency + improved behaviour
* Use an RNA enum callback for NLA FModifier types too
* Cleaned up tooltips for these operators in Graph and NLA editors
* Fix update notifiers after adding FModifiers in the Graph Editor
2016-04-15 20:05:07 +12:00
35a089d960 FModifiers: "Add Modifiers" in Graph/NLA Editor buttons now uses a dropdown instead of a button
This brings the UI here more in line with the Constraints and Modifiers UI's.

TODO:
* The tooltips/descriptions on the operators now need fixing, as we can no longer
  use custom tooltips when defining these buttons.
* The operators need to be fixed to only operate on the active data
2016-04-15 20:05:06 +12:00
6bddad2c4e Code Cleanup: Add proper defines (with ANIM_* prefix) for animation-related copy-paste buffer free callbacks 2016-04-15 20:05:06 +12:00
6401730697 Graph Editor: Move "View" panel to be the last
This change means that when going from having no FCurves active to having
an active FCurve, the properties panels will not get stuck with only showing
the "View" tab, which is not that useful a lot of the time.
2016-04-15 20:05:05 +12:00
b8892cac19 Cycles: Yet another fix for camera in volume
Was an embarrassing glitch in original optimization policy,
the for-loops can't be de-duplicated here.
2016-04-14 17:20:17 +02:00
78c3a5d00f Compositor: Fix image and render layer always extending edges
It was no more possible to translate two images, put one on top of
another in order to do things like mapping VR views.
2016-04-14 11:20:00 +02:00
8ed746683a Remove redundant abs ray/line point functions 2016-04-14 13:04:35 +10:00
416064cd5b Math Lib: ray_point_factor_v3 functions
Gives a bit better precision than creating a line in some cases,
use for ED_view3d_win_to_3d.
2016-04-14 12:00:16 +10:00
bbcb9c68c9 Cycles: Resolve ridiculous amount of memory used by spatial split builder
This was only visible on systems with lots of threads and root of the issue
was that we've been pre-allocating too much memory for all the threads.

Now we only pre-allocate data for the main thread and rest of the threads
does allocation on-demand.

This brings down memory usage from 36Gig to 6.9Gig when building spatial
split for the Bunny.blend file on our Intel beast.

Originally regression was happened by the threaded spacial split builder
commit.
2016-04-13 14:25:21 +02:00
9604db7650 Fix T47813: Cycles Standalone not respecting integrator sample_clamp_direct 2016-04-13 10:39:21 +02:00
c8e2cc21ab Cleanup string includes after versioning commits 2016-04-13 09:45:32 +02:00
3156055e27 Show version number in UI as well 2016-04-13 09:45:30 +02:00
bd7e4d2a3d Tweaks to the version string formation
Couple of things:

- No need to use string streams to format the version string,
  we can do it at compile time and don't bother with anything
  at runtime.

- Function declaration was wring and would have caused linking
  conflicts in cases when util_version.h was included from
  multiple places.

We should have an utility function to get Cycles version so
applications which are linked to Cycles dynamically can query
the version, but that can't be done as an inlined function in
header and would need to be a function properly exported to a
global symbol table (aka, be implemented in a .cpp file).
2016-04-13 09:45:26 +02:00
ed050753ce Add a version number to Cycles standalone
Now Cycles has its own versioning, that is mainly interesting for external projects, which integrate the engine.

We start with version 1.7.0. Reasons for that:

* The engine is too mature for a 1.0 release.
* We assume that Cycles inside of Blender 2.61 was version 0.1. We count upwards in 0.1 steps, therefore Cycles inside of Blender 2.77 would be 1.7.

We use a common versioning scheme here, with 3 decimals for the major, minor and patch level.

At the moment cycles --version can be used to display the version, easy to parse for external projects. The info will be added to the UI later aswell.
2016-04-13 09:45:23 +02:00
84c68dcb3f Cycles: Minor cleanup, whitespace around keyword and preprocessor indent 2016-04-13 08:58:52 +02:00
c1a27a76cf Cycles microdisplacement: preserve smooth normals for linear subdivison
This way we prevent cracks in the model due to discontinuous normals, by using
smooth normals for displacement instead of always getting flat normals after
linear subdivision.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1916
2016-04-13 01:37:33 +02:00
068ee2cd98 Fix T47754: Meshes glitch on cycling Viewport Shading mode with Linked Groups
This is a regression since 4310128 which is cased by really bad logic:
there might be dependencies between dupli-objects, which means _if_ we
really want to ensure derived mesh on dupli creation we have to do it
before any matrix is overwritten.

I'm not sure if such derived mesh trick is really the only way to go
without major refactor, but seems simple fix for now will do it.
2016-04-12 17:16:36 +02:00
3a977ff502 Missed last commit 2016-04-13 00:49:47 +10:00
6cc953fb74 Correct UI messages: hyphenate 'add-ons' 2016-04-13 00:30:38 +10:00
951fad2baa Cycles: Add missing velocity attribute to builtin image loader
For some reason other parts of blender importer were assuming velocity
is supported, but actual loader was not aware of that.

Fixes T48064: Adding velocity attribute crashes render
2016-04-12 13:26:21 +02:00
19539c50c9 Cycles: Avoid crash when accessing non-existing volume attribute 2016-04-12 13:26:21 +02:00
f636b8bfc0 CMake: consistency check now reports stale ignores
Also update ignore list.
2016-04-12 20:12:29 +10:00
d4979f1d66 Remove exception for file which no longer exists 2016-04-12 11:55:44 +02:00
5231b049d7 Fix T47443: Circle & UV Sphere aren't aligned
D1912 by @samb96

Change the starting point of the UV sphere so that it is aligned with the circle, cylinder, and cone primitives.
2016-04-12 19:47:29 +10:00
dc7d6643e1 Remove any wrangler utility scripts 2016-04-12 11:07:23 +02:00
4fae162bce CMake: ignore header 2016-04-12 18:50:08 +10:00
b1ef786a73 CMake: Partially revert recent missing headers commit
The header which was put to the CMake project is not by any means used
during compilation, it is only used when manually updating CUDA wrangler
from CUDA headers.
2016-04-12 08:54:34 +02:00
4a64b36029 Cleanup: use bool 2016-04-12 11:26:06 +10:00
a2db16ba58 CMake: add missing headers 2016-04-12 11:22:30 +10:00
d032c5e46c Cycles microdisplacement: UI tweak to use split column
Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D1917
2016-04-12 00:08:28 +02:00
665467e51e Cycles microdisplacement: refactor to move some tesselation code from SubdMesh to Mesh
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1915
2016-04-11 23:50:15 +02:00
d456458e06 Cycles microdisplacement: change use subdivision bool to subdivision type enum
This is only the UI change, there is no underlying code change in this commit.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1910
2016-04-11 23:13:51 +02:00
ebfdd7da83 Cycles microdisplacement: perform subdivision dicing in raster space
NOTE: this is only the first of many patches towards completing the subdivison
and displacement system in Cycles. These patches will be reviewed and committed
one by one over the coming weeks.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D1909
2016-04-11 23:12:11 +02:00
7d033717ad Cycles: Cleanup, make some comments easier to read on split editors 2016-04-11 18:00:42 +02:00
ac00c17900 Cycles: Remove hair support from volume BVH traversal
There are couple of reasons:

- Volume shader on hair does behave really weird anyway and it's
  not something considered a bug really.

- Volume BVH traversal were only used by camera-in-volume check,
  which doesn't really make sense to take hair into account since
  it'll be rendered wrong anyway.

Such a removal makes both code easier to extend further (as in,
no need to worry about those traversal for hair bvh) and also
reduces stress on GPU compilers.
2016-04-11 17:18:14 +02:00
e4cdda548a Cycles: Remove unused SAH from BVH pack 2016-04-11 17:18:14 +02:00
6cd13a221f Cycles: Rename tri_woop to tri_storage
It's no longer a pre-computed data and just a storage of triangle
coordinates which are faster to access to.
2016-04-11 17:18:14 +02:00
e5a2790ecb Fix T48084: Solidify uses alternate quad-direction
This prevents twisted quads from self-intersecting.

This change makes the duplicate surface match the first vertex in the face,
so the diagonal indices match in the face copy.
2016-04-11 23:04:11 +10:00
90271e7ff1 Fix T48082: Unwrap overwrites face selection
Sync selection option made adding a new UV layer select all edit-mesh faces.
Now just select the UV's, ignoring sync-select option.
2016-04-11 20:27:10 +10:00
45a089c138 Fix T48103: Wrong renders on AMD OpenCL when Light Falloff node is used 2016-04-11 10:54:41 +02:00
2050ecc307 BGE: Fix T48071: Global logic manager
Previously the logic manager was used as a global variable for SCA_ILogicBrick::m_sCurrentLogicManager,
this request to always update it before run any python script and allow call function like
ConvertPythonTo[GameObject/Mesh]. The bug showed in T48071 is that as exepted the global
m_sCurrentLogicManager is not updated with the proper scene logic manager.
Instead of trying to fix it by updating the logic manager everywhere and wait next bug report to add
a similar line. The following patch propose a different way:
- Every logic brick now contain its logic manager to SCA_ILogicBrick::m_logicManager, this value is
  set and get by SCA_ILogicBrick::[Set/Get]LogicManager, It's initialized from blender conversion and
  scene merging.
- Function ConvertPythonTo[GameObject/mesh] now take as first argument the logic manager to find name
  coresponding object or mesh. Only ConvertPythonToCamera doesn't do that because it uses the
  KX_Scene::FindCamera function.

Reviewers: moguri

Differential Revision: https://developer.blender.org/D1913
2016-04-10 23:57:43 +02:00
3a80d5e1d0 Cycles: Fix rare dead-locks on TaskScheduler::exit()
When the Moon is full it was possible to have a dead-lock in task
scheduler's  exit() method.

Similar problem was fixed in Blender's task scheduler 3 years ago
in bae2a2c.
2016-04-10 21:18:54 +02:00
50f9681e15 Docs: comment on line-sphere intersection 2016-04-10 22:46:12 +10:00
019ce363b0 Cleanup a bit particle distribution code.
Also do proper intial/final checks to avoid adding particle on zero-weight extreme items,
instead of using cheap tricks like 'small offset'...
2016-04-09 22:46:27 +02:00
950acb0ced Fix T47983, Take II: Particles - Emit from Verts emits double on one vert.
Previous fix made another issue even more visible, leading to +1 particle on first vert
and none on last one. This commit should fix both original and new issues.
2016-04-09 18:59:05 +02:00
d09a372acb Fix T48078: incorrect OS X command for retrieving number of CPUs on in Makefile. 2016-04-09 00:25:18 +02:00
c1d1c1dc6b Fix T48088: Reproducible crash: Edges + Array Mod + Hair Particles.
Code did not consider the possibility to have no face at all! :P
2016-04-08 16:26:42 +02:00
a5dcda8ad3 Fix broken by D1880 line stipple deactivation 2016-04-08 12:20:43 +03:00
d969192fbe Wide lines + line stipple deprecated API replacement
The patch contains an implementation of the wide lines and the line stipple that is necessary for OpenGL upgrade.

For the implementation I have chosen the geometry shader because it required minimum changes for the wrapper calls and such implementation is the best for the "basic shader" architecture.

There are few shortcomings that can be corrected in future. They all are related to the fact that the lines in one strip are not connected with each other. So the stipple pattern is not continuous on the common vertex of two lines. There is also no continuity of form (each line is an independent rectangular).
But the advantage is that even outdated glBegin, glVertex work! Though with the above restrictions.
Continuity of form and stipple can be implemented with additional attributes, and it will require more changes in calls.

At the moment, the patch replaces calls for some "gestures". It works satisfactorily for "cross" or "rectangular" and not so good for "lasso" and "circle" due to the above-mentioned shortcomings.

Don't forget to set USE_GLSL to true for testing.

Alexander Romanov (Blend4Web Team)

Reviewers: merwin, brecht

Reviewed By: merwin, brecht

Subscribers: aligorith, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1880
2016-04-08 10:58:40 +03:00
a51e9ece53 Cycles: Fix misleading remaining time report when using infinite number of samples in viewport 2016-04-06 16:30:52 +02:00
d6ae94b988 Cycles: Fix compilation error of Hair BSDF GLSL shader 2016-04-06 15:40:55 +02:00
42824f4403 Fix missing viewport update when tree output is in a node
There was already an attempt to do it, but it worked incorrect because
of wrong recursion check.
2016-04-06 15:23:26 +02:00
e10ec6ee9a Cycles: Avoid possibly uninitialized variable 2016-04-06 10:51:04 +02:00
5ddf6ca87a Quiet warning for release build 2016-04-06 18:26:39 +10:00
9e3b0350f5 Fix leak w/ missing external mesh customdata 2016-04-06 16:14:30 +10:00
78d39cad8b Tweak fill-region method to produce fewer 'gaps' 2016-04-06 15:07:37 +10:00
16597b691a Fix camera view-border line width 2016-04-06 14:27:37 +10:00
28dad2ec12 Correct error checking for wrong frame range 2016-04-06 09:41:30 +10:00
f5fb4361d2 Cleanup: indentation 2016-04-06 09:30:20 +10:00
cc970dc08a Cleanup: arg docstrings 2016-04-06 09:28:22 +10:00
16f919ea58 Render frame arg parsing, list and range support
Support a comma separated list of frames, as well as frame ranges using the '..' separator.

eg: `blender my.blend --render-frame 1,2,10..40,100..200`
2016-04-06 09:23:15 +10:00
Reinier de Blois
c084520b03 Expose new Recast partitioning methods for navmesh generation
This patch depends on D1747, which upgrades the Recast version.  It exposes the new Recast partitioning methods in the navmesh generation.

Reviewers: campbellbarton, moguri

Reviewed By: moguri

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1748
2016-04-05 21:39:04 +02:00
Reinier de Blois
176538f613 Update Recast version to 1.5.0
The version of Recast that Blender ships with is from 2009.  This patch updates the Recast version to the latest version, 1.5.0.  The Detour version remains untouched.

Reviewers: campbellbarton, moguri

Reviewed By: moguri

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1747
2016-04-05 21:38:52 +02:00
214e384fc4 Fix UV-Editor crashes w/ over SHRT_MAX UV's 2016-04-05 22:16:09 +10:00
b8ca4819b2 Revert "Cycles: Remove the Preetham Sky model."
This reverts commit d91316dc67.
2016-04-05 12:25:54 +02:00
46aaa53998 Fix T48054: Blender 2.77 doesn't import blenders fbx, due to recent changes in anim RNA API.
Please do not break API when not absolutely needed, here it was a mere parameter order issue...
2016-04-05 11:51:54 +02:00
db28ff54d6 Fix T47705: Freestyle line glitch.
The addressed issue is a regression from Blender 2.75, after the internal
switch from double to single precision floating-point numbers in the
Freestyle code base.  Face normal calculations require the higher
precision during the computations, even though the results can be stored
as single precision numbers.
2016-04-05 16:15:09 +09:00
9c952bbe85 Cleanup: Typo fixes after BVH commits. 2016-04-05 01:20:45 +02:00
82b0a9e369 PyDriver support for all RNA property types
Support for driver variables that don't resolve to numbers, eg:
objects, bones, curves... etc.

Without this, Python expressions to access this data needed to use an absolute path from `bpy.data`,
however this is inconvenient, breaks easily (based on naming) and wouldn't set the dependencies correctly.
2016-04-05 07:38:57 +10:00
65f279b770 Cycles: Fix wrong camera in volume check when domain is only visible to camera rays 2016-04-04 19:30:38 +02:00
ac8f4ba530 Cycles: Fix regression caused by recent camera-in-volume commit
Stupid me forgot that we don't have stop-element in the stack yet.
2016-04-04 18:24:40 +02:00
a3d6552514 Cycles: Fix regular BVH not having proper visibility flags
This was caused by recent threading commit. Now because of all children
are set when they're ready need to explicitly update all parent's visibility.
2016-04-04 18:11:34 +02:00
d82d9e14e8 Fix T48045: Freestyle ID user decrement error.
This fixes reported issue, but there could be more of those hidden in Freestyle code,
it did not handle user refcount at all (and the fact it by-passes BKE in some places
for efficiency does not help here).

Note that this should be relatively harmless, since freestyle uses own Main during
render, so everything is cleaned up in the end in any case... But better try to
handle IDs correctly here too. :)
2016-04-04 15:49:30 +02:00
f76dec9238 Update hash for an OBJ unit test 2016-04-04 15:22:31 +02:00
bf55afbf26 Cycles: Make spatial split BVH multi-threaded
The title actually covers it all, This commit exploits all the work
being done in previous changes to make it possible to build spatial
splits in threads.

Works quite nicely, but has a downside of some extra memory usage.
In practice it doesn't seem to be a huge problem and that we can
always look into later if it becomes a real showstopper.

In practice it shows some nice speedup:

- BMW27 scene takes 3 now (used to be 4)
- Agent shot takes 5 sec (used to be 80)

Such non-linear speedup is most likely coming from much less amount
of heap re-allocations. A a downside, there's a bit of extra memory
used by BVH arrays. From the tests amount of extra memory is below
0.001% so far, so it's not that bad at all.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1820
2016-04-04 14:43:21 +02:00
be2186ad62 Cycles: Solve possible issues with running out of stack memory allocator
Policy here is a bit more complicated, if tree becomes too deep we're
forced to create a leaf node and size of that leaf wouldn't be so well
predicted, which means it's quite tricky to use single stack array for
that.

Made it more official feature that StackAllocator will fall-back to
heap when running out of stack memory.

It's still much better than always using heap allocator.
2016-04-04 14:13:19 +02:00
5ab3a97dbb Cycles: Log overall time spent on building object's BVH
We had per-tree statistics already, but it's a bit tricky to see overall
time because trees could be building in parallel.

In fact, we can now print statistics for any TaskPool.
2016-04-04 13:43:19 +02:00
ba7c2b7b73 Cycles: Log allocation slop factor for BVH arrays
Currently they're staying at 1 (actual size over capacity), but we
will be changing it quite soon in order to avoid having too much
memory re-allocation happening at a BVH build time and will be
playing with different policies for that.
2016-04-04 12:56:56 +02:00
5d25579602 Fix missing ID_SO sound type in outliner's ID types.
Note that we may want to review that some day, we have quite a bit of ID types here that are
'blend file' view only, might be worth splitting the check based on this.
2016-04-04 12:35:59 +02:00
61a8d12ccd Cycles: Tweak to stack allocator used by BVH builder
In some files stack memory was overruning the pre-allocated stack.

Perhaps we should fall-back to a hep-allocated stack so release builds
don't crash in works case but just becoming slower.
2016-04-04 12:23:23 +02:00
8cc7460495 Smoke: Don't use min as an uniform name
This is an attempt to fix report T47991.
2016-04-04 11:58:27 +02:00
673ddd48da Cycles: Make curves modified by a taper object with modifier considered a deform modified
That might consider a bit more objects to be considered deform modified,
but it covers common case of using taper object without require of doing
recursive checks.

In worst case it'll be just some extra synchronization time, no render
time difference will happen for false-positive because of extra checks
happening in Cycles.
2016-04-04 11:39:04 +02:00
2f08d5f761 Fix T48002: Wrong behavior with "RGB to Intensity" in Image textures
There was some extra linearization happening in such cases.
2016-04-04 11:30:35 +02:00
f4875bed89 Fix curve editmode adding 3D primitives w/ 2D curves 2016-04-04 18:36:38 +10:00
0a7ed17099 Fix curve adding 3D nurbs when 2D is set
Ctrl-LMB ignored 2D constraint
2016-04-04 18:36:37 +10:00
097b895c2c Fix curve hide keeping spline active 2016-04-04 18:36:37 +10:00
c868945a43 Fix curve, missing update on Ctrl-LMB 2016-04-04 18:36:37 +10:00
3de9b2ca74 Fix curve add-vertex w/ 2D curves
Project the point onto the 2d place where possible.
2016-04-04 18:36:37 +10:00
8f1223b636 Move some debug print under G.debug
It's not like every debug build is benefiting from this print..
2016-04-04 09:58:14 +02:00
c63398e55a Fix uninitialized variable use w/ VSE transform 2016-04-04 12:44:03 +10:00
d91316dc67 Cycles: Remove the Preetham Sky model.
The improved Hosek / Wilkie model was added during my GSoC 2013 and the default since then.

The older model was kinda kept for compatibility, but after more than 2 years it's time to remove it.
The Hosek / Wilkie model is more realistic anyway, and people who really want a day / night transition can mix the Sky Shader with another one (e.g. color) and fade between the two.
2016-04-02 23:36:14 +02:00
74e40663da Fix T47971: rigid body baking crash due to thread race condition. 2016-04-02 13:04:26 +02:00
b03ff0bbf8 Fix T48030: Can't zoom VSE properties panel 2016-04-02 18:52:52 +11:00
e02d0de36e Fix T47505: Cycles OpenCL rendering crash on Windows.
Restore the boost bug workaround, but without changing the locale.
2016-04-01 20:39:07 +02:00
ce44ffd74f Cycles: Fix wrong camera-in-volume stack when camera ray hits volume domain twice 2016-04-01 18:03:58 +02:00
0f6f921898 Cycles: Temporarily revert index sort commit for spatial split
There are in fact some missing parts to it (Split BVH builder should
be creating bins from result of Object Split constructor).

Doable, but need to quickly fix issue for the studio here, easier to
revert for now.
2016-04-01 17:45:59 +02:00
8e6d6cc4dc Fix T48001: Highlighting selected item in filtered lists.
active index was not reset to 'nothing' in case actual active item was filtered out.
2016-04-01 16:55:34 +02:00
a9cd97673d Knife Project: revert fix for T43896
For now leave precision at half a pixel until we have real fix.
Resolves T48023.
2016-04-02 01:33:10 +11:00
9ca9256693 Cycles: Support deformation motion blur for curves deformed by taper 2016-04-01 15:53:40 +02:00
f318e8322f Cycles: Report thread ID from worker thread to callbacks
Main use case of this ID will be to emulate TLS which otherwise
would require having some platform-specific implementations which
is not always really optimal.

See notes about the argument in util_task.h.
2016-04-01 15:25:35 +02:00
c6b27dd4fa BMesh: improve path-select fill region w/ ngons
Rewrote to work with ngons and and more complex topology, now uses separate function.
Fixes T48009.
2016-04-01 23:36:06 +11:00
Philipp Oeser
ae49f2ed99 Fix T48013: UV Sculpt Brush Does not appear in UV window - but does show up in uv panels (t, n)
Epic fail in recent rB2c3985 :/

To be backported to 2.77a!
2016-04-01 14:22:54 +02:00
f185effa15 Buildbot: Explicitly disable tests on all platforms
They were never running anyway since there's no checkout of
tests folder. We should either make tweaks to buildbot master
to make it to send cloning commands for tests folder and keep
tests working (currently some of them are broken).
2016-04-01 10:33:44 +02:00
42a9f334c8 Update stub for recent BPY API 2016-04-01 18:56:48 +11:00
4738ae085d Cycles: Fix for missing pthread's spin on OSX 2016-04-01 09:16:46 +02:00
314aa17678 Fix When using keying sets, the toggling "all items" in the array target only goes from the index value down, instead of keying all 2016-04-01 12:52:26 +13:00
ee324aacdd Hide layers from UI in template 2016-04-01 10:23:39 +11:00
743739f9dc Cleanup: style/spelling 2016-04-01 10:02:59 +11:00
de21f07f6c Generic check for string being a Py keyword
Driver code used incomplete list of Py keywords
2016-04-01 09:49:16 +11:00
bc318fc470 Use STRPREFIX macro for testing property name 2016-04-01 09:24:50 +11:00
83b5f0268e Fix T48012: Knife Project crash 2016-04-01 06:27:35 +11:00
553ea6de8b Fix NULL check before free 2016-04-01 06:23:35 +11:00
9431fc6764 Cycles: Fix wrong initialization order of mesh flags and object transform 2016-03-31 17:54:03 +02:00
185d002586 Cycles: Fix too many objects being considered an instance 2016-03-31 17:46:22 +02:00
6cc04b408c Cycles: Fix compilation on Win32 after bitscan commit
Need to revisit utility headers a bit more carefully and perhaps
move such utilities outside of simd-related headers.
2016-03-31 16:47:57 +02:00
Julian Eisel
90c19c61d4 Fix memory leak when assigning driver
Also added NULL-checks for RNA paths, though they might be a bit paranoid.
2016-03-31 16:41:50 +02:00
Julian Eisel
60534ee56b Fix memory leak when calling new driver eyedropper
Would return OPERATOR_RUNNING_MODAL for non-modal operator.
2016-03-31 16:27:16 +02:00
de6af2f02a Remove the obsolete windows launcher 2016-03-31 14:07:57 +02:00
c0cb9d75d6 CMAKE disable building the windows launcher, fix type in delayloading of debug dll 2016-03-31 14:05:46 +02:00
791a0852e8 Cycles: Name cleanup and some comments in BVH code 2016-03-31 13:52:38 +02:00
4ec95d621a CMAKE / msvc openmp, delay loading of openmp dll so we can set environment
variable before it is loaded
2016-03-31 13:46:14 +02:00
e2059380de Cycles: Add easy to use spin lock primitive
Currently unused, but will be handy for an upcoming changes.

It'll also be nice to be able to do scoped_lock() for both
Mutex and Spin, but currently it's not really easy to do,
need some changes in typedefs and such, will happen as a
separate commit.
2016-03-31 10:22:11 +02:00
7fd71338f9 Cycles: Expose array's capacity via getter function
This way it's possible to query capacity of an array, which then
could be used for some smart re-allocation and reserve policies.
2016-03-31 10:06:21 +02:00
63d017be90 Cycles: Avoid per-split memory allocation for the new references list 2016-03-31 10:06:21 +02:00
e69a0ab5fc Cycles: Pass BVH builder by const reference to spatial splitters 2016-03-31 10:06:21 +02:00
d9b729e342 Cycles: Only sort indices when finding a best dimension to split
This reduces amount of data being moved back and forth, which should
have positive effect on the performance.
2016-03-31 10:06:21 +02:00
bbbbe68473 Cycles: Wrap spatial split storage into own structure
This has following advantages:

- Localizes all the run-time storage into a single structure,
  which could easily be extended further.

- Storage could be created per-thread, so once builder is
  threaded we wouldn't have any conflicts between threads.

- Global nature of the storage avoids memory re-allocation
  on the runtime, keeping builder as fast as possible.

Currently it's just API changes, which don't affect user at all.
2016-03-31 10:06:21 +02:00
9c420e5e48 Cycles: Use stack storage for temporary data on leaf creation
Uses new StackAllocator from util_stack_allocator. Some tweaks to the stack
storage size are possible, read notes in the code about this.

At this point we might want to rename allocator files to util_allocator_foo.c,
so the stay nicely grouped in the folder.
2016-03-31 10:06:21 +02:00
ffe59c54cb Cycles: Add STL allocator which uses stack memory
At this point we might want to rename allocator files to
util_allocator_foo.c so the stay nicely grouped in the folder.
2016-03-31 10:06:21 +02:00
65b375e798 Cycles: Move non-vectorized bitscan() to util
This way we can use bitscan() from both vectorized and non-vectorized
code, which applies to both kernel and host code.
2016-03-31 10:06:21 +02:00
0b6b094a8c Cycles: Aligned vector was not covered by guarded stat
This was making stats printed by the logging being wrong: they did not
include such memory as BVH storage.
2016-03-31 10:06:21 +02:00
bd68a25505 cmake fix full debug builds on msvc 2016-03-31 08:12:53 +02:00
ec28fe2e6b Fix T47985: VSE GL-render scene strip hangs
Regression in d5f1b9c22,
threading deadlock rendering a scene from the OpenGL preview.
2016-03-31 15:49:24 +11:00
01ce8d80d0 Usual ui messages fixes/tweaks. 2016-03-30 23:39:54 +02:00
f7fc55867a libquery foreach looper: in recursive case, do not bother with NULL id pointers! 2016-03-30 21:36:09 +02:00
cb19948053 Fix T47983: Particles - Emit from Verts emits double on one vert.
When non-random, particle distribution used a small start offset (to avoid
zero-weight faces), which is fine with "continuous" entities like faces, but not
for discrete ones like vertices - in that case it was generating some undesired
"jump" over a few verts in case step was small enough
(i.e. total number of verts/particles was big enough).
2016-03-30 21:04:54 +02:00
756ab5ee2c Use Ctrl-Shift-RMB for to enable 'Fill Region' 2016-03-31 04:30:33 +11:00
a55477d32a Shortest Path Select: option to select all paths between 2 elements
This option selects all paths between source/destination which are no longer than the path found.

Handy for selecting meshes with a grid-topology.
2016-03-31 04:25:19 +11:00
26132eaf1f Partly fix (unreported) particles not updating correctly when changing settings.
Point-cached particles (those using simulations) would not update at all outside of
first frame, due to PSYS_RECALC_RESET flag being ingnored in `system_step()`...

For some mysterious reasons, udate is still non-fully functional outside of startframe
(e.g. changing face distribution between random and jittered), but at least when choosing
'Vertices' you get particles from verts and not faces!
2016-03-30 17:10:54 +02:00
53e85a159a Particles: Fix broken grid distribution in some case from own recent rB201d3938622. 2016-03-30 16:56:32 +02:00
f8b9f4e9bb Cycles: Resumable render implementation for Cycles
This feature is also known by the name Samples Offset, which allows
artists to render animation with given amount of samples N, but then
render more samples, starting from N and ending with M (where M > N)
and merge renders together as if they rendered exactly M samples.

Surely such effect could be achieved by changing Seed variable, but
that has possible issues with correlation artifacts and requiring to
manually deal with per render layer samples and such.

While we can't support all possible renderfarm-related features in
Cycles it's nice to support really commonly used stuff.

Here's a command how to run Blender with the new feature enabled:

  blender -- --cycles-resumable-num-chunks 24 --cycles-resumable-current-chunk 2

This command will divide samples range in 24 parts and render
range #2 (chunk number is 1-based).

This feature might be changed a bit after we'll do some tests here
in the studio with it.
2016-03-30 16:02:27 +02:00
ee364b6358 Fix T47940: Custom bone shapes, select error w/ Open NVidia drivers
Latest nouveau drivers have a bug here, use occlusion queries.
2016-03-31 00:59:04 +11:00
74d3f3746c CMake cleanup target_link_libraries_decoupled 2016-03-30 15:15:17 +02:00
119ce13a41 Fix T46623: OSX bpy.app.binary_path_python incorrect
CMake's PYTHON_EXECUTABLE wasn't set.
2016-03-30 22:50:29 +11:00
722d586257 Fix T47993: noise_vector ignores random seed
Replace hard coded values with offsets derived from the random seed.
2016-03-30 20:43:43 +11:00
93f107729c Fix T48000: Eyedropper sample-merged ignored at first 2016-03-30 17:28:01 +11:00
fd9674e0b3 Merge branch 'openvdb' into cvdb_ray_isect 2016-03-30 04:10:10 +02:00
e5b71e1017 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/kernel_globals.h
	intern/cycles/kernel/kernel_types.h
2016-03-30 04:07:44 +02:00
29bb10ee96 Fix transform center2d for 2d views
While this didn't show up as a bug, the center2d was being calculated with a zero aspect,
causing TransInfo.center2d to be NAN.
2016-03-30 07:15:33 +11:00
37e1e2695c Fix T47814: VSE Scene 'Use Sequence' fails
Conflict with flags between depsgraph and sequencer caused error.
Now pass state of sequencer parents to avoid recursion.
2016-03-30 06:59:36 +11:00
e5e8d67028 Fix T47961: Wipe effects should have 2 inputs 2016-03-30 06:33:35 +11:00
c3ed6010af Fix T47967: Select next active fails in some cases
For cases when there are multiple matches,
find the closest match (with increasingly fuzzy tests) instead of failing.
2016-03-30 05:01:57 +11:00
3a24e6320f Buildbot: Attempt to work-around unsupported clang on OSX machine
Ideally this would need to be fixed by nvcc itself. but they didn't
do that for a long time.
2016-03-29 19:46:10 +02:00
de81607efc Fix error in ghash/gset_ensure_p_ex
The key is needed in the case the ghash resizes.
Caused regression T47984.
2016-03-30 03:04:47 +11:00
201d393862 Fix T47902: Particle grid not using modifier stack, Take II.
Now only fix correct handling of use_modifier_stack for grid distribution,
fixing it globally breaks all existing edited hair systems. :/
2016-03-29 17:45:56 +02:00
a959771626 Revert "Fix T47902: Particle grid not using modifier stack."
This reverts commit 2bd3acf7cd.

Commit is valid in theory - but in practice, it means nearly all edited hair systems
would need to be re-created from scratch... Not nice, so better revert and note in code
that particle distribution is ugly and does not respect 'use modifier stack' option in most cases.
2016-03-29 17:33:08 +02:00
24d931ea58 GPencil New Stroke Smoothing: Don't perform smoothing on pressure values
As noted by Antonio and Daniel, performing smoothing on the pressure values
for new strokes doesn't work that great. From an artist POV, it is apparently
"very strange that line thickness shrink suddenly after drawing it".
2016-03-30 03:21:59 +13:00
3bdd7ba34f Driver Mapping Types: Added temporary icons to break up the two types of mapping behaviours (modal vs manual) 2016-03-30 03:21:58 +13:00
d29b32ae36 RMB Menu: Add icons for delineating each cluster of options in this menu
From T33052 by Harley Acheson (harley)
2016-03-30 03:21:58 +13:00
deffd4352b Drivers Setup: Expose all mapping types for creating drivers
* This includes the "manually create" modes, which correspond to the previous behaviour
  for setting up drivers. This is necessary when the current screen layout is not
  well suited to having multiple property editors open (e.g. small screen or heavily
  subdivided screen).

* Only the modes relevant for the current property type (i.e. array vs single)
  will be shown

* The "Add Driver" entries in the RMB context menu have now been replaced by a
  submenu which will list all the available mapping types.

* NOTE: The code for the ANIM_OT_button_driver_add() operator is perhaps a bit hairy.
  However, it currently allows us to have the desired behaviour. It can always get
  cleaned up later though.
2016-03-30 03:21:57 +13:00
3237ae2855 Add license text for OCIO configuration 2016-03-29 12:54:29 +02:00
003f908f0d Fix T47987: Blender Cycles standalone does not properly read UV coordinates from XML 2016-03-29 10:02:17 +02:00
2fae1719f8 Fix T47986: OBJ Import fails w/ imagepath encoding 2016-03-29 18:30:08 +11:00
b1f918bcc5 Fix T47958: Crash in Walk or Fly Navigation in Camera mode when invoking from non-3DView region 2016-03-28 18:19:43 +02:00
Julian Eisel
37b7b3a935 T47532: Pop-ups drop fast mouse clicks
Caused by rBc24be7ec6e5.

Before rBc24be7ec6e5,  wm_handlers_do always called handlers a second time with event value KM_PRESS in case of a double click. After it, this was only the case for non-LEFTMOUSE events.
Since ui_popup_handler (almost) always returned WM_UI_HANDLER_BREAK, the second handler iteration with KM_PRESS wouldn't run. This fix just makes sure we return WM_UI_HANDLER_CONTINUE for double click events instead (causing second iteration to run).
2016-03-28 16:45:12 +02:00
28ca3ebc5f Fix T47969: Select Random always uses same seed
Increment the seed on each use,
otherwise calling again selects the same order, unless you manually adjust the seed.
2016-03-29 01:24:57 +11:00
d336bb0765 Fix T47972: Blender crash showing particle system.
Do same as with faces - if no orcodata is available, fill orco with current location...
2016-03-28 15:52:59 +02:00
240adb90a5 Fix T47973: Render stamp ignores font alpha 2016-03-29 00:26:55 +11:00
6a099b0c45 BLF: alpha support for drawing to buffer 2016-03-29 00:26:55 +11:00
e2e72a20ec Fix T47931: Missed world shader update when having object dependency 2016-03-28 10:45:29 +02:00
8a9dd6f6fb Fix T47898: Error adding mask node with "Add Mask Node" operator
This operator is intended to be used by drag-n-drop, no user invocation
is expected to happen here. Use Add->Search to quickly add nodes instead.
2016-03-28 10:09:11 +02:00
b7dfef325d Cleanup: Unused variable 2016-03-28 09:36:41 +02:00
ca935abc18 Graph Editor UI: Experimental Tweak - Use tabs for properties region, to make it easier to navigate 2016-03-28 14:46:29 +13:00
96f8bfec2d GPencil: Note that clicking outside the active area also exits draw mode 2016-03-28 14:46:28 +13:00
211b539644 Fix T47959: make tip for 'individual origins' pivot point in UV editor more accurate.
Based on D1877 from Philipp Oeser (lichtwerk), thanks.
2016-03-27 17:18:17 +02:00
c65950dbb4 GPencil: Remove the old UserPrefs-based On/Off Stroke Smoothing method
This never really worked that well, and often ended up being far too strong
to be of practical use. The new options do similar things, but with greater
control, so removing this old method now.
2016-03-28 03:39:26 +13:00
2bb956f6c9 GPencil: Smooth and Subdivision variable/setting naming
On second thought, these might be better names for these... I'm still not 100%
happy with these, but they will do for now.

(Best results currently seem to be with smooth 0.7, and subdivision steps 1 or 2)
2016-03-28 03:21:31 +13:00
fd8f51da08 GPencil: Removed the restriction of not subdividing strokes further if it exceeds GP_STROKE_BUFFER_MAX
Assuming that this subdivision + smoothing mostly only happens at the end of a stroke
anyway, enforcing this max-points limit in some cases was resulting in strokes that
weren't quite getting subdivided properly as the others.
2016-03-28 03:21:30 +13:00
e78a929d68 GPencil: Code Cleanup - Simplify and clarify the code for subdividing a stroke 2016-03-28 03:21:29 +13:00
a7538b19c6 GPencil: Restore ability for Smooth brush to affect pressure values of strokes 2016-03-28 03:21:29 +13:00
00cfbeef11 Code Cleanup - Style tweaks 2016-03-28 03:21:28 +13:00
bfbbc8ec40 Improve grease pencil stroke quality
Improve the quality of current grease pencil strokes adding a new dynamic smooth and subdivision. The level of smooth and subdivide can be adjusted using UI parameters. These options are disabled by default in order to keep the grease pencil stroke compatible with any existing add-on.

Both parameters are defined at layer level.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D1866
2016-03-28 03:21:28 +13:00
71107208dd More tooltip tweaks
The "UI_OT_eyedropper_id" operator only actually works in the 3D view,
so change the tooltip to match that
2016-03-28 03:21:27 +13:00
Julian Eisel
9adf4cba7d Fix T45075: "Error, region type 2 missing in - name:"File", id:5"
Unexpectedly found out what was going wrong here. If a file was saved with a filebrowser open, we searched for the channel region in the wrong list (see 'ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;').

Minor annoyance is that I had to move the loookup to the 2.77.1 version patch now.
2016-03-27 13:45:10 +02:00
7bce3dd3ad Fix T47697: Smoke simulation doesn't work in viewport
Seems to be a division by zero error.

Should be safe for an upcoming 'a' release.
2016-03-27 13:21:33 +02:00
Julian Eisel
9c2704c169 Fix changing view in default video editing layout broken
Own mistake in 802bb42267
Apparently we only store one preview region for all views, didn't know that (makes sense though).
2016-03-27 13:20:30 +02:00
ce71e2e789 Fix T47962: It's possible to set a Sound strip as a modifier Mask. 2016-03-27 13:02:43 +02:00
fb9315ce2a Cleanup: Silence some compiler warnings 2016-03-27 12:36:49 +02:00
e12650bdd1 Driver Eyedropper: Auto detection/correction magic for rotation properties
When linking a rotation property to a non-rotation property (going in either
direction - i.e. rot -> normal, normal -> rot), the driver expression will
now be set so that the new drivers behave as expected (i.e. you get the values
you see, instead of "weird" values that seem several orders of magnitude off).

This may not be that great for everyone (i.e. the rare users out there who
actually like to look at their rotations in radians), but they usually know
what they're doing anyway, so this will be easy to correct.
2016-03-27 18:05:35 +13:00
4b279815d5 Drivers: Add a "none" mode for use when adding drivers
Although it isn't currently exposed, this allows for the old behaviour,
where an "empty" driver was added (without any target assigned yet).
For this reason, it's also referred to as the "Manual" mode.

There are also some attempts at improving the tooltips + names for the
other modes (again, not shown anywhere yet)
2016-03-27 18:05:35 +13:00
6caad32c12 Code Cleanup - Split out the property-button-finding code so that it can be used for other eyedroppers 2016-03-27 18:05:34 +13:00
52f3f6ffa4 Fix crash opening some .blend files after recent fix for hidden preview regions. 2016-03-27 01:55:51 +01:00
e14324daa7 Fix T47758: rigidbody bug with constraint breaking and disable collisions.
This is a regression in Bullet, reverted the problematic change for now with
a custom patch.
2016-03-27 01:32:28 +01:00
273740006e Fix T47668: Cycles OpenCL glass not rendering correctly on AMD.
Work around what appears to be a compiler bug.
2016-03-26 23:45:18 +01:00
9317f9c055 Fix T47939, take II: Check clang package version, not llvm-devel one.
Looks like some distro still provide llvm-3.4-devel, while no more clang-3.4.
Since clang depends on llvm of same version, check clang only should ensure
us we also have matvhing llvm... *sigh*
2016-03-26 21:07:04 +01:00
8fcf774167 Fix T47935: Hair particles; The display percentage parameter breaks after a render is done.
Follow same logic in `psys_render_restore` as in `psys_render_set` - if hair and
display percentage is not 100%, we have to recompute particles...

With regular 'emitter' particles just hiding some is fine (though using random here
will not give a precise proportion...).
2016-03-26 17:41:56 +01:00
112f431c3b Fix T47951: UserId problem on reload.
readfile.c would increment object usercount in three places, where it should not.
Remember kids: Objects are **only** refcounted by Scene's bases, and Object->proxy!
2016-03-26 16:22:17 +01:00
6483c3c280 Fix own regression in rBc08924bf94f2dff - foreach ID looper was broken due to missing initialization.
Quite unbelievable this could slip in... tons of shame on me :/
2016-03-26 16:11:12 +01:00
6a0c187653 Revert "Fix T47896: Scripted Expression string length limit is too short for some autogenerated expressions"
This reverts commit 322f86d6b3.
2016-03-26 23:00:20 +13:00
5759e335c3 Driver Variable Name Validation: Added missing check for zero-length (i.e. "blank") names 2016-03-26 18:02:02 +13:00
0512e20ae9 Driver Setup Workflow Improvement: Property Eyedropper
This commit brings some long requested improvements to the workflow for setting up
drivers, which should make it easier and faster to set up new drivers in a more
interactive fashion.

The new workflow is as follows:
1) Hover over the property (e.g. "Lamp Energy" or "Y Location") or properties ("Rotation")
   you wish to add drivers to. We'll refer to this as the "destination"
2) Ctrl-D to active the new "Add Drivers" eyedropper
3) Click on the property you want to use as the source/target. The property under the
   mouse will be used to drive the property you invoked Ctrl-D on.

For example, to drive the X, Y, and Z location of the Cube using the Y Location of the Lamp,
hover over any of the X/Y/Z location buttons, hit Ctrl-D, then click on the Y-Location
button of the Lamp object. Drivers will be added to the X, Y, and Z Location properties
of the Cube; each driver will have a single variable, which uses the Y-Location Transform
Channel of the Lamp.


Tips:
- Transform properties will automatically create "Transform Channel" driver variables.
  Everything else will use "Single Property" ones

- Due to the way that Blender's UI Context works, you'll need two Properties Panel instances
  open (and to have pinned one of the two to show the properties for the unselected
  object). It's slightly clunky, but necessary for implementing a workflow like this,
  as the UI cannot be manipulated while using eyedroppers to pick data.

- The eyedropper operator implemented here actually has three modes of operation.
  1) The "1-N" (one to many) mode is the default used for Ctrl-D, and "Add Driver to All"
     in the RMB Menu. This is the behaviour described above.
  2) There's also a "1-1" (one to one) mode that is used for the "Add Single Driver" in the
     RMB Menu.
  3) Finally, there's the "N-N" mode (many to many), which isn't currently exposed.
     The point of this is to allow mapping XYZ to XYZ elementwise (i.e. direct copying)
     which is useful for things like locations, rotations, scaling, and colours.


Implementation Notes:
- The bulk of the driver adding logic is in editors/animation/drivers.c, where most of
  the Driver UI operators and tools are defined

- The property eyedropper code is in interface_eyedropper.c along with all the other
  eyedroppers (even though they don't share much actual code in common). However, this
  turns out to be necessary, as we can't get access to many of the low-level buttons API's
  otherwise.

Todo:
- It may be necessary to restore a way to access the old behaviour (i.e. "manual setup")
  in case it is not practical to immediately pick a property.

- Other things to investigate here include extra hotkeys (e.g. Ctrl-Shift-D for Add Single?),
  and to expose the N-N mode.

- Other things we could try include interactively applying scaling factors, picking
  multiple targets (e.g. for location difference and rotation difference drivers),
  and/or other ways of using these property picking methods.
2016-03-26 18:02:02 +13:00
ee9898e0fa Drivers Workflow: Change hotkey for "Add Drivers" to Ctrl-D (it was previously just DKEY)
Just using DKEY for this was resulting in too many drivers being accidentally created
by users drawing using Grease Pencil. This change also works better with the following
workflow changes to the driver setup process.
2016-03-26 18:02:01 +13:00
eac770a33a Fix T47939: Install Deps OSL 1.7.1 and clang-3.5
Until we officially support llvm3.5 or more, only allow for 3.4 llvm packages,
and build own stuff otherwise...
2016-03-26 00:31:41 +01:00
2bd3acf7cd Fix T47902: Particle grid not using modifier stack.
Disclaimer: this is tentative fix, seems to be working but you never know with particles.
If issue arise, we'll just revert this commit and hide 'use modifier stack' option
for grid distribution instead.

This commit also try to make choice of which dm to use during distribution more generic
(deduplication of code), again hopping not to break anything. :P
2016-03-26 00:18:00 +01:00
Julian Eisel
802bb42267 Fix sequencer view in video editing layout containing hidden preview region
Steps to reproduce were:
* Open default video editing layout
* Drag down or click '+' icon in upper right corner of sequencer view
* A preview region appears, even though the view type is not set to sequencer-preview split mode

Another bug that has been there since ages :/ Reported by @Blendify via IRC, thanks!
2016-03-26 00:09:34 +01:00
7607d064d6 Fix Cycles debug panel, being shown in BI as well. 2016-03-25 19:59:18 +01:00
e4a265f058 Cycles: Add an option to build single kernel only which fits current CPU
This seems quite useful for the development, so you don't need to wait
all the kernels to be re-compiled when working on a new feature, which
speeds up re-iteration.

Marked as an advanced option, so if it doesn't work so well in practice
it's safe to revert anyway.
2016-03-25 16:09:05 +01:00
700722f686 Cycles: Cleanup, indent nested preprocessor directives
Quite straightforward, main trick is happening in path_source_replace_includes().

Reviewers: brecht, dingto, lukasstockner97, juicyfruit

Differential Revision: https://developer.blender.org/D1794
2016-03-25 13:55:42 +01:00
0e47e0cc9e Cycles: Use dedicated BVH for subsurface ray casting
This commit makes it so casting subsurface rays will totally ignore all
the BVH nodes and primitives which do not belong to a current object,
making it much simpler traversal code and reduces number of intersection
tests.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1823
2016-03-25 13:42:13 +01:00
712a257994 Fix T47928: Crashing save corruption with dynamic paint drip effector groups.
Dynapaint's `foreachIDLink` was mnot handling effector_weights->group pointer...
2016-03-25 13:17:04 +01:00
Julian Eisel
4509559c13 Fix modal bevel OP immediately stopping when called using enter key from search menu
Steps to reproduce were:
* Go to edit mode, select geometry
* Spacebar -> search for bevel OP
* Activate *using enter key*
* Immediately stops when releasing enter key

To fix we simply make sure the initial release event is ignored. For mouse events that wasn't an issue since activating an element is done on key release in menus. An alternative fix would be to do the same for enter key, but that's more risky. Also, checking event value is highly recommended anyway.
2016-03-25 12:31:46 +01:00
7219988258 Revert "Fix T47263: numpad4/6 rotates around worl Z axis and not view Y axis."
This reverts commit fe0ca82b23.

This is a design issue, needs more thinking, for now just revert back to old behavior.
2016-03-25 12:09:59 +01:00
a0a7d823e0 CMake: Disable Cycles OSL for the light configuration
While it was indirectly disabled already, it's handy to use the config
as template and enable certain features. In case of Cycles enabling it
would also enable OSL which is not very expected.
2016-03-25 11:27:08 +01:00
7f3da8f5c9 UI: Presets for scene units
This adds simple preset menu for unit scale scene property.

D1799 by @alm
2016-03-25 05:03:25 +11:00
9dc5e1dbc2 Make IDPreview handling code use new recursive libquery looper. 2016-03-24 16:10:39 +01:00
c08924bf94 Rework library_query foreach looper - add optional recursivity.
This commit:
* Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually
  stop in helper functions too, and jumping to a finalize label instead of raw return, to
  allow propper clean up).
* Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp
  from recursion. Note that this implies 'readonly', modifying IDs while recursing is not
  something we want to support!
* Changes callback signature/expected behavior: return behavior is now handled through flags,
  and 'parent' ID of id_pp is also passed (since it may not always be root id anymore).

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1869
2016-03-24 16:10:39 +01:00
60cf62ff4b Cycles: Minor optimization of equirectangular projection
Don't calculate sine twice, store this in a variable instead.

Perhaps compilers can optimize this out, but helping them a but wouldn't hurt.
2016-03-24 15:01:39 +01:00
8249046b82 UI: search operator's by word prefix
Would match middle of words which wasn't very useful in most cases.
2016-03-24 23:30:51 +11:00
70fcecc1f7 Fix BLI_strncasestr use with a single character 2016-03-24 23:30:51 +11:00
bdae647670 Color sources for point density textures based on mesh vertices
This patch adds support for coloring point density textures based on several mesh vertex attributes.

* Vertex Color: Use a vertex color layer for coloring the point density texture
* Vertex Weight: Use a weights from a vertex group as intensity values. (for Blender Render engine the additional color band is used)
* Vertex Normals: Use object-space vertex normals as RGB values.

The vertex color source enum is stored separately from the particle color source, to avoid invalid values when switching.

Note that vertex colors are technically "corner colors" (MLoop), so each vertex can have as many colors as faces it is part of.
For the purpose of point density the mloop colors are simply averaged, which is physically plausible because corners can be viewed
as multiple points in the same location.
2016-03-24 12:07:03 +01:00
8e9a55f1e5 Fix some typos and incorrect tooltips/descriptions 2016-03-24 23:31:06 +13:00
f209529c3d Fix T47910: Knife project fails
Regression in fix for T43896, using screen-space precision here is very problematic,
using lower precision here works for both reports.
2016-03-24 18:27:39 +11:00
7e65b02fb6 Cleanup: use prefix for return args 2016-03-24 18:05:10 +11:00
2a9e3c2bdb Fix incorrect arg type 2016-03-24 17:56:30 +11:00
75849b099f Fix T47838: Walk gravity fails w/ intersecting objects
Regression in 3ad0344, fix from @mano-wii.

More comprehensive fix can be done after 2.77a.
2016-03-24 17:52:31 +11:00
17d0c10096 Driver Keyframing: Some tweaks to make inserting keyframes on Driver F-Curves easier
Now, when trying to insert a keyframe on a driven property (using IKEY, or with
autokeying enabled), the keyframes will get created on the Driver's F-Curve
(instead of creating a new FCurve that goes into the active action, but will never
do anything). Furthermore, the x-value of the new keyframe will be the current
result of the driver expression.

Why/Motivations:
This way, it becomes easier to create corrective drivers, as you can position all
the targets the driver depends on, then adjust the driver value until it does what
you need, and then you keyframe that value to bake it into the Driver F-Curve
(in effect, "training" the computer how to behave in that case).

Usage Notes:
* In practice, that particular workflow is still quite clunky to achieve, due to some
  quirks of how the driver system and the UI widgets interact. Specifically, you'll
  need to disable/mute the driver before trying to edit the setting (to prevent the
  driver from immediately resetting the value - before even autokey fires!). However,
  if you're using the Graph Editor to preview/monitor/manage the keying process, you'll
  then want to re-enable the driver before changing the targets, so that you can see
  how much of a change you'll want to be applying!

* The warning about editing driver values may need to be disabled or selectively
  knocked out. I had it disabled while testing this functionality, but it's actually
  harmless in its current state (if just a bit annoying).
2016-03-24 19:34:52 +13:00
0a3792a65b Fix T47900: VSE adjustment crashes on blank frame
Regression, should have been included in previous fix.
2016-03-24 17:13:25 +11:00
d2244b59d8 Fix dodgy indentation 2016-03-24 15:20:56 +13:00
c4956faf99 Drivers UI: Added name validation/linting for Driver Variables
When attempting to change a driver variable name to an "invalid" name,
an indicator will now be shown beside the offending variable name.
Clicking on this icon will show a popup which provides more information
about why the variable name cannot be used.

Reasons that it knows about are:
1) Starts with number
2) Has a dot
3) Has a space
4) Starts with or contains a special character
5) Starts with an underscore (Python does allow this, but it's bad practice,
   and makes checking security of drivers harder)
6) Is a reserved Python keyword
2016-03-24 15:15:04 +13:00
322f86d6b3 Fix T47896: Scripted Expression string length limit is too short for some autogenerated expressions
While most scripted expressions are quite short (e.g. "var" or "frame + 1"),
those that are autogenerated by scripts (to take into account a wide range of factors)
may require a bit more headroom to operate in.

By doubling the maximum length here, we now make it possible to combine up to 38
3-letter variables in some linear combination (with all factors expressed to 4 dp).
That should be more than enough for anyone or anything for quite a while!

Unfortunately, this does increase memory consumption for drivers across the board.
2016-03-24 13:02:22 +13:00
c1095c7a9f Revert "Fix T47869: OpenColorIO Error with unicode path to config file under Windows"
White the config itself could be loaded this way, lookup tables can not. Additionally,
that's not really clear how to solve the issue with search path which is multi-byte
only in the API.

Reverting for further investigation.

This reverts commit ab4307aa08.
2016-03-23 19:28:16 +01:00
376eb77fd7 Fix T47900: VSE adjustment crashes on blank frame 2016-03-24 05:23:37 +11:00
2103e2112c Fix T47870: Missing viewport update when material output is inside of the group 2016-03-23 15:42:38 +01:00
c87e65542c Fix T47833: View-aligned GPencil strokes move in crazyspace when grabbed
These fixes "seem" to do the right thing now...
2016-03-24 03:32:28 +13:00
ab4307aa08 Fix T47869: OpenColorIO Error with unicode path to config file under Windows 2016-03-23 15:09:36 +01:00
6a4967ca6e AnimEditors: Fuzzy/Multi-Word Name Filtering
Thanks to D1080 by @rockets, I've now been able to easily implement the
ability to type multiple word snippets/partial words into the text filter
field (in the Animation Editors), and have it filter the channels which
contain just some of those parts (instead of having to match everything).

For example, the following search strings will now work:
* "loc rot" or "lo ro" will now filter all location and rotation FCurves
* "col loc" will filter all location and color FCurves
* "scale" will also work as before to filter all scale FCurves

But, the following will not work:
* "lc rt" will NOT filter all location and rotation, as the fuzzy search only
  breaks down the search string based on whitespace placement

By default, this is not enabled when using name filtering (i.e. magnifying glass is checked,
and some filtering text is specified). Instead, you need to enable the "AZ" toggle beside
the name field. This fuzzy matching is not enabled by default as it could end up being
quite a bit slower on really heavy scenes. (There are probably some optimisation
opportunities, but that's only a future option if someone really needs it)
2016-03-24 02:45:14 +13:00
21f31e6054 Fix T47856: Cycles problem when running from multi-byte path
This is a mix of regression and old unsupported configuration.

Regression was caused by some checks added on Blender side which was
checking whether python function returned error or not. This made it
impossible to enable Cycles when running from a file path which can't
be encoded with MBCS codepage.

Non-regression issue was that it wasn't possible to use pre-compiled
CUDA kernels when running from a path with non-ascii multi-byte
characters.

This commit fixes regression and CUDA parts, but OSL still can't be
used from a non-ascii location because it uses non-widechar API to
work with file paths by the looks of it. Not sure we can solve this
just from our side by using some codepage trick (UTF-16?) since even
oslc fails to compile shader when there are non-ascii characters in
the path.
2016-03-23 13:58:31 +01:00
6e31f4f090 Fix T47893: BGE crashes w/ generated mesh data 2016-03-23 23:40:30 +11:00
74399e0a18 Radial Operator: Tweak number of digits displayed for the different property types
* As requested by venomgfx, rotations now only display to 2 decimal places (more than
  enough for rotations in degrees)
* Also, made it so that the "factor" types now show 3 dp (previously only 2, which isn't
  really enough when dealing with values from 0.0 - 1.0)
2016-03-24 01:00:13 +13:00
9815262444 Radial Control Operator: Always show the property name + value on the header
The radial control operator is commonly used for setting sculpt brush Size and Strength
settings. However, when using it, it can often be difficult to remember which hotkey
is responsible for which setting, meaning that you can often accidentally modify the
wrong setting without knowing it (or even what new value you've set it to).

This commit makes it so that the property name and the current value are always shown
on the header. Previously this info was only shown when the doing numeric input.
(It also fixes a bug where the numeric input print would hang around even after it
wasn't being used).
2016-03-24 01:00:12 +13:00
0f501a73ab Fix T47890: Vertex mask w/ subsurf select fails
Regression in GL refactor
2016-03-23 21:02:44 +11:00
80a7efdc1d UI: multi word filtering in search menu
D1080 by @rockets, with own improvements to tests
2016-03-23 18:51:29 +11:00
b0a7e77700 Cleanup: style 2016-03-23 04:47:16 +11:00
c31c53983e Cleanup: style (80-width) 2016-03-23 04:25:08 +11:00
46dd04faed Fix incorrect strncat use 2016-03-23 03:54:04 +11:00
0f1d711681 Fix T47830: Multi-edit w/ ui-list wont highlight
Regression from 4d6b892.
2016-03-23 03:37:23 +11:00
84d8b35d6c Weight Paint: support accumulate for blur brush
This re-applies smoothing based on the previous update.

Can smooth more but harder to get such even distribution.
2016-03-23 01:25:56 +11:00
e2181c2ef2 Fix for crash of point density textures due to undefined point_data on loading. 2016-03-22 15:07:56 +01:00
220a7a4fb1 Weight Paint: blur now smooths connected weights
Previously it would average all points under the brush, giving an off feedback loop that often depended on the
direction of the brush stroke, giving not-very-useful smearing effect.

Now blend brush smooths between connected edges.
2016-03-22 22:37:30 +11:00
29acdb4889 Mesh API: add BKE_mesh_vert_edge_vert_map_create
Handy when you need to reference connected verts directly.
2016-03-22 22:07:45 +11:00
3b5dec4afc Fix T47882: startup camera not upright 2016-03-22 17:22:41 +11:00
121e273bb3 Cleanup: reduce scope for versioning vars 2016-03-22 17:20:17 +11:00
0f63ce61c5 Fix add mesh template 2016-03-22 14:26:48 +11:00
4acd218c02 GPU compositing:
Minor optimization: Store the uniform interface of shaders instead of
re-querying every frame.
2016-03-21 22:43:03 +01:00
Philipp Oeser
2c3985d9e6 Fix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.
rB5b3af3dd made the poll function here slightly too laxist.

To be backported to 2.77 should we make an 'a' release.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D1861
2016-03-21 15:45:16 +01:00
da2dfaad1a Mirror influence of environment texture in Blender viewport
This patch implements Mirror influence for environment textures. Approach matches the one from BI.
{F281871}
See the video https://youtu.be/BskgCv6dcIE
Example: {F281876}
Alexander (Blend4Web Team)

Reviewers: campbellbarton, merwin, brecht

Reviewed By: brecht

Subscribers: TwisterGE, blueprintrandom, youle, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1786
2016-03-21 14:36:33 +03:00
112300a982 Fix T47862: VSE hard cut fails
Regression caused by changing how video length is calculated,
however similar problems could be caused by strip length changing on-disk.
2016-03-21 19:40:41 +11:00
f4840e878b Fix T47848: Fix regression in sequencer GL render
Own changes in 2.77 broke off-screen render with scene render size doesn't match output.
2016-03-21 16:36:20 +11:00
fb5c6333f9 GPU: avoid redundant logic for non-spot lamps 2016-03-21 16:06:04 +11:00
72bf5d13e6 Fix for non spot lamps calculating spot values
Logical error in D1378, also incorrectly used lamp type as a flag.
2016-03-21 16:02:37 +11:00
a0a66e0418 Correct strange icon scaling in preferences 2016-03-21 15:34:34 +11:00
8238f5b33b Fix T47868: Check Box shape doesn't scale 2016-03-21 15:16:43 +11:00
2683dd8b93 Docs: add missing bmesh.ops descriptions 2016-03-20 19:40:03 +11:00
7f03e7cc3c Fix T47837: Filtering UIList broken with recent master.
Using 32nd bit of integer with our int RNA prop is not a good idea, it does not
really support unsigned int even with PROP_UNSIGNED type...

Most likely this has been unveiled by recent work over property clamping in RNA.

Not critical, but should be backported should we make an 'a' release.
2016-03-19 17:06:32 +01:00
26f2fe9528 mathutils.bvhtree: Add find_nearest_range API call
Returns all elements within a radius.
Similar to kdtree.find_range
2016-03-19 18:31:56 +11:00
1a7596951a BLI_kdopbvh: Pass center to to range callback
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.
2016-03-19 18:31:56 +11:00
6aeb1f7f56 Fix: "pchan_name" field in SDNA for names of bone targets for drivers was too short
When all the names in Blender were updated to go from having 32 characters to 64,
the "pchan_name" field in the DriverTarget struct was missed. This meant that if you
had a bone with a suitably long name, it would have been impossible to use values from this
bone in a driver.

The only reason this probably hasn't been discovered yet is because the standard/old depsgraph
doesn't work that well for bones in the same armatures, so setups where this may have
occurred are not that common.

To prevent this problem from happening in future, I've added the standard "MAX_ID_NAME-2"
comment to the comments on each line likely to be impacted by such changes, making it
easier for whoever does a search and replace in future :)
2016-03-19 17:48:29 +13:00
3d59be3001 Sequencer: expose GL preview alpha in scene UI
While this isn't essential, accessing this setting required navigating to each scene and using render menu.
Expose in sequencer UI for more convenient access.
2016-03-18 20:05:08 +11:00
cc12fc1f11 Fix T47806: Blender animation player stop working correctly with XVID codec
Something weird, seems some buffers _might_ be shared between codec context
and frame, which is quite weird. Could be a bug in FFmpeg or could be wrong
API usage somewhere else..
2016-03-18 11:50:06 +05:00
9777c5b0ca Fix T47827: Single Channel Preview Error
Fix by @sergey with own fix for big endian.
2016-03-17 23:52:49 +11:00
49182111fb ImBuf: Some tweaks to FFmpeg frame free policy
Th intention is to make sure we don't free buffers which were not allocated
by FFmpeg.

This is a possible fix for T47806.
2016-03-17 14:45:10 +05:00
eb32aa827a Sequencer: add frame-jump to menu 2016-03-17 11:02:14 +11:00
6952d75e3b Fix missing 'anim_data' in RNA API of Freestyle's linestyle.
Reported by Manuel Rais on ML, thanks.
2016-03-16 20:21:02 +01:00
3274dbceb1 Sequencer: Alt-RMB select handle now always selects strip
Was possible to do Alt-RMB on a strips handle - which only make the strip active (but didn't select).
This isn't really useful, so just select the strip and its handles in this case.
2016-03-17 00:26:50 +11:00
23e608b6fb Fix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel while sculpting 2016-03-17 01:12:30 +13:00
Julian Eisel
386872b98b Fix text on collapsed node not positioned correctly with high DPI
Reported by @JacquesLucke via IRC, thx!
2016-03-16 12:53:57 +01:00
bd5bfad723 Fix T47807: Toggle header shortcut doesn't work 2016-03-16 11:33:32 +11:00
2f4ea47566 CMake: only show py module install options when used 2016-03-15 23:52:34 +11:00
31731bc834 Fix T47734: Rest Position is not working with new Deps 2016-03-15 16:13:25 +05:00
b7deea029a Fix T47780: Icons don't update in floating panels 2016-03-15 21:13:41 +11:00
647a4ea2f7 Fix T47577: Movie clip uses too much memory with still image sequences 2016-03-15 15:07:18 +05:00
5879778c38 movieclip: Cleanup around cache
Should be no functional changes.
2016-03-15 15:01:53 +05:00
d042962025 Cleanup some warnings 2016-03-15 14:16:16 +05:00
9df9c17d2c ImBuf: Use proper function to free FFmpeg frames 2016-03-15 13:39:39 +05:00
7ab2e73494 Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8
In fact, some areas in FFmpeg might require alignment up to 32, so now we
make temporary conversion in an aligned frame. We only do this if width is
not aligned to 32.
2016-03-15 13:19:49 +05:00
9ddd83cec2 Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8
Revert "Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8"

This reverts commit 606f6b79ea.
2016-03-15 12:32:27 +05:00
0bf34bbb88 Fix T47759: Mesh 'Select less', leaves isolated verts
Select less in mesh edit-mode would leave selected vertices/edges
in edge/face mode which don't support selecting these elements.
2016-03-15 14:17:54 +11:00
ca22dbe2a2 CMake: remove unused libpath's
Also add note that these should be deprecated in favor of absolute libs.
2016-03-15 13:15:26 +11:00
7db79ae57a PyAPI: Double performance of Mesh.from_pydata
D1853 by @JacquesLucke

The speedup is mainly possible by using the `foreach_set` method for polygon data.
2016-03-15 10:45:34 +11:00
a078fe3539 Fix T47750: Edited hair: disconnect (and connect!) operator do not support redo.
As suggested by Sergey, do not register those anymore, this way we keep undo step,
but user cannot 'redo' them (does not work, since cached DM in particle modifier data
is not yet re-created by depsgraph update after undo when operator is redone).

UI now has two buttons, one to (dic)connect current psys, the other to (dis)connect all.

Also fixed similar issue with Connect Hair op.
2016-03-14 21:04:30 +01:00
00166ff62e Better fix for T47787 - remove extra user due to 'user_one' as soon as we increase 'real' user count.
This has several benefits:
* User count remains coherent, regardless of the order in which you use 'user_one' & real refcounting users
  (i.e. if you add to group, and then link in scene, or the reverse, you now always get same final user count).
* Avoids the need to check for potential 'user_one' extra user in count in several places in code (e.g. when
  making IDs single users...).
* Users won't wonder why they cannot make 'single user' and ID even though its user count shows '2'!
* readfile.c now always uses code from BKE's library.c when modifying id->us. Which means we can consider
  (asside from assignment during initialization) that id->us is read-only outside of library.c context.

Note that this commit reverts previous one (rB6b1d77a8052b) - please **do not** backport this one in 2.77.
2016-03-14 15:05:52 +01:00
6b1d77a805 Fix T47787: When performing operation 'Make single user' -> 'obj&data', object could be removed from group.
Similar cause as in T47482, we used to have poor handling of 'user_one' cases of ID usage,
leading to inconsistent behavior depending on order of operations e.g.

Here, was object used by a group but not linked in any scene - once linked in scene,
their usercount would be 2, leading to 'making single copy', when it's actually not needed.
We now have better control here, so let's use it!

Note that other ID 'make single user' code will likely need similar fix (Images, etc.).

Safe to be backported to 2.77.
2016-03-14 14:50:16 +01:00
2a9bc888d0 Fix T47784: BMesh.from_object broken keyword args 2016-03-15 00:38:33 +11:00
a12d42712b Fix T47772: Randomize stroke has direction bias 2016-03-14 21:29:24 +11:00
e509e911a3 Fix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash
Regressions after 2.76, to be backported to 2.77.
2016-03-14 14:16:04 +05:00
a686aa3477 Support mdisps for Mesh.flip_normals() 2016-03-14 15:34:03 +11:00
b9ae96dc12 Cleanup: move MDisps flipping to own function 2016-03-14 15:33:54 +11:00
66043cc6c1 Fix T47788: Symmetrize flips multi-res data
Symmetrize was unusable with multi-res data,
add an option for the bmesh operator not to flip the multi-res depth.
2016-03-14 14:21:16 +11:00
0024768f88 Cleanup: style/spelling 2016-03-14 13:21:13 +11:00
34fe03c7f2 Fix T47773: Particle System with Boids Crash.
Problem was, during initialization of boids particles in `dynamics_step()`,
psys of target objects was not obtained with generic `psys_get_target_system()`
as later in code, which could lead to some uninitialized `psys->tree` usage...

Think it's safe enough for 2.77, though not a regression.
2016-03-13 18:21:30 +01:00
ed28134f71 Fix bplayer (c) 2016-03-13 15:44:27 +01:00
9779d1558a Default Keyframe Type: Some UI tweaks
* Don't show name of keyframe type in timeline header. It's getting a bit too crowded
  for that, so just show the keyframe icon. Hopefully that will be enough.

* Tweaked the tooltip and label to make it clearer what the setting is for
2016-03-14 01:04:39 +13:00
0e1b4e10a2 Fixed some type mismatch errors, missed earlier
(CMake MSVC's output makes it really difficult to spot errors when they occur!)
2016-03-14 01:01:43 +13:00
6bf9aa3f8e Fancy procedural icons for Keyframe Types
The new "default keyframe type" dropdown on the timeline header
(and also the "Keyframe Type" operator/properties in other places)
now has procedurally generated icons which reflect what that keyframe
type will look like when rendered in the Dope Sheet.

This was achieved using the ancient "VICON" (vector icon) stuff
that's lurking around in the dark parts of UI code. From memory,
the only other things that use (or used to use) this stuff included
some of the triangle icons for some dropdown buttons, or something
like that.

Notes:
* Theme colour changes are reflected immediately by these icons.
  This is possible because they are all drawn procedurally
* These icons scale with the DPI setting. I manually guessed the size of
  these icons. They can be adjusted further if needed.
* I've documented the steps for adding voodoo icons like this on the wiki
  (http://wiki.blender.org/index.php/Dev:2.7/Source/Checklists/Vector_Icon)
* It's true that the rendering of these keyframes doesn't quite fit the rest
  of the icons in the UI. However, since we're just leveraging the standard
  keyframe drawing methods (to avoid discreptancies between the two), we'll
  leave it as such for now. Maybe later we can consider blending in a bit of
  the glossy keyframe icons in the Icon Sheet?
2016-03-14 00:56:52 +13:00
81e7f6b8a0 More compile fixes - Game Engine 2016-03-13 23:34:42 +13:00
6ba8eb17f5 Compile fix for Linux 2016-03-13 23:22:15 +13:00
8d91864242 Fix T47760: Toggling GPencil's "Selection Mask" via Python does not update UI
Add rna updates to greasepencil sculpt properties

D1849 by @lichtwerk, reviewed by @aligorith
2016-03-13 19:14:24 +13:00
570fbba3f3 Keyframing: Added ToolSetting for choosing default keyframe type
To make it easier for animators working in a multipass pose-to-pose workflow
when inserting breakdown keyframes and so forth, it is now possible to specify
the "type" of keyframe being created (i.e. the colour of the keyframe, when drawn
in the Dope Sheet).

Usage:
1) Choose the type of keyframe ("Keyframe", "Breakdown", "Extreme", etc.) from
   the new dropdown located between the AutoKeying and KeyingSet widgets on the
   timeline header.
2) Insert keyframes
3) Rejoyce that your newly created keyframes have now been coloured for you already
   in the DopeSheet.

Todo:
* Look into a way of using the actual keyframe colours (from the theme) for the icons
  of these types.
2016-03-13 18:28:30 +13:00
b10e3cc997 Cleanup: warning 2016-03-13 15:15:38 +11:00
d5253aaf9d CMake: use CXX for C++ in var name
Follow convention cmake uses.
2016-03-13 15:03:04 +11:00
Jack Andersen
861616bf69 Full Inverse-Quadratic-Equation Lamp Falloff
This patch adds a new `falloff_type` ('Inverse Coefficients') for Lamps in
Blender-Internal and GLSL.

The current falloff modes use a formula like this inverse-square one:

`I = E × (D^2 / (D^2 + Q × r^2))`

While such a formula is simple for 3D-artists to use, it's algebraically
cumbersome to work with. Game-designers authoring their own shaders
could benefit much more by having direct control of falloff-coefficients:

`I = E × (1.0 / (coefC + coefL × r + coefQ × r^2))`

In this mode, the `distance` parameter is unused (except for 'Sphere'
mode); instead relying on the designer to mathematically-model the
falloff-behavior.

The UI has been patched like so:
{F153843}

Reviewers: brecht, psy-fi

Reviewed By: psy-fi

Subscribers: brita_, antidote, campbellbarton, psy-fi

Differential Revision: https://developer.blender.org/D1194
2016-03-13 02:05:36 +01:00
Julian Eisel
989b0e472e Increase node max width to 700px
Opened and collapsed nodes now have a max width of 700px. Animation nodes add-on needs this.
2016-03-12 19:12:32 +01:00
681becb359 Fix related to T47750: Particle disconnect operator: 'all hair' disabled would not work correctly after first op execution.
This is side issue, main one remains and does not look easy to fix, see report for details.
2016-03-12 18:55:49 +01:00
b20f12d835 Cycles: Some typo fixes 2016-03-12 15:01:20 +05:00
d652833a17 Cycles: Support parallel convergence mode for spherical stereo 2016-03-12 15:01:20 +05:00
7d82de9e84 Fix bad UI range of convergence distance which was above the hard limit
That was rather confusing to slide the value.

Perhaps makesrna can check cases like this?
2016-03-12 15:01:20 +05:00
6b91fb706d Cycles: Optimize derivatives calculation by using pre-calculated dx/dy
We've got pixel-wide world-space derivatives which we can use in the
perspective camera sampling. This allows to get rid of two calls to
transform_direction() function.

In theory we can save two transform_perspective() calls if we'll also
save pre-calculated camera-space dx/dy.
2016-03-12 15:01:20 +05:00
a8c87bad22 Cycles: Cleanup, spherical_stereo_direction will return normalized direction
Previously each call of this function was followed by a normaliztion, now it
is done in the function itself with an according note around the function.
2016-03-12 15:01:20 +05:00
e327fb522a Fix T47763: 2.77 RC2 (Fluid) Particle Baking slower compared to 2.67b.
Static schedule was responsible here...

Also, made a minor optimization in case adaptative (auto) subframes are enabled,
gives a few percent of speedup here.
2016-03-12 09:14:30 +01:00
93895420eb Cycles: Do no limit viewport samples to USHRT_MAX when value is at 0.
We don't limit manually setting higher values, this was probably overlooked here.

Found by @Blendify in IRC.
2016-03-11 21:36:07 +01:00
1394369332 Fix crash adding EditNormals modifier to NURBS object (or other types but mesh).
Kinda stupid, but that eModifierTypeFlag_AcceptsCVs could really use a comment alongside
its definition!

Safe to be backported to 2.77.
2016-03-11 15:31:30 +01:00
da9f0a507c Minor improvement to last commit
Sign is known in this case, no need  to check for either direction.
2016-03-12 01:12:51 +11:00
8accc19d5d Math Lib: less complex convex quad check 2016-03-11 23:41:50 +11:00
59c47ecf90 Revert "Use render path as initial location when saving renders"
This reverts commit cd6442f7d4.

Broke workflow for incrementally saving versions of a render.
2016-03-11 22:14:45 +11:00
758b20b8ca Cycles: One more optimization fix, derivatives used to be calculated without aperture
At this point it's totally unclear why we're ignoring aperture and and rolling shutter
now for derivatives calculation but do not ignore direction change caused by stereo.
2016-03-11 15:23:31 +05:00
086de5b5e3 CMake: Warn when buildinfo is disabled due to missing Git 2016-03-11 14:49:23 +05:00
cc2138888a CMake: Avoid call of find_package(Git) for every compile with buildinfo enabled
This is a bit tricky, find_package(Git) was only used to check if git is installed
and actual git command was assumed to be in the PATH (while ideally it should have
been GIT_COMMAND variable).

This commit makes re-compile output cleaner, especially when using Ninja.

Adding proper GIT_COMMAND to buildinfo.cmake is also possible via argument.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1847
2016-03-11 14:46:18 +05:00
e7eb91365b Cycles: Fix bug calculating dP for perspective camera
Was introduced by recent optimization. Not really sure derivatives are
intended to work like this, but better to stick to what Dalai had
originally for now.
2016-03-11 14:45:35 +05:00
ebe306b8d2 Cycles: Cleanup, redundant normalization 2016-03-11 14:45:35 +05:00
c149b6b7d7 Fix T47753: World equirectangular regression
D1729 fixed 'View' projection but broke 'Equirectangular'.

This commit also changes equirectangular projection to match Cycles and the viewport.
2016-03-11 20:36:59 +11:00
Martijn Berger
b5b269ac11 Fix compilation of cycles standalone and network device 2016-03-11 10:00:47 +01:00
0922b6d6de Cycles: Fix border render after spherical stereo commit
Buffer params needs to know camera's border, otherwise it'll create full buffer.

There might be some issues with stereo camera still, but in worst case it'll
only update camera twice as far as i can tell. Not ideal, but better than no
border render at all.
2016-03-11 12:58:28 +05:00
9f8311ee88 Include requests' cacert.pem file
This allows us to verify certificates of HTTPS connections, which is
mandatory for logins like on Blender ID.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1845
2016-03-11 07:58:05 +01:00
4af287fc9c BGE: Fix memory leak in VBO code 2016-03-10 19:41:45 -08:00
11e4558313 BGE: Fix animations when using VBOs 2016-03-10 19:41:45 -08:00
0bcbbb1ee3 Fix T47749: Crash subdividing wire edge w/ mdisps 2016-03-11 10:32:56 +11:00
814fa06851 Cycles: Optimize spherical stereo position when no spherical stereo is used 2016-03-10 22:03:03 +05:00
59a7204797 Cycles: Simplify perspective camera derivatives calculation
Probably some further simplification is possible, will look into this later.
Alternatively will get rid of KernelCamera.{dx, dy}.
2016-03-10 21:48:12 +05:00
033b0789c8 Text Editor: Auto indent for backspace/delete
Editing with spaces + auto-indent didn't delete indentation as expected.
2016-03-11 00:06:09 +11:00
Dalai Felinto
de7a8af793 Multi-View: Cycles - Spherical Stereo support (VR Panoramas)
This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices

The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)

Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).

* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER

* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)

* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).

* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.

* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.

* We have no support for interocular distance attenuation based on the proximity of the poles  (which helps to reduce the pole rotation effect/artifact).

THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451

This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.

All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case	 Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332

Reviewers: sergey, dingto

Subscribers: #cycles

Differential Revision: https://developer.blender.org/D1223
2016-03-10 09:28:29 -03:00
1bae9c6a5b Remove OpenGL render alpha world-bg exception
Just follow setting and don't take world-background into account.
2016-03-10 22:47:18 +11:00
95128c5eb9 Report error when render fails
Was printing to console, but UI didn't show error message.
2016-03-10 19:37:39 +11:00
606f6b79ea Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8
This is a bit annoying, but FFmpeg can't deal with unaligned arrays in some
cases. There seems to be an easy workaround with using SWS_ACCURATE_RND flag
which should be harmless since we don't really scaling frames, but only
using sws_scale to change color space.

Additionally, this is what VLC is also using.
2016-03-10 13:22:09 +05:00
751874d6bf CMake: remove OSX version lookup table
This assumed the OSX SDK version matched the OSX version, which isn't always true.

Also problematic for maintenance and would make building older Blender versions on OSX fail.

Passing in pre-defined OSX_SYSTEM is also supported,
if you have multiple and want to select one.
2016-03-10 17:59:54 +11:00
9b3b0a5873 Skip scopes update for render result during rendering 2016-03-10 11:29:45 +05:00
f65c08c56c Install-Deps: Build Boost with iostreams.
This patch enables libboost_iostreams and bumps the magic number to match.

Reviewers: dingto

Reviewed By: dingto

Subscribers: dingto

Projects: #bf_blender, #platform:_linux

Differential Revision: https://developer.blender.org/D1840
2016-03-10 00:22:45 +01:00
Julian Eisel
2f3e39869a Fix T47729: Linking node sockets using shortcut fails
Could also have swapped nodes to assign instead of swapping after assigning, but this way it's easier to see whats going on.
2016-03-09 11:23:56 +01:00
5704ba7f9b Cleanup: style, spelling 2016-03-09 19:34:26 +11:00
d030443601 Correct UI active state w/ bevel-factor
D1838 by @JacquesLucke
2016-03-09 19:30:12 +11:00
6a5b636b56 Cleanup: remove button flag for forced tool-tips 2016-03-09 19:15:41 +11:00
01d3afaf3d Fix/workaround T47685: Drag keymap slider fails
This is a special case where the UI update function re-creases the keymap we're currently editing.
Making it so dragging values fails.
2016-03-09 17:41:43 +11:00
d36dbe8a6d RNA: remove redundant update callback
No need to update keymap toggling expand.
2016-03-09 16:10:33 +11:00
95448e851b Fix minor glitch w/ edit-bone center
Don't include the same point multiple times when calculating center with connected bones.
2016-03-09 16:09:58 +11:00
1f386cce5f Fix T47723: Custom shape not copied w/ edit-bone 2016-03-09 12:25:35 +11:00
4e66981964 Add missing custom-scale when copying bones 2016-03-09 11:13:40 +11:00
f4e1c1d135 Correct recent RNA array slicing commit
Broke slice assignment when used on an item from a multi-dimensional array,
eg: `array[i][:] = data`
2016-03-08 21:19:35 +11:00
c324c4d575 Fix T47701: Image not fully updated after setting .pixels
The set callback was missing couple of things:

- Mipmaps should be updated after pixels changes
- GPU texture is invalid after setting pixels
2016-03-08 14:59:05 +05:00
ad98f00d1f PyAPI: Support multi-dimensional RNA slice assignment
This was already supported for getting slices.
2016-03-08 19:36:12 +11:00
846080e6bc Fix Py API array assignment not clamping values 2016-03-08 15:33:28 +11:00
02cabdac5a Fix crash loading some library blend files
Blend files with screen but no scene would crash.
2016-03-08 06:56:42 +11:00
95983baa09 Fix missing weight invert w/ shrink-wrap modifier 2016-03-08 06:18:46 +11:00
27d160f6ca Correct docstrings 2016-03-07 21:54:17 +11:00
5adfdd965a Fix T47681: Bump node doesn't work with SSS shader when using OSL 2016-03-07 15:32:46 +05:00
Julian Eisel
9fe977dbf0 Fix T47706: 'CTRL ALT Left Mouse' clicking on the dope sheet summary line crashes Blender
Simple NULL-check seems fine here, working as it should now. Most likely caused by rBc4dc14b079d81.
2016-03-07 11:21:01 +01:00
19ec1bfa89 Fix T47691: Missing redraw w/ pop-up dialogs
Search buttons would overwrite existing callbacks, even when they weren't needed.
Causing missing updates for search buttons in pop-ups.
2016-03-07 16:38:22 +11:00
431a5b623e Fix T47688: Regression in gl_load
Error caused by 771f73b6
2016-03-07 14:31:45 +11:00
42e8660272 Simple Deform modifier: invert vgroup option
D1839 from @Orgold
2016-03-07 11:28:21 +11:00
d086f6aa5c Shrink Wrap modifier: invert vgroup option
D1839 from @Orgold
2016-03-07 11:24:03 +11:00
5fd0c1ed3f BMesh: avoid assert dissolving degenerate faces
For dissolving 2-sided faces, theres no need to check they are valid before removal.
2016-03-06 17:25:56 +11:00
6bfd88acd9 Fix T47670: cycles GLSL incorrect normal map node. 2016-03-06 06:55:20 +01:00
7499fcf177 Python docs: minor cleanup and adding missing parenthesis to a code sample 2016-03-05 19:46:01 +00:00
002deb29cb Fix T47670: cycles GLSL incorrect layer weight / fresnel.
World space and view space normals were mixed up, we should only convert from
world to view space if a custom normal is connected, otherwise it is already in
view space.
2016-03-05 14:33:41 +01:00
40b748d40f Fix for missing update changing VFont.filepath
Changing the filepath wouldn't reload the font even after calling scene.update().
2016-03-05 17:40:33 +11:00
4e500101a7 Cleanup: quiet -Wcomma, cast to void where needed 2016-03-05 09:16:12 +11:00
fea07c1a63 Cleanup: unnecessary comma use
Also use SWAP macro
2016-03-05 09:13:16 +11:00
acebfbb666 Cleanup: unnecessary comma use 2016-03-05 09:12:07 +11:00
5513762946 Alternate fix for virtual-pixel update not working
On changing, clear drawable window to force update.
2016-03-05 06:37:56 +11:00
f33e44151e Revert "Fix changing virtual pixelsize having no affect if only main window is open"
This reverts commit fe7bab1343.

Setting correct context is important,
but this is setting DPI and widget unit on *every* mouse move.
2016-03-05 06:31:40 +11:00
Julian Eisel
fe7bab1343 Fix changing virtual pixelsize having no affect if only main window is open
Changing virtual pixelsize only had an affect when a second window was open. (Was also possible to trigger update by opening another window.)

Steps to reproduce:
* Change any editor into user preferences *in main window*
* Change virtual pixel size -> nothing happens
2016-03-04 18:13:01 +01:00
a3de3a03c8 Fix typo in 'Vietnamese' language label (must have sneaked in while adding Basque one, grr). 2016-03-04 17:46:39 +01:00
Julian Eisel
e0da0a1492 Fix menu aliged to right side of screen in UserPref window
Only applied in a really few cases actually.

To reproduce:
* Open User Preferences *in own window*
* Search for node wrangler add-on (it's one of the few cases where this happens)
* Enable and open details
* Click on one of the menues in the add-on preferences

Actually this was reproducable in any window, user preference area just had to take up most/all of the width.

Note: I'm not totally sure if just disabling these lines is correct, but I didn't find any issues or any information why this was needed. So it seems to be redundant.
2016-03-04 16:52:17 +01:00
d8b8a6e275 Fix T47683: broken BBox logic when drawing duplis.
Once a dupli had a valid bbox, that bbox would be used for all following objects
without bbox, instead of skipping clipping check.

Issue unveiled by rB3fa0a1a5bc0ff2, but not related at all (in fact, bug was present before that commit).
2016-03-04 12:35:52 +01:00
f2c40ca9f0 Fix uninitialized memory use lattice-boundbox
Many other places weren't clearing boundbox dirty flag after calculation.
2016-03-04 21:50:54 +11:00
b8417501ab Cleanup: suspicious use of commas 2016-03-04 16:38:41 +11:00
4ec61ff9f6 Curve/line width change broke outline drawing
Partially revert e29a5ba6
2016-03-04 14:53:36 +11:00
9c8b6cc3fd Docs: include mathutils.interpolate 2016-03-04 08:40:22 +11:00
f38c175fc8 Docs: example for writing blend file libraries 2016-03-04 07:56:04 +11:00
c38087afc0 Correct image format args (remove 'MOVIE') 2016-03-04 06:36:13 +11:00
63d25b47b8 Docs: minor comment correction 2016-03-04 06:36:13 +11:00
6d673f8f0c Docs: comment on poly flipping w/ solidify 2016-03-04 06:36:13 +11:00
21583b50cf Docs: add comment on reloading modules 2016-03-04 06:36:13 +11:00
b0bd39c12a Use IOError exception failing to write blend file 2016-03-04 06:36:13 +11:00
d377f1445a Fix T47676, take two: also do some 'regular file' versionning (allows to handle users own default startup files, among others...). 2016-03-03 16:06:49 +01:00
8ead4990d3 Fix T47676: Broken default values for particle brush strength.
Current startup .blend has old (percent?) values for particle brush strength.

Since rBe4e21480d6331903c90ab073746484498441e1ac, UI controls do not clamp automatically values anymore,
which means when you first enable comb (or any other brush) you get a 50 strength, waaaayyyy to powerful.

This commit fixes this in `BLO_update_defaults_startup_blend`, note that it does not fix custom users'
startup files, nothing to do here...
2016-03-03 15:48:50 +01:00
b47137ae46 Fix T47644: crash (use-after-free) regression from rB7a74738914a66e.
Handling `me` data here is not good idea anyway, we override it completly with data
from `tmp` (crash came from freeing already existing bb from me, while pointer still existed in tmp).

(rediscovered it while working on T47676...).

To be backported to 2.77.
2016-03-03 15:03:23 +01:00
Julian Eisel
adafcda0bd Fix T47674: "Change Data/Files" setting incorrect filter
Image filter was not set, but only if invoked from toolbar (image strip needs to be selected to see the button).
Caused by rB7fa72b8970, Wasn't aware there's another button for this for image strips.
2016-03-03 14:32:57 +01:00
29902e0242 Fix player (c) 2016-03-03 16:11:05 +05:00
8c113a95e3 Make texture node threaded
Quite trivial idea -- just pass tread ID to the texture sampling function.

Implemented as a TLS to avoid passing huge amount of extra contexts around.
Should be working on all platforms, but compilation test is required.

Reviewers: juicyfruit, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1831
2016-03-03 16:02:31 +05:00
ba7eb0c7b9 Add utility macro to work with thread local storage 2016-03-03 16:02:31 +05:00
3e5414e490 PyAPI: API for selectively writing data-blocks
Useful for writing asset-libraries to a file, eg.

`bpy.data.libraries.write(filepath, datablocks, relative_remap=False, fake_user=False)`
2016-03-03 21:50:20 +11:00
b02b8a3c00 Refactor BKE_copybuffer for general partial saving
Move to re-usable BKE_blendfile_write_partial API
2016-03-03 21:11:22 +11:00
82cf78dfe8 Avoid some obvious crashes when running out memory allocating render result 2016-03-03 13:21:04 +05:00
e8bffa7a50 Render Save Buffers: Use proper memory buffer size for a display buffer 2016-03-03 13:13:42 +05:00
a96dbe5bca CMake: Remove redundant print of Git Found message
find_package(Git) will already print this.
2016-03-03 13:12:50 +05:00
d1499ba9fb UI: move checkbox for missing add-ons to LHS 2016-03-03 18:50:59 +11:00
a47bfe7d40 Experimental option to build Blender with C11 support
It'll be nice to eventually go C11/C++11 by default, but for until
then it's kinda handy to be able to build locally with C11 support,

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Differential Revision: https://developer.blender.org/D1752
2016-03-03 11:34:18 +05:00
1776ad53b9 Cleanup: take Main argument for copy 2016-03-03 13:35:21 +11:00
cfaba8ad6c Fix RNA property clamp assigning in Python
On first assignment the value was clamped, but successive assignments weren't.
2016-03-03 12:36:33 +11:00
8fa1d70543 Cleanup: comments for creator_args & line length 2016-03-03 12:36:33 +11:00
2177f64585 Armature edit-mode: Add clear-roll operator, Alt-R 2016-03-03 11:45:43 +11:00
f7062b2407 Increase max-frame to 500,000
Note that we could increase to 524286 without loosing subframe precision,
however this is a round number allowing for longer video export / animations.

See T46859 for details.
2016-03-03 08:47:31 +11:00
e3e3f3851c Cleanup: replace dict /w list for module reload
Never used keys and better reload in same order loaded.
2016-03-03 06:33:46 +11:00
f51ef8ac4d Correction to own previous rB9c0de0084bfe.
'1mm+1m' would fail with original fix, now consuming all alpha chars before checking unit again...
2016-03-02 18:12:14 +01:00
ae0901bb09 Fix bplayer (c)
Seriously...
2016-03-02 18:04:26 +01:00
9c0de0084b Fix T47661: cm (centimeter) unit breaks m (meter) unit in Metric.
`m` unit when used after `cm`/`mm`/etc. ones would get ignored, and the alt version of miles
would be used instead.

The root of the issue is that, in `unit_find_str`, once we get a 'hit' for a unit, we check
it's actual unit (since 'm' would also hit on 'cm', 'mm', etc.). In case that hit is not a
valid unit one, we would just return NULL, breaking the cycle of checks over that unit, and
hence missing all later usages of it.

So now, in case we have an 'invalid unit hit', we immediately retry to find it within remaining string.
2016-03-02 18:02:19 +01:00
bee0a7587b Fix crash accessing nodes search menu
Was caused by d49985c.
2016-03-02 17:58:34 +05:00
83824947ba Avoid node tree update tag when changed nodes which are not affecting result
This was we don't have re-compo or viewport re-rendering happening when changing
nodes which are not connected to the output at all (for example when adding new
nodes or changing settings for unconnected nodes).

Only basic operations are covered for now. checks could be added to more tools
when needed.

Currently it's not fully optimal implementation, but seems to work fast enough.
Don't see reliable alternative to that -- keeping tag in the node wouldn't work
because of the node groups (which are probably already broken, but should be
easy to solve with current approach). So guess it's more matter of optimizing
path search from a node to output.

Before processing forward let's check whether it's indeed something we want
and whether the approach is indeed not fully bad.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1765
2016-03-02 17:58:34 +05:00
0d12e086f5 Fix T47564: Unwrapping the same mesh results in different UVs.
Pointers of faces were passed as face keys during parametrizer's face creation. Since those
addresses were different for every run, the layout of the faces ended up being different
in the internal hash, leading to inconsistent order of their evaluation during LSCM solving,
and slightly different UV maps.

Solved by simply using faces' indices as key instead, which ensures we always get same results
with exact same input data now.

Many thanks to Roman Nagornov (RomanN) for raising the issue, investigating it and finding
the solution! And thanks to Brecht for quick review too.
2016-03-02 12:21:53 +01:00
36f35268b3 Fix bplayer (c) 2016-03-02 11:06:23 +01:00
3d3d491d40 Cycles: Fix wrong default value for volume samples 2016-03-02 14:53:36 +05:00
9c183f60e1 Fix T47610: Texture node in compositing nodes does not update
The issue was caused by some code accessing R from a functions which
are marked as safe for use from outside of render pipeline.

Now those functions are safe(er) for use.
2016-03-02 12:47:43 +05:00
c593b77910 Cleanup: style, and --help edits 2016-03-02 17:01:38 +11:00
d49985ce48 UI: Show categories in operator search popup
Gives better context especially when operators have generic names.
2016-03-02 14:09:16 +11:00
69b66d549b UI: Add search-create callback
Needed to support alternate search UI's, no functional changes.
2016-03-02 13:57:16 +11:00
aefb68c84d Fix assert in UI code
Dont attempt to clip empty string
2016-03-02 12:53:55 +11:00
c32e8fb09f Fix T47642: Crash baking w/ cycles 2016-03-02 12:34:39 +11:00
cd6442f7d4 Use render path as initial location when saving renders 2016-03-02 12:19:34 +11:00
0658659f74 GHash: BLI_ghash_ensure_p_ex now takes a pointer-to-key arg
This is an alternative to passing a copy callback which is some times inconvenient.
Instead the caller can write to the key - needed when the key is duplicated memory.

Allows for minor optimization in ghash/gset use.

Also add BLI_gset_ensure_p_ex
2016-03-02 11:18:56 +11:00
bac98199e9 UPBGE: Fix light visibility 2016-03-01 21:21:11 +01:00
266348e658 UPBGE: Disallow shadow buffer render when the lamp is hidden.
It now allow the user to use multiple shadow lamps and hidden the culled lamps.
2016-03-01 21:21:11 +01:00
47498c4f05 Fix T47635: Texture paint performance regression
Flipped bindcode check in D1414 caused projection paint to always do full updates.
2016-03-02 06:57:26 +11:00
b302ed210c Add Basque (Euskara) new language.
Nothing critical, but would be nice to backport this to 2.77.
2016-03-01 20:04:49 +01:00
42b2c47386 Fix T47643: Blender crash. Linked speaker issue.
Speaker's localization func would not make direct-linked its used sound datablock...
2016-03-01 18:09:22 +01:00
449fbde7d1 Batch-previews generation: add option to control whether we save backup .blend1 file or not.
Requested by Aaron Carlisle (@blendify) over IRC.
2016-03-01 17:46:21 +01:00
50500a4399 Fix T47638: Bad auto-smooth value for new meshes
Code was using degrees as radians.

Still unclear why default cube will have 180 degrees angle, but new meshes 30,
but that's kinda separate topic which is to be addressed separately.

This is a subject for final 2.77 release.
2016-03-01 13:00:00 +01:00
a0db3c3966 Fix (unreported) crash when opening a file from splash screen when 'load UI' option is disabled.
See rB935e241fa6ea095493 for details of the issue, but first fix caused regression T47632.

So for now handling the issue in a localized way, this is not a real solution (since this could happen
in other cases), but will do for 2.77.

This commit is to be backported to 2.77.
2016-03-01 12:44:38 +01:00
607d916f50 Fix T47632: Revert "Fix (unreported) crash when opening a file from splash screen when 'load UI' option is disabled."
This reverts commit 935e241fa6.

Issue will be fixed in a more localized way for now (not that nice, since this use-after-free can possibly happen
in other places too, but only safe solution for 2.77).

This commit is to be backported in 2.77.
2016-03-01 11:47:33 +01:00
0187a5f292 Py (addons) i18n: fix memleak, enhance msgid lookup.
Probably did not happen yet (since nobody uses addons translations...), but there was an
nice memleak during creation of translation ghash in case a same msgid/msgctx would be
added more than once.

Also, no need to allocate (and free) a temp key each time we lookup a msgid, we can use
given const strings directly here!
2016-03-01 11:44:10 +01:00
8f14baae92 Edit Mesh: Edge tag toggle when no active path is found
User request, this matches 2.6x behavior more closely.
2016-03-01 16:49:11 +11:00
Julian Eisel
509270ee61 Eyedropper: Reset property on cancel and add enter to confirm 2016-02-29 23:02:40 +01:00
a19c278551 Include modules needed for Python to run pip
This means Python developers can install pip using Blender's bundled Python.
2016-03-01 07:37:49 +11:00
Julian Eisel
c1d05faa24 User customizable keymap for eyedropper (modal operator) 2016-02-29 18:56:05 +01:00
Julian Eisel
d787db701a Cleanup: Rename ED_button_operatortypes -> ED_operatortypes_ui 2016-02-29 17:47:36 +01:00
Julian Eisel
84b1d67b64 Add User Interface keymap (no items yet)
Needed to allow modal UI keymaps, but I'm sure we'll need this more often in future.
First item will be modal eyedropper keymap coming in a following commit.
2016-02-29 17:46:22 +01:00
Julian Eisel
e61588c5a5 Fix a bunch of temp full-screen glitches
Steps to reproduce fixed glitches were:
* Change any editor to be file browser from menu, Ctrl+O *from the file browser area*, Esc -> area reset to what it was before changing to file browser initially
* Ctrl+O from any area, F12, Esc -> returns to initial editor in full-screen (expected is file browser in full-screen)

Fixes T46229

Core of the fix is removing old area from spacedata list when going back to previous area (see ED_area_prevspace -> BKE_spacedata_remove). Also, when creating a new temp area we now don't exit old area anymore (needed so SpaceFile->op is kept, but it also makes sense in general)
Aaand finally removes some ugly hacks.

Tested quite a bit, so I think it's safe to apply (besides of remark below), just would like to get things double checked and confirmed. After all, this full-screen stuff finally starts to feel like it's working :P

Note, there's still a memory leak when quitting Blender with temp area open. Haven't found out how to solve yet, but it's not that important for review anyway.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: plyczkowski, Blendify

Maniphest Tasks: T46229

Differential Revision: https://developer.blender.org/D1531
2016-02-29 16:18:42 +01:00
Julian Eisel
49ba9740b8 Cleanup: Duplicated function
wmOrtho2_region_pixelspace and wmOrtho2_region_ui were doing exact same thing since rBSa86482f81cf3.
2016-02-29 15:20:09 +01:00
94349ab308 Buildbot: Store latest master config from buildbot 2016-02-29 11:33:06 +01:00
ed22ab3ce8 Fix T47604: Sculpt + Modifier undo gives invalid normals 2016-02-29 20:37:19 +11:00
298aac33cc Tests: improve RNA default reporting
Float values were often reported with extra precision from float32 -> 64 conversion.

Add repr_float_32 to give cleaner output.
2016-02-29 11:55:44 +11:00
2baa6fa864 RNA: add is_array property
Needed since dynamic arrays would have zero length.
2016-02-29 11:02:08 +11:00
b285394acc PyAPI: correct function name w/ arg parsing 2016-02-29 09:00:21 +11:00
0515703b15 Minor optimization: avoid 2x hash, adding to set 2016-02-29 09:00:21 +11:00
97677f5725 Minor optimization to skin operators
- store layer lookup
- single hash adding to set
2016-02-29 09:00:21 +11:00
42fe1ba844 Fix T47615: crash trying to use point density with lamp object. 2016-02-28 22:57:17 +01:00
87c8ff0164 Cycles: Fix compilation error of certain OpenCL split kernels 2016-02-28 16:53:38 +01:00
e3841c91f9 Fix T42536: Normals modifier: Generated normals can be opposed to face one, needs winding flipping in this case. 2016-02-28 15:48:08 +01:00
877f441628 BKE_mesh: add polygon flipping tools.
Those new functions invert the winding of polygons, effectively inverting their normals.

A helper was also added to allow swapping two items in customdata layers.

Being able to invert normals outside of BMesh area is very important in several places,
like IO scripts or customnormals modifiers...

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1814
2016-02-28 15:29:56 +01:00
ea76ec2866 Cleanup: rename CustomData_swap to CustomData_swap_corners.
More in line with our other func names handling sub-item data (mainly, tessfaces' UVs and VCol...).
2016-02-28 15:16:42 +01:00
45b46cfbe3 Setup a texture with volume shaders. 2016-02-28 08:31:24 +01:00
807e7fdc11 Try to set intersection information correctly. 2016-02-28 08:30:35 +01:00
ef59dba7ba Merge branch 'openvdb' into cvdb_ray_isect 2016-02-28 07:05:18 +01:00
a49ade92fe Merge branch 'master' into openvdb
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-02-28 07:04:35 +01:00
0feab1baef Fix T47608: Cycles cage baking crash after recent uv derivative fixes. 2016-02-27 23:57:40 +01:00
9191dd3a4a Fix T47605: Elsyiun theme info text hard to read 2016-02-28 07:22:12 +11:00
abb3763483 Fix T47582: Curve handle thickness regression 2016-02-28 06:29:14 +11:00
4cbc3d2fdd Fix T47586: Nurbs handle thickness regression 2016-02-28 05:57:22 +11:00
ee2a33de50 Fix T47583: Mesh wire edge thickness regression 2016-02-28 05:45:46 +11:00
6e66ffb61a Cleanup split creator.c
creator.c was getting hard to follow.

- Split off argument and signal handling into own files.
- Move docstrings next to functions (to keep docs grouped with code).
2016-02-28 05:23:48 +11:00
82d6162990 Fix T47592: Wrong line width w/ custom-bones 2016-02-28 05:03:49 +11:00
3091935fec Docs: early exist build process on error
Don't attempt to build docs when generation fails.
2016-02-28 04:25:11 +11:00
c3a408938d Docs: Add missing context members 2016-02-28 04:25:11 +11:00
562b568abe Buildbot: Rename i386 to i686, we don't support pre-i686 CPUs anyway 2016-02-27 14:06:37 +01:00
eb9d488251 Fix T47596: Bone motion path - confusing UI in 3DView tools.
Now using same UI as in object/armature properties, also save one line in 3DView panesl. ;)

Nothing crucial there, but nice & safe to backport to 2.77 imho.
2016-02-27 13:20:43 +01:00
3fcd638beb Buildbot: Support build in a newer chroot 2016-02-27 13:09:36 +01:00
79c8eed843 Cleanup: Update Cycles standalone copyright info. 2016-02-27 13:07:32 +01:00
bdaf8c469e Release Cycle: BCon1 again, alpha stage. 2016-02-27 13:06:31 +01:00
3075328c56 Fix T47593: 'Move to layer' will be crash in blender 2.77rc1.
To be backported to 2.77.
2016-02-27 11:30:23 +01:00
5cec0e6faf Fix: "Twist" GP Sculpt brush in 2D Editors was unusable... now mostly usable, if still slightly offset 2016-02-27 01:12:02 +13:00
6d672a566c Fix: "Twist" GP Sculpt brush didn't work well in 3D View 2016-02-27 01:12:02 +13:00
65fe04b13f 2.77 splash
by Pokedstudio
2016-02-26 22:41:36 +11:00
1746c5da67 Blender 2.77 release: Bump subversion and go into RC cycle now
Splash and RC1 AHOY are incoming.
2016-02-26 11:15:23 +01:00
9177bf2f30 Code reshuffling to prevent problems like the previous commit happening again 2016-02-26 19:12:45 +13:00
1db29781db Fix T47503 - My previous fix for T47472 accidentally reused an unrelated flag
ked->iterflags actually already had an enum defined, but at the time of the previous
fix, I'd forgotten that it was defined. As a result, "f1 needs NLA remap" got given
the same flag as "include handles when doing keyframe selection checks".
2016-02-26 19:12:44 +13:00
18a6ebbc3a Code Cleanup - Fix comments 2016-02-26 19:12:43 +13:00
7dc419c8fe Restore ability to clear motionpaths from selected objects/bones only
In response to user feedback, this commit brings back the ability to
limit motionpath clearing to only happening for those on selected
objects/bones.

By default, the "Clear" operator will clear from all objects/bones,
unless the Shift key is held.
2016-02-26 19:12:43 +13:00
0b13989307 CMake: show error on missing LIBDIR early on
Previously CMake would show many messages about missing libs before checking for a missing LIBDIR.
Now show the error immediately and exit.

Also allow for custom LIBDIR on OSX.
2016-02-26 13:45:24 +11:00
b41bf7a171 UI: Add 'Copy Python Command' to menu
This feature wasn't exposed anywhere in the interface.
2016-02-26 12:00:36 +11:00
f3ec08d934 UI: improve cursor mapping for int buttons
With continuous grab disabled, non-linear mapping for int buttons
wasn't working usefully with small mouse movements.

Now 2x pixels motion adjusts by at least 1 w/ int buttons.
2016-02-26 11:17:34 +11:00
d53132d200 Fix T47015: BGE, objects vanish aligning to vector
1811 by @mangostaniko

Fixes regression since moving to floats.
2016-02-26 09:16:56 +11:00
f1b5b97bed Fix T47559: Crash when scrubbing in time on a OpenVDB Smoke.
Cache reading was not using the right simulation flags (outdated), which
made it lookup non-existent grids, and crash on de-referencing null
pointers.
2016-02-25 22:48:53 +01:00
ef7791ff20 Fix for object align not using local view cursor 2016-02-26 08:21:29 +11:00
b50e880e49 Fix T47565: Crash when adding texture node in compositor 2016-02-25 20:01:31 +01:00
ba98b681e7 3D View: correct menu for moving out of local-view
Also name more clearly
2016-02-25 20:38:06 +11:00
3f602fff3c Cleanup: de-duplicate curve menu 2016-02-25 11:54:30 +11:00
837c4c5d47 Cleanup: const args for curve handle calculation 2016-02-25 11:02:46 +11:00
20b4477cff Cleanup: use defines for handles
Copied from original function.
2016-02-25 10:44:34 +11:00
a21c6b5f59 Correct comments 2016-02-25 10:37:22 +11:00
1a7b9ce006 CMake: check for minimum MSVC version
Needed since older versions are unsupported (giving cryptic errors).
2016-02-25 07:31:44 +11:00
7db8f5cdd7 Remove paste-from-file from menu
Operator no longer exists.
2016-02-25 06:25:47 +11:00
60acb8bc57 UI: Use zoom in/out icons for curves
Was confusing since zoom icons were used for add/remove elsewhere (color-ramp & presets).
2016-02-25 06:25:47 +11:00
6472b98a9c Link windows builds against Blosc when OpenVDB is enabled
OpenVDB is compiled with Blosc support, meaning we should pass Blosc to
a linker now.

Unfortunately, the Blosc has compiled-in crt and pthread library, which
still screws up linking.
2016-02-24 15:51:26 +01:00
43d4d72e05 Fix race condition in point density texture min/max code 2016-02-24 14:28:35 +01:00
b6d9cbe654 Cycles: Fix bug in CMJ pattern when number of samples is 1
It was wrongly considering 1 is a power of 2. While it is a correct thing
(1 == 2^0) it's not what the math in some later formulas expects.
2016-02-24 14:23:45 +01:00
48d399a321 Fix memory leak in panel category update 2016-02-24 05:50:18 +11:00
b54b4eee3b UI: expose soft limits to custom-property editor
Internally custom-id-properties used soft-limits, but there was no way to edit these.
2016-02-24 02:54:48 +11:00
935e241fa6 Fix (unreported) crash when opening a file from splash screen when 'load UI' option is disabled.
Took me some time to figure out what was going on here... Was again that delayed button
callback stuff (`ui_apply_but_funcs_after()`), first calling button op, and then
its callback func.

Issue was that 'open file' op (through call to `WM_file_read()`) would clear
the splash screen (as more or less the entire 'dynamic' UI), but callback func of that splash
(`wm_block_splash_refreshmenu()`) would still try to access that freed menu's region.

So, root of the issue seems to be that setting context's wm/win/etc. would not clear
context's menu pointer (while clearing all other 'sub' pointers). I could not find
nor imagine any case where this behavior could be desired, so simply added nullification
of that pointer when setting context's wm/win/etc.

Note that crash was due to read-after-free, infuriating debug builds with asan,
but seems like release builds never actually crashed on it.
2016-02-23 16:38:47 +01:00
125d5d2be5 Fix T47444: Texture node in compositing nodes does not update 2016-02-23 15:26:34 +01:00
62b3fdb57c bplayer compile fix (c) 2016-02-23 14:48:27 +01:00
e8c24ee0d9 Fix memory leak running project-paint from Python 2016-02-24 00:32:52 +11:00
7a62fe316b Point density: Removed wrong line in previous commit
Thanks Bastien for finding this out!
2016-02-23 14:33:15 +01:00
509953a9db Remove unused "Free Unused" option from compositor
It was basically doing nothing, for ages.
2016-02-23 14:32:57 +01:00
6ac0d357d6 Fix T47534: Crash w/ project-paint from Python 2016-02-24 00:00:23 +11:00
56da420112 Make point density sampling threaded
It should be all fine to sample same point density from multiple threads,
this is something what Blender Internal is doing actually.
2016-02-23 12:30:27 +01:00
48ed9fcb78 Fix memory leak in point density
The issue was happening when having unconnected point density which
will cache data but will not free it because there's no actual call
to the actual sampling.

Now the idea is to make sure cache is zeroed on file load and undo
and then caching via RNA will free the data if any exists. This could
leave us with a single copy of cache in the node if it's not used,
but it's quite small amount of memory and it's not leaking.
2016-02-23 12:01:16 +01:00
9c68ffc3b4 UI: disable undo for cycling render slot
This wasn't working and used extra undo steps.
2016-02-23 20:59:51 +11:00
90e9da423b CMake: Enable BLOSC for OpenVDB for the full config
This will respect the official build configuration where we should
have BLOSC enabled.

We can't really detect if OpenVDB was compiled with BLOSC or not,
so seems we can't really avoid this extra flag.
2016-02-23 09:48:47 +01:00
d3fa1bd4d5 Fix warnings reported by MSVC
Mainly it's related on a bad practice in SDL to force-define __SSE__
and __SSE2__ flags which generates quite some warnings and causes too
much noise.

There are some other warnings fixed. Should be no functional changes.

NeXyon, please check the changes in audaspace :)
2016-02-23 09:44:54 +01:00
073ce98231 Fix white balance sequencer modifier
- division often visibly clipped channels.
- division by zero caused NAN pixel values.
2016-02-23 14:54:42 +11:00
f5872d2747 Fix T47531: crash with particle roughness curve mapping, after fix for T46382. 2016-02-23 04:22:13 +01:00
e4e21480d6 Fix button display clamping values
Displaying a button would clamp the value if the button was outside the range.
This could be OK in some cases,
however it's problematic with object dimensions which would re-scale objects on showing the panel.

Add `ui_but_update_edited` when its OK to modify the value.
2016-02-23 10:15:36 +11:00
adab35ba02 Fix T47529: Selecting paths makes them relative
When selecting file-paths from the interface, initialize the 'Relative' setting from existing paths.
2016-02-23 06:39:34 +11:00
2a3bd4621b Sculpt: use Ctrl to set grab/sculpt normal-weight
Having to change this with the slider each time isn't so convenient
and invert in this case does nothing.
2016-02-23 06:21:14 +11:00
f8ee24b1a8 Sculpt: apply grab normal-weight to snake-hook 2016-02-23 06:04:23 +11:00
1e98435c85 Sculpt: Enable original-normal for grab brush
Without this, grabbing with normal weight will continually select new normals
based on where you move the cursor,
causing the normal location to flicker in a way which isn't controllable in any useful way.
2016-02-23 05:27:13 +11:00
36e732c89f Sculpt brush can now grab inwards w/ normal weight
Previously the grab brush could only move ourwards when normal aligned.
2016-02-23 05:04:32 +11:00
37915e0b79 Don't draw object center when outside the view 2016-02-23 03:24:30 +11:00
27f5a01056 Fix line-width (drawing hair at wrong width) 2016-02-23 02:53:22 +11:00
e3f997d47f Fix T47517: "Show Weights" edit-mode fails
Don't use materials when showing weight colors.
2016-02-23 01:24:42 +11:00
7a74738914 Fix memory leak in DM_to_mesh 2016-02-22 23:22:15 +11:00
20104beea7 Fix T47482: take II, restore 2.76 behavior regarding groups when deleting an object.
Also re-reported through IRC by Thomas Beck (@plasmasolutions), thanks.

Though it's not ideal in theory, we have quite poor handling of object datablock currently
from user PoV - before this commit, it was not easily possible to get fully rid of an object
anymore if you did not removed it from all its groups before deleting it.

So for now, restore 2.76 behavior (namely, unlink an object from avaerything in Blender
once it is no more used by any scene).

Better handling of all this is TODO for later (also related to much more heavy changes
done in id-remap branch regarding sanitizing our ID deletion process).
2016-02-22 12:16:29 +01:00
9cfc203749 Compositor: fix memory leak in filter node operation.
Avoid allocating the (tiny) array on the heap in the first place.

Reviewers: sergey, lukastoenne

Differential Revision: https://developer.blender.org/D1815
2016-02-22 10:58:49 +01:00
c359343f8d Fix T43388, fix T40369: Cycles baking not antialiasing textures.
This re-enables the AA jittering, but with proper clamping so that u >= 0,
v >= 0 and u+v <= 1.

Differential Revision: https://developer.blender.org/D1254
2016-02-21 15:10:51 +01:00
a447421dec Bake API: add assert to verify we have valid UVs. 2016-02-21 14:38:50 +01:00
a0e1e0047b Fix crash baking selected to active after recent fix for uninitialized variables. 2016-02-21 14:38:49 +01:00
12ca20e6c3 Attempt to fix GLog compilaton on FreeBSD
Copied some config variables from an original config file.
2016-02-21 13:40:22 +01:00
ae086225da Fix compositor using edge repeat policy when it shouldn't
Was easy to notice when alpha-overing smaller image with blur on
the bigger frame.
2016-02-21 13:16:56 +01:00
de651318e6 Fix/workarounds for a couple of crashes. 2016-02-21 08:35:20 +01:00
cc1d9c3493 Move Volume class definition to volume.h, also move some properties from
the VolumeManager there, added some more code to handle attributes.
2016-02-21 07:39:25 +01:00
f6c11062bc Fix uninitialized var use initializing bake data 2016-02-21 16:20:36 +11:00
Julian Eisel
a66bc6c0f0 Correct incomplete doxgen file paths in WM 2016-02-21 02:10:29 +01:00
d2c5959834 fix T47484: Added fallback solution (copy exported file when rename is not supported) 2016-02-20 23:26:33 +01:00
4e95807db3 fix T47484: Added proper error reporting for Collada Exporter 2016-02-20 21:42:12 +01:00
edf9e8d4dc fix T47484: Added final status of exported file to Blender console 2016-02-20 20:33:42 +01:00
1b9039752a Fix unnecessary separators in image editor Image menu. 2016-02-20 20:22:51 +01:00
e608f2e7ec Fix crash enabling Use Multiview on images with an empty filepath. 2016-02-20 17:56:56 +01:00
95180a46ed Fix memory leak when saving OpenEXR half file fails. 2016-02-20 17:56:56 +01:00
4dd406c7b7 Fix T47482: Own mistake in new handling of 'userone' ID usages when decrementing usercount.
Ended up not handling at all 'userone' case, now it increments usercount correctly when needed.
2016-02-20 16:49:44 +01:00
c0d43871e0 Make Blender ready for C++11
Did a full compile of debug build with C++11 enabled, it all passed compilation
apart from some deprecated type used in GE's Video Texture. Solved it inside of
ifdef block now.

In the future we should uncomment the MSVC part of it, it should all be safe and
correct (MSVC2013 does not define new C++ version but supports C++11). The reason
it is commented is to have absolutely no effect on the upcoming release.
2016-02-20 16:45:53 +01:00
fe9b21a44a Add GHash/GSet pop() feature.
Behavior is similar to python's set.pop(), it removes and returns a 'random' entry from the hash.

Notes:
* Popping will return items in same order as ghash/gset iterators (i.e. increasing
  order in internal buckets-based storage), unless ghash/gset is modified in between.
* We are keeping a track of the latest bucket we popped out (through a 'state' parameter),
  this allows for similar performances to iterators when iteratively popping a whole hash
  (without it, we are roughly O(n!), with it we are roughly O(n)...).

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1808
2016-02-20 15:28:25 +01:00
90e77c871b Userpreferences Panel (for the 3DView)
This is an attempt to improve the User preferences panel for the 3DView. I made 2 changes:

- I reordered the sequence of properties by grouping them into more logical groups as it made sense to me. Please indicate where to rearrange the order if necessary.

- Then i added some changes in the code to get the groups better arranged visually. I am pretty sure that this can be done much better, more clever, more generic, whatever. This is just what i could figure out on my own so far.

Reviewers: aligorith, sergey, gaiaclary

Subscribers: sergey

Projects: #user_interface

Maniphest Tasks: T47295

Differential Revision: https://developer.blender.org/D1757
2016-02-20 14:07:20 +01:00
5f613f7b5d OCIO: Disable the warnings related on C4251
Those warnings are trigerred by stl classes in OCIO's public interface.

To quote MSDN: "C4251 can be ignored if you are deriving from a type in
the Standard C++ Library"

This is the only instance where those warnings hunts us, so for now we
can keep it all local in intern/opencolorio but this might be changed
in the future.
2016-02-20 14:06:11 +05:00
b2655167c6 GHost: Avoid macro re-definition by undefining the macro first
Should b totally harmless since the define was overriten anyway.
2016-02-20 14:06:10 +05:00
d9bf6b2d33 Carve: Silence 32/64 bit shit warning
There's no need to mix ints and size_t here at all
because all the values fits into integer.

It's unlikely we'll be re-bundling Carve, so didn't
bother with the patchset.
2016-02-20 14:06:10 +05:00
f1088bd9e1 CMake: Ignore paranoid MSVC linker warnings 2016-02-20 14:06:09 +05:00
ac5e989d4a Fix for NULL used instead of false 2016-02-20 14:06:08 +05:00
55aaa27018 Cleanup, avoid passing const pointer to MEM_freeN()
This generates warnings with MSVC. Similar typecast was
already done in other cases, so think it's all fine.
2016-02-20 14:06:07 +05:00
637f97b316 ImBuf: Cleanup, don't use using namespace, it's a bad practice 2016-02-20 14:06:07 +05:00
cfc8d80f2c ImBuf: Solve re-definition warnings
The idea now is to have FFmpeg/OIIO headers listed after
the system ones. This is because FFmpeg/OIIO might define
some constants with the same name as the ones from math.h.

FFmpeg/OIIO has ifdef around defines, but math.h doesn't
check whether constants were already defined or not, which
causes some noisy warnings.
2016-02-20 14:06:06 +05:00
b30ab24fb8 Cycles: Avoid re-definition of math cnstants with MSVC 2016-02-20 14:06:05 +05:00
aff60520bd Fix some warnings in GLog/GFlags when buildingwith MSVC2013
Those warnings were only addressed for MSVC2015 so far.
2016-02-20 14:06:05 +05:00
ff675f0367 CMake: Don't pass SSE2 flags in compositor for 64bit MSVC
ALl 64 bit platforms supports SSE2, hence the flag is ignored
and warning was generated.
2016-02-20 14:06:04 +05:00
8132553553 Fix (unreported) crash when ungrouping a nodegroup with some animated node.
Was accessing already freed action in temp nodegroup animation data...
2016-02-20 13:15:40 +01:00
028c67c81e Fix T44453: Exporting Keying Sets referencing node tree properties generates invalid Python code/paths
The problem is that node trees (such as the Material, Lamp, and Compositor node trees)
are stored as "nested node trees" on the affected datablocks. They are particularly
troublesome to deal with, as the are not easily identified, and also cannot be easily
mapped back to the ID's which actually own them. As a result, the usual automated
methods do not work when dealing with these!
2016-02-20 17:55:11 +13:00
6c02c5fb09 Fix T47433: Driven shapekey values (from 2.4x) are not indicated as having drivers
Only Driver FCurves with named shapekeys (instead of shapekey indices) was
getting picked up by the UI code for testing whether a property had drivers
or not. So, while this version patching code worked when it was initially
written for the 2.4x -> 2.5 transition, some subsequent changes ended up
breaking this. As this stuff is not used often, the breakage wasn't noticed.
2016-02-20 17:55:11 +13:00
86c55a18e5 Fix T47492: Name is not displayed for newly renamed FCurve, when the path was broken
Thanks Alexander Romanov (a.romanov) for the fix!
2016-02-20 17:55:10 +13:00
e29a5ba617 Only use outlines around faces for surface objects
Was drawing wire when mixed with non-wire nurbs.
2016-02-20 13:49:18 +11:00
ae4c46c6e5 Fix nurbs surface drawing using material for lines
Also reduce context switching
2016-02-20 13:49:18 +11:00
Julian Eisel
a529ad9707 Minor adjustments to keymap editor layouts
* Remove unnecessary big margins after triangle icons (esp. for keymap items they where waaay to big)
* Remove ugly margin after "Foo (Global)" entries
* Add little margin after expanded key maps
2016-02-20 00:46:17 +01:00
Julian Eisel
8d73805df0 Fix wrong indentation of items in keymap editor
Actually, 3 issues here:
* Keymap items of "Foo (Global)" maps weren't indented enough
* Items after a opened "Foo (Global)" map were indented too much (col was overridden then).
2016-02-20 00:28:47 +01:00
7c76479d5f Fix compilation error with FFmpeg and Ubuntu Trusty
Seems this is a confusion between Libav which was silently used
by Ubuntu instead of FFmpeg.
2016-02-19 22:05:06 +01:00
b5b156f089 Set line-width, point size when running callbacks
Since 2.76 Blender no longer resets these after use,
this may break add-ons, so reset before calling region callbacks.
2016-02-20 06:58:03 +11:00
aed2a97a86 Cleanup: remove unused environment files. 2016-02-20 03:48:09 +11:00
3d6b8bd506 Fix implicit double to float conversion caused by use of double precision M_PI 2016-02-19 17:41:20 +01:00
44561459f3 fix T47484: replaced tempnam() by simple name 'untitled' 2016-02-19 16:23:11 +01:00
ba99e097f7 Fix T47472: Border select in the Action Editor does not respect NLA scaling on Summary Tracks 2016-02-20 02:54:43 +13:00
4e35131609 Mac OS X Openvdb, add blosc support.
even if WITH_OPENVDB_BLOSC is off openvdb still contains 1 reference to snappy so we link with it always
2016-02-19 02:24:16 -08:00
e394488665 Start working on volume attributes. 2016-02-19 11:00:55 +01:00
9e81222525 CMake: New dependency graph requires either Boost or C++11 2016-02-19 10:18:59 +01:00
1e58af0f53 Fix T47454: Line width display error
Note, there are still cases where nurbs surfaces display double line width,
but this isn't a regression from previous releases.
2016-02-19 15:05:44 +11:00
503f0e8be6 Merge branch 'openvdb' into cvdb_ray_isect 2016-02-19 04:42:09 +01:00
74ae05cb04 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/render/nodes.cpp
	intern/cycles/util/CMakeLists.txt
2016-02-19 04:41:52 +01:00
3c4f971392 Workaround for T47213: branched path sampling issues with CUDA 7.5. 2016-02-19 00:49:24 +01:00
1d15421af9 Fix T47477: Transform allows 'inf' input
Numeric input wasn't checking numbers were finite,
could crash transforming with skin modifier.
2016-02-19 10:19:19 +11:00
60e53e0ce6 Fix crash drawing fonts at size 1 2016-02-19 09:40:26 +11:00
2fbdf9adc7 Fix frame node text ignoring blank lines 2016-02-19 09:22:26 +11:00
411deae9b0 Fix T47451: Blender internal not rendering meshes with zero vertices in the original mesh. 2016-02-18 20:05:57 +01:00
0136046335 Fix T45343: incorrect Cycles baking of bump maps from selected to active.
The differentials were incorrect, now they are properly transferred from the
low to the high poly mesh.
2016-02-18 20:05:57 +01:00
1a676d4e0e Fix related to T45343: UV unwrap giving poor results for some n-gons. 2016-02-18 20:05:56 +01:00
da81227e54 Cycles: Fix wrong sample all direct/indirect settings on sm_50 and higher
Seems to be some compiler fault which leads to a wrong flag being used,
making it so wrong number of samples is used for the background.

This should in theory fix issue reported in T47213.
2016-02-18 16:29:35 +01:00
608ee3e073 BGE: Allow access to original texture openGL Bind code/Id/Number
This patch adds a python method to get openGL bind code of material's texture according to the texture slot.

Example:
import bge

cont = bge.logic.getCurrentController()
own = cont.owner

bindId = own.meshes[0].materials[0].getTextureBindcode(0)
Test file: http://www.pasteall.org/blend/40679

This can be used to play with texture in openGL, for example, remove mipmap on the texture or play with all wrapping or filtering options.
And this can be used to learn openGL with Blender.

Reviewers: TwisterGE, kupoman, moguri, panzergame

Reviewed By: TwisterGE, kupoman, moguri, panzergame

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1804
2016-02-18 12:05:53 +01:00
e24323ea40 Actually only remove sqlite dll 2016-02-18 10:53:55 +01:00
dde810c268 Revert "Fix: T46526, Do not try to install sqlite3.dll anymore as we link it statically into pythons _sqlite"
This reverts commit a8e6b633c9.
2016-02-18 10:53:54 +01:00
e1f624ecef Cleanup: add missing struct qualifier 2016-02-18 19:35:48 +11:00
a8e6b633c9 Fix: T46526, Do not try to install sqlite3.dll anymore as we link it statically into pythons _sqlite 2016-02-18 08:19:14 +01:00
a8fe3a1cee Fix T47461: Different results on CPU and GPU when using Branched Path Tracing
The issue here was actually somewhere else - the attached scene from the report used a light falloff node in a sunlamp (aka distant light).
However, since distant lamps set the ray length to FLT_MAX and the light falloff node squares this value, it overflows and produces a NaN
weight, which propagates and leads to a NaN intensity, which is then clamped to zero and produces the black pixels.

To fix that issue, the smoothing part of the light falloff is just ignored if the smoothing term isn't finite (which makes sense since
the term should converge to 1 as the distance increases).
The reason for the different results on CPUs and GPUs is not perfectly clear, but probably can be explained with different handling of
Inf/NaN edge cases.

Also, to notice issues like these faster in the future, kernel_asserts were added that evaluate as false as soon as a non-finite intensity is produced.
2016-02-18 01:23:38 +01:00
d40a24a037 Fix crash on exit with Blender Internal baking and envmap render. 2016-02-17 22:46:11 +01:00
0eb54bd226 Fix armature relationship lines missing w/ hi-dpi 2016-02-18 06:40:20 +11:00
66688078bd Fix line width for armature w/ custom bones 2016-02-18 05:46:14 +11:00
578f98d7ad Fix T47452: Translate-node seams w/ subpixel offset 2016-02-18 02:16:49 +11:00
8512a8b956 Buildbot: Remove CMake cache on all platforms
This way we are always sure that we are using latest ever configuration
without need to manually poke buildbot after doing changes in the building
environment.

Also uncomment code back, was a left-over from some debug.
2016-02-17 15:29:13 +01:00
8cab327316 Cycles: Make CUDA 7.5 officially recommended
This was a hard decision, because going newer CUDA toolkit makes
rendering up to 5% slower. But on another hand, it solves major
speed regressions (up to 30%) with branched path tracing on a
top level cards.

Neither of those regressions have a meaningful and sane workaround
from the code itself.

Toolkit 6.5 could still be used, but it's no longer recommended one.
2016-02-17 15:18:56 +01:00
d81dd2da0f Fix/workaround static object initialization in gflags 2016-02-17 15:01:40 +01:00
157bc3dbbf install_deps: final CMake instructions: always update all libs controlled by this script.
Otherwise, switch from local built to system installed libs (once a valid package becomes available)
would be missed...
2016-02-17 14:47:49 +01:00
b04746a83d install_deps: OSD building: disable CUDA/OpenCL backends.
Those are can of worms to support properly (versions mismatch, etc.),
and not used in Blender currently anyway.
2016-02-17 14:15:56 +01:00
3857b4600f Cycles: Don't silence unused macro, remove the macro instead
It's not really handy to silence something unused hoping for it'll be
used in the future. We can end up with quite some silencing then.

Also made this flag which i find rather useless to NOT cause -Werror
in Cycles code.
2016-02-17 12:40:56 +01:00
d4e5e94ec7 Cleanup: unused define warning 2016-02-17 21:39:23 +11:00
88d4d0d070 Cleanup: OSL style 2016-02-17 21:39:23 +11:00
d6b77450ce Fix T47447: Cycles crash when reaching texture limit with 3D textures 2016-02-17 11:43:03 +01:00
4431caae1a Some more tweaks to make linking to a shared FFmpeg-3.0 happy 2016-02-17 10:48:46 +01:00
90705d6eda Add missing glLineWidth call 2016-02-17 20:36:35 +11:00
60d735df14 Use high precision for scene scale
Without this its possible to accidentally truncate the value.
2016-02-17 20:36:35 +11:00
8d95178c0b Fix T47411: Cycles portals luminance artifacts
When using multiple portals, scene areas behind one of the portals were rendered darker than they should.
The reason for that is a pretty stupid mistake: Since portals are only used at positions that aren't behind them,
only portals that are used should be accounted for in the PDF calculation. That was actually the case, but the final
divide incorrectly divided by the total amount of portals, not the amount of visible ones.

Another issue with areas behind portals was the PDF evaluation function.
The new evaluation code is shorter, simpler and fixes this issue.

Also, the threshold for the distance check was increased to avoid artifacts where portals touch a surface.
2016-02-17 03:06:30 +01:00
0ccae52394 Fix OpenCL kernel build errors after recent 3D texture changes. 2016-02-17 01:38:55 +01:00
833eb863eb Fix (harmless) assert in BVH spatial splits with Visual Studio debug builds. 2016-02-17 00:07:35 +01:00
2f7237ac78 Fix broken ghash performance gtest.
Regression from rB2dba2b3d71d9781bce45. Do not understand why MSVC needs this convoluted
allocation (looks like broken compiler crap?), but at least let's do it correctly!
2016-02-16 22:22:41 +01:00
1c958f5bef Cleanup: avoid -Wnarrowing warning 2016-02-17 05:18:47 +11:00
480b814e02 Cycles: Remove back some tweaks for inline policies
While kernel compiles fine, it seems generated binary is not really correct.
2016-02-16 17:25:58 +01:00
b82538d3b7 Make game engine ready for FFmpeg-3.0 as well 2016-02-16 16:30:14 +01:00
4f8e051883 Correct label for simple deform modifier 2016-02-17 01:55:40 +11:00
d0246d5f30 Cycles: Some cleanup, should be no functional changes
Addressing meaningful feedback from coverity.
2016-02-16 15:33:00 +01:00
Julian Eisel
21c88df7c7 Fix items in mode pie changing position by supporting more than 8 items in operator-enum pies
Now a 'More' item is added to the pie when there are too many items. It opens a sub-pie that contains the remaining items.
Note that this only touches operator-enum pies (like the object mode pie is), it is not a complete support for pies with more than 8 items. For this further design and code work would be needed, but this is too urgent to wait for that.

This is a better fix for T46973, should definitely be applied for 2.77 release.

Patch D1800 by myself with some edits by @campbellbarton, thanks!
2016-02-16 15:04:33 +01:00
8f944789cd Add missing line-width for curve widget 2016-02-16 23:46:04 +11:00
63b60be6d7 Fix T47427: Crash caused by OSL 2016-02-16 13:38:07 +01:00
f630964feb Set line-width for sequencer borders 2016-02-16 23:23:40 +11:00
7e60f61007 Fix sample mis-match w/ OpenGL full-sample render 2016-02-16 23:12:11 +11:00
ab5417870d Cleanup: Typo. 2016-02-16 13:00:44 +01:00
03cfc2bf6a Amend T47425 fix, use scene setting
There are times when the preview background is important.
2016-02-16 22:41:27 +11:00
c5e1781944 Cycles: Fix crash when trying to render after re-enabling the addon 2016-02-16 12:47:31 +01:00
0b03785eb5 Make Blender compilable with FFmpeg-3.0
While it's not something we'll be using for the official release,
it's nice to support new libraries at least on "it compiles" level,
so it's not that many frustrated developers around.

Nexyon, please have a look into Audaspace changes :)
2016-02-16 12:34:15 +01:00
462b6dd919 Sequencer: GL preview, use transparent background
Fixes T47425, match 2.76 and non-preview behavior
2016-02-16 21:12:10 +11:00
2ecd67efa4 Fix T47422: Factory startup loads too many fonts 2016-02-16 07:52:16 +11:00
1c4f21f85e Cycles: Initial support of 3D textures for CUDA rendering
Supports both smoke/fire and point density textures now.

Reduces number of textures available for sm_20 and sm_21, but you have
to compromise somewhere on such a limited hardware.

Currently limited to linear interpolation only, and decoupled ray
marching is not supported yet. Think those could be considered just a
further improvement.

Some quick example:

  https://developer.blender.org/F282934

Code is minimal and we can fully consider it a fix for missing
support of 3D textures with CUDA.

Reviewers: lukasstockner97, brecht, juicyfruit, dingto

Reviewed By: brecht, juicyfruit, dingto

Subscribers: mib2berlin

Differential Revision: https://developer.blender.org/D1806
2016-02-15 21:26:29 +01:00
Martijn Berger
b5171e250c Make cycles standalone link again 2016-02-15 21:00:25 +01:00
f2d564d4f3 Usual i18n tweaks... 2016-02-15 20:09:10 +01:00
9a0fb589f7 Cleanup: reorganize BKE ID tagging functions.
BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those
into flags (for presistent one) and tags (for runtime ones).

Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts
to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_'
functions affect flags.
2016-02-15 19:38:51 +01:00
a1495366af Cleanup: rna_main_api: use macro to define tag() and is_updated rna functions. 2016-02-15 19:38:51 +01:00
6c298a16e4 Buildbot: Support CUDA kernels cross-compile and enable it for 32bit platforms 2016-02-15 19:13:52 +01:00
c93069083e Cycles: Tweaks for 32bit CUDA binaries
Tweak some inline policies. Not totally crazy yet, and in fact we now
have one less ifdef statement now.
2016-02-15 19:11:02 +01:00
1336e97b12 Cycles: Use CUDA_64_BIT_DEVICE_CODE to detect which CUDA architecture to use
It is initialized based on size of pointer, which matches our previous
behavior, but using it in Cycles side allows to cross-compile CUDA
binaries.
2016-02-15 19:08:36 +01:00
06743f4018 Cycles: Make guarded allocator compatible with MSVC2015 2016-02-15 18:33:36 +05:00
3e6b7d0fd8 Fix white balance, was doing unnecessary linear conversions
This made byte & float images behave differently, where other modifiers remain the same.
Also remove scene from the modifier (should have been passed as arg but no longer needed).
2016-02-16 00:07:03 +11:00
473eff2df8 Compositor: Re-consider the way how track speed works
Based on an user feedback, previous implementation with providing
decoupled X and Y speeds didn't work in production at all: there
is no way to combine this speeds to an usable vector.

So now we're providing speed vector output instead, which provides
speed in an exactly the way Vector Blur node expects it to be:
first two components is a speed from the past, second two components
defines speed to the future.

Old behavior can be achieved by RGBA separating the speed output
and using first tow components.

Now this speed gives quite the same results as a speed pass, with
the only difference that track position speed uses "shutter" of
1 while pass uses shutter of 0.5 (and there's no way to affect on
that?).
2016-02-15 12:43:14 +01:00
6371fccdbe Cycles: Fix guarded allocator issues on Windows
The issue was caused by static vectors allocating some internal
data using rebound element allocator for them, which was causing
access to a non-initialized statistics objects and was failing a
lot when switching Blender to a fully guarded allocation.

Additionally, we were not able to free that internal memory before
Blender exits, which was causing false-positive memory leak prints.

Now we're not using GuardedAllocator for those proxy containers.

Ideally this should be done as a GuardedAllocator::rebind, but
it didn't work for vector<bool> because it seems some internal
parts are converting bool to char32_t, which either makes it so
we can't use GuardedAllocator for those vectors or the compiler
get's confused when we're trying explicitly allow GuardedAllocator
for rebind<char32_t>.

This with current approach we should be fine for the release.
2016-02-15 11:46:13 +01:00
318d3b9ab4 Cleanup: rst style 2016-02-15 19:43:08 +11:00
41fb953fa0 Docs: update tip on using the systems Python 2016-02-15 19:35:54 +11:00
aa8fc57f1e Fix for Python executable not being found on Linux
Python name could include ABI-flags after the version,
since checking for all combinations of ABI flags can expand into many possibilities,
take the executable name from the build system.
2016-02-15 19:05:25 +11:00
3d24e57ce8 CMake: install python as an executable 2016-02-15 18:45:32 +11:00
Julian Eisel
19201f9ae3 Uber-picky: Too small margin in tooltip
Minor design detail, but kept bugging me :) Was removed in rBd57847ca5b9.
2016-02-14 23:06:43 +01:00
7d85da882b Cycles: Fix infinite recursion of md5 calculation on Windows
Was caused by some safety things of making sure we've for NULL
terminator for the buffer when doing mbs<->wcs conversion, but
it turns out this simply confuses str::string and it can no
longer have proper .size(). Let's assume behavior of string
allocation is same all over the std, and we can avoid having
that extra null-terminator allocated.
2016-02-14 21:08:11 +05:00
b4e10aa70b Fix T47405: subsurf triangulation was producing incorrect normals after last fix. 2016-02-14 20:25:33 +01:00
a9813f2380 Tweak doc section about overriding context - point out context.copy() usage! 2016-02-14 18:27:35 +01:00
1538f526e9 Docs: update doxy config 2016-02-14 22:11:35 +11:00
af49690b32 Docs: disable sharing docs within a group
This made using groups apply docstrings to undocumented functions in the group
(and give errors that the args didnt match).
2016-02-14 22:10:42 +11:00
a71523fab4 Cleanup: braces 2016-02-14 10:14:28 +01:00
1c870f46e7 Compositor: Cleanup, don't shortcut float values
Use 0.0f instead of 0.f and so on.
2016-02-14 10:12:45 +01:00
de9ec80e64 Fix T47405: subsurf inconsistent triangulation in OpenGL compared to applied modifier and render. 2016-02-14 03:51:41 +01:00
3143ec29d0 Fix T45606: cycles multires tangent space normal map bake issues. 2016-02-14 03:51:41 +01:00
Julian Eisel
f6f851d28a Fix T47404: Bones get draw fat line in pose mode
Removed this glLineWidth call in rBe8d7a0206e99, thought it wasn't needed. Really hope this was the last line width issue for now :/
2016-02-13 23:16:04 +01:00
4c04149bca Fix crash when cancelling cycles bake in some cases. 2016-02-13 22:54:29 +01:00
701a4a4e09 Fix cmd+z for undo not working when editing text objects on OS X. 2016-02-13 22:54:02 +01:00
88770bed7c Fix T47393: mouse wheel scroll no longer zooms with mighty mouse on OS X.
Hopefully this is the last fix, using the method explained here:
https://forums.developer.apple.com/thread/31536
2016-02-13 16:07:55 +01:00
6a593aba44 Cleanup: Move Cycles sky model data to util. 2016-02-13 13:41:40 +01:00
d1dd893487 Cycles: Remove meaningless expression 2016-02-13 13:29:50 +01:00
89b1f042cf Cycles: Fix compilation error on Windows 2016-02-13 13:29:13 +01:00
69dc0c3192 Cycles: Fixes for Burley BSSRDF
There are several fixes in here, which hopefully will make the shader
working correct without too much magic in there.

First of all, this commit brings BURLEY_TRUNCATE down from 30 to 16
which reduces noise a lot. It's still higher than original truncate
from Brecht, but this reduces PDF value at a cutoff distance by an
order of magnitude (now it's 0.008387, previously it was 0.063521
for the albedo of 0.8 and radius 1.0). This should converge to a
proper result faster and don't have artifacts.

This kind of reverts fix for T47356, but after additional thinking
came to conclusion Burley is not being totally smooth, it is about
giving less waxy results which it's kind of doing in the file.

Second of all, this commit fixes burley_eval() to use normalized
diffusion reflectance. This matches the way we calculate CDF and
solves numeric instability close to 0, making PDF profile looking
closer to other SSS profiles:

  https://developer.blender.org/F282355
  https://developer.blender.org/F282356
  https://developer.blender.org/F282357

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1792
2016-02-13 13:29:13 +01:00
83dc288689 Cleanup: Remove some OIIO code for versions prior to 1.5. 2016-02-13 13:21:47 +01:00
ae635771b2 Cycles: Fix crash caused by the guarded allocation commit
C++ requires specific alignment of the allocations which was not an
issue when using GCC but uncovered issue when using Clang on OSX.
Perhaps some versions of Clang might show errors on other platforms
as well.
2016-02-13 12:35:33 +01:00
33fb344171 Docs: remove bmesh py api warning 2016-02-13 20:44:47 +11:00
3ec1695273 Sculpt: avoid double-hash for pbvh building
Gives minor speedup entering sculpt mode and with undo.
2016-02-13 18:59:56 +11:00
2c2d52c2de Optimize sculpt undo, avoid redundant updates
On undo, sculpting regular meshes would update _all_ GPU VBO's.
Avoiding the update gives noticeably faster undo.

This is also a fix/workaround for strange behavior with NVidia's driver (T47232),
Where locking and unlocking all buffers for updating
slows down redraw speed permanently after the first undo.

However the problem isn't avoided entirely since a single brush stroke might modify most of the mesh.
2016-02-13 18:59:56 +11:00
12b996e61b BLI_bitmap: add flip macro 2016-02-13 18:59:56 +11:00
c9ef3d1f69 Set alpha clip to lower value
Workaround for T46962 still works
2016-02-13 18:55:23 +11:00
1477028ea3 Cycles: Fix compilation error with MinGW
Was using some C++0 which we don't officially enabled yet.
2016-02-12 20:21:13 +01:00
29c0cff680 Fix/workaround compilation error in dds
CLAMP was conflicting between Common.h and BLI_utildefines.h

Ideally we would use macro from BLI, but it's a bit involved change
to make it working with C++, will keep it for later.
2016-02-12 20:14:39 +01:00
4b42a49086 Fix error in bvhtree_walk_dfs_recursive 2016-02-13 01:53:44 +11:00
c8d2bc7890 Cycles: Always use guarded allocator of vectors
We don't have vectors re-allocation happening multiple times from inside
a loop anymore, so we can safely switch to a memory guarded allocator for
vectors and keep track on the memory usage at various stages of rendering.

Additionally, when building from inside Blender repository, Cycles will
use Blender's guarded allocator, so actual memory usage will be displayed
in the Space Info header.

There are couple of tricky aspects of the patch:

- TaskScheduler::exit() now explicitly frees memory used by `threads`.
  This is needed because `threads` is a static member which destructor
  isn't getting called on Blender's exit which caused memory leak print
  to happen.

  This shouldn't give any measurable speed issues, reallocation of that
  vector is only one of fewzillion other allocations happening during
  synchronization.

- Use regular guarded malloc (not aligned one). No idea why it was
  made to be aligned in the first place. Perhaps some corner case tests
  or so. Vector was never expected to be aligned anyway. Let's see if
  we'll have actual bugs with this.

Reviewers: dingto, lukasstockner97, juicyfruit, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1774
2016-02-12 15:43:26 +01:00
28604c46a1 Cycles: Make Blender importer more forward compatible
Basically the idea is to make code robust against extending
enum options in the future by falling back to a known safe
default setting when RNA is set to something unknown.

While this approach solves the issues similar to T47377,
but it wouldn't really help when/if any of the RNA values
gets ever deprecated and removed. There'll be no simple
solution to that apart from defining explicit mapping from
RNA value to Cycles one.

Another part which isn't so great actually is that we now
have to have some enum guards and give some explicit values
to the enum items, but we can live with that perhaps.

Reviewers: dingto, juicyfruit, lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1785
2016-02-12 15:27:33 +01:00
Dalai Felinto
ec9977855f Fix: OSX - Cmd + A doesn't work for Font objects editing
Since Cmd + A works elsewhere, it should work during font objects editing as well.

There is still a mysterious issue with Cmd + Z not working for UNDO the edited
text in OSX (probably GHOST related).
2016-02-12 11:58:43 -02:00
Dalai Felinto
a143aeaeae Integrate font objects copy/paste with system clipboard
When pasting text, the style (bold, material, ...) is maintained, if it was originally copied from Blender.

This fixes the issue of missing copy/paste options for font objects
(they were present back in Blender 2.49)

Reviewers: Severin, campbellbarton, brecht
2016-02-12 11:05:05 -02:00
9c21015c26 Fix crash in bvhtree.FromPolygons 2016-02-12 19:12:58 +11:00
3c7369164e Fix T47379: crash appending materials with node trees. 2016-02-11 22:34:15 +01:00
Julian Eisel
e8d7a0206e Fix more cases where gpencil thickness controls line thickness of 3D view elements
We now simple set glLineWidth to 1 once before drawing objects. This way we don't have to do it all over.

Fixes T47396.
2016-02-11 21:00:27 +01:00
7428ccfd6d Fix T47314: Misaligned DataBlock Previews for groups with custom center coordinates
Now take into account `dupli_offset` of groups.

Also fixed another issue related to objects renderability, previous code was giving
bad results due to added temp objects to generate previews (camera, lamp...).
2016-02-11 17:34:08 +01:00
1d0e084834 Fix T47387: Cycles Point Density Render Issues 2016-02-11 15:48:29 +01:00
6767c61a9b Fix T47378: Separate images popup UI does nothing
Use confirm popup instead of redo popup
2016-02-12 00:45:24 +11:00
164dfbeb50 Cycles: Remove some ifdefs for OSL < 1.7.1.
That means that we now only support OSL 1.7.1 or newer. Please update libs or re-run install-depsh.sh.
2016-02-11 13:58:50 +01:00
1e29849da0 Fix for cursor not being reset on file load
caused by 6081f6c3
2016-02-11 23:47:17 +11:00
10cc4ae359 Cycles: Fix typo in network device
Spotted by jesterKing, thanks!
2016-02-11 13:05:55 +01:00
4cfff68344 install_deps: fix boost installation on Fedora/Suze & co.
Was only trying to install $BOOST_VERSION or higher boost - being fairly recent
this always failed. We can live with older versions too, so now using
*BOOST_VERSION_MIN as with other distros.
2016-02-11 10:21:27 +01:00
cbdc72fb35 correct error in last commit 2016-02-11 20:06:13 +11:00
932cfb98e7 Disable bmesh-boolean modifier for 2.77 release
Edit-mode boolean is still available
2016-02-11 19:56:24 +11:00
bd60920576 Revert "CMake: remove ".svn" checks"
This reverts commit 00fbc326e3.

Still needed for svn <1.8
2016-02-11 19:14:59 +11:00
0d71ea54d0 Fix T47389: WPaint + texture entirely transparent 2016-02-11 18:48:28 +11:00
5b2d0b0fb4 BLI_kdopbvh: test root node before traversing 2016-02-11 18:23:58 +11:00
86725667d4 Cleanup: naming for NearestRayToAABB_Precalc 2016-02-11 18:21:10 +11:00
00fbc326e3 CMake: remove ".svn" checks 2016-02-11 16:00:19 +11:00
Julian Eisel
3ab50cf3aa Fix camera border controlled by gpencil thickness
This only happened when looking through camera which is only selected object. Reported @quollism, thanks :)
2016-02-10 23:17:53 +01:00
389a6a4c92 Fix T47382: incorrect tooltip for mirror tool in object mode. 2016-02-10 21:10:50 +01:00
0ba649549c Cleanup: remove unused radius argument 2016-02-11 05:47:05 +11:00
fce0e31bcf Docs: use doxygen sections 2016-02-11 05:39:39 +11:00
8e85ef1c7d Fix T47332: Face select masks display glitch 2016-02-11 04:19:44 +11:00
f5982f2a29 Outliner: omit active-unselected in "Selected" view
This isn't selected, so misleading to include in selection list.
2016-02-11 01:15:36 +11:00
d6eddc5f92 add openvdb to blender config (and buildbot) 2016-02-10 14:04:05 +01:00
4a7b09c4ea Windows MSVC allow building with openvdb / tbb 2016-02-10 13:59:04 +01:00
e7374d0227 Docs: minor comment edits to smallhash 2016-02-10 23:28:16 +11:00
9d77beb2c0 Merge branch 'openvdb' into cvdb_ray_isect 2016-02-10 11:07:17 +01:00
b67005b978 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/util/CMakeLists.txt
2016-02-10 11:06:48 +01:00
88d5d99130 Tweaks to the comments of smallhash
Collaboration between russki guy working from Netherlands and
ausie bloke working from Australia (not Austria).
2016-02-10 10:52:24 +01:00
5237937a08 Cycles: Fix an AttributeErro exceptionr on missing object context
This happens when the properties panel is pinned to the material tab.

Patch by Ralf Hölzemer (aka cheleb), thanks!

Differential Revision: https://developer.blender.org/D1776
2016-02-10 10:35:39 +01:00
2cbf32e0fb Cleanup: double promotion
Also remove null checks from args with non-null attribute.
2016-02-10 15:27:28 +11:00
184a2ee5a4 Fix screenshot adding image extension after .blend 2016-02-10 15:27:28 +11:00
15f76ca072 Update link to avoid redirect 2016-02-10 01:05:10 +01:00
Julian Eisel
7efd45eecd Node Editor: Another missing glLineWidth reset
Caused too thick outlines around nodes and around preview image in node.
2016-02-10 01:05:10 +01:00
5a45ccaf3e Fix T47377: Newer file crashes at render on official 2.76b version
Really annoying bug, the code was not forward compatible at all and
resulted in crash. And it is really good to keep at least one release
forward compatibility so possible regressions could be verified easily.

The idea now is to use new property name for the pixel filter type,
but keep old property around for a couple of releases, so we have at
least some forward compatibility.

Don't like this situation at all, but seems it's least of the evil
we can choose.

Thanks Brecht for the review!
2016-02-10 04:10:52 +05:00
Julian Eisel
d6e936254e Fix manipulator drawing width controlled by gpencil thickness!1!! 2016-02-10 00:01:25 +01:00
Julian Eisel
e902ba270e Fix curves drawn with wrong line width
Selected/Active curves were drawn with too high line width in Object mode.
2016-02-09 23:51:27 +01:00
ba9992aa91 Cycles: Cleanp, avoid direct calls of RNA_enum_get, we've got utility for that 2016-02-10 03:27:07 +05:00
fb82cff720 Typo: Open GL -> OpenGL 2016-02-09 21:03:17 +01:00
e927f8b424 Fix T47370: untranslateable bake panel strings.
Reorder buttons a bit so that these strings are not even needed, makes more
sense to have this grouped anyway.
2016-02-09 19:47:49 +01:00
4912e0e746 Fix T47339: Unified color not used w/ radial control 2016-02-10 01:48:02 +11:00
24e6411be6 Fix T47366: Single slope linear curve was wrongly using vector handle
Vector handle is only required for a symmetric curve to give nice a /\ shape.
Single slope curves better to use AUTO handle by default.
2016-02-09 14:51:32 +01:00
02b538ec83 Fix make.bat checking 64bit systems 2016-02-10 00:26:12 +11:00
9961d47a4f Add BLI_bvhtree_walk_dfs utility function
This generic function allows callers to walk the tree using callbacks to define behavior.
2016-02-09 22:47:14 +11:00
caa16c1443 BLI_kdopbvh: expose bvhtree_kdop_axes array
So future callbacks can make use of the axis index.
2016-02-09 22:47:14 +11:00
337b718695 Fix T47371 - add access to 'static' enum items.
Some dynamic enums, which do not need a valid context pointer, have their 'itemf'
callback always called. This is annoying for introspection tools (like the ones generating
translations, or API documentation), because it means they never have access to all possible
options (enum items).

So now, there is also an `enum_items_static` accessor to get only statically-defined
enum items.

Note: only i18n tools take advantage of this currently, others are still to be updated.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1782
2016-02-09 12:51:07 +01:00
ae2036e69b Add missing gl line width for curve normals 2016-02-09 20:54:49 +11:00
73b672ee97 Fix: Transform constraint/helper line drawing had incorrect thickness when GPencil strokes are shown 2016-02-09 21:55:07 +13:00
7e5cabb6b6 Fix T47368: Crash re-linking object to scene 2016-02-09 18:06:06 +11:00
ea3900c58f Docs: correct description 2016-02-09 16:30:13 +11:00
69327137c0 Fix T47367: Segfault in BIF_draw_manipulator() with "around active" and the active object hidden
Accidentally left off null check when cleaning up the code there in
34993bf97d  (GPencil_Editing_Stage3 branch)

Thanks to Sami Pelkonen (pltsi) who reported this bug, along with
some nice and detailed backtraces which made it easy to locate
the problem :)
2016-02-09 15:27:41 +13:00
97d9d6224c Set clip alpha to small non-zero value
This amends 089d2a18 which was a known driver bug (T46962),
increasing the clipping to avoid precision issues.
2016-02-09 12:00:08 +11:00
2ac88328b0 Cycles: Fix Burley's CDF truncation after recent radius fix
This is all not really ideal, but good enough for tonight.
More thoughts and investigation tomorrow!
2016-02-08 21:50:38 +01:00
Dalai Felinto
089d2a18d9 Fix: Empty > Image not working in some hardwares
Basically the default U.glalphaclip was 1.8367099231598242e-40 in some
computers (e.g., OSX 10.11, AMD Radeon HD 6750M) this value would need for bad
gl clipping.

The new default is 0.0. To test this before/after the fix, just run:

$ blender -b --factory-startup --python-expr "import bpy; print(bpy.context.user_preferences.system.gl_clip_alpha)"
2016-02-08 15:15:48 -02:00
6e16becffd Fix T47354: Garbage key events (UNKOWNKEY) would remain in backup event's keymodifier.
For some reason, using 'dead keys' to compose some accentuated latin chars will generate
some 'unknown' key events, and in this case, direct `event.keymodifier` was correctly
cleared, but not its 'backup' version in `win->eventstate`, so all further events would
get an invalid modifier until some real one would be pressed again...
2016-02-08 15:46:11 +01:00
dae8326d1e Fix T47356: Too sharp falloww with Burley BSSRDF
After the clamping commit we need to bump BURLEY_TRUNCATE
constant a bit, otherwise mean free path does not really
match the disk radius needed for importance sampling.
2016-02-08 14:54:11 +01:00
52668c56b7 GPencil: Layers with alpha = 0 should not be editable
* Added a new API function to test if a GPencil layer is visible or not
* Replaced all editability checks with this new "super check"
* Replaced all magic number thresholds for opacity visiblity with a single define
2016-02-09 02:45:36 +13:00
4bc070a519 Code Cleanup: Use bool instead of int for "setactive" param 2016-02-09 02:45:36 +13:00
3419ffdf49 Fix: ANIM_animdata_update() was not handling post-edit updates on GP channels
This may have resulted in situations where the order of GP keyframes was
incorrect (leading to some frames not being able to be found), or in some
redraw problems when trying to delete GP keyframes (that I was getting earlier,
but can't seem to reproduce now)

TODO: We now need to hook up a proper api to do the GP key sorting
2016-02-09 02:45:35 +13:00
770319bbd2 Fix: "Speaker" Icon for "Muting" in GPencil Dopesheet mode was confusing and used incorrectly
In the other Dopesheet modes, the "Speaker" icon was used to refer to
"animation playback muting", while for GP layers, this was being incorrectly
abused for "layer visibility in viewport".

This commit fixes that by making the following changes:
* A new "eye" icon toggle is added for controlling GP Layer visibility
* The "speaker" icon toggle now controls "Lock Frame to Current" functionality,
  which functions more like the "animation playback muting" that is generally
  expected.
2016-02-09 02:45:34 +13:00
2e914d556a GPencil: Numpad 0 and Numpad view rotation keys now work in Continuous Drawing Mode
When animating to the camera, and working in "Continuous Drawing Mode",
it be necessary to return to the active camera viewport, after briefly pivoting
the view using MMB (to check on perspective or something like that). However,
before this fix, you would have had to exit drawing mode to do this.
2016-02-09 02:45:34 +13:00
5136791de1 GPencil Eraser: Do not allow eraser radius to get smaller than 1 pixel 2016-02-09 02:45:33 +13:00
eb9953abc0 GPencil UI: Show selection mask toggle in 3D view header to make it easier to access 2016-02-09 02:45:33 +13:00
0618971398 GPencil UI: Expand Sculpt Settings panel by default
Sculpt settings are often quite handy to be able to easily access while drawing,
so make it easier to access these when drawing without having to first expand
the panel.

(On the other hand, the "Edit Strokes" panel contains tools already found in
various other places - menus,etc. - so no need to expand it by default)
2016-02-09 02:45:32 +13:00
84b020d635 GPencil: If "onion skinning" toggle on header is enabled, new layers will have onionskinning enabled too 2016-02-09 02:45:32 +13:00
ee509b4cb7 Fix: Renaming Grease Pencil layers doesn't update the Dopesheet Channels Region 2016-02-09 02:45:31 +13:00
c6afa36f47 Fix group flipping when syncing mirror weights
Corrects mirror syncing for invert, levels & smooth.

Note that the code changed to process mirroring even if both verts are selected,
since group flipping can mean that is still meaningful.
2016-02-09 00:19:28 +11:00
172143d4f8 Cleanup: use doxy comments for deform.c 2016-02-08 22:40:57 +11:00
4b9c697210 CLeanup: style 2016-02-08 22:28:06 +11:00
4fc0b1638f Improve make.bat final message 2016-02-08 21:14:10 +11:00
37a2a3c8dc Fix RenderEngine API docs
Correct access to passes, D1779 by @levon.

Also use is_preview attr and use register/unregister functions.
2016-02-08 20:35:32 +11:00
d8163a08fb Fix for non-bool return values of a few common RNA functions with declared boolean return.
Since rBbbc7dc169dc365889bad3f3aed7b868efb432710 bool-valued RNA functions are expected to
return only 0 or 1. For flag tests as in these functions the returned int value needs to be
explicitly converted to bool.
2016-02-08 10:13:09 +01:00
dc2a01ca05 Fix T47360: Image loading fails when accessible from the CWD 2016-02-08 18:21:20 +11:00
f77110e789 Fix T47347: Z-pass defaults to zero
Use the same default value for Z-depth in the compositor as everywhere else.
2016-02-08 13:36:41 +11:00
ba1ca9148d Fix T47353: Project paint ignores small faces
When zoomed out - faces < 0.5 pixels across a diagonal aren't so rare,
so culling them can ignore small faces.
2016-02-08 11:48:03 +11:00
ce6ba15727 Image Editor: use shift+home to fit the frame
FKey conflicts with painting.
2016-02-08 08:38:48 +11:00
c7608ef359 Fix T47337: BVHTree.find_nearest missing
Method wasn't named as documented.
2016-02-08 08:29:46 +11:00
Martijn Berger
715410c2fd CMake OpenVDB support on OS X
Reviewers: kevindietrich, sergey

Differential Revision: https://developer.blender.org/D1773
2016-02-06 04:26:57 -08:00
dd185bf5b8 Fix T47336: compositor color balance offset/slope/power incorrectly clamps HDR colors. 2016-02-07 16:41:41 +01:00
8f6912392d Fix T47342: hang with freestyle viewport render and animation playback.
Not sure why I made the logic so complicated before, this change should solve
the deadlock when the render thread tries to acquire the main thread lock while
the main thread is waiting for threads to finish.
2016-02-07 16:38:48 +01:00
72dd1ba3fe Fix T47349: incorrect Cycles fresnel and layer weight with GLSL materials.
Patch by Ralf Hölzemer.
2016-02-07 14:45:39 +01:00
bd0223b8fe Fix T47351: slow rigid body sim bake after recent changes to use jobs system.
The bake system had a 200ms sleep for each frame substep, to give the UI time
to redraw. I don't think there is a good reason to have this, with fair thread
scheduling this will give UI thread 2x more time at best, and the UI doesn't
need to be that responsive during bake.
2016-02-07 14:35:21 +01:00
77197b26fa Cleanup: line width 2016-02-07 22:56:20 +11:00
8be34580c1 move windows out of source dir 2016-02-07 20:58:58 +11:00
578f70f288 Cycles: Fix access uninitialized light after recent refactor/fixes 2016-02-07 06:20:06 +05:00
76eac1ae70 Motion Paths: Use custom poll functions for "Update" operator 2016-02-07 13:32:13 +13:00
7320df2e61 Motion Paths: Show "Update" button in the toolbox too 2016-02-07 13:32:12 +13:00
4e3d6725c4 Clear motionpaths for all objects and bones instead of only selected ones
With the old behaviour, it was too easy to get old paths hanging around because you
forgot to go through and select a few bones that still had them.
2016-02-07 13:32:12 +13:00
9eca281e88 Added Context.editable_objects/bases
This is useful when you want visible + editable objects, but you don't
want to require the items to be selected as well.
2016-02-07 13:32:11 +13:00
e360080a04 Cycles: Refactor the way how we exclude light from the device
This unifies things around ignoring light due to lack of scene
contribution or due to other optimization tricks.
2016-02-07 02:21:38 +05:00
7faa9d1304 Fix T46550: Cycles combined baking black in some cases.
Now pass_filter is modified to have exactly the flags for the light components
that need to be baked, based on the shader type. This simplifies the logic.
2016-02-06 21:02:02 +01:00
c502114ee1 Cycles: Solve issues with auto-disabled MIS
There were two issues:

1. Memory leak: std:;erase does not call delete on the
   pointer (which is actually a good idea),

2. After MIS was disabled in viewport render there was
   no way to bring MIS back.

Now instead of removing light from the scene data we
kind of tagging it for an ignore. Possible cleanup
would be to add Light::is_enabled and use that instead
of passing weird and wonderful function arguments.
2016-02-06 20:43:44 +01:00
f25f7c8030 Cycles: Re-implement some utilities to avoid use of boost
The title says it all actually, the idea is to make Cycles
only requiring Boost via 3rd party dependencies like OIIO
and OSL.

So now there are only few places which still uses Boost:

- Foreach, function bindings and threading primitives.

  Those we can easily get rid with C++11 bump (which seems
  inevitable sooner or later if we'll want ot use newer
  LLVM for OSL),

- Networking devices

  There's no quick solution for those currently, but there
  are some patches around which improves serialization.

Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D1764
2016-02-06 19:19:20 +01:00
7623d3e071 Cycles: Add some utility tests using GTests
This is an initial move to have unittests to at least cover
utility functions, which then could be extended further to
test such areas as shader optimization and such.

Currently only based on initial "infrastructure" layout and
writing tests needed to test the no-boost patch.

Note: This patch starts to use "<dir>/<header>.h" notation
for the include statements which i just got used to do in
other projects. Something what would be cool to use globally
in the code eventually.

Reviewers: dingto, juicyfruit, lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1770
2016-02-06 19:19:20 +01:00
3867bef904 Fix T47320: Cycles baking in edit mode uses outdated mesh. 2016-02-06 19:14:04 +01:00
2dba2b3d71 Fix gtests on Windows/MSVC
There were some missing stubs and some tests were specifically
written for Linux. Also, apparently MSVC has a limit of 64K for
the insource strings..
2016-02-06 21:21:55 +05:00
5508cc2d63 Fix typo in 32bytes aligned malloc test 2016-02-06 16:42:19 +01:00
a90d5cd692 Cycles: Remove workaround for MSVC2010 and Boost
We've upgraded to Boost-1.60 and MSVC2013 since the workaround
was originally committed. After checks with current compiler and
libraries the original bug is no longer happening.

This will make string comparison much faster in Windows, solving
synchronization bottlenecks of fewzillion objects.

Thanks Martin Felke (aka scorpion81) for the tests!
2016-02-06 15:56:47 +01:00
e1f5b2b4c1 Fix GTests compilations on Windows
Unfortunately this doesn't make all tests compilable due
to all sort of weird and wonderful bad levels includes
on Windows (G referenced from bf_blenlib) but at least
allows to selectively build tests for now.
2016-02-06 15:12:28 +01:00
d978f23f71 CMake: Remove mention of extern_redcode, it was removed 2016-02-06 14:37:29 +01:00
6081f6c387 Fix T47204: selection failing directly after disabling multisample in user prefs.
Now store the multisample setting each window was created with.
2016-02-06 12:21:41 +01:00
e602fe60c0 Code cleanup: resolve minor Cycles todo's. 2016-02-06 11:56:37 +01:00
d5e929a9d3 Code cleanup: remove unused Cycles code from BVH cache. 2016-02-06 11:55:35 +01:00
4443bb8922 Fix Burley BSSRDF NaNs and fireflies.
Explicitly truncate to Rm same way as the Gaussian BSSRDF, and use safe_sqrtf()
to be sure in case of float precision issues.
2016-02-06 11:52:43 +01:00
a6ca8a1b73 Cleanup: Remove support for OSL versions < 1.6.
We can get rid of more ifdefs once all platforms are on OSL 1.7 soon.
2016-02-06 00:07:20 +01:00
66a9698978 Cycles: Change several default values (second batch).
This change the following values:
- World settings:
	- Use MIS: On
	- MIS Samples: 1
	- MIS Resolution: 1024

Enabling World MIS per default won't make simple backgrounds (flat background color) slower,
see previous commit. This gets disabled internally if World MIS is not actually needed.
2016-02-05 22:45:36 +01:00
469447f707 Cycles: Auto disable World MIS, if we only use a simple color.
When World MIS is enabled by the user, we now check if we actually need it.
In case of a simple node setup (no procedurals, no HDRs..) we auto disable MIS internally to save render time.

This change is important for upcoming default changes.
2016-02-05 22:13:51 +01:00
ca88bc5ac1 Cleanup: Rename has_heterogeneous_volume variable.
No functional changes, this change is done for consistency of upcoming changes.
2016-02-05 21:33:37 +01:00
2685d45fa2 Fix error in last commit.
treedata could have a non-initialized tree in case of edge_snapping, leading to segfault.

Spotted by @mano-wii, thanks.
2016-02-05 18:48:15 +01:00
3ad0344171 Fix T47326: Snap to vertices not working properly in orthogonal view mode.
Same causes as when snapping to faces, so same solution: in case of ortho view,
offset start of ray to be just slightly outside of the target's bbox, to avoid
too much far away start point that generate floating point computation instability
in BVH raycasting.

Note that this lead to some refactoring, to avoid duplicating too much of code.

For now, edge snapping seems to behave OK (uses different logic), so not touched.

Based on patch by Germano Cavalcante (@mano-wii), thanks!
2016-02-05 18:18:27 +01:00
d3889e2cad Fix T47329: Compositing fails to render unless each included scene was rendered since opening 2016-02-05 14:58:15 +01:00
c4dc14b079 Fix T45915: Cannot select keyframes in summary channels in Dope Sheet in TweakMode
When in TweakMode on NLA strips that had an offset, it was not possible to select
those keyframes in the Summary Channel in the Dope Sheet.

The main gist of it is that the current code is from before the summary track was
introduced, and so could assume that ANIM_nla_mapping_get() would work for all channels
present. Thus, simply converting the clicked frame to nla-mapped time once would be
enough. However, for summary channels, nla-mapping_get() doesn't do anything, since
we can potentially include keyframes from several different objects!
2016-02-06 02:40:43 +13:00
c105c59bb4 Fix T46037: Moving keys in NLA tweak mode on offset actions results in Bezier handles getting stretched unreasonably
Patch by Alexander Gavrilov (angavrilov)

Reviewed by Joshua Leung (aligorith)
2016-02-06 02:40:43 +13:00
c53c8df6d9 Cycles: ifdef some extra code when building split kernels 2016-02-05 14:11:16 +01:00
24ae7b9035 Cycles: Don't gray out integrator settings when userprefs are set to OpenCL but scene is set to CPU 2016-02-05 13:40:51 +01:00
3758828d33 Install_deps: update magic build numbers of OIIO and OSL.
Please remember to change those each time you update building code and there is no version change.
Otherwise poeple re-running the script won't get the updated builds.
2016-02-05 12:03:58 +01:00
e688a62712 Cycles: Fix for initial guess of the radius for Burley BSSRDF
The value was too high, causing bad Newton iteration step.
Now the value is not so good, but it's still within 9 iterations
and those high number of iterations are only happening in
approx 1% of input values.
2016-02-05 10:06:08 +01:00
da7ddb69e9 Cycles / OSL: Updare stdosl.h to 1.7.1.
This updates our file to OSL 1.7.1, which comes with some new inbuilt
features:

- linearstep()
- smooth_linearstep()

- hash()
- getchar()
2016-02-05 00:05:26 +01:00
208a49b1c3 Install Deps: Use SSE2 optimizations for OIIO and OSL. 2016-02-04 23:42:39 +01:00
fc3db32f04 Cleanup: Update BSSRDF code comment. 2016-02-04 22:42:55 +01:00
d80f8baba5 Support for cubemap reflections in the viewport
D1756 by @youle, uses existing texture mapping option.
2016-02-05 04:30:06 +11:00
45071fa0f5 Update themes
Label text editing uses colors from text buttons
2016-02-05 04:30:06 +11:00
1da4628c74 Install_deps: Disable building tests for OSL
Since we're now on 1.7 we can skip building the OSL testsuite. It was giving various compilation errors on different machines and we don't need them anyway...so just disabling them in the script.
2016-02-04 18:10:20 +01:00
55dcdb9bd7 Fix T47324: Edit-text in list view theme glitch
Use existing text select colors when text matches select color.
2016-02-05 03:28:22 +11:00
e7e9613fe6 Install_deps: tweak OSL build options. 2016-02-04 16:52:13 +01:00
2b1a08c213 Install_deps: updated OSL to 1.7.1. 2016-02-04 16:35:32 +01:00
3e7389eaf2 Cycles: Speedup of Christensen-Burley SSS falloff function
The idea is simply to pre-compute fitting and parameterization
in the bssrdf_setup() function and re-use the values in both
sample() and eval().

The only trick is where to store the pre-calculated values and
the answer is inside of ShaderClosure->custom{1,2,3}. There's
no memory bump here because we now simply re-use padding fields
for the pre-calculated values. Similar trick we can do for other
BSDFs.

Seems to give nice speedup up to 7% here on my desktop with
Core i7 CPU, SSE4.1 kernel.
2016-02-04 15:29:58 +01:00
f250aa9d86 Fix T47323, no Fac output in Magic texture (OSL). 2016-02-04 14:08:36 +01:00
ac53999d1b Nodes: Remove code which was dead for 2 years now 2016-02-04 09:57:00 +01:00
f41a5c60a7 Cycles: Make Christensen-Burley a default falloff function 2016-02-04 09:52:56 +01:00
ad26407b52 Cycles: Implement approximate reflectance profiles
Using this paper:

  http://graphics.pixar.com/library/ApproxBSSRDF/paper.pdf

This model gives less blurry results than the Cubic and Gaussian
we had implemented:

- Cubic: https://developer.blender.org/F279670
- Burley: https://developer.blender.org/F279671

The model is called "Christensen-Burley" in the interface, which
actually should be read as "Physically based" or "Realistic".

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht, dingto

Subscribers: robocyte

Differential Revision: https://developer.blender.org/D1759
2016-02-04 13:27:23 +05:00
d8a998ce71 Use contextlib for temporary py console overrides
Using context overrides means stdout/stderr overrides can't be left set by accident.
2016-02-04 17:40:02 +11:00
0034765208 Project Paint: add sample merged option
This picks the on-screen color instead of using the active layers texture color.
2016-02-04 15:26:07 +11:00
50a19cc852 Fix T47317: Dynamic paint crashes with no UV layer 2016-02-04 14:19:32 +11:00
24eecb00de Cycles: Correction to asserts, they will never trigger before 2016-02-03 15:01:26 +01:00
3aa74828ab Cycles: Cleanup, indentation and braces 2016-02-03 15:00:55 +01:00
87cbcd697b Fix T47266: Blender crashes from Scripted Expression in Driver
Issue was caused by update RNA callbacks freeing the dependency
graph, which is only needed to tag depsgraph for rebuild.

Solved by using a flag for the depsgraph which indicated that it
is to be rebuilt.
2016-02-03 14:40:02 +01:00
557074c30a Cycles: Cleanup, indentation
Not sure why it was mixed tabs and spaces, it's all just
confusing in different editors.
2016-02-03 12:17:39 +01:00
d6531a5662 Fix T47302: Crash when OSL active with a viewport on rendered
Only happened when rendering second time with OSL enabled.
Was caused by fix for T47201. Hopefully now all the issues
are solved (meaning, we don't keep files opened and don't
crash either).
2016-02-03 12:11:23 +01:00
2a65acc952 Cleanup: parenthesize macros 2016-02-03 21:17:07 +11:00
9ab7482657 Imbuf: remove libredcode
D1751, remove this library since its quite a specific - only supports an older version of this codec.

Also ffmpeg has added support for recent versions of the codec.
2016-02-03 18:39:37 +11:00
31776d8a67 Cleanup: refactor tooltip data-access out of layout function 2016-02-03 18:01:18 +11:00
fcbb03a9b7 Remove redundant file exists checks 2016-02-03 17:45:54 +11:00
94d1674ddc Fix T47303: Voxel texture disappears after first frame
Failed reads didn't update the voxel 'ok' tag,
making successive reads fail (even on existing frames).
2016-02-03 17:33:51 +11:00
3416428e0b Recent BLI_rename fix introduced error w/ blend file versioning
Rename calls didn't check if the file existed first, so missing file was counted as success and ignored.
2016-02-03 17:10:35 +11:00
91bd58869c Include why file operations fail in reports 2016-02-03 16:41:17 +11:00
622019a085 Fix BLI_rename returned success w/ missing source path 2016-02-03 15:57:24 +11:00
36b516cb97 Fix T47249: Wrong edit-mesh material color w/ hidden faces
Regression in 700c40e2

Also avoid unnecessary flushes with material changes with hidden faces.
2016-02-03 15:01:50 +11:00
9045cf88a5 Cleanup: correct comment, unused var 2016-02-03 11:51:58 +11:00
b80c07321b Fix T47300: SHIFT TAB, CTRL SHIFT TAB shortcuts does not toggle snap, snap mode on off anymore.
Regression from rB12c71508c2d7.

Now, we systematically first try keycode from `XLookupKeysym()`, and only fall back to
the one from `XLookupString()` if it failed to convert to a valid gkey.
2016-02-02 21:27:33 +01:00
e3f48bdb48 Usual i18n/UI message fixes... 2016-02-02 20:40:23 +01:00
e42852a339 Cycles: Cleanup and reference actual paper used for BSSRDF sampling 2016-02-02 18:06:29 +01:00
6bbe59fab1 Fix T46933: Bone axes letters may not be visible
Now axis letters are view aligned.
2016-02-03 03:33:17 +11:00
2b445b83fe Fix T46583: Sculpt symmetry don't work in clipping border view mode
This is an attempt to solve the issue by doing clip test on the original
side of the stroke. Some extra testing is required.
2016-02-02 16:04:33 +01:00
147de2c49e Fix T46411: Experimental deps graph causes particles to jump around 2016-02-02 15:43:20 +01:00
5e5143460c Depsgraph: Fix particle system component nodes not being displayed in debug graph 2016-02-02 15:33:50 +01:00
6290df0cf4 Fix T46382: Crash sharing particle system with clump or rough curves
Made those curves local to thread evaluation now, so there is no
threading conflict accessing them from evaluation threads anymore.
2016-02-02 15:01:58 +01:00
4ceea37db4 Fix T46481: Volume grid particles out of volume
The issue was caused by fix for 31017 which resulted in some
missing intersecitons recorded which screwed inner/outer checks.

This is an old bug, so didn't bother with forcing re-distribution
to happen on file open to avoid possible other regressions.
2016-02-02 13:54:53 +01:00
49247f0fc4 Fix T47207: Material shading incorrectly handles colorramp node
The issue was introduced by a fix for T44713 which only made GLSL
consistent with Cycles.

Now we do have conditional averaging or proper luma weighting based
on whether we're new old old shading system. Not totally ideal but
should work for until we re-design viewport possibly breaking how
Blender Internal does implicit conversion.
2016-02-02 12:50:56 +01:00
be10d6d3f0 Cleanup: rename uvflag -> flag for dm drawing
Was called both, however this isn't mainly for uv's so just call 'flag'.
Also remove redundant NULL check.
2016-02-02 17:39:40 +11:00
9afab70985 Partial Fix T47221: Sculpt Hide fails w/ texture drawing
Support for skipping hidden faces in sculpt mode w/ texture drawing.
2016-02-02 16:48:44 +11:00
3b92a9472c UI: update dynamic tips
Useful for progress ETA to continuously update.

This adds API option not to activate new regions GL state which isn't needed in many cases.
2016-02-02 14:16:53 +11:00
3822a9c01a Fix T47256: Progress bar doesn't update w/ mouse-over 2016-02-02 14:16:15 +11:00
7c04c3c960 Use simpler method to check the planes view aligned 2016-02-02 12:40:07 +11:00
c0d2de25d1 Match armature/object select grouped order 2016-02-02 12:40:07 +11:00
883a20c8e7 Cleanup: style 2016-02-02 12:40:07 +11:00
Michał Ziobro
a92bdfe0c9 Armature select similar: children, immediate-children en sibligns selection.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1750
2016-02-02 00:41:33 +01:00
deef941208 Fix build error on OS X in previous commit, this define should stay. 2016-02-02 00:41:32 +01:00
fae710a213 Fix T47293: game engine crashes since Bullet upgrade.
This restores a modification that was there before.
2016-02-02 00:19:09 +01:00
3b11acda70 Fix double metadata prefix when using strip's metadata 2016-02-01 18:09:15 +01:00
cd047de026 Correction to previous fix of multiple releases of same ImBuf
Original change in d631252 was not quite correct because it
was missing release since the acquire() will return NULL.

Hopefully now all the cases are covered.
2016-02-01 17:12:09 +01:00
25de685d36 Fix T47288 Vector transform not behaving correctly with camera space and cycles 2016-02-01 18:46:32 +03:00
80a5409033 Fix potential access uninitialized metadata 2016-02-01 16:33:29 +01:00
7c935152fa Remove debug-only code which sneaked in 2016-02-01 16:29:45 +01:00
cb9f9a63e0 Fix wrong information used for stamp when "Strip Metadata" is used
Such configuration used to cause quite confusing situation when
stamp will use actual scene's statistics but metadata from strip
will be used for the saved file (basically, causing different
information stamped and saved as metadata).

Don't think it was desired behavior and it's something what
artists here in the studio wants to be fixed.
2016-02-01 16:11:24 +01:00
d7af7a1e04 Add theme settings for keyframe indication in 3D View 2016-02-01 14:09:43 +01:00
e8523842b7 Cleanup: FileData->flags: Convert defines to anonymous enum. 2016-02-01 14:03:31 +01:00
e4d47518b3 Fix T47238: Bug w/ view aligned constraint plane
When constraining on 2 axis, it was possible the plane was view-aligned causing odd glitches.
2016-02-01 21:48:17 +11:00
b29d046e64 Avoid duplicate getConstraintSpaceDimension calls 2016-02-01 21:48:17 +11:00
ddc9c76e3a CMake: Silent Numpy warning on OSX
It is in the archive actually and being installed nicely by the looks of it.
2016-02-01 10:39:16 +01:00
8aef306a42 CMake: Attempt to fix wrong installation folder for requests on OSX 2016-02-01 10:38:34 +01:00
b3daf92f7e Sequencer: IF effect strip only affects on a single strip use source metadata for the result
This way it's possible to have some color-correction modifications on
top of the render result and yet still have proper metadata stored.

Usecase: Access per-frame render-time of the movie frames from the
final export.
2016-02-01 10:19:55 +01:00
d55bd1bd87 Cycles: Fix wrong clamping used for camera border 2016-02-01 10:02:24 +01:00
e43f08f6a2 Fix missing return after NULL check, from Coverity reports. 2016-02-01 08:34:29 +01:00
25f5fdc070 View2D: avoid divide-by-zero 2016-02-01 15:23:30 +11:00
526dbd8089 Cleanup: unused TransInfo members 2016-02-01 15:23:29 +11:00
c2508b0aaf Fix transform crash in rare cases
In some cases transform modes would use the custom-data pointer,
other times the transform conversion functions would.

However with some combinations (bone mirror + bend for eg),
both conversion & transform mode would use this pointer causing a crash.

Fix this by having 2 custom-data pointers:
one for the mode, another for the data-type.

This also simplifies time-slide which was conditionally mixing mode/type data in the one array.
2016-02-01 15:23:29 +11:00
17429dce00 Fix T47289: Edges don't transform in face-mode 2016-02-01 13:15:02 +11:00
25860e92c2 Docs: warning for loading duplicate movie-clips 2016-02-01 11:56:24 +11:00
aaecf91f93 UI: minor tweaks to view orbit shortcuts show 2016-02-01 11:01:00 +11:00
40517fb2e7 Added a way to get the cache filename. 2016-01-31 16:50:03 +01:00
2ca168d6f5 Merge branch 'openvdb' into cvdb_ray_isect 2016-01-31 15:59:34 +01:00
d924998d3e Cleanup: pep8 2016-02-01 00:47:10 +11:00
61c6cae79e A more sensible hash function for pthreads on Windows. 2016-01-31 13:21:12 +01:00
0f3f117311 Docs: add preset menu example 2016-01-31 18:08:01 +11:00
fd08905df7 Merge branch 'openvdb' into cvdb_ray_isect
Conflicts:
	intern/cycles/blender/blender_object.cpp
	intern/cycles/blender/blender_sync.h
2016-01-30 23:47:40 +01:00
2b17f0d4af Merge branch 'master' into openvdb 2016-01-30 23:44:31 +01:00
24f95a1991 Point Cache: fix typo in smoke_openvdb_read. 2016-01-30 23:30:16 +01:00
29c51dd1ed Added a method to check for sparse volumes. 2016-01-30 23:23:27 +01:00
6451c072ce Fix T47153: scroll wheel zoom fails with mouses that support smooth scroll on OS X. 2016-01-30 22:33:20 +01:00
fe0ca82b23 Fix T47263: numpad4/6 rotates around worl Z axis and not view Y axis.
Those two were the only one rotating around some world axis (turntable mode),
so better make their behavior consistent with other rotating numpad keys.

This breaks the turntable-rotation with numpad keys, though.
2016-01-30 19:07:36 +01:00
eed9c6fdcf Fix T46455: Array modifier could generate chained mapping of vertices, leading to corrupted geometry.
That was the main issue (in both T46455 and T46690), solved by 'flattening' those chains (v1 -> v2 ->v3 etc.)
before calling `CDDM_merge_verts()`.

Also added note to `CDDM_merge_verts()` that it does not support chained mapping, along with
a basic assert that should catch most of those cases in future.

The logic of 'following mapping' was also rather broken, making a special case here when using
object-controlled offset is very weak. Further more, blindly following mapping in this case
was far from ideal, this could end to merging vertices rather far from each other.

To address this issue, we now always follow mapping, but only as long as 'final' vertex remains
close enough from mapped one.

Finally, the search of 'closest' vertex to merge with was also quite bad, would just pick the first
one matching distance limit, instead of using the actual closest one - could lead to rather ugly
geometry deformations in case one would use not-so-small merge threashold!
2016-01-30 18:02:40 +01:00
bde80cbb14 Fix memory leak in hook modifier's data copy 2016-01-30 15:40:24 +01:00
74c7707e8c Cycles: Pass Blender's C++ RNA structures by reference
This way we avoid passing structures which could be up to
few hundred bytes by value to the utility functions.

Ideally we'll also have to add `const` qualifier in majority
of the calls, but C++ RNA does not allow us to do that because
it does not know if some function modifies contents or not.
2016-01-30 15:08:57 +01:00
0e4e1993e6 Cleanup: correct qsort comments
Also add link to original source & parenthesize min macro.
2016-01-30 13:27:48 +11:00
5f0b673aa9 Cleanup: line length 2016-01-30 13:27:48 +11:00
f688fb6127 Cleanup for last commit, these variables are no longer needed. 2016-01-30 02:12:59 +01:00
9815f8a623 Cycles: Cleanup of OpenCL split kernel routines
The idea is to switch from allocating separate buffers for shader data's
structure of arrays to allocating one huge memory block and do some index
trickery to make it accessed as SOA.

This saves quite reasonable amount of lines of code in device_opencl and
also makes it possible to get rid of special declaration of ShaderData
structure.

As a side effect it also makes it easier to experiment with SOA vs. AOS
for split kernel.

Works fine here on NVidia GTX580, Intel CPU amd AMD Fiji cards.

Reviewers: #cycles, brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1593
2016-01-30 00:23:06 +01:00
fef53c74b5 CMake: Remove per-module Werror settings
Seems i was the only one who was really up to using it and
i do have gcc-5 finally backported and installed here so
such a fine-tune flags are no longer needed.
2016-01-30 00:04:52 +01:00
96da223d0b Quiet some warnings. 2016-01-29 21:39:19 +01:00
65977350c5 Attempt to fix compilation on windows. 2016-01-29 21:30:50 +01:00
443dc7c414 Merge branch 'master' into openvdb 2016-01-29 20:59:18 +01:00
e7915ea6eb Cycles: Remove code which was commented out for ages now
It was mainly unfinished code for volume in a split kernel which
should be done differently anyway to avoid such a code copy-paste.

The code didn't really work, so likely nobody will cry.
2016-01-29 18:59:37 +01:00
25aea19323 Cycles: Remove some unused variables from split kernel function 2016-01-29 18:54:46 +01:00
b33bcc1955 install_deps: disable ffmpeg in oiio, we do not need it and this lib varies too much accross distros... 2016-01-29 17:05:01 +01:00
75838de7c3 Fix i18n-related points in T47265 - mostly, fix non-translated items in enum-search popup menu. 2016-01-29 15:06:46 +01:00
d3989a3140 Buildbot: Update master configuration 2016-01-29 17:47:47 +05:00
15abb48a04 Install_deps.sh: attempt to add OpenVDB, not working for now.
OpenVDB is like a 30-years old lib when it comes to building it - not even a configure.sh script!
This makes it impossible to auto-build (install_deps is not a new CMake!).

So for now, just storing some template code for it, and expected version/deps data
in --show-deps option.
2016-01-29 11:07:28 +01:00
cd71d9e936 Sequencer: It is now possible to append strip's modifiers to all selected ones
Previously it was only possible to replace all existing modifiers with the
new list, which isn't so great for grading.

Ideally we should also have some sort of merge policy here, but that's for
later.
2016-01-29 09:17:33 +01:00
7d285854b0 Skip save-as history running from another Operator
So scripts can call Save-As without adjusting 'Recent Files'.
Uses same logic and file reading,
2016-01-29 17:00:32 +11:00
f2a93faa7c Fix T47271: Vertex Group to Selected missing update 2016-01-29 15:12:57 +11:00
a57d9f725f Fix crash running transform in background mode 2016-01-29 15:12:57 +11:00
cd6178e584 Cleanup: remove unused code 2016-01-29 15:12:57 +11:00
928a22e66e Added primitive type, some shell code. 2016-01-28 19:12:23 +01:00
e2161ca854 Cycles: Remove few function arguments needed only for the split kernel
Use KernelGlobals to access all the global arrays for the intermediate
storage instead of passing all this storage things explicitly.

Tested here with Intel OpenCL, NVIDIA GTX580 and AMD Fiji, didn't see
any artifacts, so guess it's all good.

Reviewers: juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1736
2016-01-28 18:59:27 +01:00
53ef03d20f FFmpeg: Experiment with use of nb_frames from a stream when known
The idea is to use known number of frames in the stream when possible
instead of trying to deduct it from a stream duration and time base,
which could potentially give some rounding errors.

This, i.e., solves quicktime encoded files from animators to open
just fine in sequencer.

Another report done by the main Nieve guy (aka venomgfx)
2016-01-28 16:38:05 +01:00
fbc8eeb46c Merge branch 'openvdb' into cvdb_ray_isect 2016-01-28 16:11:32 +01:00
427718ab16 Merge branch 'master' into openvdb 2016-01-28 16:11:18 +01:00
5f31089957 Cycles: Make OpenCL's argument wrapper able to get int/float values directly 2016-01-28 15:03:42 +01:00
12c71508c2 Fix T47228: Ghost not handling predictably keycodes when first keymap is non-latin.
Why this is not working in original code and works int this one remains mystery
(see comments for details).

Note that we still do not support at all non-latin keymaps for our shortcuts,
this would be nice to add someday, but that's a TODO, not a bug.

Reviewers: sergey, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1746
2016-01-28 14:57:33 +01:00
a3793f5e0b Cycles: Enable compilation of sm_37 kernels by default
Makes sense to keep support of top-range cards "out of the box".
2016-01-28 11:59:40 +01:00
ff0dcc5d70 Cycles: Make kernel compilable for 3.7 compute capability
It is used by GK210 GPUs which could be found in, i.e. Tesla K80.
2016-01-28 11:56:09 +01:00
0834015b74 Fix/Workaround T46412: Defocus node not working on Windows 32 bit
The issue was caused by some functions in compositor returning
garbage values. Partially the issue was caused by vc12_xp toolset
we're using, but even with regular vc120 toolset nodes like bokeh
image did not work correct.

This is a bit weird solution, which could indicate some sort
of compiler bug, but is also actually makes sense because we do
use SSE intrinsics in the compositor now. Maybe it all gets
interfered in some way.

In any case, if someone wants to find a real solution for the
issue please go ahead.

This shouldn't have affect on supported platform because we
already demand CPU to have SSE2 support.
2016-01-28 11:39:17 +01:00
2a8f1c656c WM: allow filesel to execute a modal operator 2016-01-28 20:43:26 +11:00
30086eafe5 OpenGL: optimize ED_screen_draw
One draw call for all screen area outlines instead of one per line.
(Two for retina displays)

One draw call for area split line instead of two.

En/Disable GL_BLEND once for area join arrow instead of twice.
2016-01-28 02:51:22 -05:00
f91fe78af5 cleanup: spelling, comments, alignment
fixed pet peeve “frustrum” and other non-functional changes.
2016-01-28 01:36:12 -05:00
05dbc470ad Cleanup: warnings & style 2016-01-28 17:23:12 +11:00
a1d7f67d81 cleanup: spelling / typos
no functional changes
2016-01-28 00:30:50 -05:00
ba9468768d Usual i18n/UI messages fixes. 2016-01-27 22:20:26 +01:00
66aa4af836 Fix T47252: FileBrowser: buffer overflow with scripts defining too long 'filter_glob' string.
Fixed this with three changes:
* filter_glob is now 255 char max (63 could be a bit limited in some rare cases).
* IO templates now explicitely define max len of that property (such that scripters are aware of the limit).
* ED_fileselect_set_params() is now safe regarding too long strings from a 'filter_glob' op property.
2016-01-27 18:04:50 +01:00
4e2eea63a4 Fix clear keyframes op not reporting when called over a locked fcurve.
Debug print here is not that useful to common user, and keyframe deletion
does report warning, so do the same for clear op.

Reported by venomgfx over IRC, thanks.
2016-01-27 17:23:55 +01:00
a621926694 Tracking: Remove unfinished code from automation experiments 2016-01-27 16:26:50 +01:00
fa9ba68a2b Tracking: Update plane track solution after joining point tracks
Was in fact long term TODO, it all should work fine now.
2016-01-27 16:20:17 +01:00
28d599a0fc Tracking: De-duplicate code for tracking a sequence and single frame
It was not so much better from performance point of view to have
a special case here and it only made us having two entry points
to the same things, which was rather annoying.

Should no be functional changes for artists.
2016-01-27 16:01:20 +01:00
17735ec0f5 Tracking: Solve some TODOs
Should not be functional changes.
2016-01-27 14:27:37 +01:00
efefae62de Atomics: Use _InterlockedAnd8 direction for 342bit MSVC
That's what MSDN tells you to do and that's how to solve the compilation
error problem with it.
2016-01-27 14:16:02 +01:00
30cbaac9d3 Tracking: Remove code which was dead for quite some time now 2016-01-27 14:13:19 +01:00
8179a287d4 Tracking: Cleanup, de-duplicate some code 2016-01-27 14:06:55 +01:00
0e9ccb3c12 Merge branch 'master' into openvdb
Conflicts:
	source/blender/makesrna/intern/rna_nodetree.c
2016-01-27 12:53:54 +01:00
938e528bee Buildbot: Enable OpenVDB BLOSC for the Linux builders 2016-01-27 12:49:42 +01:00
1f954649c4 OpenVDB: Get rid of hardcoded TBB variables and enabled for Linux buildbot 2016-01-27 12:27:35 +01:00
b871160dd9 OMP -> BLI_task: BKE's pbvh.c
Should be the last bit of sculpt/paint code, now this is fully using BLI_task.

Note that PBVH normals update is now about 20% quicker than with OMP code
(from 27ms to 21ms with a big stroke over a 500k vertices monkey), even though
a missing thread-protection was added... atomic primitives ftw!

For the records, with the missing `#pragma omp critical` section added,
previous code was like four times slower (above 100ms).
2016-01-27 12:26:00 +01:00
e5e7507d31 PIL_time_utiledefines: add TIMEIT_AVERAGED variants to block timing macros.
This variant behave exactly as TIMEIT_START etc., but it also sums up all times in
a static var and prints out average execution time - very useful when dealing
with small/quick pieces of code that get executed often, to get some meaningful results.
2016-01-27 12:26:00 +01:00
7e9103b49c atomic_ops: add atomic_fetch_and_and_uint8 wrapper.
Needed by incomming changes in pbvh.c.

Note that we make it much simpler than for other primitives in this file - think
we could revise its content to make it simpler one day...
2016-01-27 12:26:00 +01:00
5d6d5b7272 Fix T46624: Preview is not always correctly updated
It is possible that preview was not updated to correspond a
new context when width of preview is the same for two contexts.
2016-01-27 11:04:21 +01:00
4aa286d788 Sequencer: Fix crash when trying to change filepath of Sound strip
It was not implemented and fallback RNA-based approach was not
correct since there's no filepath property of sound strip.
2016-01-27 11:01:41 +01:00
1bc6ae8529 Buildbot: Fix for missing spnav for Linux builds 2016-01-27 10:22:30 +01:00
cbb52c903c Fix T47250: OpenVDB crash
Issue was that the domain matrix was not initialized properly on the
first frame (in smokeModifier_init), which caused OpenVDB to throw an
exception for trying to create a VDB grid with non-affine transform.
2016-01-27 10:14:41 +01:00
771f73b6be World textures displaying for viewport in BI.
This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport.
It supports:

  - "View", "AngMap" and "Equirectangular" types of mapping.

  - Different types of texture blending (according to BI world render).

  - Same color blending as when it lacked textures (but render via glsl).

{F207734}
{F207735}

Example: {F275180}
Original author: @valentin_b4w

Regards,
Alexander (Blend4Web Team).

Reviewers: sergey, valentin_b4w, brecht, merwin

Reviewed By: merwin

Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin

Projects: #rendering, #opengl_gfx, #bf_blender:_next

Differential Revision: https://developer.blender.org/D1414
2016-01-27 12:06:57 +03:00
f6ff8f27e3 WM: Support showing reports for modal operators
This isn't common use, but modal operators may make reports while they're running.
Now they're displayed in the info header.
2016-01-27 17:34:44 +11:00
499bde8105 NDOF: enable 3D mouse support on Mac by default
We used to require the 3Dconnexion driver installed at build-time so
this was turned off.

I reworked the code last year to remove the driver dependency so
there’s no reason not to enable this.
2016-01-26 21:08:57 -05:00
4a42445d3d Fix bplayer (c) 2016-01-26 22:02:06 +01:00
5467ed128f Cleanup: forgot to comment again debug timing print in paint_stroke.c 2016-01-26 22:02:06 +01:00
7ce61c64cf Cleanup: remove OMP's 'critical' sections in BKE_pbvh_node_add_proxy/free_proxies.
Not so useful now that we use BLI_task! Not sure why those were ever added actually,
readng carefully that code only modified data here is the PBVHNode, which is only
used/affected by one thread at a time ever. And shared read data (PBVH itself) is
not modified during brush execution itself, so it's safe to use it threaded too.
2016-01-26 22:02:06 +01:00
4a0b896671 Minor correction to API docs 2016-01-27 07:51:53 +11:00
161e2343b7 Cleanup: minmac -> minmax & RE_render_ext naming
Use more conventional API word-ordering for RE_render_ext
2016-01-27 07:37:33 +11:00
a2b9633791 CMake: Correction in comment in previous commit 2016-01-26 15:42:53 +01:00
cbb498cfb0 CMake: Corrections around disabling Boost
Were some missing dependencies in the checks.
2016-01-26 15:42:35 +01:00
43957a1177 Fix bplayer (c) 2016-01-26 14:03:53 +01:00
d9ccc0c957 mesh_evaluate.c: OMP -> BLI_task, and some more parallelization.
Only concerns poly normals computing, have usual 10% speedup of affected code for OMP -> BLI_task switching.

Also parallelized the 'weighted accum' part (used when computing both polys and vertices normals,
when using modifiers e.g.), which gives nice 325% speedup (from 66ms to 20ms for a 500k poly monkey
with simple deform modifier e.g.). ;)
2016-01-26 14:01:32 +01:00
e4c83bc345 Fix T46679: ZMask layers don't update w/ animation
Make sure z-mask layers aren't excluded for animation evaluation.
2016-01-26 23:31:47 +11:00
8126b0222d Fix T47214: Keyed Particles don't render correctly when used for point density input
The issue was caused by different AABB used by Cycles and texture sampler.

Instead of trying to keep this two functions in sync we now do have an
utility call in the point density node to query the AABB.
2016-01-26 12:50:55 +01:00
0095c2dad2 CMake: Keep Schur specializations OFF by default config
Now when doing full build is real easy on all platforms, we can
only keep it enabled for the blender_full configuration.
2016-01-26 11:47:53 +01:00
c8d2ebe13c Compositor: Speedup movie (un)distortion operation
Avoid per-pixel camera intrincs object construction and synchronization.

Here on a bit synthetic file it gives about 40% speedup with a single node.
2016-01-26 11:44:43 +01:00
f1f42c6172 Fix compilation error after recent luma changes on certain platforms
See T47243 for some more details.
2016-01-26 09:57:25 +01:00
b336124a13 Correct commented printfs 2016-01-26 09:08:40 +11:00
b64d5809e7 Upgrade Bullet to version 2.83.
I tried to carefully preserve all patches since the last upgrade.

Improves T47195, cloth collision detection bug.

Differential Revision: https://developer.blender.org/D1739
2016-01-25 22:14:46 +01:00
3c72e302e1 Correct own error in recent BVH nearest ray 2016-01-26 07:40:21 +11:00
c292b4ebb9 Fix T46456: Crash when aborting stroke while using dyntopo.
Basically, the 'fake undo' restoring orig coordinates in this case cannot work with dyntopo,
since it assumes nothing was added/removed.

For now, just prevent this 'restoration' when dyntopo is used, this is no ideal solution
from user PoV - but it's better than plain ugly crash!

Complete solution seems much more involved and outside of scope of bug handling, added a TODO note:
http://wiki.blender.org/index.php/Dev:Source/Development/Todo/Tools#Sculpting
2016-01-25 20:28:47 +01:00
60663c8ec4 Fix various potential bugs from coverity reports (NULL dereference, negative number assigned to uint...).
Note: the wm_jobs needs proper fix, we cannot have that kind of inconsistencies in some 'public' API!
2016-01-25 16:55:08 +01:00
a852abd9ce Merge branch 'master' into openvdb 2016-01-25 16:15:15 +01:00
9e56d75470 Smoke viewport: also draw voxel size indicator when adaptive domain is
not used.

This is kinda how it was in the openvdb branch but was accidentaly put
in the adaptive domain draw scope during final review.
2016-01-25 16:12:31 +01:00
e3e23f7746 ImBuf: Make luminance calculation inlined
Title actually tells it all, it is rather simple function which totally makes
sense to be inlined.

This gives up to 5% of speedup when updating scopes for a large image.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1310
2016-01-25 14:13:52 +01:00
83c9109926 Fix T46902: Revert zeroing velocity in BGE logic brick
This reverts commit 3dbc123061, "BGE:
allow setting velocity to zero in a motion actuator" as it caused more
issues than it solved. Zeroing linear or angular velocity with logic
bricks is discussed further in https://developer.blender.org/D1545
2016-01-25 13:50:52 +01:00
8cd645d20b Merge branch 'master' into openvdb 2016-01-25 12:56:33 +01:00
e5a51d2818 Cleanup. 2016-01-25 12:52:03 +01:00
1cd6c7fcd4 Cycles: fix memory leaks due to hash collision.
Also clean the code a bit.
2016-01-25 12:43:35 +01:00
e8b5670da0 Correct line-width for armatures 2016-01-25 22:21:36 +11:00
45fd0847f4 Fix T47233: fcurves.find() won't work with drivers
Doing something like:
bpy.data.objects["Cube.001"].data.shape_keys.animation_data.drivers.find('eval_time')

wouldn't work, because the drivers.find(datapath, index) method wasn't implemented
yet. Previously, it was only implemented for FCurves in actions.
2016-01-26 00:11:56 +13:00
064903f8ed Keep image dimension used by space image and some other tools sync
When using an empty render result (after re-opening the file, i.e.)
some tools (like masking) could have used wrong image resolution
because of not being aware of special cases supported by the image
space to display the render result.

This should fix selecting mask points when mask is opened op top
if an empty render result.
2016-01-25 12:07:21 +01:00
a48a66fb19 A few urgent glLineWidth fixes for anim editors
This fixes some of the issues noted by venomgfx that were caused by
Se25ba162c0b62b19cf367f0f29e29d0c0960978d

Specifically, this commit fixes:
* Timeline: Keyframe lines
* Graph Editor: Curves and Handles
2016-01-25 23:46:02 +13:00
8850775ce8 Sequencer: Add option to use absolute mask animation time
This is handy for cases when mask is created on top of the edit and
used for tasks like color grading and other enhancement.

That was the main purpose of the masks which was totally broken in
6786ef6. Now it's possible to have masks created as both a part of
input movie roto process (which then better be re-mapped to the strip
timing) and as a grading tool (which should be using scene timing
for the animation).

Thanks artists from the Nieve for screaming about such a broken case.
2016-01-25 11:16:49 +01:00
4f8b7f4420 Docs: quiet warnings in reference doc syntax 2016-01-25 20:26:39 +11:00
f233770ef8 Docs: avoid plank comma in API reference 2016-01-25 20:26:39 +11:00
820e7214dd Fix T47218: OpenGL render with missing alpha, due to recent OpenGL refactoring.
Patch by Ralf Hölzemer.
2016-01-25 10:05:50 +01:00
34076a79e3 Transform: optimize vertex snap w/ nearest-to-ray
Use BLI_bvhtree_find_nearest_to_ray for vertex snapping,
avoids doing screen-space lookup on each vertex.
2016-01-25 19:01:54 +11:00
33a7c7408d BLI_kdopbvh: Add BLI_bvhtree_find_nearest_to_ray
Support for casting a ray through all nodes to find the closest
(not the first hit as with ray casting).
2016-01-25 19:01:53 +11:00
bfabb9d3c5 Math Lib: Add dist_squared_ray_to_aabb_v3 utility 2016-01-25 19:01:42 +11:00
1a7e7b14b4 Cycles: fix crash when rendering a volume with non-uniform voxels. 2016-01-25 07:15:55 +01:00
cd56c473ca Merge branch 'master' into openvdb 2016-01-25 06:31:32 +01:00
fea44edeea Fix regression in sequencer overlay draw option
Drawing alpha backdrop would obscure image data behind the overlay.
2016-01-25 11:41:13 +11:00
2a50760873 Correct fix for T47047
Caused new 2d views to initialize w/o scrollbars
2016-01-25 08:33:22 +11:00
d631252109 Fix lock release deadlock when acquiring pass with no data ready yet
There is no reason to do separate image buffer release when there's
found buffer but with empty rects because of the following reasons:

- All the acquire() calls are followed with corresponding release()
  calls, regardless of whether image buffer was empty, missing or
  whatever.

- It was done wrong -- since lock was passed as NULL, it'll only
  de-reference the image buffer itself, this causes following:

  * Wrong user counter since there'll subsequent release() call with
    the proper lock passed to it.
  * Global locks are to be released prior to the spin locks,
    and such an extra release violated this rule.
2016-01-25 01:25:52 +05:00
a224ee00f5 Fix missing render result release when alt-wheeling render pass menu 2016-01-25 01:25:09 +05:00
81a1b002a0 Fix T47210: Compostiting, Bad AA using distort + undistort nodes
Compositor tried to be too much smart and avoid unneeded re-calculations of
the distortion model, but the way it was implemented is by falling back to
the nearest interpolation first.

We can't really cheat here, better to just look into faster models estimation.
2016-01-25 00:25:38 +05:00
9797a135e3 Fix T47217: Crash when tracking specific scene 2016-01-24 23:49:47 +05:00
da1dce7f79 Fix yet another case broken after glLineWidth() changes
Original patch didn't have any tests or what? =\
2016-01-24 23:15:58 +05:00
780e900a0d Cycles: Tweak Cycles samples again.
Now we use 128 for final, and 32 for preview. These values should be a bit
better (power of two, also faster with CMJ).
2016-01-24 13:32:20 +01:00
9163fc05a7 Cycles: Fix typo in flags check 2016-01-24 17:05:02 +05:00
35c3e7b522 Cleanup: Remove outdated comment in volume code.
Thanks to jesterking for finding this one.
2016-01-24 12:31:36 +01:00
f796e2d3d2 Add missing line width in the 2d view grid drawing 2016-01-24 16:25:22 +05:00
79ee1b0b5a More missing calls to glLineWidth 2016-01-24 22:06:46 +11:00
82577a7d7b Depsgraph: Add missing relations between driver and particle settings
While it's not really working reliably to drive something on runtime
it's handy to have such possibility to tune particle system using
proxies in the scene files.

Just another quick thing for the Nieve project.
2016-01-24 16:03:53 +05:00
54b992ae61 Fix glLineWidth state use w/ grid floor and brush 2016-01-24 20:30:41 +11:00
7c1e369987 Fix tile highlight corners are too fat since recent changes in glLineWidth policy 2016-01-24 14:01:56 +05:00
b147ecb991 Fix Smooth Weight expand logic
Since weight_other is equal to weight_accum_prev[i_other], the original
lines actually are no-op. The visible effect is that when smoothing just
two vertices with weights 1 and 0, the expand value has no effect until
it reaches exactly 1. This change makes it gradual.
2016-01-24 16:25:53 +11:00
2ca34e419e Docs: minor edits to code comments 2016-01-24 14:29:14 +11:00
203d2c5029 Prevent accidental fall-through in switch 2016-01-24 12:21:13 +11:00
3174254142 Cleanup: style 2016-01-24 12:13:37 +11:00
0284fe8579 Correct error in recent vector transform commit 2016-01-24 12:12:42 +11:00
b42878012c Cycles: Make Clang 3.6 happy with const debug flags reference
For some reason it did not like the explicit const qualifier for a
custom type.
2016-01-24 01:33:53 +05:00
398baef6c8 Fix T47132: Cycles Rendering Tiles Indicator Limited to 16 2016-01-24 01:31:36 +05:00
a6aaaad979 Vector Transform node support for GLSL mode and the internal renderer
The Vector Transform node is a useful node which is present in the Cycles renderer.
{F144283}
This patch implements the Vector Transform node for GLSL mode and the internal renderer.

Example: {F273060}

Alexander (Blend4Web Team)

Reviewers: brecht, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Subscribers: psy-fi, duarteframos, RobM, lightbwk, sergey, AlexKowel, valentin_b4w, Evgeny_Rodygin, yurikovelenov

Projects: #bf_blender:_next

Differential Revision: https://developer.blender.org/D909
2016-01-23 15:39:31 +03:00
adf0a12fa1 Merge branch 'openvdb' into cvdb_ray_isect 2016-01-23 09:23:55 +01:00
a48c171584 Forgot this in previous commit 2016-01-23 09:14:27 +01:00
7bb03d99f6 Merge branch 'master' into openvdb
Conflicts:
	CMakeLists.txt
	build_files/cmake/Modules/FindOpenVDB.cmake
	intern/openvdb/CMakeLists.txt
	intern/openvdb/intern/openvdb_dense_convert.cc
	intern/openvdb/intern/openvdb_dense_convert.h
	intern/openvdb/intern/openvdb_reader.cc
	intern/openvdb/intern/openvdb_reader.h
	intern/openvdb/intern/openvdb_writer.cc
	intern/openvdb/intern/openvdb_writer.h
	intern/openvdb/openvdb_capi.cc
	intern/openvdb/openvdb_capi.h
	intern/openvdb/openvdb_util.cc
	intern/openvdb/openvdb_util.h
	source/blender/blenkernel/CMakeLists.txt
	source/blender/python/intern/CMakeLists.txt
	source/blender/python/intern/bpy_app_openvdb.c
2016-01-23 09:12:43 +01:00
2ebed329ae Prepare merge with master 2016-01-23 08:59:34 +01:00
e9452f909c Implementation of OpenVDB as a possible cache format for smoke
simulations.

This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.

A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.

A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB

Reviewers: sergey, lukastoenne, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht

Differential Revision: https://developer.blender.org/D1721
2016-01-23 08:39:40 +01:00
275abd14a0 OpenGL: combine multiple GL_LINES into fewer draw calls
Incidentally, one of the removed glBegin(GL_LINE) calls should’ve used
GL_LINES with an S, which was a GL_INVALID_ENUM error.
2016-01-23 02:27:32 -05:00
705e6d76fb OpenGL: tiny state-change fix
Only re-enable blending if the function that disables it was actually
called.

Still not ideal flipping this on & off repeatedly, but now there are
fewer flips.
2016-01-23 01:13:36 -05:00
e25ba162c0 OpenGL: call glLineWidth less often
Each LINES draw call is now responsible for its own line width. No need
to set it back to its 1.0 default after every draw.

This eliminates half our calls to glLineWidth , similar to last week’s
work on glPointSize.
2016-01-23 00:58:51 -05:00
90293a8da3 Math Lib: optimize segment-plane clipping
Calculate the clipped min/max factor along the segment,
only applying to the coordinates at the end (will give better precision too).

Also make split input/output args.
2016-01-23 13:48:31 +11:00
456e7be9d2 Cycles: Change several default values (first batch).
This changes the following defaults:

- Render settings:

  * Samples: 100
  * Preview Samples: 50
  * Filter: Blackmann-Harris
  * Tile Order: Hilbert Spiral

- Lamp settings:

  * Use MIS: On

- Material settings:

  * Volume Sampling: Multiple Importance

Old files are not affected, I tested the versioning code back and forth.
More changes are to come (World, BVH...) but that needs a bit more work.
2016-01-22 23:19:23 +01:00
7f65eb3f53 Fix part of T47025: Shadow pass error: Black shadow.
Skipping computing of shadow pass when diffuse color is pitch black is fine... unless
you actually need/want that shadow pass!

The 'noisy' issue with picture texture remains a bit mysterious to me currently. :/
2016-01-22 19:32:47 +01:00
477078defa Fix T45523: "View All" in Graph Editor does not respect Y axis with small values
The previous threshold used to prevent the Graph Editor from imploding if
presented with a flat (or nearly flat, accounting for floating point precision)
curve was too coarse, meaning that in some cases, the "View All" tool would end
up behaving weirdly.
2016-01-23 01:56:45 +13:00
56e729105a Dopesheet: Make frame range for new editor instances saner, by basing them on the current frame range
This brings the dopesheet more in line with the NLA and Graph Editors, where
similar initial ranges were also used. The benefit is that it should save
animators a small amount of time getting the dopesheet timeline into the
right zoom level before starting work.
2016-01-23 01:56:45 +13:00
ac7c3e048b Fix T46657: VSE: Strip length jumps to a negative number. 2016-01-22 12:09:31 +01:00
1d88773b1f OpenGL: cleanup
- LINE_STRIP to LINES when only drawing one
- group state changes for easier reading
- general cleanup
2016-01-22 02:52:12 -05:00
8c596e08e7 OpenGL: remove unneeded state changes
UI_panel_category_draw_all was setting PolygonMode to LINES before
drawing LINES.

stitch_draw was setting PolygonMode to its default FILL value — any
function that deviates from the default should’ve changed it back to
FILL.
2016-01-22 02:52:12 -05:00
66d9efe765 OpenGL: draw box outlines with lines, not rectangles
2 reasons:
- fewer state changes (PolygonMode)
- glRect goes away in later GL versions
2016-01-22 02:52:12 -05:00
f2fdec3ab7 OpenGL: remove glGet with unused result
This code is disabled but still…
2016-01-22 02:52:12 -05:00
24f05bb917 OpenGL: remove extra vertex in arrowhead
Now draws 2 lines instead of 3 (with a zero-length middle).
Same visual result.
2016-01-22 02:52:12 -05:00
4c6836401e OpenGL: pull glBegin/End out of loops
When drawing 2D grid and 3D axes.
2016-01-22 02:52:11 -05:00
017c45b966 GPencil: Select Grouped (Shift G)
This commit adds a "Select Grouped" operator. Although it is set up to
allow more types of "grouping" in future, it current only supports
a single mode (i.e. "Same Layer"). As a result, it does not pop up
any menus/submenus in all the usual places.
2016-01-22 15:31:42 +13:00
8e35657beb OpenGL: fewer state changes for wireframe PBVH
Wireframe drawing doesn’t use the following GL state, so don’t update
these:
- ShadeModel
- NormalPointer
- ColorPointer

Normal & color data are still uploaded as part of the interleaved VBO,
but those attributes are disabled for wireframe.
2016-01-21 21:07:17 -05:00
445f7910e8 Hacky compile fix for mingw compile issue reported by bat3a on bf-committers
I've been using this fix in another branch locally, so it seems to work fine.
The other #ifdef checks should be checked on too, as __MINGW32__ and __MINGW64__
do NOT seem to be defined when compiling that file
2016-01-22 13:59:54 +13:00
e965e92fa5 Fix: Breakdowner value would jump when starting the tool a second time during a Blender session
As reported on the Blender Institute Podcast 009. See my comment on the cloud blog
for further details.

When used a second (or third, etc.) time, the breakdowner's (Shift-E) percentage value
would initially be the last-used value (e.g. 33% or 75%), before suddenly jumping
to another value as soon as the mouse moves. The cause of this behaviour was that it
was initially reusing the value from the previous time the operator was run, but then
as soon as the mouse moved, it would snap to the percentage implied by the mouse position.

(Note: The mapping from mouse position to percentage is "absolute" - i.e. the percentage
is based on how far across the 3D view the mouse is, instead of being some kind of
relative offset thing).

To make things a bit less jumpy, I've changed the behaviour so that the mouse position
always gets used immediately, instead of having it jump suddenly only when making
some mouse movement.
2016-01-22 13:55:19 +13:00
8cde671f8b Sequencer: Speedup gaussian blur effect
Apply X and Y blur as separate step, this reduces number of accumulations
required and makes effect more realtime.

Another quick thing for the Nieve project.
2016-01-22 00:13:06 +05:00
7788681eda MS Visual Studio 2015 does not find std::inserter 2016-01-21 17:21:32 +01:00
7e27fcf301 Sculpt: pinch/inflate support for snake-hook
Snake-hook tended to loose volume along the stroke,
now with pinch > 0.5 its possible to sculpt shapes without loosing volume.
2016-01-21 21:28:24 +11:00
f758ee50e6 Sculpt: Add rake option to snake-hook
This allows for dragging out shapes that rotate to follow the cursor motion.

Values over 1 can be set for 'interesting' artistic effects.
2016-01-21 21:28:07 +11:00
adcef2bd36 Cycles: Improve UI feedback for light samples.
Fix T47213.
There was actually no real bug here, just clarify now in the UI that Mesh, World and Lamp samples only have an effect if we sample all lights (direct or indirect).
2016-01-21 09:02:49 +01:00
301383c688 Add missing weight paint selection mirror
Was lost resolving merge-conflict.
2016-01-21 18:46:17 +11:00
de356415ae Correct comments & some explanation from last commit 2016-01-21 11:03:37 +11:00
a1164ce271 Remove errors for unsupported math operations 2016-01-21 10:30:17 +11:00
aa69fb64ac Cleanup: line length, indentation 2016-01-21 09:42:17 +11:00
5ef2ed23e1 Weight Paint: Make multi-paint & mirror work as if bone selection was symmetric
The simplest way of handling mirroring in multi-paint is creating a
uniform symmetric selection and relying on existing symmetric weights
to direct changes to the appropriate vertex groups. This already works
if mirror bones are selected manually, and can be made easier to use
by doing it implicitly.
2016-01-21 08:03:47 +11:00
3c74968aa4 Remove old multipaint related argument from wpaint_blend.
With multipaint based on collective weight there is no need for this.
2016-01-21 07:38:41 +11:00
6699590a02 Weight Paint: Multi-paint support for blur tool
Use the collective weight when using blurring.

This brings blur in sync with the rest of multi-paint modifications.

Also, blur has no business calling `defvert_verify_index` anyway when
it simply wants to read weights.
2016-01-21 07:27:29 +11:00
42c984e2c3 Delete unused code, separate for better diff appearance. 2016-01-21 07:24:37 +11:00
7395c0c88a Weight Paint: multi-paint uses collective weights
Similarly, the displayed weight distribution should be used as the
target of brush application instead of the invisible active group.

Multi-paint is split into a new function because all the calls to
defvert_verify_index at the top of the old code should never be
done in multi-paint mode.
2016-01-21 07:23:55 +11:00
b88b73816a Weight Paint: 'Sample' now supports multi-paint
Since the coloring uses sum or average of the weights of all selected
groups, the weight pick tool should also use that instead of reading
the weight of the single active group that you can't see.
2016-01-21 07:11:56 +11:00
754096e670 Weight Paint: reduce alert color brightness
This condition can actually happen quite often if weight painting for
a rig that uses separate control bones, so the color shouldn't be so
bright that it's hard to look at for a significant amount of time.
2016-01-21 06:42:30 +11:00
b0b310e65d Cleanup: remove remainings of OMP in sculptpaint area. 2016-01-20 20:39:18 +01:00
c1b76285ee Particle_system.c: OMP -> BLI_task.
The threaded code is twice quicker now (from an average of 20ms/frame to 10ms/frame
while baking 10000 particles here e.g.)!

Think this is mostly due to usage of 'dynamic' scheduler in OMP code though,
from my experience so far this tends to have dramatic effects over performances,
static scheduler is usually much much more efficient.
2016-01-20 19:58:42 +01:00
6703d413f9 paint_mask.c: OMP -> BLI_stack. 2016-01-20 17:05:06 +01:00
54d3506253 Fix error in rBa6eae7339190. 2016-01-20 14:54:57 +01:00
6fa5d22109 Fix T43896: Knife Project fails when zoomed out
While knife-project still uses screen-space projection,
use much lower snap thresholds when projecting.
2016-01-20 20:46:25 +11:00
90bac235ea Fix T46243: New Depsgraph: changing action misses relations update tag 2016-01-20 10:32:14 +01:00
bf5ddb9728 Fix T47198: Broken UV/VCol in BI and Cycles with some degenerated faces - BI part.
Problem is actually similar in both engines - in some cases, we changed
'natural' quad splitting order to alternative one, without properkly 'notifying'
UV/VCol/other tessface data about it.

So code would use a 'wrong' triangle of UVs etc.

Fix for Cycles was committed by sergey as rBa6eae7339190d1.
2016-01-20 10:03:14 +01:00
a6eae73391 Fix (partial) T47198: Cycles have broken UVs in some degenerated quads cases
The issue was discontinuity in logic when importing vertices from blender
and then importing data layers regardless of how we split the face. Quite
interesting we didn't notice this issue before.

Thanks Bastien for the investigation, based on D1742 but redid it to make
patch a bit more clear to follow.
2016-01-20 09:13:04 +01:00
7e9feac3e0 Fix for tangent regression w/ looptri changes
LoopTri changes in 2.76 calculated all tangents as triangles,
this gave different results though in most cases it was hard to notice.

Though no bugs were reported we should keep our tangents compatible with other users of mikktspace.
2016-01-20 17:52:43 +11:00
a197023439 Cleanup: style, use const 2016-01-20 17:10:12 +11:00
18ffeb689d error in last commit 2016-01-20 17:09:18 +11:00
e25b113694 Cleanup: naming convention
Follow isect_ray_tri_watertight_v3 naming.
2016-01-20 17:03:10 +11:00
bda0820d57 Support multi-paint & show zero-weights as black
Specifically, when only one bone is selected and it's not really active.
(With multiple bones on the other hand that behavior is forced on,
since multi-paint can't modify purely zero weight verts and that's important.)
2016-01-20 11:43:09 +11:00
5feb3688fb Carve: Remove empty implementation files 2016-01-19 22:56:37 +01:00
19adfd3176 Cycles: Fix OpenCL kernel compilation after the bake commit
There is no function pointers in OpenCL specification. For as long
as we want to support this platform we should follow the specifications.

While the code is not totally optimal now, it should not be that huge
of performance issue on CPU since it does jump tables just nicely, so
it's not that much extra computation here.
2016-01-19 22:53:19 +01:00
52e34ffe33 Cycles: Pass missing shader filter argument to CUDA and OpenCL kernels 2016-01-19 22:53:19 +01:00
aeaa0ce3e8 Usual i18n/UI messages tweaks. 2016-01-19 20:31:06 +01:00
e5904f3eea Cycles: Add a debug flag to disable QBVH 2016-01-19 18:38:41 +01:00
52f07ad724 Sequencer: Implement Tone Map strip modifier
Behaves same exact way as compositor node, but could be applied
in the sequencer and used as a grading tool.

Requested by the Nieve project artists.
2016-01-19 15:54:55 +01:00
70c690c6e4 Fix T47203: Render Crash due to missing zbuf_float handling in IMB scaling. 2016-01-19 13:24:03 +01:00
d44ea880ea Fix T47201: Cycles+OSL keeps image files open until Blender exits
Now image will be opened for while render session is active, this is
needed to keep image cache working correctly. But stopping render
should now release all files descriptors.
2016-01-19 14:56:52 +05:00
dea38d78c4 GTests: were using C++11 feature 2016-01-19 20:44:57 +11:00
df465368ba Libmv: Solve some strict warnings in tests 2016-01-19 14:06:25 +05:00
9b8eb41567 GTests: split array_utils tests 2016-01-19 19:55:25 +11:00
257268a1bd CMake: check for LLVM static library by default
Even when static option isn't enabled, use the static library path if the dynamic library isn't found.
2016-01-19 12:37:26 +11:00
3b3b35546e Weight Paint: Add lock-aware normalize
D1713 from @angavrilov (with own edits)

The way current weight paint code works is that instead of making normalization lock aware, a separate `enforce_locks` function is called to do a different kind of normalization, hoping that by the time real normalize is called, there is nothing for it to do. The problem is that:

- That different normalization is based on adding the same amount to all unlocked groups, whereas true normalize uses multiplication to preserve ratio between them. The multiplicative approach should match the way weights operate better.
- If `enforce_locks` fails to achieve perfect normalization, true normalize will change locked groups.

Try to fix this by replacing `enforce_locks` with true lock-aware normalization support.

Supporting locked groups in normalize means that freezing the active group can make full normalization impossible if too much weight was added or removed, so it may be necessary to do two normalize passes. This is similar to how enforce_locks operates.

Also, now there is no need to go through the multi-paint branch just because of the locks. In the actual multi-paint case, the same normalize code can be used via a temporary flag array that represents the union of selected and locked groups.

User-visible effect should be:

- Auto-Normalize doesn't change behavior vertex to vertex depending on whether it has any locked groups.
- It never changes locked groups; if you lock some groups and start painting with seriously non-normalized weights, it's assumed you intended that.
- It never adds vertices to new groups, since the computer can't do that intelligently anyway - it was especially broken in case of mirroring.
- It always acts to preserve the ratio between groups it changes, instead of (sometimes, see point 1) adding or subtracting the same amount.
2016-01-19 09:14:35 +11:00
4e6ad37fc1 GTests: array_utils 2016-01-19 08:23:08 +11:00
5128637d48 BLI_array_utils: add binary and/or functions 2016-01-19 08:23:05 +11:00
3d4b8922fc Ignore const qualifier when comparing types 2016-01-19 07:51:03 +11:00
d5ddc52ae1 Cleanup: style 2016-01-19 04:54:39 +11:00
306337afea rather then → rather than 2016-01-18 10:20:14 +01:00
d48c328b72 OpenGL: remove ARB_fragment_program comment
This a list of OpenGL extensions used. Minus one thanks to
kevindietrich’s smoke work!

https://developer.blender.org/D1694
2016-01-17 23:26:37 -05:00
5cd3428220 Transform: no need to store distance to snap point
Compare squared distance to snap target since the value is only ever used for comparison.
2016-01-18 14:01:20 +11:00
8573c1a847 Fix T29153: Rotate & scale ignore snapping points
Checking for 'Closest' here isn't needed since
TransSnap.snapTarget callback is already ensuring the selected target is the closest.

Also don't reuse the pre-calculated distance,
since its only valid to do this when there are no snap points
and this isn't a significant gain to avoid the extra calculation - run once per update.
2016-01-18 14:01:20 +11:00
b4146a04bc UI: use a callback for the progress tooltip
Avoids constructing tip text and storing it when its not used.

Also quiet divide by zero warning when no progress was made.
2016-01-18 14:01:13 +11:00
c6bc2363e5 UI: redesign of the progress bar.
A picture is worth a thousand words: http://wiki.blender.org/index.php/
File:UI_progress_bar.png

Reviewers: #user_interface, brecht, dingto

Reviewed by: brecht, dingto

Differential Revision: https://developer.blender.org/D1727
2016-01-18 01:39:09 +01:00
82603761bc Fix compile error wwhen building without OpenVDB 2016-01-17 22:19:13 +01:00
22e3a4ad5e Cycles: quick patch to support decoupled ray marching.
Rendering is not quite right, lots of black spots and areas, but at
least it's working.
2016-01-17 21:22:57 +01:00
7b51e97617 Cycles: avoid recomputing tread ids everytime we need them. 2016-01-17 20:35:08 +01:00
c4c2bd1350 BGE: Allow access to light shadow settings with python
This patch adds a new API which allow us to access light shadow settings from python. The new API can be used to write custom GLSL materials with shadows.

Reviewers: brecht, kupoman, agoose77, panzergame, campbellbarton, moguri, hg1

Reviewed By: agoose77, panzergame, campbellbarton, moguri, hg1

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1690
2016-01-17 18:47:14 +01:00
8f098b0a40 Cleanup. 2016-01-17 18:45:29 +01:00
a5c419f4cc paint_cursor: OMP -> BLI_task. 2016-01-17 17:17:28 +01:00
f690c9b6ad Cycles: cleanup util_volume, move non-inline functions definition from
header to source file.

Also de-duplicate loop to free memory from the various maps.
2016-01-17 16:48:48 +01:00
2c5f878ba1 Cycles: create per-thread utils before the actual rendering starts.
Previously, those were created on the fly as needed, but wasn't thread
safe at all, since multiple threads could write to the maps at the same
time.
2016-01-17 16:27:21 +01:00
59a47ae091 Merge branch 'master' into openvdb
Conflicts:
	source/blender/windowmanager/WM_api.h
2016-01-17 14:45:33 +01:00
5a20df6336 Bump boost to 1.60 2016-01-17 12:44:25 +01:00
36e65a7b73 CMake: clarify missing Python package message
Blender builds properly without extra Python packages,
avoid FUD for new devs.
2016-01-17 16:08:36 +11:00
63c848da26 Cleanup: spelling
Also use doxy formatting for warning/note.
2016-01-17 13:45:32 +11:00
e10a6f987b Cleanup: style 2016-01-17 13:40:22 +11:00
dad1cdad13 Revert "Make 'incompatible pointer type' gcc warning an error by default."
This reverts commit b5bd39b518.

This is problematic because it means minor differences in system headers can cause errors
(glew in this case errored for me both with system and Blender's bundled version).

Developers can enable -Werror=* locally for warnings that aren't reliable across different systems.
2016-01-17 13:25:47 +11:00
9145c6976c Revert "Fix compile error in gpu_debug (incompatible-pointer-type)."
This reverts commit 75cfc81ec3.
2016-01-17 13:25:47 +11:00
8194f223d8 Point Cache bake: make sure endframe is initialize with a decent value.
This is how the old code used to initialize it. Current value was
failing big time when baking all caches (always set to MAXFRAME), and it
was added right before commit to quiet a warning... (I know, I know...)
2016-01-17 03:13:15 +01:00
91096aefc5 Dynamic Paint: use job system for the image sequence bake operator.
Reviewers: brecht

Differential Revision: https://developer.blender.org/D1732
2016-01-17 02:04:46 +01:00
45b6893e70 Point Cache: use job system for bake operators.
Reviewers: brecht

Differential Revision: https://developer.blender.org/D1731
2016-01-17 02:01:41 +01:00
75cfc81ec3 Fix compile error in gpu_debug (incompatible-pointer-type). 2016-01-17 01:58:06 +01:00
2beb0bfc6c Fix memory leak in (the still unused) WM_reportf. 2016-01-16 23:26:28 +01:00
b5bd39b518 Make 'incompatible pointer type' gcc warning an error by default.
This is the second time at least that kind of stuff slips in during one of my refactor,
a mere warning here is really not enough (too easy to miss it)!
2016-01-16 23:00:42 +01:00
143d423a19 Fix T47189: Large smoke simulation sometimes make Blender crash.
Issue was with very thin domains along one or two axes, these could lead to simulation
with only one cell width - and smoke code assumes we have at least 4 cells in each direction.

So now, we clamp resolution to a minimum of 4 in smoke_set_domain_from_derivedmesh().

Note: in extreme cases like this report, this will generate very un-cubic cells,
check it still works OK in 3DView is needed here.

Thanks to @genscher and @kevindietrich for help on this issue. :)
2016-01-16 22:45:04 +01:00
cdaf5ac967 Fix incorrect function for sculpt multithreading task after recent refactor. 2016-01-16 22:28:32 +01:00
05734d57e1 WM: remove unnecessary context argument from WM_report, no good reason to have it. 2016-01-16 22:28:03 +01:00
33fd81e5e6 Fix smoke BLI_task'ed code after recent refactor.
Curse gcc for not erroring by default on passing wrong func pointers... :/
2016-01-16 21:44:07 +01:00
7e18918fae OpenGL Smoke: fix possible inconsistency between fire shader/texture binding. 2016-01-16 18:53:55 +01:00
1c71b8e323 Cycles: Fix compilation with older OSL
We didn't switch to OSL-1.6.9 on all platforms yet,
so please keep codeabse compiled with 1.5 for the
time being.
2016-01-16 22:47:04 +05:00
8acf14c55c Cleanup: BLI_task foreach looper API doc. 2016-01-16 16:06:27 +01:00
31d907fa0a Cleanup: BLI_task - API changes.
Based on usages so far:
- Split callback worker func in two, 'basic' and 'extended' versions. The former goes back
  to the simplest verion, while the later keeps the 'userdata_chunk', and gets the thread_id too.
- Add use_threading to simple BLI_task_parallel_range(), turns out we need this pretty much systematically,
  and allows to get rid of most usages of BLI_task_parallel_range_ex().
- Now BLI_task_parallel_range() expects 'basic' version of callback, while BLI_task_parallel_range_ex()
  expectes 'extended' version of the callback.

All in all, this should make common usage of BLI_task_parallel_range simpler (less verbose), and add
access to advanced callback to thread id, which is mandatory in some (future) cases.
2016-01-16 15:59:37 +01:00
724809655c Fix (unreported) missing scene->gm.dome.warptext in libquery looper. 2016-01-16 12:47:14 +01:00
2c5bc023c2 Fix T47188: Blender crashes when trying to undo adding new scene with "copy settings".
Our RenderSettings struct may have a bit too much levels, makes it hard to track
all 'pointer' data during copy...

Fixed several issues here, but not sure I found all existing ones. :/
2016-01-16 12:47:14 +01:00
36aa7e659e Fix T47180: Cycles deform motion blur + displacement behaves weirdly
Displacement shader was not updating motion vertex positions.

Current solution is not totally correct because it applies same offset
for all time steps. Ideally we'll need to evaluate displacement shader
for every time offset separately, but currently we don't have subframe
image access.

For the time being will consider this a TODO.
2016-01-16 15:36:42 +05:00
ddc75d7e8a OpenGL: remove redundant state change 2016-01-16 02:19:16 -05:00
384a16bfbc cleanup: C99
- tighter scoping
- declare closer to use
- struct initializers
- bool vs int
2016-01-16 02:17:05 -05:00
a29e2c379e OpenGL: simplify some UI draw calls
- vectorscope grid
- color ramp handles
- box shadows (image file preview)
2016-01-16 01:17:51 -05:00
f4cd7ca9c6 OpenGL: pull glBegin/End out of loop
so that all points here are drawn between one Begin/End pair.
2016-01-16 00:11:49 -05:00
2d71d13ea2 OpenGL: fixes related to GL_POINTS
I put all usage of GL_POINTS under the microscope. Fixed problems &
optimized a couple of spots.

- reduce calls to glPointSize by about 50%
- draw selected & unselected vertices together for UV editor & EditMesh
- draw initial gpencil stroke point the proper size
- a few other smaller fixes

New policy: each GL_POINTS draw call needs to set its desired point
size. This eliminates half our calls to glPointSize (setting it back to
its 1.0 default after every draw).
2016-01-15 23:51:29 -05:00
31375a1b21 Cleanup: stdbool no longer optional, remove checks 2016-01-16 15:38:57 +11:00
92b222a158 Cleanup: use enum constant for DNA comparison 2016-01-16 15:00:22 +11:00
63de1e7e7a Blender Internal: subframe render support
Note this doesn't expose the option to the interface,
it just means scripts that set the subframe can render (as with Cycles).
2016-01-16 13:10:47 +11:00
b22dde0198 Cleanup: style 2016-01-16 13:01:49 +11:00
70e16b3c99 Fix T47181: Blender OSL script node crash (OSL 1.6.9)
Compiling OSL scripts with errors in them would cause Blender to crash since the OSL version
bump to 1.6.9 instead of printing the error to the console as it did before.

With version 1.6.2, OSL added a pointer to an OpenImageIO ErrorHandler as an argument to the
OSLCompiler constructor. However, since it defaults to the NULL pointer, Blender still compiled
fine after the OSL version bump.
It turns out, though, that this pointer is used without further checks inside the OSL code, which
makes it crash when it tries to report an error unless a valid ErrorHandler pointer is specified.
Therefore, this commit simply passes a pointer to the static default handler that OIIO offers,
which prints the error to the console just like OSL did before.

Using this feature for a more advanced error handling and displaying from the Blender side would
be possible and seems reasonable, but for now it's not really relevant for fixing this bug.
2016-01-16 01:32:22 +01:00
Dalai Felinto
9a76354585 Cycles-Bake: Custom Baking passes
The combined pass is built with the contributions the user finds fit.

It is useful for lightmap baking, as well as non-view dependent effects
baking.

The manual will be updated once we get closer to the 2.77 release.
Meanwhile the new page can be found here:

http://dalaifelinto.com/blender-manual/render/cycles/baking.html

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D1674
2016-01-15 13:00:56 -02:00
9137a44014 Fix T47185: Wrong items order with template_icon_view. 2016-01-15 15:19:14 +01:00
7776f03873 Changes around update normals from PBVH to CDDM
- Only do this if PBVH is not used for display, this should correspond
  to whats' happening in sculpt.c now.

- No need to do such synchronization for solid drawing, it supports
  optimal display from PBVH.

In fact, such synchronization is only needed in the following case:

Drawing callback does not support PBVH draw and sculpt session is
configured to use PBVH for display and related operations.
2016-01-15 16:29:57 +05:00
2414832bf1 Tracking: Make plane track sliding aware of closest mouse
Also made threshold aware of zoom, so now it's always 12px threshold
regardless of how much you're zoomed in.
2016-01-15 15:37:46 +05:00
585574dc30 Tracking: Split tracking_ops into smaller files
The file started to be rather really huge and difficult to follow.
Should be no functional changes.
2016-01-15 15:15:56 +05:00
bdd79ef880 Tracking: Cleanup, use more strict code style
Should be no functional changes.
2016-01-15 15:15:56 +05:00
d21eeffbbf Cleanup: used pre-defined atoms in ghost 2016-01-15 18:40:15 +11:00
663a2f6e0c Tracking: Use sliding zone which is closer to the mouse
Previously it was simplier logic which only checked whether the mouse
is inside of some area around sliding zone, which was resulting in
wrong sliding zone used when zoomed out.
2016-01-15 12:23:24 +05:00
c282373116 Fix T31063: X11 window resize fails on PPC
X11 property access was using wrong sized types that only worked for little endian systems.
2016-01-15 16:47:41 +11:00
f81bc88ac7 Fix crash w/ scripts run from the command line that load files
Also refactor context backup/restore into functions.
2016-01-15 10:23:26 +11:00
786e81fd18 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/CMakeLists.txt
2016-01-14 23:34:42 +01:00
fc8730d4c2 DNA: partial revert of long removal
924c626 broke loading on systems with different endian.
We could support reading values from SDNA, it isn't really worth the extra hassle.

Long support is still removed, just keep enum values the same.
2016-01-15 09:18:50 +11:00
5d45c2bf65 Fix T47168: Project image looses float precision 2016-01-15 07:32:30 +11:00
b4e56dce30 Doc: more detailed ImBuf.rect/rect_float comments 2016-01-15 07:10:07 +11:00
63a718e50f Cleanup: warning, whitespace 2016-01-15 05:36:07 +11:00
76197a2b96 Improve multi-paint tip 2016-01-15 05:21:42 +11:00
2fb3fa1bf1 Usual fixes and tweaks for UI messages. 2016-01-14 17:00:16 +01:00
46a7b46c30 Fix broken i18n messages extracting script with new py code.
Some py devs are way too smart for our own good... :P
2016-01-14 17:00:16 +01:00
8f3bb8d578 Cycles: One more attempt to fix issue mentioned in previous commit 2016-01-14 19:12:11 +05:00
a4625b910f Cycles: Fix typo in the debug panel commit 2016-01-14 19:07:06 +05:00
55926ad298 Cycles: Fix string compiler warnings after recent changes 2016-01-14 17:04:56 +05:00
c9365e25a9 Cycles: Cleanup, spelling and indentation 2016-01-14 17:01:56 +05:00
3ba9742be2 Cycles: Remove the experimental CUDA kernel.
This commit removes the experimental CUDA kernel, making SSS and CMJ
regular features.

Several improvements have been made in the past few
weeks (thanks Sergey!) which make SSS render several times faster (2-3x
compared to 2.76b) on the GPU, and the increased VRAM usage has also been
fixed. Therefore the experimental kernel is no longer needed.

Differential Revision: https://developer.blender.org/D1726

Manual has been updated: too:
https://www.blender.org/manual/render/cycles/features.html
2016-01-14 12:56:08 +01:00
cc55f97da9 Compositor: Add option to extend image bounds when blurring
It is handy when doing some roto work and it's required to blur some
mask or overaly before alpha-overing it on top of the footage.

Quite straightforward option with the only limitation that variable
size blur is not supported.

Reviewers: campbellbarton

Subscribers: hype, sebastian_k

Differential Revision: https://developer.blender.org/D1663
2016-01-14 16:13:55 +05:00
73feae6f5d Libmv: Solve strict compiler warnings in stubs 2016-01-14 15:56:05 +05:00
Quentin Wenger
370a8ee741 Add compression modes for TIFF images
This patch aims at providing multiple compression modes for TIFF output,
particularly uncompressed mode.

At this moment  have None, Deflate, LZW and Pack Bits modes been integrated,
mimicking The GIMP export modes (except JPEG mode, which returned encoding
errors).

More modes could be added if needed.

Default remains Deflate.

Reviewers: campbellbarton, mont29, sergey

Differential Revision: https://developer.blender.org/D1709
2016-01-14 15:33:46 +05:00
1f273cec00 Cycles: Tweak inline policy for some functions
The goal is to make Experimental kernel closer in performance to the
official kernel, avoiding spills and such.

There should not be big impact on official kernel, own tests showed
few percent performance drop on laptop's GPU. CPU was always the
same speed on AVX, AVX2 and SSE4.1 CPUs i've been testing here.

This seems to be the last essential step before we can get rid of
Experimental kernel and enable SSS officially on GPU without causing
some major performance issues.

Surely some more tweaks are possibly required, but that we can do
for until cows go home anyway.
2016-01-14 14:53:05 +05:00
5af103fe00 Cycles: Reduce scope of some defines set in CMakeLists
Should be no functional changes at all, just speeds up re-compilation
when some features needs to be disabled for development purposes.

For example, when running lots of Valgrind it's handy to disable any
GPU devices because otherwise you'll be wasting quite some time in
the driver while enumerating devices.

Reviewers: dingto, lukasstockner97, brecht, juicyfruit

Differential Revision: https://developer.blender.org/D1730
2016-01-14 13:12:50 +05:00
16b7887b33 Fix typo in image editor grease pencil panel 2016-01-14 18:59:05 +11:00
351d6d18aa Fix image save ignoring options
Saving an image didn't un-set previously enabled options.
(saving 16bit png as 8 bit didn't work for eg).
2016-01-14 18:56:23 +11:00
15b97e799f CMake: Silence messages about unordered map and shared pointer on second run
This variables are being cached anyway and can only be changed on first run,
no need to keep reporting them again and again.
2016-01-14 12:57:58 +05:00
d3c55337d3 CMake: Fix typo in CUDA dynload commit 2016-01-14 12:48:14 +05:00
9db3440acc CMake: Add additional search path for OpenSubdiv
This patch will match where install_deps puts OpenSubdiv.
2016-01-14 12:46:01 +05:00
2fcacbbda1 install_deps: Cleanup, delete trailing whitespace
Based on patch D1644 by Jeffrey Hoover
2016-01-14 12:44:47 +05:00
90e827ba66 CMake: De-duplicate checks around unordered maps and shared pointer
Previously several areas were calling TEST_SHARED_PTR_SUPPORT and
TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but
was causing some quite verbose output with same information line
printed multiple times. additionally, what's more worse, define flags
for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists.

Now we've got a single place where checks for those classes are
happening and other areas are simply checking for variables set by
those check macros, keeping CMake output clean and nice.
2016-01-14 12:38:46 +05:00
2af7637f20 Cycles: Add option to directly link against CUDA libraries
The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.

The option is disabled by default, so there's no affect on any of
artists.

In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).
2016-01-14 12:27:22 +05:00
d67535eea0 Weight Painting: Respect locks w/ auto-normalize 2016-01-14 15:29:37 +11:00
10ac7c0f15 Fix weight paint normalizing w/ locked groups
Reported as part of T47123

Checks for locked groups assumed auto-normalize
and would distribute wight between groups even with auto-normalize disabled.
2016-01-14 14:05:15 +11:00
3a51a90e56 Fix incorrect weight normalize w/ locks
D1712 by @angavrilov
2016-01-14 13:49:27 +11:00
5e1323640a Correct NULL checks in recent weight-paint fix 2016-01-14 13:19:07 +11:00
9f05fe00a0 Cleanup: use const qualifier in makesdna 2016-01-14 13:00:49 +11:00
f5604af464 Cleanup: use BM_mesh_* prefix for BMesh functions 2016-01-14 13:00:11 +11:00
bc3db85da8 UI: show error when pasting fails 2016-01-14 12:55:38 +11:00
3e0f117ef5 Fix T47170: Sculpt w/ constructive modifier crash
Regression in 4d33c37c9

Only copy normal arrays from sculpt to the DerivedMesh when the mesh is deformed.

Constructive modifiers calculate their own normals.
2016-01-14 10:08:29 +11:00
30971199ac Add object & pose-mode select more/less menus
Exposes object parent/child select, which wasn't in any menus.
2016-01-14 09:45:47 +11:00
de79d049e2 Add object mode select more/less
Simple operator that selects using parent/child links.
2016-01-14 09:45:47 +11:00
5371102039 BI "Real Sky" option works incorrectly for environment texture.
How to check?

1) Set Rendered mode for 3d View
2) Set "Blend Sky" and "Real Sky" flags for world.
Rotate view you will see right color blending from Horizon to Zenith color.
3) Add environment texture
Rotate view and you will see incorrect texture mapping that is not correspond to color blending that was observed in previous step.

So I conclude that this is a bug.

This issue must be solved before the patch D1414 because BI behavior is the viewport target.

Example: {F273051}

Alexander (Blend4Web Team)

Reviewers: sergey

Reviewed By: sergey

Subscribers: Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1729
2016-01-13 11:38:48 +03:00
7f2b8e78b6 Use const qualifier in do_sky_tex
Will be needed for D1729.
2016-01-13 13:18:41 +05:00
348fc7f4a6 Remove outdated assert 2016-01-13 15:11:46 +11:00
a14c67b0ad Polyfill2d: improve sweep clipping logic
Now only reverse the fill direction when reaching a non-concave corner.
Gives ~4x speedup here in tests with complex ngon.
2016-01-13 14:49:00 +11:00
e2715b129c Final OMP -> BLI_task commit for sculpt code. 2016-01-12 19:59:15 +01:00
a934da6bce BMesh: select next can now step over existing selection 2016-01-13 04:05:27 +11:00
8ca76d15b2 Add bmesh.select_history.discard
Follows convention for set, useful to avoid error handling with remove().
2016-01-13 04:03:47 +11:00
aa523f8435 Fix os.path.is_subdir w/ trailing slash 2016-01-13 02:58:53 +11:00
7142bf6cf3 Cycles: Use proper primitive for the motion subsurface refine 2016-01-12 17:09:29 +05:00
ac7aefd7c2 Cycles: Use special debug panel to fine-tune debug flags
This panel is only visible when debug_value is set to 256 and has no
affect in other cases. However, if debug value is not set to this
value, environment variables will be used to control which features
are enabled, so there's no visible changes to anyone in fact.

There are some changes needed to prevent devices re-enumeration on
every Cycles session create.

Reviewers: juicyfruit, lukasstockner97, dingto, brecht

Reviewed By: lukasstockner97, dingto

Differential Revision: https://developer.blender.org/D1720
2016-01-12 16:21:30 +05:00
c6c223ade6 Fix T47164: [Scene.raycast] - True result when it should be False.
We cannot use FLT_MAX as initi distance for raycast...

Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh,
and use in RNA raycast callbacks (and all other places using that API).
2016-01-12 10:09:00 +01:00
90250f8568 Support for copy/paste groups
Developer node, now bases are instanced by give_base_to_objects,
needed for correct OB_FROMGROUP base-flag assignment.
2016-01-12 06:36:03 +11:00
72e31d6a72 Cycles: Always inline triangle precalc for CUDA devices
Since the SSS changes compiling Experimental sm_52 kernel seems
to work just fine.
2016-01-11 21:41:00 +05:00
a60c3c6b21 Cycles: Fix for SSS objects being black when combined with motion blur 2016-01-11 21:39:24 +05:00
16f8444d9d Fix T47147: small particles incorrectly rendered as large particles (particle size influenced by texture).
In fact, code would behave strangely here with any negative value, applying a 'wrapped positive clamping'
(comes from original 2.5 commit feature, rBfafbd9d71b95776d1c7583476de74fccefab7f10)...

This commit is conservative - it keeps same behavior for all particle properties affected by textures,
except for size and length, where we apply a real [0, 1] clamping.

Easy to change in future in case new odd cases popup.
2016-01-11 17:01:09 +01:00
8d9ffa1a6f Fix tip about hair grid display (was copy/paste from hair guides one...). 2016-01-11 12:42:18 +01:00
f84ebfea61 Cleanup: use Linux line ends!!! 2016-01-11 12:42:18 +01:00
ca405a73b4 Fix T47148: Hair grid dos not work.
Actually, it was the whole 'cloth' simulation of hairs that was broken,
since grid data could not be initialized correctly.

Stupid mistake from looptri conversion, rBc582e186d90291a19a4e404111c492f1fd2c41a4
2016-01-11 12:42:18 +01:00
7f4850fbc5 Update add-on descriptions
Also replace addon -> add-on
2016-01-11 20:30:23 +11:00
bedd78904d UI: Move checkbox for toggling addons to the LHS
Without this, its a little annoying to expand, then enable an addon.
This matches panel headers too.
2016-01-11 20:30:23 +11:00
ff1121c716 Bah, forgot to increase boost magic number... 2016-01-11 09:57:32 +01:00
b7eebc1905 install_deps: add wave to boost built modules, seems needed by OSL1.6.9... 2016-01-11 09:54:47 +01:00
9107b48e5a install_deps: fix typo preventing installation of libsndfile on Fedora-like distro. 2016-01-11 09:54:47 +01:00
4d6b8925e6 Fix T47158: Labels w/ icons use button text color
Icon buttons with text labels now use the same color as labels.

This was causing problems with theming since there was no way to set color
for all labels without also changing button text color.
2016-01-11 19:43:29 +11:00
af85639e0e Error in last commit (assumed mirror existed) 2016-01-11 18:37:45 +11:00
d7e6a6f4de Fix T47152: Normalize fails w/ mirror group
When the mirrored vertex group was created on the first stroke,
the mirrored weight failed to normalize.

aused by the valid vgroup map being created before adding the mirror vertex group.
2016-01-11 17:36:55 +11:00
a2d7ba8c21 Fix T47154: Sequencer add/subtract ignored alpha 2016-01-11 16:08:34 +11:00
60fa2644cb Fix error in white-balance w/ float buffer 2016-01-11 14:59:18 +11:00
b211e4193f Fix memory & file-handle leak w/ custom data write 2016-01-11 13:19:19 +11:00
74f291cdea Fix T47101 - Grease Pencil eraser doesn't work when activated using D+RMB when using a tablet
When using D+RMB using a tablet (e.g. holding down the side button of the stylus
while hovering it over the surface of the tablet) to erase, the tablet would
report zero-pressure. This causes problems when using the new pressure-sensitive
Grease Pencil eraser, causing it to have no effect.
2016-01-11 15:11:36 +13:00
961ac8eb85 Report errno string when writing files fails
Screenshot ignored errors, some render code printed 'Saved' without checking for failure.

note: errno is now cleared from IMB_saveiff so all callers don't need to.
2016-01-11 12:32:29 +11:00
f28d3955e9 Cleanup: use const image-format arg 2016-01-11 12:01:08 +11:00
2c8ca79683 WM: show file selector errors in header
Was too easy to miss errors from the file selector, now show in the info header.
2016-01-11 11:29:08 +11:00
24b29873ec Fix GL regression from D1645
Push/Pop mismatch caused GL_STACK_UNDERFLOW
2016-01-11 11:23:18 +11:00
924c626895 DNA: remove 'long' type
Turns out even in files this was used, it was only for runtime members that are now ignored.
2016-01-11 09:23:11 +11:00
4bcb8defb8 DNA: print errors to stderr
Wasn't showing error output in some cases.

Also reduce variable scope in calculate_structlen
2016-01-11 09:23:11 +11:00
7ef3c40902 Cleanup: warnings (misleading-indentation) 2016-01-11 09:23:11 +11:00
d23f478863 Cycles: Add utility funcs to UI code, to check GPU usage.
Can be useful sometimes, and we already have this for CPU. Required for
some further work here.
2016-01-10 21:52:39 +01:00
82049cbe7e OpenGL Smoke: fix color issue, and clarify meaning of variables in the shader. 2016-01-10 19:05:10 +01:00
e7aa07c616 Fix compile error. 2016-01-10 13:55:12 +01:00
7278cb3428 Merge branch 'openvdb' into cvdb_ray_isect 2016-01-10 12:30:01 +01:00
01ff9adea5 Merge branch 'master' into openvdb 2016-01-10 12:19:00 +01:00
f1e8204f5a Smoke: fix for missing viewport color update.
Active color wasn't copied over if it differs from what the user plugged
in in the UI. Also use a darker color for the default color so smoke
doesn't doen't appear too bright.

Reported in IRC by mib2berlin.
2016-01-10 11:37:34 +01:00
e9c8e0316f Some minor fixes from coverity reports. 2016-01-10 09:45:57 +01:00
0372b64270 OpenGL: port smoke drawing code to GLSL.
Beside the obvious ARB -> GLSL change, the texture slicing algorithm had
to be rewritten.

Although this new algorithm has the same behaviour as the old one (view
aligned slicing), it works with an arbitrary number of slices (which
could eventually be set by the user), which means we can preallocate the
buffer. The previous algorithm would slice from the begining to the end
of the volume's bbox, and draw the slices as it generates them.

Also support for ARB program was removed.

Patch by myself, with some minor fixes by Brecht.

Reviewers: brecht, #opengl_gfx

Differential Revision: https://developer.blender.org/D1694
2016-01-10 07:36:23 +01:00
d330162ba6 Cycles: Fix Uninitialized Value compiler warning in the scoped_timer
Although the code made it impossible to use time_start_ uninitialized, at least GCC did
still produce multiple warnings about it.
Since time_dt() is an extremely cheap operation and functionality does not change in any way when
removing the check in the constructor, this commit removes the check and therefore the warning.
2016-01-10 00:50:54 +01:00
64df7a2b38 Cycles: Read Wave texture profile in the XML parser 2016-01-10 00:24:12 +01:00
6995b4d8d9 Cycles: Adding Hilbert Spiral as a tile order for rendering
This patch adds the "Hilbert Spiral", a custom-designed continuous space-filling curve, as a tile order for rendering in Cycles.
It essentially works by dividing the tiles into tile blocks which are processed in a spiral outwards from the center. Inside each
block, the tiles are processed in a regular Hilbert curve pattern. By rotating that pattern according to the spiral direction,
a continuous curve is obtained, which helps with cache coherency and therefore rendering speed.

The curve is a compromise between the faster-rendering Bottom-to-Top etc. orders and the Center order, which is a bit slower,
but starts with the more important areas. The Hilbert Spiral also starts in the center (unless huge tiles are used) and is still
marginally slower than Bottom-to-Top, but noticeably faster than Center.

Reviewers: sergey, #cycles, dingto

Reviewed By: #cycles, dingto

Subscribers: iscream, gregzaal, sergey, mib2berlin

Differential Revision: https://developer.blender.org/D1166
2016-01-10 00:13:53 +01:00
ec20c4b558 DNA: remove endian switching long checks
This wasn't correct, and long was only ever used in cases we can now ignore.
2016-01-10 07:47:08 +11:00
f06f6eab0d Cleanup: style, gpu module 2016-01-10 07:12:10 +11:00
8a924899a9 Byte swap doubles on file read 2016-01-10 04:53:59 +11:00
8c1a2bc2b3 Merge branch 'master' into openvdb 2016-01-09 13:35:48 +01:00
0422e12517 Remove leftover scons files. 2016-01-09 13:35:17 +01:00
296d125e25 PyAPI: Redraw notifier when debug value changes 2016-01-09 22:56:44 +11:00
0ded953eea Cleanup: warning/spelling 2016-01-09 22:56:43 +11:00
43cc8d0be2 Fix T47060: Uv form dupli not working with Cycles when the hair/particles mesh has more than one uv sets.
In fact, it was not working with BI either - 'UV from dupli' would always take active UVLayer,
not render_active one.

Fixed now for both Cycles and BI, and for both particles and 'simple' dupli_face.
2016-01-09 12:31:45 +01:00
08869e41f1 Fix broken build from rBd7da51b727725
Please avoid specialized typed enums in headers as widely used as BKE_object.h,
we do not want to include DNA_modifiers_type.h everywhere...
2016-01-09 09:42:14 +01:00
8202c73ef4 Fix (unreported) other joke in our localizing code - setting LIB_TAG_LOCAL tag!
This fake tag is zero, so it does not set anything - and it does not clear
indirect/extern ones either...
2016-01-09 09:29:31 +01:00
9691202585 Fix T47121: Image node on linked and localized material loses image after reopening project.
Code 'localizing' the node of an ID (a material, here) was kind of a joke,
setting id.lib to NULL is not enough, by far! Now calling ntreeMakeLocal().

And ntreeMakeLocal was also missing indirect->extern switch for its directly used IDs,
which explains why they were lost after a save/reload.

Note that here again, a big part of this 'localizing' code should be made generic
using library_query stuff, but this is for id-remap, not current master...
2016-01-09 09:29:31 +01:00
425a4b23fd MSVC 2015 do not redefine snprintf 2016-01-09 08:55:58 +01:00
a862cebfd4 Bring in refactor from other (private) branch.
Now the system behaves a bit more like the pointcache.

It's about time I merge the changes.
2016-01-09 06:16:03 +01:00
5c00edab94 Merge branch 'master' into openvdb
Conflicts:
	source/blender/blenkernel/intern/smoke.c
2016-01-09 05:55:15 +01:00
14de8361f9 Smoke (fire): Move spectrum code from C++ (intern/) to C code (BLI)
This change is for a few reasons:
- it works with color, and (therefore) will need to be color managed, at
some point. This will be much easier to do if the code is closer to the
actual color management code (in Blender's core, so to speak).
- it has nothing to do with the actual fire simulation, as it is just
used to create a lookup table
- it can be reused for other purposes (i.e. in Blender internal
renderer, if people are interrested in a blackbody node à la Cycles)
- cleanup: some functions (`contrain_rgb`, `xyz_to_rgb`) already exist
in BLI

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1719
2016-01-09 04:48:31 +01:00
d7da51b727 Smoke, Dynamic Paint: de-duplicate object subframe update function.
As in the title. In the smoke version, there was also an extra
'for_render' parameter that wasn't used, and wasn't used by the callers
either, so it was removed altogether.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1718
2016-01-09 04:37:53 +01:00
cc0f5bf7ec Cleanup: make use of PIL time instead of redefining own timers.
Also added a DEBUG_TIME macro in the related files to comment time funcs out.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D1717
2016-01-09 04:25:48 +01:00
85d6759636 Audaspace: Sequencer sound bugfix and mono UI.
- Fixed a bug that the sound when changed in the properties panel was not updated.
- Added the option to make a sound mono while adding a sound strip.
- Added the option to make a sound mono in the sequencer properties panel.

Related bug report: T47140
2016-01-09 02:35:30 +01:00
f39aa17058 Text Editor: Autocomplete suggestion wrap-around
D1716 by @someonewithpc
2016-01-09 10:03:30 +11:00
70028e73dc Readfile: use hash lookup for bones
Bone loop for reconstructing links was O(n^2)
2016-01-09 09:17:18 +11:00
2d973f44e2 Fix T47047: Toolbars opening at maximum zoom level
There were 2 issues:
- toolbars were set initialized in user-defaults
  so their scroll & zoom level were set.
- initializing new 2d views included the scroll width,
  which scaled the new views zoom level, especially when dragging out.
2016-01-09 06:01:34 +11:00
2835a151c8 CMake: Make OSL's .oso shaders building also dependent on OSL compiler!
Otherwise, you can update OSL and not get .oso files regenerated, which is a quite
funny way to crash Blender...
2016-01-08 19:41:04 +01:00
c7ea7e4c9a install_deps: bump OIIO and OSL to 1.6.9.
And we can even use vanilia version of OSL now! :D
2016-01-08 18:57:58 +01:00
eada698c0e install_deps: raise boost official version to 1.60. 2016-01-08 17:59:44 +01:00
ea2c24f138 install_deps: bump ffmpeg to 2.8.4. 2016-01-08 17:52:32 +01:00
e108b8f102 Add new '--no-confirm' option to avoid user interaction (needs to run ths script as sudo then) 2016-01-08 17:52:32 +01:00
9ac83d499e Fix bisect flagging w/ multiple cuts on an ngon
Caused symmetrize to fail for concave ngons crossing the midpoint multiple times.
2016-01-09 02:06:45 +11:00
e830334357 Math Lib: use x-span for fill_poly_v2i_n callback
Instead of running the callback per-pixel,
pass the x-span to the callback.
2016-01-08 23:35:34 +11:00
0634fd0e97 Remove raskter library
it's no longer used by any of the parts of Blender.
2016-01-08 16:30:30 +05:00
7af548f87e Tracking: Cleanup, reduce scope of some variables 2016-01-08 16:26:21 +05:00
707500b5c4 Tracking: Use BLI mask rasterization for track masks 2016-01-08 16:26:21 +05:00
875be10903 Sequencer: Tweak to how/when the "use_framerate" option is enabled
In response to feedback from plasmasolutions that having this option "always on"
caused some examples of more destructive errors, this commit introduces an attempt
at seeking a better balance between doing what people expect when casually importing
clips, and not clobbering existing timelines.

Specifically:
1) When there's nothing in the scene, the option will default to being enabled.
   This accounts for users doing this for the first time with no strips
2) When there are already sequence strips, the option will default to being disabled.
   In this case, changing the framerate could be dangerous. Hopefully this new check
   is sufficient.
3) There's always still the option for users to control what exactly happens. However,
   there have been reports that this cannot always be seen/set?
2016-01-09 00:12:33 +13:00
4ef918d661 Koro request: add 'active layer' and 'selected' options to view3D' paste operator.
Those two are ON by default, since I think it's most common expected behavior
(as with append/link ops).
2016-01-08 11:13:58 +01:00
5c69345edc Fix T47138: Page Down key pages up, instead of down, in Outliner.
Usual operator properties 'saving' after first execution... Double fix here, since being
explicit in keymap is good practice too.
2016-01-08 09:55:39 +01:00
15faab0082 Fix T47135: VSE importing sound is one frame longer than video.
Issue is with rounding up of length reported by audaspace for audio part - when it matches nearly exactly
the actual video length, using ceil() would make it one frame longer. Now apply a small (0.0001 frame)
negative offset to prevent this effect.
2016-01-08 09:41:08 +01:00
1341f91695 Simplify checker mapping in BI when both Odd and Even are disabled
This also solves artifact mentioned in comment in T46984.
2016-01-08 13:20:34 +05:00
c986e93a98 BMesh: Select Previous, set active face now works 2016-01-08 16:43:05 +11:00
2c2129eb39 Correct warnings from recent cleanup 2016-01-08 16:43:05 +11:00
4846b44024 Sequencer: Use movieclip framerate when importing new movie strips
When importing new movie strips into the sequencer, the scene's frame rate
will now be adjusted to match that of the movie being loaded by default.
To get the old behaviour (e.g. if importing a clip into an existing project),
disable the "Use Movie Framerate" option in the file browser when selecting
the strip.

This change is designed to solve the common problem that users trying to import
video clips will forget to adjust the frame rate before importing the clip, thus
causing the sound and video strips to be out of sync (as the sound strip ends
up longer/shorter than the video stream).
2016-01-08 18:32:39 +13:00
cd6c6ee1a5 Fix T46993: UI lag in fullscreen mode on OS X / Intel graphics.
If anyone finds OS X UI drawing glitches with different graphics cards please
report them and I'll add an exception specifically for Intel, but in theory this
should work fine for all graphics cards.
2016-01-07 23:51:38 +01:00
2643b57f97 OpenGL: remove obsolete version check
This *should* be the last one in Blender creator. A few still live in
BGE.
2016-01-07 16:44:49 -05:00
0e695f671a cleanup: C99
- tighter scoping
- declare vars closer to where they’re used
- use more bool
2016-01-07 16:32:36 -05:00
f01f74d5dd cleanup: C99
- tighter scoping
- declare vars closer to where they’re used
- minor spacing cleanup
2016-01-07 16:32:35 -05:00
0df1bdc268 OpenGL: fix max texture anisotropy check
Query max supported on init, use that to clamp user-set values.
2016-01-07 16:32:35 -05:00
1aff22b81d OpenGL: use best available mipmap gen function
ARB_framebuffer_object works just like GL 3+ and is the preferred
method.

Fall back to older EXT_framebuffer_object if necessary.
2016-01-07 16:32:35 -05:00
290b0a97ba cleanup: OpenGL comment
Removed reference to GL 1.x since we no longer support that. ES is
likely in our future though!
2016-01-07 16:32:35 -05:00
77641c28ef OpenGL: remove some hacks/workarounds
Everything I've tested works fine without these hacks. Variety of Mac, Linux, Windows, Intel, nVidia, AMD.
If these workarounds are for old unsupported systems let's clean house.

Reviewers: #opengl_gfx

Differential Revision: https://developer.blender.org/D1707
2016-01-07 16:32:35 -05:00
e20b30a1d8 OpenGL: remove glPointSize hack 2016-01-07 16:32:35 -05:00
261ac69f57 Fix RNA_enum_set_identifier(), needs a context to handle correctly dynamic enums. 2016-01-07 21:52:54 +01:00
e63c773b7c Correct check when no path can be found 2016-01-08 06:09:54 +11:00
d755b08259 Add add-ons catalog to links in preferences menu
D1715 by @Imaginer
2016-01-08 04:58:22 +11:00
5fd3b07647 Add select next/previous items to select menu 2016-01-08 04:42:17 +11:00
8965586151 Editmesh select sub-menu 'Select All by Trait'
Similar to object mode 'Select All by Type',
This menu is for various options to select based on some rules.

Moving into a submenu removes clutter, and means we can add other selection types.
2016-01-08 04:07:20 +11:00
5d118f6dd7 BMesh: add select next/prev operator
This uses selection history to select the next vert/edge/face based on surrounding topology.
Select previous just removes the last selected element.

Uses key-bindings: Ctrl-Shift +/-
2016-01-08 03:21:31 +11:00
08185d2af0 Fix T46723: Issue with linking to rigs running Blender in new depsgraph mode
This isn't really ideal fix, but currently i can't tell how proxies should work
with the new dependency graph. This backward links are crazy, non-threadsafe
and mindblowing. Need to do some smarter/easier system.
2016-01-07 20:06:13 +05:00
3ad1e4fab9 addon_utils: improve docstrings
Also make error handler take the exception as its argument.
2016-01-07 23:33:51 +11:00
3e530f9439 Fix error in recent commit 2016-01-07 21:05:49 +11:00
eed28a1db8 Select mirror multiple axis support
Previously you could only select mirror on X axis,
now support mirroring on multiple axis as well as more than one
(for mesh and lattice data).
2016-01-07 20:57:03 +11:00
9e3ae79a54 Fix access possibly uninitialized armature's bounding box flag 2016-01-07 14:35:01 +05:00
c4fda6f7d0 Cleanup: use generic xyz axis enums 2016-01-07 20:22:49 +11:00
0778856268 Cleanup: remove unused scene arg 2016-01-07 20:11:59 +11:00
5483695698 Cycles: Update some API to be ready for OSL 1.6
While previous code was already compiling with OSL 1.6 it was using some symbols
which were considered deprecated in upstream.

This commit adds some ifdefs, but soon we'll get rid of all them rather soon
with the upcoming OIIO/OSL update.
2016-01-07 14:04:12 +05:00
772a3dab21 Cycles: Update some types used form OSL
Some types were deprecated back in 2013, better to be prepared earlier for those
types being removed from upstream.
2016-01-07 13:15:30 +05:00
3d313c9e5c Cycles: Whitespace cleanup, extra space in the argument list
Seems we're really starting to need to have cpplint for Cycles.
2016-01-07 11:52:45 +05:00
02739bd051 Cycles: Cleanup, use "string_" prefix for functions in util_string
No functional changes, just makes it easier to track where the function
is coming from.
2016-01-07 11:47:58 +05:00
9f2d33a652 Cycles: Fix wrong transparency flag being set to integrator
Patch from be28706 made it so integrator will use last shader's transparent
shadow flag, which is wrong since last shader might not have transparent
shadow while shaders prior to it might have one.
2016-01-07 11:45:13 +05:00
fd0a2d4eb4 Merge branch 'master' into openvdb 2016-01-07 03:35:31 +01:00
3da0af1464 Cycles: Add utility function to convert bool to string. 2016-01-07 01:38:25 +01:00
db72639e1f Cleanup: Fix Cycles compile warning on MSVC. 2016-01-07 00:26:26 +01:00
81a253a0d5 Cycles OpenCL: Change environment flags for testing.
CYCLES_OPENCL_TEST was removed, there was an insonsistency between
opencl_kernel_use_split() and opencl_get_usable_devices().

From now on, to test non whitelisted devices please use either
CYCLES_OPENCL_MEGA_KERNEL_TEST or CYCLES_OPENCL_SPLIT_KERNEL_TEST.
2016-01-07 00:14:04 +01:00
83e73a2100 Cycles: Refactor how we pass bounce info to light path node.
This commit changes the way how we pass bounce information to the Light
Path node. Instead of manualy copying the bounces into ShaderData, we now
directly pass PathState. This reduces the arguments that we need to pass
around and also makes it easier to extend the feature.

This commit also exposes the Transmission Bounce Depth to the Light Path
node. It works similar to the Transparent Depth Output: Replace a
Transmission lightpath after X bounces with another shader, e.g a Diffuse
one. This can be used to avoid black surfaces, due to low amount of max
bounces.

Reviewed by Sergey and Brecht, thanks for some hlp with this.

I tested compilation and usage on CPU (SVM and OSL), CUDA, OpenCL Split
and Mega kernel. Hopefully this covers all devices. :)
2016-01-06 23:43:29 +01:00
be28706bac Proper fix for memleaks when rendering partsys from edit mode... 2016-01-06 21:22:01 +01:00
f286df75c0 ...And fix memleak in previous commit, sigh... 2016-01-06 20:28:21 +01:00
31e6978066 Fix (unreported) crash when rendering hairs from edit mode (own regression in recent particle edit fix).
*sigh* hope we fix some day that recursion issue that makes it such a PITA to generate DM of other targets from DM stack...
2016-01-06 20:20:50 +01:00
4acf0f05a1 'users of ID' py API.
This mainly adds bpy.data.user_map() method, which goes over the whole Main database
to build a mapping (dict) {ID: {users_of_that_ID}}.

Very handy to check and debug ID usages, but could also be really valuable for py addons
creating temporary scenes, or some exporters, etc.

Note: current code in master's libquery misses some IDs (and reports some it should not,
like nodetrees), this is fixed in id-remap but still needs serious review before going to master.
This basically means that current bpy.data.user_map() **will not** report a complete and exhaustive
state of dependencies between IDs. Should work OK in most cases though.

Original work/idea comes from id-remap branch, was heavily reworked by @campbellbarton
and myself for master.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1678
2016-01-06 19:48:10 +01:00
ea7a2766f6 Cycles: Fix possible buffer overflow in OIIO cache error message 2016-01-06 23:09:48 +05:00
03302fd5ed Fix T47120: CPU OSL Cycles crashes blender in latest GIT
The issue was caused by leaking error messages caused by
getting OIIO texture handle for built-in images.
2016-01-06 23:06:54 +05:00
944b6322e6 Cycles: Log whch optimizations are used for CPU kernels
Not fully thread-safe, but is rather harmless. Just some messages
might be logged several times.
2016-01-06 20:25:19 +05:00
e2846c999a Cycles: Fix stupid mistake which was assining kernel function in a loop 2016-01-06 20:05:33 +05:00
60c0c47dba Save sys-info to file instead of a text block
The main reason for this change is this file is typically used when making bug reports,
its best if users attach this file to reports directly.
2016-01-07 00:24:33 +11:00
cbc0a73ae4 Fix T47034: Explode "Cut Edges" looses UV's
Own regression in c61e4f2
2016-01-06 22:08:49 +11:00
7e6d09608b Fix Blender Player linking issue.
Removed the conflicting declaration since it is not needed anymore, as
the stipple arrays are now only used in gpu_shader_basic.c.
2016-01-06 01:33:12 +01:00
8c8215fb77 Fix T46984: Image mapping bug
The issue was caused by wrong scaling applied on top of the image sampling.

It seems there's no reason to apply alpha clipping when using EWA filtering,
this filtering currently works in the way that it apples all needed clipping
and scaling to a clipped kernel already.
2016-01-05 22:41:41 +05:00
5d564da3b6 Cycles: Fix memory leak in shader graph when bump graph is used 2016-01-05 21:18:02 +05:00
0b78b8f167 Buildbot: Link libstdc++ statically 2016-01-05 19:59:38 +05:00
ca0e663c04 CMake: Fix typo in comment 2016-01-05 19:42:16 +05:00
2d9ed6e7c8 fix compiling cycles after recent gflags / glog shuffle 2016-01-05 14:14:10 +01:00
ad6b7c07dd CMake: remove mingw64_gcc49
Not supported or in working state.
2016-01-05 23:35:14 +11:00
c42ae8be60 CMake: copy python DLL for MinGW builds 2016-01-05 22:13:36 +11:00
0a9935cb28 OpenGL: various small optimizations
- set uniform colors outside of loop
- replace glBegin/End with DrawRangeElements
- use GL_LINES when drawing single lines
2016-01-05 01:35:19 -05:00
2b0d63be79 Merge branch 'master' into openvdb
Conflicts:
	SConstruct
	build_files/scons/config/darwin-config.py
	build_files/scons/config/linux-config.py
	build_files/scons/config/win32-mingw-config.py
	build_files/scons/config/win32-vc-config.py
	build_files/scons/config/win64-mingw-config.py
	build_files/scons/config/win64-vc-config.py
	build_files/scons/tools/Blender.py
	build_files/scons/tools/btools.py
	intern/SConscript
	intern/cycles/SConscript
	source/blender/blenkernel/SConscript
	source/blender/editors/object/SConscript
	source/blender/editors/space_view3d/SConscript
	source/blender/nodes/SConscript
	source/blender/python/SConscript
2016-01-05 00:48:25 +01:00
da070f6f5b Usual i18n fixes... 2016-01-04 21:09:39 +01:00
ff10557c20 Fix for previous commit...
Arg, forgot half of it, sorry for the noise. :|
2016-01-04 21:02:05 +01:00
1b7fdb6a60 Fix missing 'WITH_OPENCOLORIO/OPENIMAGEIO' defines in install_deps final message.
Reported by venomgfx on IRC, thanks.
2016-01-04 20:59:52 +01:00
2ac555fe47 ID: Sanitize handling of 'USER_ONE' (ensure_user) case.
Note that this has little impact on current master - yet it allows to fix the 'Image Editor' bug
(open image in editor, use same image in texture, delete image from texture, image us is 0 and
red in image editor...) and probably a few other similar cases.

But that change is mandatory to get a proper handling of ID deletion/reamapping/reloading/etc. as done in id-remap branch.

Instead of just adding a user if none already present, new code use two new ID tags to get a three-states status:
  - Normal: nothing changes.
  - Needs extra user: we know that ID needs an extra user, so we take of never going down to 0 in 'real' usercount handling.
  - Has extra user: we do have increased that ID usercount to get our needed extrauser.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1696
2016-01-04 20:17:23 +01:00
c35ad8d4a3 GTest: Fix some strict compiler warnings
Those changes are to be backported to the upstream actually, for until then
it should be good enough to have it locally.
2016-01-04 23:54:02 +05:00
4a3e89e9ee Fix wrong linking flags for Libmv tests 2016-01-04 23:32:57 +05:00
be87bc6bd8 Next step of fix for gtests (but still not working...) 2016-01-04 19:29:42 +01:00
82d88e42a5 BLI_task threaded looper: do not assert when start == stop.
This can happen quite often in forloops, and would be annoying to have to check for this
in caller code! So now, just return without doing anything in this case.
2016-01-04 19:17:09 +01:00
17eb5b3af6 Fix (unreported) memleak related to PBVH and looptri.
Looptri are not mesh data, they are allocated and built for PBVH only, and totally 'local' to it,
so duplicating like we do for verts & co leads to leaking memory.
2016-01-04 19:17:09 +01:00
0b157f7c6c Sculpt: OMP -> BLI_task, step III.
The remaining bits in editors' sculpt.c, which is now free from OMP.

All in all, changes in this file allow from below 2% to above %20 speedup per stroke, depending
on brush complexity, size, and definition of the mesh below it...

Note that this commit also unifies all 'threaded data' into a single struct, a few more
floats/pointers do not hurt here, and it makes code a bit simpler.
2016-01-04 19:17:09 +01:00
0e5e407007 Correct include directories for GTests 2016-01-04 22:16:14 +05:00
Dalai Felinto
353d0237bc Cycles-Bake: Unset properties fallback only working for invoke 2016-01-04 13:20:34 -02:00
Dalai Felinto
c59e8cc12a Fix T47076 part II
We still got unfreed memory after b909dfda
2016-01-04 13:19:08 -02:00
66123ef3ad Cleanup 2016-01-05 01:46:13 +11:00
474aa8515d Libmv: Solve some strict compiler warnings 2016-01-04 19:48:15 +05:00
ba432299cd Move Libmv from extern/ to intern/
Logically it is intern library since being mainly developed by 1.5 blender guys.
2016-01-04 19:39:13 +05:00
6fb6a08bf8 Move Ceres to extern/
Even tho it's currently only used by Libmv we might use it for something
else in the future. Plus, it's actually where it logically belongs to.
2016-01-04 19:39:13 +05:00
0b856dd97e Move GLog/GFlags to extern/
This is where the libraries belongs to actually, they are not only used by
Libmv now, but also by tests and Cycles.
2016-01-04 19:39:13 +05:00
69f4080839 Re-organize structure of GLog/GFlags CMake libraries
The idea is to split them into two separate targets and have dedicated include
directories list for each of them in order to avoid some annoying include header
modifications in comparison with upstream.

Reviewers: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1706
2016-01-04 19:39:13 +05:00
8608a0f4f0 added new "Fake User" option for appending objects, this sets a fake user on each newly appended item except Groups and Objects. 2016-01-04 14:02:30 +01:00
2cdd4a5467 Cycles: Fix access uninitialized SVM stack caused by recent optimization 2016-01-04 17:11:52 +05:00
aad24468e2 Fix T47038: Particles in Particle Edit Mode get added in completely wrong location.
It also fixes another issue (crash) related to symmetric editing.

Quite involved, we (try to!) fix complete broken logic of parts of particle code, which would use poly index
as tessface one (or vice-versa). Issue most probably goes back to BMesh integration time...

This patch mostly fixes particle editing mode:
  - Adding/removing particles when using generative modifiers (like subsurf) should now work.
  - Adding/removing particles with a non-tessellated mesh (i.e. one having ngons) should also mostly work.
  - X-axis-mirror-editing particles over ngons does not really work, not sure why currently.
  - All this in both 'modes' (with or without using modifier stack for particles).

Tech side:
  - Store a deformed-only DM in particle modifier data.
  - Rename existing DM to make it clear it's a final one.
  - Use deformed-only DM's tessface2poly mapping to 'solve' poly/tessface mismatches.
  - Make (part of) mirror-editing code able to use a DM instead of raw mesh, so that we can mirror based on final DM
    when editing particles using modifier stack (mandatory, since there is no way currently to find orig tessface
    from an final DM tessface index).

Note that this patch is not really nice and clean (current particles are beyond hope on this side anyway),
it's more like some urgency bandage. Whole crap needs complete rewrite anyway,
BMesh's polygons make it really hard to work with current system (and looptri would not help much here).

Also, did not test everything possibly affected by those changes, so it needs some users' testing & validation too.

Reviewers: psy-fi

Subscribers: dfelinto, eyecandy

Maniphest Tasks: T47038

Differential Revision: https://developer.blender.org/D1685
2016-01-04 12:19:45 +01:00
e83b3e577e Remove unused datatoc script 2016-01-04 21:30:01 +11:00
982904fcc9 Fix T47109: Expose sound data-block selector 2016-01-04 21:08:14 +11:00
598180f98d Fix crash sequencer drawing with no sound 2016-01-04 20:42:44 +11:00
236fabcc41 Minor edits to sync make.bat & makefile 2016-01-04 20:42:00 +11:00
4c37d910de Remove outdated and unmaintained script which was supposed to configure a release environment
It was not updated in ages and in fact, it's easier to wrap release environment
into Docker or VirtualBox image.
2016-01-04 14:30:48 +05:00
5d99cde822 Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680
2016-01-04 14:20:48 +05:00
1eb5e0b660 minor cleanup 2016-01-04 01:38:49 -05:00
d2b4f9c627 OpenGL: image drawing tweaks
- no need to allocate client memory up front
- delete unneeded GL calls
- set default alpha test function on exit
2016-01-04 01:38:49 -05:00
ed2daace76 minor cleanup: typos
no functional change
2016-01-04 01:25:52 -05:00
2e8a840307 OpenGL: GPU_legacy_support workaround for nVidia
nVidia Linux driver reports GL_CONTEXT_PROFILE_MASK = 0, which is a bug.
In that case check for the ARB_compatibility extension.

Non-buggy drivers will continue to use
GL_CONTEXT_COMPATIBILITY_PROFILE_BIT.

Thx to Dr Hackerman for reporting.
2016-01-04 01:03:47 -05:00
193b38cc47 Remove select-next-loop operator
Taken from original bmesh-branch but doesn't give useful results
(misses selection flushing).
2016-01-04 15:03:18 +11:00
142abe0b4a Merge branch 'master' into openvdb 2016-01-04 02:01:01 +01:00
2e77c413ab Sculpt: OMP -> BLI_task, step II.
This time, all tools' code itself.

Not much to say, except that we can also get rid of that OMP caching pre-process ugly stuff
for multires smoothing.

Together with previous commit, we have about 5% average speedup on stroke execution
(though this vary a lot, up to 30% speedup in rare cases, and in even rarer cases some
odd massive slowdowns...).

Tech note: we may want to add 'guided'-similar feature to our BLI_task threaded loop,
I suspect this could explain random massive slowdowns of new code (very rare, but annoying...).
2016-01-03 23:56:54 +01:00
da49ee30b0 Fix T47100: OpenCL compilation warnings due to missing space in the argument list 2016-01-03 23:13:49 +05:00
d57847ca5b Fix text wrapping off-by-one error w/ string width
Caused odd white space error in tooltip enum values.
2016-01-04 01:41:58 +11:00
a3df65dea8 Fix T47008: OSL Memory Corruption (Use after free)
The issue was caused by OSL using TLS which is required to be freed before the
Cycles session is freed. This is quite tricky to do in Cycles because different
render session are sharing the same task scheduler, so when one session is being
freed TLS might need to be active still.

In order to solve this, we are now doing JIT optimization ahead of the time
which ensures either TLS of JIT is freed before the render on multi-core system
or freed on OSLRenderSession destroy on single-core system.

This might increase synchronization time due to JIT of unused function, but
that we can solve later with some smart idea,
2016-01-03 18:28:33 +05:00
80a76030ae Improve system info tip 2016-01-03 23:24:00 +11:00
d48abb8ffd Get rid of yet another instance of DM_DRAW_OPTION_NO_MCOL
Logic here is weird. Generally, textured drawing overrides
material color unless material uses object color instead?
It doesn't make sense, material color is a material color
whatever the circumstance.

Repeating: idea as always is to push all those options out of per-
polygon callbacks and make decisions such as color enable in the higher
level functions.
2016-01-03 00:26:28 +01:00
09e3ef29c1 Get rid of three needless instances of DM_DRAW_OPTION_NO_MCOL.
It would be good to get rid of this entirely, ideally decision
about mcols can be taken at material level and not done per face. More
work needs to be done for that to work though.
2016-01-02 23:22:22 +01:00
c2bd260122 GPU buffers: Add update functionality for existing buffers.
Only used for color for now, but we need this for any kind of buffer
updates actually.

This should get rid of some allocation/deallocation, making
vertex painting a bit faster.
2016-01-02 19:55:15 +01:00
66bea2d77e Fix compilation error on Windows 2016-01-02 13:17:39 +05:00
b1a7fc2c51 Cycles: Force bottom-to-top tile order for viewport rendering
This commit overrides the user's choice of tile order in the case of viewport rendering and always uses bottom-to-top instead.
This was already done until the TileManager redesign, but since it removed the distinction between viewport and regular rendering
in the manager, the viewport was now also using the selected order. Since this requires sorting of the generated tiles,
it slows down rendering a bit. With the forced bottom-to-top order, this sorting step can now be avoided again.

Since the tile order is invisible anyways for viewport rendering, this commit won't have any impact on users (apart from a slight speedup).
2016-01-02 01:15:26 +01:00
5c682a901b Cycles: Add Saw option to the wave texture
This commit adds "Bands Saw" and "Rings Saw" to the options for the Wave texture node in Cycles, behaving similar to the Saw option in BI textures.
Requested by @cekuhnen on BA.

Reviewers: dingto, sergey

Subscribers: cekuhnen

Differential Revision: https://developer.blender.org/D1699
2016-01-01 23:25:37 +01:00
1991ee1738 Sculpt: OMP -> BLI_task, step I.
This gives usual nice boost in parallelized sections themselves, on global sculpting stroke
it's a bit hard to say, seems like we have an average 5% speedup, but it varies a lot...

Note that this area is only parallelized when you have a big brush over dense geometry, otherwise
there's no change at all.

As a side note, this commit also factorizes code here, three times nearly the same code, tst...
2016-01-01 21:27:16 +01:00
dc20db1c6c make.bat: only configure once 2016-01-02 06:31:11 +11:00
1ed610ed73 Fix OSL compilation, cannot assign vector to color. 2016-01-01 18:05:34 +01:00
fe5efe4196 make.bat: add 'clean' command 2016-01-02 02:30:02 +11:00
4ccc62dbc8 make.bat: detect MSVC location
Now this can run from any command line (without having to be launched from MSVC Command Prompt)
2016-01-02 01:42:43 +11:00
0d2b2cd378 make.bat: sanity checks w/ useful error messages 2016-01-01 21:26:27 +11:00
b92f997cad make.bat correct name for cycles target 2016-01-01 18:47:30 +11:00
ef3f512007 Fix for make.bat
Build install target and config path was wrong.

Also use less verbose output and enable multiprocess builds.
2016-01-01 16:05:11 +11:00
b519a73326 Add helper make.bat file for ms-windows builders
See --help for options (currently still quite basic)
2016-01-01 05:44:34 +11:00
ade35bac93 Cycles: Implement rolling shutter effect
This is an attempt to emulate real CMOS cameras which reads sensor by scanlines
and hence different scanlines are sampled at a different moment in time, which
causes so called rolling shutter effect. This effect will, for example, make
vertical straight lines being curved when doing horizontal camera pan.

This is controlled by the Shutter Type option in the Motion Blur panel.

Additionally, since scanline sampling is not instantaneous it's possible to have
motion blur on top of rolling shutter.

This is controlled by the Rolling Shutter Time slider which controls balance
between pure rolling shutter effect and pure motion blur effect.

Reviewers: brecht, juicyfruit, dingto, keir

Differential Revision: https://developer.blender.org/D1624
2015-12-31 20:44:27 +05:00
c81e6ffdf9 Fix T46915: Non-intuitive behavior of Vector Curve Mapping node
Vector mapping node was doing some weird mapping of both original and mapped
coordinates. Mapping of original coordinates was caused by the clamping nature
of the LUT generated from the node. Mapping of the mapped value again was quite
totally obscure -- one needed to constantly keep in mind that actual value will
be scaled up and moved down.

This commit makes it so values in the vector curve mapping are always absolute.
In fact, it is now behaving quite the same as RGB curve mapping node and the
code could be de-duplicated. Keeping the code duplicated for a bit so it's more
clear what exact parts of the node changed.

Reviewers: brecht

Subscribers: bassamk

Differential Revision: https://developer.blender.org/D1672
2015-12-31 20:40:22 +05:00
70fa2f69c9 Fix T47046: Exporting Max and Maya keymap throws RNA warnings in console.
Totally harmless, but let's silence this bpyrna warning in case enum_items
is a DummyRNA_NULL_items, which is by definition empty...
2015-12-31 14:57:48 +01:00
702372f6c5 Fix wrong format used in the recent python exit code commit 2015-12-31 18:02:54 +05:00
619946253e Libmv: Yet again update to the latest version
Again brings some fixes for MSVC-2015 and keeps it easier to backport
the fixes into upstream.
2015-12-31 17:56:57 +05:00
99da8e1ed8 Cycles: Fix viewport rendering with multiple GPU devices 2015-12-31 17:49:25 +05:00
82a1adfbdf Command line argument to exit on Python errors
eg:
  blender -b --python-exit-code 1 --python script.py --render-anim

This causes blender not to continue parsing command line arguments and exit if the script raises an exception.
2015-12-31 22:37:32 +11:00
3236f1ab54 Add parse_int_strict_range utility for command line input 2015-12-31 22:37:32 +11:00
8e1fae3e38 Libmv: Update to latest upstream version
Brings some extra fixes for MSVC-2015
2015-12-31 16:16:52 +05:00
6046a86522 Update CUDA wrangler to latest upstream
Brings support of NVRTC bindings and also makes it easier to tweak
libraries paths and use multiple alternative names for libraries.
2015-12-31 16:02:24 +05:00
0b4abd08b3 Cycles: Experiment with use of runtime tag instead of set for SVM generation
This gives about 2x speedup (3.2sec vs. 11.9sec with 32716 handled nodes) when
updating shader for the shader tree.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1700
2015-12-31 15:58:18 +05:00
0ffc603553 Cleanup: Py API naming
Use BPY_execute_* prefix for all Python execution commands
2015-12-31 21:20:41 +11:00
16e1bbf1db Fix T47076: Memory issues when closing Blendera after Cycles baking 2015-12-31 14:49:58 +05:00
8a9e20495c Fix T47089: View rotate fails w/ auto depth+perspective 2015-12-31 19:09:04 +11:00
b6697b4d2a MSVC 2015 fix: do not redefine snprintf, even MS is getting standards complient 2015-12-31 08:53:06 +01:00
88477fe2bf Fix T47094: Crash w/ sequencer white-balance 2015-12-31 18:15:45 +11:00
7a702ba1d5 Cleanup: warning 2015-12-31 18:15:45 +11:00
0850165a5a Always initialize cache path. 2015-12-31 01:10:01 +01:00
ac8105a72d Usual i18n/UI messages fixes... 2015-12-30 21:44:53 +01:00
e11ed68af0 Fix (unreported) memleak in mesh remapping auto-transform code. 2015-12-30 21:11:07 +01:00
6472810c96 Grr, forgot those ones in previous commit...
Never believe QTCreator when it comes to finding all usages of a func, kids... grep ftw!
2015-12-30 21:05:57 +01:00
511e3c5d9d BLI_task: change BLI_task_parallel_range_ex() to just take a bool whether to use threading or not, instead of threshold.
From recent experience, turns out we often do want to use something else than basic
range of parallelized forloop as control parameter over threads usage, so now BLI func
only takes a boolean, and caller defines best check for its own case.
2015-12-30 20:39:56 +01:00
d9bb4a200c Fix OS X (with 10.11 SDK) glog build errors due to using deprecated code.
Some values are now restored to the ones from before the upgrade today.
2015-12-30 19:52:25 +01:00
f1f0e12f82 Merge branch 'master' into 'cvdb_ray_isect' 2015-12-30 18:51:39 +01:00
a072bc47cb Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/render/svm.cpp
	intern/cycles/render/svm.h
2015-12-30 18:40:17 +01:00
cf2005d942 Fix T47081: laplacian smooth edit mode tool crash. 2015-12-30 17:26:51 +01:00
f5c978074c Cycles: Code cleanup: use scoped timer to measure parts of SVM compiler 2015-12-30 19:35:21 +05:00
4d2eb42cfd Cycles: Wrap SVM compiler state variables into a single struct
This way it's easier to pass stuff around and also much easier to add more
state variables.

So far should be no functional changes for artists.
2015-12-30 19:21:19 +05:00
3918c8b9a5 Cycles: Optionally output luminance from the shader evaluation kernel
This makes it possible to move some parts of evaluation from host to the device
and hopefully reduce memory usage by avoid having full RGBA buffer on the host.

Reviewers: juicyfruit, lukasstockner97, brecht

Reviewed By: lukasstockner97, brecht

Differential Revision: https://developer.blender.org/D1702
2015-12-30 19:04:04 +05:00
c8a551bf13 Cycles: Don't install CPU-related kernel files 2015-12-30 18:51:35 +05:00
2b5d60eb2d Cycles: Deduplicte CPU kernel declaration and definition code
Main goal is to make kernel signatures editing easier and less prone to the
errors caused by missing function signature update or so.

This will also make it easier to add new CPU architectures.

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: dingto, lukasstockner97, brecht

Differential Revision: https://developer.blender.org/D1703
2015-12-30 17:54:02 +05:00
f320724195 BGE: Fix invalid operator< for microsoft compiler.
It fixes the strict weak ordering assertion failure, see : https://support.microsoft.com/en-us/kb/949171.
sybren and youle are the author of this commit.
2015-12-30 13:47:43 +01:00
4145a4d08c GLog: Solve some compilation warnings
Those are actually sent to a pull-request, see

  https://github.com/google/glog/pull/81
2015-12-30 17:25:54 +05:00
6b7ead4fe8 Libmv: Update to the latest upstream version
Main reason is to bring up new Glog which should have MSVC 2015
support.
2015-12-30 17:01:28 +05:00
2583cc88de Fix Moto overflow warnings
This fault (level 2, C4056) was introduced by changing Moto from double to float.
2015-12-30 12:45:36 +01:00
939dd2e168 Skip some more workarounds when using MSVC 2015 2015-12-30 11:23:10 +01:00
5e974a350f Make cycles compile with MSVC 2015 2015-12-29 18:59:23 +01:00
a6b67ca802 Cycles: Add timing information to the SVM compiler stats 2015-12-29 21:20:10 +05:00
aff9fd60bc Cycles: Optimize nodes deduplication routines
The idea is to have separate sets per node name in order to speed up the
comparison process. This will use a bit more memory and slow down simple
shaders, but this extra memory is not so much huge and time penalty is
not really measurable (at least from initial tests).

This saves orders of magnitude seconds when de-duplicating 17K nodes and
overall process now takes 0.01sec on my laptop,
2015-12-29 20:27:00 +05:00
3482cdb136 Cycles: Remove assert which is no longer valid
Was a left-over since 5b33115.
2015-12-29 19:19:53 +05:00
3666ee9132 More from T47045: Add i18n translations to render status from compo.
Also fix inconsistency for freestyle translation - we use IFACE_ everywhere
(TIP_ may be more suited, but let's be consistent first!).
2015-12-29 12:42:12 +01:00
407c9fc9d6 Various cleanups. 2015-12-29 00:53:32 +01:00
625381509f Building w/o OpenMP now works again
rename define since its no longer OpenMP specific.
2015-12-29 10:33:00 +11:00
5b30e823a7 Fix invalid memory access in multiview code during render, reported on irc. 2015-12-29 00:27:18 +01:00
d1a26437ef OS X: remove code for OS X <= 10.5, which is already not supported since 2 years. 2015-12-29 00:27:18 +01:00
6ca6d29e6b Fix memleaks in our gtests. 2015-12-28 23:19:24 +01:00
971f9e1c25 BLI_math_statistics: switch from OMP to BLI_task.
This time, with have over 300% speedup!

But no, this is not due to switch to BLI_task (which 'only' gives usal 15% speedup),
but to enhancement of the algorithm, flatten loop over covariance matrix items now allows
to compute (usually) all items in parallel, instead of having at most 3 or 4 working threads
(with unbalanced load even)...
2015-12-28 22:57:55 +01:00
d08e9883bd BLI_kdopbvh: switch from OMP to BLI_task.
Gives the usual 10%-30% speedup on affected functions themselves (BLI_bvhtree_overlap() and
BLI_bvhtree_balance()), and about 2% speedup to overall cloth sim e.g. (measured from
main Cloth modifier func).
2015-12-28 21:40:22 +01:00
49a30112d4 Fix opengl error when GLSL is on for basic shader: shader needs to be
bound before setting uniforms
2015-12-28 20:51:38 +01:00
d346ed3b10 cdderivedmesh fix stippled faces not getting drawn at all
Also rearranged code here to not issue a draw call (explicit flush) per
face and not set shader per face either when stippled drawing is mixed
with regular drawing. Not good at all for performance.
2015-12-28 17:55:03 +01:00
1dcae9e309 Fix T47045: add some missing UI i18n translations to texture buttons and freestyle render messages. 2015-12-28 17:46:48 +01:00
6c99d342d8 Minor cleanup (paranoid checks) and fixes from coverity. 2015-12-28 16:48:35 +01:00
6f1c44e611 Some fixes from coverity (only one really nasty, in paint_proj). 2015-12-28 16:09:06 +01:00
1a246afe03 Cycles: Use different approach for SVM summary report
Use Summary structure to collect all summary related on the shader compilation
process which then could be either simply reported to the log or be passed to
some user interface or so.

This is type of the summary / report which is most flexible and useful and
something we could use for other parts like shader optimization.
2015-12-28 19:42:37 +05:00
b26fb531f3 Cleanup: style, indentation 2015-12-29 01:08:41 +11:00
61d6fa92c5 Correct recent error passing NULL to fclose 2015-12-29 01:01:20 +11:00
0ae2ade17a Cycles; Fix typo in the comment 2015-12-28 19:01:26 +05:00
18ccc6f960 Cycles: Log basic statistics of SVM compilation process 2015-12-28 19:01:07 +05:00
bb53c28704 Ceres: Remove suitesparse related files
It's quite small chance we'll be supporting suitesparse for Blender due to all
the complexity of 3rd party libraries, so removing implementation files which
are only needed when suitesparse is enabled.
2015-12-28 16:37:48 +05:00
738f6d8127 Cycles: Implement node deduplication routines
The idea of this commit is to merge nodes which has identical settings
and matching inputs into a single node in order to minimize number of
SVM instructions.

This is quite simple bottom-top graph traversal and the trickiest part
is how to compare node settings without too much trouble which seems to
be solved is quite clean way.

Still possibilities for further improvements:

- Support comparison of BSDF nodes
- Support comparison of volume nodes
- Support comparison of curve mapping/ramp nodes

Reviewers: brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1673
2015-12-28 16:37:48 +05:00
daf6f5f81e White Balance modifier for the VSE
This snippet creates a white balance modifier for the video sequence editor. It is useful for everyone who likes to set a new white point in the video source (easily via the eyedropper). Just select a point in the source file where you know that it should be white. The algorithm will then shift the colors towards your new white point.

See attached the image for a quick demo.

{F270576}

Reviewers: psy-fi

Reviewed By: psy-fi

Subscribers: Blendify

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1698
2015-12-28 12:16:48 +01:00
225b02fcd6 Fix for building ghost-tests 2015-12-28 21:40:49 +11:00
c6e8353462 Fix possible invalid-index use /w link/path select 2015-12-28 21:26:02 +11:00
641d4e2b7f Cleanup: use BLI_libblock prefix for id functions
- test_idbutton -> BLI_libblock_ensure_unique_name (not only used from UI)
- BKE_rename_id -> BKE_libblock_rename (always pass valid main)

also rename:
- name_uiprefix_id -> BKE_id_uiprefix
2015-12-28 17:21:29 +11:00
6a595bfa66 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/osl/osl_services.cpp
2015-12-28 01:47:29 +01:00
12874c703c Cleanup typo.
Harmless but irritating... :P
2015-12-28 00:37:07 +01:00
f30b0c60cf Switch BKE_smoke from OMP to BLI_task.
Gives a global speedup of about 5% in smoke simulation (as usual, parallelized chunks themselves
are about 15-25% quicker with BLI_task than with OMP), using a simple setup with two generators
(one from mesh, one from particles), an obstacle and a windfield.
2015-12-28 00:37:07 +01:00
d617de965e Fix (unreported) broken BLI_task's forloop func in case we have less iterations that workers.
When called with very small range, `BLI_task_parallel_range_ex()` would generate a zero `chunk_size`,
leading to some infinite looping in `parallel_range_func` due to `parallel_range_next_iter_get` returning
true without actually increasing the counter!

So now, we ensure `chunk_size` and `num_tasks` are always at least 1 (and avoid generating too much tasks too).
2015-12-28 00:37:07 +01:00
7ef10decdb Fix for heap-use-after-free happening in GHOST_EventManager.
Issue was that dispatchEvent might call removeWindowEvents/
removeTypeEvents which will delete the event before we can do so.

To address this, handled events are now put in a separate list.

Reported by psy-fi and reviewed by brecht in IRC.
2015-12-28 00:35:47 +01:00
540ab7a55a Changes to rename_id function:
* Don't copy name before entering new_id function. new_id does that for
us already.

* Take a main argument to make the function possible to use with
different databases

* Append BKE_ to rename_id
2015-12-27 23:22:43 +01:00
c4c3d84d58 Addendum to previous GHOST commit: remove redundant check. 2015-12-27 21:32:19 +01:00
c09ed363bf Minor UI incosistency reported by erickblender on irc. Twist brush is
renamed to Rotate to match the tool name.

It is not actually compulsory that the two must match since users can
change the name of a brush arbitrarily but at least try to have
consistent naming in our defaults.
2015-12-27 21:16:16 +01:00
3e35e32e9d Fix memory leak in GHOST Event Manager.
The events are allocated on the heap, then pushed on a stack. Before
being processed, they are popped from the stack, and deleted after
processing is done. When the manager is destroyed (e.g. application
closing), any remaining event in the stack is detroyed.

Issue is that when the "application closing" event is processed, it is
never freed, because the manager gets destroyed before the call to
`delete` is made and the event is not on the stack anymore.

Now events are left on the stack while they are processed, and only
popped and deleted after processing is done.

As a slight bonus refactor: use void as return type for dispatch events
functions, as no caller is checking the return value, and it is not
clear what it means (suggested by the reviewer).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1695
2015-12-27 18:08:44 +01:00
a36b522869 CMake: make install prefix option irrelevant for MinGW too. 2015-12-27 16:57:43 +01:00
fcc68a02e9 Fix T47064: Change Audio defaults to 48 kHz
Historically blender had an audio sample rate of 44.1 kHz as default which is mostly popular because it's the sample rate of audio CDs. Audaspace kept using this default from the pre 2.5 era. It was about time to change to 48 kHz, which is a more widespread standard nowadays, especially in video. It is the recommended sampling rate of the Audio Engineering Society.

Further reading: https://en.wikipedia.org/wiki/44,100_Hz#Status
2015-12-27 16:33:54 +01:00
0a118317fc BMesh Path Select: Face Stepping Option
Supports diagonal paths for verts and faces,
Selects edge-rings with edges.
2015-12-27 22:39:25 +11:00
3afa72b6c7 BMesh: BM_loop_share_edge_check utility func 2015-12-27 22:39:22 +11:00
3fcf535d2e Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all.

This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.

id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.

New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.

Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.

Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1683
2015-12-27 12:00:33 +01:00
ec2ca11cba BMesh Path Select: Add checker-select options
Allows to quickly select alternate elems in a path (matching checker-deselect options).

- adds redo support to MESH_OT_shortest_path_pick, allowing for other options.
- de-duplicates code between 2x path select operators.
- expose 'Topology Distance' property for path picking.
- remove unused 'extend' property.
2015-12-27 19:35:33 +11:00
d020b4ca91 BMesh: extract int/bmesh element access funcs.
Support getting an vert/edge/face from a single index, useful for operator redo.
2015-12-27 18:05:34 +11:00
f820c45534 WM: add checker_interval utility functions 2015-12-27 18:01:11 +11:00
b254905c38 Move generic operator props into own file
This is unrelated to core operator internals, so move into own file.
2015-12-27 17:21:00 +11:00
0cc98f9023 Fix for error w/ QtCreator project builder
cmake_qtcreator_project.py now takes a '--build-dir' argument.

Since introduction of argparse, accessing last argv from project_info is no longer working.
Now require a call to project_info.init before use.
2015-12-27 17:11:44 +11:00
700c40e2f9 OpenGL: stipple support added to basic GLSL shader
The is intended to replace the deprecated glPolygonStipple() calls with a shader
based alternative, once we switch over to GLSL shaders.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1688
2015-12-26 22:15:23 +01:00
58cf3327e4 CMake: Disable some features when using MinGW and full cmake config 2015-12-26 20:07:40 +05:00
4415e52009 CMake: Fix errors building by MinGW
Some libraries are nto updated for MinGW hence build system
needs some exceptions for this compiler.
2015-12-26 20:01:17 +05:00
Julian Eisel
4332a56742 Support custom project names 2015-12-26 20:45:18 +11:00
0d7d317755 BMesh: add checks for duplicates in a face
These could go un-noticed, causing errors later on.
2015-12-26 15:34:55 +11:00
77c3ecf88c BMesh: check at least 2 edges in each loops vert
Also no need to check twice
2015-12-26 15:34:55 +11:00
dd070c6c32 Cleanup 2015-12-26 15:34:55 +11:00
66030d8c22 Minor cleanup. 2015-12-25 15:53:18 +01:00
4d5b7fedde MOD_UVWarp: switch from OMP to BLI_task.
Usual 10%-15% speedup. Note that here OMP was rather erratic, with typical
timing about 10% slower than BLI_task, but having some 'burnouts' (~10% of times)
were it would be over ten times slower than usual... BLI_task looks much more stable.
2015-12-25 15:52:14 +01:00
83addc0a1d Cleanup: SubsurfaceScatteringNode is a subclass of BsdfNode, no need to set the value again. 2015-12-25 11:58:52 +01:00
be303589bc Fix (unreported) do not show 'appearances' options tool panel in ParticleEdit mode (not supported). 2015-12-24 18:54:35 +01:00
5cd1b530c8 Cleanup: use enum for bmesh_elem_check 2015-12-25 02:10:00 +11:00
9a1ea681e6 BMesh: remove doubles fix/optimization
Changes to remove doubles face creation,
Recent change to remove doubles broke when the new faces already existed (rare occurrence),
however theres no point to return an existing double face.

Now check if the face exists before creating it.

Other changes:

- avoid 2x hash lookups on all mapped verts.
- fill in the vert array instead of calculating from edges.
- remove inefficient search of entire edge-array before adding to it.
  (flag verts to ensure they're not used multiple times).
- move logic for transfusing edge-flags to edge creation.
2015-12-24 20:30:05 +11:00
4a356d767b BMesh: BM_verts_from_edges utility function 2015-12-24 20:30:02 +11:00
c8c7d04d69 Add STACK_CLEAR macro 2015-12-24 20:05:45 +11:00
8e07b87866 Cycles: Fix Tile access in the TileManager for viewport rendering
- When rendering in the Viewport, next_tile is sometimes called after a reset has been performed, but before
  new tiles were generated. In that case, the tile list would be invalid, causing Blender to crash randomly.
- When generating new tiles, the TileManager would not clear the tile lists before re-generating them, leading
  to some tiles being skipped during viewport rendering.
- When popping the next tile from a tile list, a reference to the just-deleted object would be returned, now the
  object is copied before deleting it.
2015-12-24 01:42:59 +01:00
059b7a81e2 Cycles: Implement constant fold for the ConvertNode.
This way socket type conversions (such as color to float, or float to vector) do not stop the folding process.
Example: http://www.pasteall.org/pic/show.php?id=96803 (selected nodes are folded).
2015-12-23 21:48:19 +01:00
1a2b5d9a8b Fix a few warnings with Apple LLVM 7.0.2. 2015-12-23 20:39:03 +01:00
93c75bf992 Fix T47051: cycles viewport textured shadeless draw bug. 2015-12-23 20:38:58 +01:00
eb6a8e4321 Update Link to the Blender Store. 2015-12-23 17:53:36 +01:00
083d6d63c8 Fix weld edges into faces splicing verts that shared a face
This could happen with degenerate faces.
2015-12-24 03:36:06 +11:00
6732da8340 Fix weld edges into faces - eternal loop
Would happen with complex edge-nets mixed with faces.
2015-12-24 03:36:00 +11:00
b9dea0f941 Remove BLI_buffer calloc option
This wasn't working reliably (after clear for example), and wasn't used anywhere.
2015-12-24 01:52:54 +11:00
ac782ba31c Fix BLI_buffer_reinit not clearing static flag 2015-12-24 01:51:45 +11:00
9c7d2ff62f Fix error in BLI_buffer_reinit
alloc_size was set incorrectly causing arrays not to be resized correctly.
2015-12-24 01:38:59 +11:00
548eb9eb4b Cycles: Sort tiles in rendering order at construction time
This commit modifies the TileManager to sort render tiles once after tiling the image,
instead of searching the next tile every time a new tile is acquired by a device.

This makes acquiring a tile run in constant time, therefore the render time is linear
w.r.t. the amount of tiles, instead of the quadratic dependency before.

Furthermore, each (logical) device now has its own Tile list, which makes acquiring
a tile for a specific device easier.
Also, some code in the TileManager was deduplicated.

Reviewers: dingto, sergey

Differential Revision: https://developer.blender.org/D1684
2015-12-23 13:14:36 +01:00
9e6a22c7e0 Fix bevel RNA enum/boolean mixup 2015-12-23 22:37:24 +11:00
36f916f200 Math Lib: clamp closest_to_line_segment_v# when segment has no length
For a line this makes sense but segments should clamp,
avoids assert in edge-rip.
2015-12-23 22:08:15 +11:00
b06f004d5b Fix issue w/ transform orientation & vert selection
Accessing selected verts as an array failed when only
some of the selected verts were in the selection-history.
2015-12-23 21:31:22 +11:00
ee9d60b033 Remove feof check for file reading
This wasnt correct since we're not reading past the stream,
though it worked on Linux and some Windows systems.
2015-12-23 17:45:46 +11:00
e74a023309 Disable calculating manipulator while transforming
Gives ~10% speedup
2015-12-23 16:35:13 +11:00
44b593ae2d Add BM_vert_edge_pair utility function 2015-12-23 16:08:23 +11:00
b51f730b0c Fix error in BM_vert_is_edge_pair
Returned true for verts with a single edge.
2015-12-23 16:08:20 +11:00
b3e94791d3 Typo in last commit 2015-12-23 15:11:54 +11:00
21b91bc764 Select Linked: only use seam delimit for faces
Delimiting on seams was only ever intended for face selection,
Previously this option didn't work for vertices,
now it's fixed the defaults aren't right for vertex/edge select-linked.

Add a workaround that bypasses operator-defaults - since this is such a rare case.
2015-12-23 15:08:58 +11:00
071a69fc95 Fix T47003: OpenGL draw missing selection highlight when using hidden wire. 2015-12-22 20:56:36 +01:00
eabf79e40a Get rid of OMP in MOD_build.
Reasons:
  - Only parallelized piece of code gives little local speedup (code block only about 25% quicker even on 1M polys cube).
  - No gain nor loss using new BLI_task system.
  - At 10% of build, parallelized piece of code is only about 5% of total func runtime (run-time explodes as build proportion increases).

See no point in adding (in utmost best optimistic case, in real use-case, when  depsgraph will likely already fire several evaluations in parallel,
speedup would be even smaller) 1% speedup here at the cost of threading complexity...

Note that since later code uses hashes, I don't think it's easy to thread it, so think we can leave with it for now.
2015-12-22 20:13:50 +01:00
b176206b94 View3D: measure smoothview angle comparing quat angles
Rolling the view registered as no angle-difference.
2015-12-23 05:23:04 +11:00
3e903794f4 View3D: Rotate around selected support for view-roll 2015-12-23 05:23:04 +11:00
642b77ef0e Fix T31605: Nupad ignores Rotate around selection
Add support for smooth-view orbiting a point besides the view center.
2015-12-23 05:04:52 +11:00
0241e28049 Fix error orbiting out of camera + orbit-selected
Would use the wrong view center (that wasn't update from the camera).
2015-12-23 04:09:15 +11:00
c86395c02d View3D: use c99 compound literals for smoothview params
Smooth-view functions took many arguments which were often NULL,
now take struct instead.
2015-12-23 02:50:50 +11:00
887829e3d8 Cleanup: Remove comments, now that we have the dedicated constant fold functions, it's obvious. 2015-12-22 14:02:57 +01:00
377b52be2e Cycles: Constant fold for the Gamma Node. 2015-12-22 13:53:13 +01:00
ba82981a2f Rename mesh operators
- use 'Intersect' prefix for boolean and regular intersection.
  hints that they use the same basic logic with different modes.
- 'split by edges' while correct - isn't very descriptive.
2015-12-22 17:12:32 +11:00
6d10bf7c44 Fix bad selection after symmetrize
Weld verts now keeps original faces so callers don't need to keep track of newly created face data.
2015-12-22 16:41:01 +11:00
a9c881f6a3 BMesh: store stackdepth as an index
Avoids -1 all over.
2015-12-22 16:41:01 +11:00
Dalai Felinto
ee2b583a05 Cycles-Bake: Fix Uninitialised value created by a heap allocation
This was causing some random black bakes. It was introduced in of of the commits replacing calloc by malloc. Things should be better now.

This error was only noticeable when baking the selected objects (not when baking from selected to active).
2015-12-21 15:31:48 -02:00
39d11352e0 UI: fix minor glitch copying small float value
Would copy 0.0 when button displayed 0.0000001.
2015-12-21 19:26:15 +11:00
5fef3c3326 BLI_storage: Split text/binary version of mem-from-file funcs
Fix T47022, caused by own commit de0119d08
2015-12-21 18:16:14 +11:00
46af314bd9 CMake: disable warning 4146
This is warning on noisy (false positives).
2015-12-21 14:54:36 +11:00
10cf7499e7 Fix T47023: Boolean w/ empty mesh didn't transform 2015-12-21 14:41:05 +11:00
580067769c Cleanup: remove unused file 2015-12-21 13:13:52 +11:00
32be51dc66 Cleanup: warnings (msvc)
Part of patch D1670 by @LazyDodo
2015-12-21 13:02:38 +11:00
6f22494140 NewDepsgraph: Fix typo tagging wrong flag.
Tagging NodeTree->flag instead of NodeTree->id.flag, not sure if this fixes something, but...
2015-12-20 23:06:18 +01:00
fdcec62dad Cleanup: invalid comment & style 2015-12-21 00:14:41 +11:00
008e7701c5 Buildbot: Cleanup unused code
- Remove deprecated/unused builders
- Remove unused SCons OSX slave configuration
- Remove SCons slave logic, it is not giving error about unknown building
  system used for the slave.
2015-12-20 15:44:53 +05:00
db6da8af85 Buildbot: Make sure optiosn override are passed after the config file 2015-12-20 15:32:59 +05:00
f01714506a Buildbot: Disable CUDA binaries for 32bit OSX slave
Funny thing, 32bit OSX slave was always building 64bit CUDA kernels
and nobody never noticed this..
2015-12-20 15:19:02 +05:00
3566d0d3a6 Buildbot: Update master config file 2015-12-20 14:49:54 +05:00
2fff2f651e Buildbot: Disable some unsupported features for 32bit OSX CMake slave 2015-12-20 14:22:34 +05:00
5a5b540356 Buildbot: Fix wrong architecture passed to CMake 2015-12-20 14:12:43 +05:00
101341845c Buildbot: Use proper archive name for CMake OSX slave 2015-12-20 14:12:04 +05:00
03d9f9a619 Buildbot: initial work to enable CMake OSX slave 2015-12-20 13:59:04 +05:00
7ac5f2fef6 Fix T47016: curve tilt value in N (redo) panel to much precise with mouse dragging.
Let's just use dafaults of angle props here. :)
2015-12-19 16:58:30 +01:00
6703c1df4e Fix shadowing var in own previous commit. 2015-12-19 11:04:56 +01:00
ef49632b24 BGE: Fix unconverted character max jump value from old files.
The bug was introduced in 3dd83b, a little conversion in versioning_270.c
was forgotten. Now max_jumps is set as default to 1.
2015-12-18 23:15:47 +01:00
d0d59ed282 Add a void 'user_data' memeber to Outliner's callbacks.
This is not used currently, but needed for work done in id-remap branch, and will
greatly reduce diff noise in this area...
2015-12-18 22:12:32 +01:00
82921ce420 OpenSubdiv: Avoid having bad-level call
This is always asking for problems. Additionally, that call was leading
to OpenGL calls happening from threads.
2015-12-18 23:16:52 +05:00
672f2efbe6 Cycles: Log OSL texture system statistics after finishing the render 2015-12-18 21:50:30 +05:00
349affe370 Cycles: Implement proper texture derivatives evaluation for OSL
This was an oldie TODO since initial work on newer OSL/OIIO support.
Now we should be ready for the libraries bump.
2015-12-18 21:50:30 +05:00
63015d3a09 Fix T47009: Value typing issue in pie menu.
When we have an active button in modal state, completely bypass the whole 'pie' handling part of the menu.

Note that behavior is probably still not ideal here (e.g. would be nice to avoid enter/escape to quit
completely the pie menu in that case - but on the other hand Pies were not really designed to handle
that kind of modal stuff either, so think having minimal support for it is enough for now.
2015-12-18 16:32:51 +01:00
60917c35e7 Cleanup: use unpacking generalization 2015-12-18 22:27:03 +11:00
73a5e4afa9 Fix T46946: EdgeSlide via G-G disables 'Correct UV' 2015-12-18 18:25:37 +11:00
f81d8e7fe1 Add wrap argument to cycle wm utility funcs
Now zooming text in the console and text editor isn't wrapping from large/small font size (annoying).
2015-12-18 16:17:13 +11:00
4644f08685 Fix T46998: Console zoom doesn't update scrollbars 2015-12-18 16:02:31 +11:00
df6264f528 Fix T46959: sys.meta_path reset on on exit 2015-12-18 03:00:38 +11:00
70273114a1 Cleanup: quiet warning 2015-12-18 02:46:08 +11:00
1554a4c2a0 Transform: bend-mouse-input error initializing
Missed from transform-mouse-input changes.
2015-12-17 19:45:29 +11:00
4123b30323 BMesh: split-by-edges minor fixes
- select all newly created edges
- remove redundant edges (not essential but nicer output).
2015-12-17 18:10:04 +11:00
b6a49eb949 BMesh: add BM_face_share_vert_check/count 2015-12-17 18:06:05 +11:00
d7723df846 BMesh: partial-connection could make duplicate edges
Avoiding to make duplicate edges is too involved, do a remove-duplicates pass at the end instead.
2015-12-17 18:03:46 +11:00
9f84d5e546 Revert "3D Cursor: Add option to lock it in place to prevent accidental modification"
This reverts commit a791153ca5.

Rather users get feedback on changing cursor-depth,
instead of preventing 3d-cursor placement entirely.
2015-12-17 14:58:21 +11:00
Eberhard Höpfner
d970f02ee1 Fix particle count being grayed out when emitting from verts, but grid is on.
Differential Revision: https://developer.blender.org/D1675
2015-12-17 01:35:09 +01:00
88191f7fa3 BMesh: support connecting single-edge island links
Handle these cases by temporarily disconnecting the single links to ensure isolated islands,
then link back up after.
2015-12-17 05:13:57 +11:00
8b1b320c9f BMesh: utility function to split off wire edges 2015-12-17 05:02:14 +11:00
901b0dea62 cleanup: C99
- for loop scope
- tighter scope on local vars
- more bool
- more const
2015-12-16 01:26:41 -05:00
ee59df521f BGE clean up: use float version of trigonometric functions 2015-12-16 01:53:48 +01:00
0c19a043e8 BGE Ketsji clean-up: double-promotion warnings 2015-12-16 01:53:48 +01:00
5b33115070 Cycles: Fix wrong assert failure happening after recent de-duplicate
This is actually intended behavior to return NULL when the socket is not
found. It's used in certain BSDF nodes to query whether some inputs exists
or not.

Perhaps we can be more explicit here and have dedicated logic to query
socket existance and keep assert in place.

In any case, even if we lost assert() for the constant fold now it's
still somewhat better than duplicated code. Perhaps.
2015-12-15 21:01:56 +05:00
baaf10cb26 Cycles: De-duplicate utility functions in ccl::Graph 2015-12-15 20:04:35 +05:00
Julian Eisel
669fdca681 Temp workaround: Object mode pie glitches since 'Edit Strokes' mode was introduced
To ensure all items of a pie are always at the same position, invisible dummy buttons were added for unavailable items. This caused mainly two issues: Command line printed warning because of the > 8 elements, and some modes weren't visible in some cases ('Object Mode' entry was missing in stroke edit mode).
To solve this nicely, we had to support > 8 items per pie. Will look into that this week, but for now, drawing dummy buttons is disabled.

From a user POV this has two ugly consequences: 1. While this temporary workaround is used, *some* pie items are positioned differently than before, 2. The 'Edit Strokes' mode entry might change its position depending on the amount of available modes.
2015-12-15 15:47:58 +01:00
c5e99abe70 Temporary solution for Add/Subtract toggles being meaningless for some GPencil brushes
For now, we just change the labels of these toggles so that it makes sense what
results we should expect from each. A better solution may be to create separate
"direction" props for the different brush types here, so that we can also define
more appropriate tooltips too to go with the labels.
2015-12-16 02:59:24 +13:00
2339a84443 Compositor: Expose track velocity via the Track Position node
velocity is measured in pixels per frame. It is basically a coordinate
difference of track coordinate at current frame and previous one (no future
prediction happens).

It's not really most intuitive place for such a things, but historically the
node was called this way..

Track velocity could be used to face effects like motion blur bu piping it
to the vector blur node.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: hype, sebastian_k

Differential Revision: https://developer.blender.org/D1591
2015-12-15 13:57:15 +05:00
879889c47c Correct own error in knife edge-net cutting
Need to ensure no duplicate edges in the array.
2015-12-15 18:44:21 +11:00
fa3fe2ee10 Cleanup: math lib naming
Distinguish between line / line_segment
2015-12-15 18:16:41 +11:00
a7c7ae5bf7 Cleanup: math lib naming
Rename not-very-descriptive (p1, d) -> (ray_origin, ray_direction)
2015-12-15 18:15:10 +11:00
87791c611d Cleanup: consistent naming for closest_to_line api 2015-12-15 17:49:31 +11:00
008c1dbb94 BMesh: split-py-edge now splices verts into edges
Edge chains spanning faces or ending without a connecting edge
are now supported by splicing verts into the face boundaries.
2015-12-15 16:23:25 +11:00
2180b38513 Fix split-py-edge assuming valid face indices
Also reduce variable scope
2015-12-15 16:13:49 +11:00
50d92aaf15 OpenGL: remove utility functions that take doubles
Kill these before someone is tempted to use them! Discourage use of fp64
generally.
2015-12-14 22:40:41 -05:00
87fac9a816 use float (not double) for font matrix
Following up on recent double --> float commits in the game engine.
2015-12-14 22:28:12 -05:00
17a16b57df Fix T46936: cycles GLSL should not draw outlines for transparent materials. 2015-12-15 02:09:00 +01:00
31d1895abf Fix T46951: invalid OpenGL mipmaps when using high bit depth textures. 2015-12-15 01:47:48 +01:00
Julian Eisel
7fa72b8970 Fix 'change path' opening file browser with wrong filter for sound strips
Changing path of a sound strip (select strip->C->'Path/Files') opened a file browser without filter for sound files, so sound files weren't visible.
Also, for movie/image files, now only movie **or** image files are visible in the file browser by default (instead of both).

Reported by @venomgfx, thanks!
2015-12-15 01:05:40 +01:00
6f6c26bdb4 Usual i18n fixes, and cleanup: fix 'randomise' -> 'randomize' spelling in code. 2015-12-14 19:24:05 +01:00
1fbd74296d Graph Editor: "Add at Cursor" options for Insert Key operator in Graph Editor
* Added the ability to add a keyframe at the current cursor location in the
  Graph Editor. This is useful for precisely defining the shape of driver F-Curves.

* Fixed a bug where the wrong cursor-x time was being used in Drivers mode
  (i.e. it was still using time, and not just any time-value, but the NLA-mapped time!)
2015-12-15 04:03:59 +13:00
236d094865 Fix: NLA Mapping should not apply to keyframes of Driver FCUrves 2015-12-15 04:03:58 +13:00
de0119d087 BLI_storage: util function BLI_file_read_as_mem
Use for text loading and pasting from file.
2015-12-14 17:16:23 +11:00
4510fe82aa BGE Physics clean up: double-promotion warnings 2015-12-14 06:56:50 +01:00
94b34c9d44 BGE Scenegraph clean up: double-promotion warnings 2015-12-14 06:56:50 +01:00
9c53e55db5 OpenGL: system info tweaks
- show extensions one per line in order for easier human scanning
- show DrawElements vertex & index limits
- assume GL version >= 2 for GLSL limit queries
2015-12-13 15:58:01 -05:00
9f6c06595a Cleanup: unused args 2015-12-14 03:24:42 +11:00
a791153ca5 3D Cursor: Add option to lock it in place to prevent accidental modification
This option helps users protect themselves from accidentally changing the cursor
location (and not being aware of this until it has already caused problems)
when drawing using Grease Pencil (or with other tools where this is equally likely).
It seems to occur most frequently when using a tablet.

Currently, this only affects the use of the mouse to set the cursor, as this is
where most accidental invocations occur.

(I'm aware that this change may turn out to be quite contentious. Fortunately, it
should be simple to just revert this commit in that case :)
2015-12-14 03:06:51 +13:00
003523e700 Removed duplicated define 2015-12-14 03:06:51 +13:00
ab0b0efe82 Dopesheet: Mirroring GPencil keyframes now works again 2015-12-14 03:06:50 +13:00
a27477b9e8 Dopesheet: IKEY (Insert Keyframe) operator now works in GPencil Mode
It will create blank keyframes, or copies of the prevailing keyframe,
depending on whether "Additive Drawing" is enabled or not.
2015-12-14 03:06:49 +13:00
66a6491782 Fix yet one more Intel driver with crappy dfdy support in offscreen
buffers
2015-12-13 14:25:46 +01:00
a158a74700 BMesh: split-face by edges support isolated edges
Previously edges needed to be connected to the faces.
2015-12-14 00:16:09 +11:00
b7090b3d1c BMesh: replace BLI_array w/ BLI_buffer
Also reuse temporary buffer between calls.
2015-12-14 00:16:09 +11:00
81b32e88a3 BMesh: add BKE_bmbvh_find_face_closest 2015-12-14 00:16:05 +11:00
cecdd13a2b GP Sculpt: WheelUp/Down can be used to control brush size/strength while a sculpt stroke is in progress 2015-12-14 01:12:42 +13:00
94265057b5 Fixed incomplete comment 2015-12-14 01:09:28 +13:00
46218dc9f9 Fix: unreported crash with misconfigured nvidia opengl drivers 2015-12-13 10:36:52 +00:00
fa4a9c7ae6 BMesh: don't use total faces to detect edits
Possible a boolean operation edits the mesh while keeping the same number of faces.
2015-12-13 19:55:21 +11:00
e47397c7d2 BMesh: no need to tag edges created to fill holes
Was selecting these edges after applying boolean,
which isnt useful since selection is supposed to be along the cuts.
2015-12-13 19:55:21 +11:00
d6ee328c92 Cleanup: style/warnings 2015-12-13 19:55:17 +11:00
fd5d4cfeff GPencil: Bump subversion and ensure that the datablock-level onionskinning flag is set correctly 2015-12-13 21:09:47 +13:00
a1f87064c4 Grease Pencil: Merge GPencil_Editing_Stage3 branch into master
This commit merges all the work done in the GPencil_Editing_Stage3 branch
as of ef2aecf2db into master. For more details
about the changes that this brings, see the WIP release notes:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/GPencil
2015-12-13 21:03:13 +13:00
d9ee88d126 BGE Rasterizer clean up: double-promotion warnings 2015-12-13 03:20:27 +01:00
0dcca69589 Moto Clean-up: double-promotion warnings 2015-12-13 02:56:30 +01:00
6329e20cbb BGE: Use float as default instead of double in Moto library.
Use float in moto instead of double for MT_Scalar.
This switch allow future optimization like SSE.
Additionally, it changes the OpenGL calls to float versions as they are
very bad with doubles.

Reviewers: campbellbarton, moguri, lordloki

Reviewed By: lordloki

Subscribers: brecht, lordloki

Differential Revision: https://developer.blender.org/D1610
2015-12-13 02:09:05 +01:00
9df6a539a2 Knife: use BM_face_split_edgenet for detecting holes
Knife had its own code for detecting holes which worked quite well,
but would prefer to use generic bmesh API call here.
2015-12-13 03:46:36 +11:00
f117f45d86 Correct own mistake in 3e499c1a 2015-12-13 01:57:57 +11:00
c61c312f97 Use material remapping for bmesh-boolean 2015-12-13 00:40:44 +11:00
c1cfdc59a3 Fix T46958: NLA Editor's 'Add Modifier' button is the wrong size on Retina Display 2015-12-12 23:10:07 +13:00
dc98a3b0a7 Cleanup: style/spelling 2015-12-12 15:10:03 +11:00
ebf9d315c4 BMesh: editmode booleans ignored when no faces cut
For the intersect tool this made sense, but booleans can use cuts which overlap edges exactly.
2015-12-12 13:58:03 +11:00
189032c724 Correct error in last boolean commit
Side was flipped
2015-12-12 13:15:09 +11:00
Arnaud Degroote
aae93ae4c6 BGE: Improve clock management
This patch improves clock management in BGE, to be able to accelerate /
slow the time, and also to finely synchronize clock with external
engines. Several new python functions have been added and existence ones
have been improved for that purpose. Now we have:

- getClockTime(): Get the current BGE render time, in seconds. The BGE
render time is the simulation time corresponding to the next scene that
will be rendered.

- getFrameTime(): Get the current BGE frame time, in seconds. The BGE
frame time is the simulation time corresponding to the current call of
the logic system. Generally speaking, it is what the user is interested
in.

- getRealTime(): Get the number of real (system-clock) seconds elapsed
since the beginning of the simulation.

- getTimeScale(): Get the time multiplier between real-time and
simulation time. The default value is 1.0. A value greater than 1.0
means that the simulation is going faster than real-time, a value lower
than 1.0 means that the simulation is going slower than real-time.

- setTimeScale(time_scale): Set the time multiplier between real-time
and simulation time. A value greater than 1.0 means that the simulation
is going faster than real-time, a value lower than 1.0 means that the
simulation is going slower than real-time. Note that a too large value
may lead to some physics instabilities.

- getUseExternalClock(): Get if the BGE use the inner BGE clock, or rely
or on an external clock. The default is to use the inner BGE clock.

- setUseExternalClock(use_external_clock): Set if the BGE use the inner
BGE clock, or rely or on an external clock. If the user selects the use
of an external clock, he should call regularly the setClockTime method.

- setClockTime(new_time): Set the next value of the simulation clock. It
is preferable to use this method from a custom main function in python,
as calling it in the logic block can easily lead to a blocked system (if
the time does not advance enough to run at least the next logic step).

Rationale are described more precisely in the thread
http://lists.blender.org/pipermail/bf-gamedev/2013-November/000165.html.

See also T37640

Reviewers: sybren, panzergame, #game_engine, lordloki, moguri

Reviewed By: sybren, panzergame, #game_engine, lordloki, moguri

Subscribers: moguri, hg1, sybren, panzergame, dfelinto, lordloki

Projects: #game_engine

Maniphest Tasks: T37640

Differential Revision: https://developer.blender.org/D728
2015-12-12 02:46:53 +01:00
e089b1f08b Fix T46945: Mesh Deform binding to a cage object with modifiers is unreliable.
Binding code was re-building its own DM for the cage, now it uses given one instead.
I cannot see really any good reason not to use 'visual' modified cage for binding process,
using base mesh instead was breaking any 'advanced' binding as described in the report.
2015-12-11 17:26:21 +01:00
8729e23f2d Fix for invalid void* to typed pointer assignment in bmesh when used in C++ code.
C++ does not allow the assignment of a void pointer to a typed pointer without
explicit casting. Since we use a generic macro in bmesh for iterators we only
ever get a void* back and cannot cast it to the target type. However, casting
the target to a void* as well solves that issue.

This tweak is #ifdef'd to be used in C++ code only.
2015-12-11 16:18:42 +01:00
e301fcf8e7 Commend timing prints for boolean 2015-12-12 01:30:03 +11:00
fa32cde8a8 BMesh: boolean wasn't ignoring hidden faces
Needed for editmode use
2015-12-12 00:52:38 +11:00
3c3d38dd02 Fix T46949: Latest blender builds are using shared pcre and xml2 libraries 2015-12-11 17:18:37 +05:00
8cd7b42877 BMesh: Add option to use BMesh boolean modifier
This uses a bmesh-intersection, BLI_kdtree and watertight intersections to perform boolean operations.

For now keep both BMesh and Carve booleans usable at once for testing & bug reports,
however we plan to phase out Carve by next release.
2015-12-11 20:24:39 +11:00
8ae8b62a0e Use Python3.5's unpacking generalizations 2015-12-11 18:14:02 +11:00
1c742b4e9a Mistake in last commit 2015-12-11 18:12:46 +11:00
d70e0b6654 BMesh: Boolean as an edit-mode tool
Works much the same as intersect operator,
expose as a new operator since for users its quite different.

Access from face menu.

Internally, this adds boolean args to BM_mesh_intersect function.
2015-12-11 17:54:42 +11:00
9f3ed82f35 Correct error in recent commit w/ hole-filling
edge-groups weren't being sorted with 2d-coords applied.
2015-12-11 16:18:24 +11:00
dde4fc63ff Fix T46951: GLSL draw mode missing some textures. 2015-12-11 03:03:33 +01:00
c593855b29 BMesh: hole support for intersect tool
Support cutting many outlines into a single face (creating edges between isolated regions).
2015-12-11 12:01:22 +11:00
bb4bff3576 BMesh: Add BM_face_kill_loose
Removes edges/verts that become unused.
2015-12-11 12:01:22 +11:00
37c6a207ce Memutil: remove some unused code. 2015-12-11 01:48:26 +01:00
c7122b5391 IK Solver: remove unused and outdated test code. 2015-12-11 01:42:41 +01:00
8a66d4966a Moto: remove some unused code. 2015-12-11 01:40:56 +01:00
becc85c5d4 Math Lib: 2d ray-segment intersection function 2015-12-11 11:27:00 +11:00
6e4802d712 IK Solver: replace TNT math library with Eigen.
Performance is about the same or slightly better for typical IK chains.
In extreme cases with many bones and multiple targets, of which some are
unreachable, I've seen 2x speedups.
2015-12-11 00:59:00 +01:00
aaa627d5f5 IK solver: replace Moto math library with Eigen. 2015-12-11 00:59:00 +01:00
810f825a39 MSVC 2015 fix, /WX warnings as errors is to restrictive for msvc 2015 currently for bmesh 2015-12-10 17:23:59 +01:00
e9825ad9f3 MSVC 2015 fix hack around internal compiler crash on openmp atomic
Eigen3 bug report: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1131
2015-12-10 15:00:30 +01:00
2f57b1cece Fix for mistake in intersect duplicate list check
In practice this hardly ever happened.
2015-12-11 00:45:38 +11:00
dd4e198636 Cycles: fix memory leaks.
They were all pretty obvious...
2015-12-10 13:56:57 +01:00
5452df7984 BMesh: minor optimization for intersect
Avoid double lookup on insertion ghash
2015-12-10 23:42:52 +11:00
3930356970 Merge branch 'master' into openvdb 2015-12-10 12:56:11 +01:00
Martijn Berger
9ad13d70fa Update Eigen to version 3.2.7
The main purpose of this is to get MSVC 2015 fixes
2015-12-10 12:37:46 +01:00
ffc750a4fa Begin to add some MSVC 2015 support 2015-12-10 11:57:13 +01:00
5f0cf67882 Cleanup: quiet warning 2015-12-10 21:18:50 +11:00
9a990eab0d Use 'peek' instead of 'last' for stack macro 2015-12-10 21:08:10 +11:00
f9047c3f8c Eigen: fold remaining OpenNL code into intern/eigen.
Differential Revision: https://developer.blender.org/D1662
2015-12-10 01:58:10 +01:00
858b680a50 Eigen: move C API into intern/eigen. 2015-12-10 01:58:06 +01:00
14f2ae4bbc install_deps.sh: fix (hopefully) broken OSL building on modern RPM-like distro.
Those stupid ones only have one version of llvm (obviously not 3.4 one ;) ), so we have to build again
LLVM3.4 in those cases. Thing is,
* I did not update LLVM magic number when fixed a stupid typo breaking OSL building (the terminfo thing),
  so many people were still using previously-built LLVM.
* Even worse, options passed to OSL to specify own LLVM from /opt/lib were wrong (not sure when this got
  out of sync...).

Thanks to mib2berlin and slikdigit for the report & testings!
2015-12-09 21:56:47 +01:00
c65cf8659e install_deps.sh: fix utmost stupid typo breaking 'skip-osl' option on RPM-based distro... 2015-12-09 20:49:49 +01:00
d2312eb4cd install_deps.sh: print correct set of sources tested when a wget fails... 2015-12-09 20:46:17 +01:00
19dba67d15 Cycles: Comment out unused arguments 2015-12-09 18:38:02 +05:00
38b9300ae0 install_deps.sh: raise default py version to 3.5.1 (due to some obscure bugs with OPM and 3.5.0). 2015-12-09 14:34:21 +01:00
4cba8d12b9 install_deps.sh: add '-U' update commands to onle-liner CMake-based build command line.
Avoid user to have to edit themselves their CMake config.

Thanks a bunch @campbellbarton for the tip! :D
2015-12-09 14:34:21 +01:00
56a55f2849 CMake: include eigen as a system header 2015-12-09 18:55:18 +11:00
aaa56782d3 BMesh: move BM_face_split_edgenet to its own file
Isolate edge-net splitting in preparation for other functions to be added here.
2015-12-09 16:24:52 +11:00
1898c1f05c Math Lib: add axis_dominant_v3_ortho_single 2015-12-09 14:03:38 +11:00
d7851b87a7 remove a debug printf 2015-12-08 20:13:45 -05:00
0dfc8d6939 OpenGL: split off framebuffer, shader and texture code into separate files. 2015-12-08 19:00:56 +01:00
b25e4b310f OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not need it. 2015-12-08 18:58:52 +01:00
af5784312a Correct recent OpenGL cleanup 2015-12-08 22:52:51 +11:00
b787341b09 OpenGL: use extension form of FBOs
FBOs are a GL 3.0 feature but enjoy nearly universal support via
extensions.

The newer ARB extension brings these features to GL 2.1 without needing
an ARB suffix.

The older EXT extensions *do* use a suffix. Since we don’t know which
is used until runtime, I added the suffix to all functions & enums.

Also updated the check to look for the FBO feature set instead of the
specific EXT extension.
2015-12-08 02:14:09 -05:00
6006173f4a OpenGL: use sized texture internal formats
Maybe this is pedantic but I read it’s best to explicitly set the
desired component size.

Also append “_ARB” to float texture formats since those need an
extension in GL 2.1.
2015-12-08 01:19:55 -05:00
c013d64a0a disable old Mac OpenGL workaround
Comment says this is from the MacOS 10.5 era. Surely it’s been fixed by
now. If nobody complains in the next few months let’s delete this.
2015-12-08 01:19:55 -05:00
c099b86238 OpenGL: simple cleanup
It’s still immediate mode, but at least it’s shorter & clearer.
2015-12-08 01:19:55 -05:00
964107fbce BGE code cleanup: Removing RAS_GLExtensionManager.
This class did nothing but print out extensions if they were found.
Instead, the code from bge.logic.PrintGLInfo() is now printed as the
Rasterizer is initialized. This gives better information, and it removes
some GL code from KX_PythonInit.cpp (the PrintGLInfo method now calls
the Rasterizer to print the information).

Differential Revision: https://developer.blender.org/D438
2015-12-07 19:25:12 -08:00
fe2f3a131d OpenGL/BGE: Remove RAS_StorageIM (glBegin/glEnd rendering of mesh data)
The only use we had for RAS_StorageIM was to render derived meshes using
Blender's mesh drawing. This is now handled as a special case in
RAS_OpenGLRasterizer instead of in RAS_StorageIM.

We are now left with RAS_StorageVA and RAS_StorageVBO. At the moment
vertex arrays are still the default since our vertex array with display
lists implementation is still much faster than our VBO code in a lot of
cases. As we improve our VBO code, we can drop vertex arrays since
Blender's minimum OpenGL version is being bumped up to 2.1, which
supports VBOs.
2015-12-07 19:05:09 -08:00
9d03307033 BGE: Remove RAS_IRasterizer::IndexPrimitivesMulti()
The work that was being done in IndexPrimitiveMulti() is now done by
IndexPrimitive() and we always assume multitexture support.
2015-12-07 19:05:04 -08:00
a4a5d85755 Python: remove support for Python 3.4 2015-12-08 12:35:29 +11:00
187b7257ea Usual UI messages fixes. 2015-12-07 21:06:14 +01:00
de0672436b Add support for compiling the cuda kernel on the Nvidia Jetson TX1 2015-12-07 17:51:24 +01:00
e65c647912 Added a comment to our use of the term 'adjoint' in BLI_math.
In modern usage this means the conjugate transpose, but we stick to
the classical usage (i.e. adjugate matrix), like Eigen does.
2015-12-07 12:35:36 +01:00
9e0757a367 BLI_linklist: add alloca append macro 2015-12-07 19:13:30 +11:00
41a2b97c30 Minor changes needed for standalone mathutils 2015-12-07 11:09:00 +11:00
a048d5f945 OpenSubdiv: refine OpenGL version & extension checks
Use new GPU_legacy_support() function.

Determine GLSL version once instead of per shader.

For Texture Buffers, allow ARB or EXT version of the extension. Either
one will do.
2015-12-06 18:47:58 -05:00
50df05c35c OpenGL: remove old version check
+ minor cleanup
2015-12-06 18:26:10 -05:00
8cfcc444c6 OpenGL: new GPU_legacy_support() function
Is current context compatible with legacy GL (version 2.1)?

My earlier approach -- checking for GLEW_ARB_compatibility -- was not
enough.

This should always return true if we set our GL context up properly. It
will return false when we switch to core profile.
2015-12-06 18:02:07 -05:00
1858823d3b OpenGL: request version 2.1 when creating context on Windows
In practice this gives us a context that is *compatible* with GL 2.1. On
my machine it gives a GL 3.3 or 4.3 compatibility profile context,
depending on graphics card installed.

Also fixed enum for core profile (not used yet).

Also added option for GL 3.2 compatibility profile. This will be useful
during Blender 2.8 development, until we are able to use the core
profile. On my machine this gives exactly a GL 3.2 compatibility profile
context, not 3.3 or 4.
2015-12-06 18:02:07 -05:00
ffabd037bb OpenSubdiv: disable TF on lower GL versions. Fixes T46794
My previous edit to this check was too lax.

OSD's shader for the Transform Feedback evaluator declares itself
#version 410 so disable the feature if user's GL < 4.1.
2015-12-06 18:02:06 -05:00
a3d774e4c9 Cycles: Fold Value and RGB node as well.
This way, connecting Value or RGB node to e.g. a Math node will still allow folding.

Note: The same should be done for the ConvertNode, but I leave that for another day.
2015-12-06 23:47:38 +01:00
c6be3fe997 Fix Scons after GLSL changes. 2015-12-06 23:09:17 +01:00
8d09eecc50 Fix (unreported) Ocean modifier assuming all its faces are quads.
Would be true in most cases (and in particular with own generated geometry),
but in case one would be using original geometry this could have crashed badly.
2015-12-06 21:07:39 +01:00
a78199332b Cleanup in main Ocean modifier code.
Note that I tried to parallelize the loops porting result of the simulation to the
DM data itself, but that ended up being 20% slower than non-threaded code!
2015-12-06 21:07:39 +01:00
4aab21f9be OpenGL: rename simple shader to basic shader. 2015-12-06 19:35:15 +01:00
cf921934b1 OpenGL: use simple shader for texture drawing in a few places.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
147f7a1e86 OpenGL: isolate fixed function lighting in simple shader code.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
42bff8bb1e OpenGL: use simple shader for armatures.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
9821fe6dc2 OpenGL: move two sided lighting check into GPU material code.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
82191b102f OpenGL: pass flag to indicate of drawMappedFaces needs to use normals.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
1eed354e53 Switch Ocean modifier's geometry generation from OMP to BLI_task.
Compared to previous revision, this gives 20% speedup on the whole modifier evaluation!

Wondering a bit how improvement can be so impressive here, would have expected very
small increases given how simple is the code here... Maybe it's the fact we get rid
of many additional OMP threads (tests are done with ten Ocean mod evaluated in parallel)?
2015-12-06 18:59:20 +01:00
e1698860ad Fix T46929: error exporting Key configuration. 2015-12-06 17:52:50 +01:00
b36a0c44bb Switch from OMP to BLI_task in BKE's part of Ocean simulation.
Not much to say, gives about 8% to 9% speedup in ocean simulation.
2015-12-06 17:37:10 +01:00
deec6ed901 install_deps.sh: Fix typos in scons instructions.
Luckily we'll soon get rid of that insane dual build system maintenance...

Anyway, thanks to Leo Koppel (lack) for the report and patch.
2015-12-06 12:04:23 +01:00
9964eed9ac PyAPI: add optional filter argument to KDTree.find 2015-12-06 21:35:32 +11:00
54b95c30ae BKI_kdtree: add a find that takes filter callback
Useful when we need to selectively ignore nodes.
2015-12-06 21:29:06 +11:00
ee719e8816 Cleanup: formatting (PyArg_ParseTuple) 2015-12-06 16:19:45 +11:00
13a578edb4 Cleanup: kdtree, redundant root node handling
For range checks we can put the root not in the stack.
2015-12-06 15:57:10 +11:00
8f12dad309 Fix generate UV's adding extra layers
Adding a new meshes when there were no faces would always add a new uv-layer.
2015-12-06 11:22:17 +11:00
ed5dbb0a7b Cycles: Implement extrapolation for RGB curves
Previously RGB Curves node will clamp input to 0..1 which is rather useless
when one wants to use HDR image textures and do bit of correction on them.

Now kernel code supports extrapolation of baked LUT based on first/last two
table points and performs linear extrapolation.

The only tricky part is to guess the range to bake the LUT for. Currently
it's using simple approach -- minmax of the input curves. While this behaves
ok for the simple cases it's easy to trick the system up causing incorrect
results.

Not sure we can solve those issues in a general case and since the new code
is giving more expected results it's not that bad actually. In the worst
case artist migh always create explicit point to make sure LUT is created
for the needed HDR range.

Reviewers: brecht, juicyfruit

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1658
2015-12-06 01:21:14 +05:00
f52720d204 Merge branch 'master' into openvdb 2015-12-05 04:39:53 +01:00
a09a7f022c Fix possible null pointer dereferencing.
When copy-pasting goes bad, though it's unlikely they'll be null.
2015-12-05 04:24:34 +01:00
ecd5904962 Cleanup: self assignement/initialization. 2015-12-05 04:16:04 +01:00
258564a7b4 Fix (unreported) Newly added grid's vertices not being selected.
`bmo_create_grid_exec` was not tagging created vertices with `MARK_VERT`, which seems
mandatory to get them selected? This sounds a bit hacky/odd to me, but that's what
all other primitive funcs do...
2015-12-05 00:48:27 +01:00
76d1201996 Fix OSL shaders building with some versions of that lib.
This must have happened months ago, but as I did not `make clean` any build folder since then,
so only noted that today.

Issue is same as dirty patch we have to apply to ODL sources before building it in install_deps.sh - for
some mysterious reason, it has become impossible to compoile .osl files into .oso ones without
giving explicit output file name (otherwise it just produces `.oso` file - utterly stupid and useless).

We could probably fix that in own OSL source, but think being explicit here does not hurt anyway, so...
Let's go the easy way.
2015-12-05 00:17:04 +01:00
3c6709a63c Fix T37879: Default UV generation for mesh primitives.
Adds default-generated UVs to mesh primitives (cone, cylinder, icosphere, uvsphere, cube, circle, grid)
when they are added to the scene, since some of them can be pretty awkward to unwrap manually.

Original patch: Liam Mitchell (CommanderCorianderSalamander).
Main review work: Campbell Barton (campbellbarton).
Finalization, fixes and cleanup: Bastien Montagne (mont29).

Reviewers: mont29, #mesh_modeling, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: lkruel, campbellbarton, michaelknubben, kevindietrich

Maniphest Tasks: T37879

Differential Revision: https://developer.blender.org/D481
2015-12-04 23:49:55 +01:00
24be453938 Fix (unreported) bad LI_ID usercount when linking a new lib.
Library datablocks shall have a zero user count in Blender currently...
2015-12-04 17:24:21 +01:00
50f17db641 Fix for too small array of function pointers in node RNA registration. 2015-12-04 17:14:33 +01:00
ab4325c07a Have to allow DNA writes in node insert_link callback in order to do anything useful with it. 2015-12-04 10:25:31 +01:00
7ec5a43051 Disable node updates while applying links from the dragging operator.
This prevents issues with reentrant update callbacks and modification
of the node tree while the operator still holds pointers to it.
2015-12-04 09:20:08 +01:00
a9a02490ce Use int division for version string 2015-12-04 08:49:59 +11:00
c8fc55d594 Buildbot: Remove windows + scons related code
This is also has been moved to the CMake, no need to keep old dying code around.
2015-12-03 22:47:40 +05:00
d1c597e0e1 Buildbot: Remove linux scons buildbot related things
It is now totally covered by cmake slave.
2015-12-03 22:35:50 +05:00
9d0d2fb209 Buildbot: Re-enable CUDA binaries for 64 bit linux slave
Also make it a bit more reasonable name for config files.
2015-12-03 22:24:27 +05:00
dc0c648914 Buildbot: User proper folder name inside of the archive
This is totally matching the way how buildbot was naming the directory.

Currently there's a bit of code duplication, but it'll be eliminated once
we'll get rid of SCons ;)
2015-12-03 22:10:59 +05:00
23c670ea0d Buildbot: Remove debug-only early exit 2015-12-03 21:59:42 +05:00
334955c3e6 Buildbot: Strip all .so files from python install 2015-12-03 18:04:13 +05:00
51e59fa90f Buildbot: No need to build player with blender config 2015-12-03 17:40:12 +05:00
7f759ec547 Node callback for handling link insertion and swapping of occupied inputs.
Nodes have a feature for moving existing links to unoccupied sockets when connecting
to an already used input. This is based on the standard legacy socket types (value/float,
vector, color/rgba) and works reasonably well for shader, compositor and texture nodes.

For new pynode systems, however, the hardcoded nature of that feature has major drawbacks:
* It does not take different type systems into account, leading to meaningless connections
  when sockets are swapped and making the feature useless or outright debilitating.
* Advanced socket behaviors would be possible with a registerable callback, e.g. creating
  extensible input lists that move existing connections down to make room for a new link.

Now any handling of new links is done via the 'insert_links' callback, which can also be
registered through the RNA API. For the legacy shader/compo/tex nodes the behavior is the
same, using a C callback.

Note on the 'use_swap' flag: this has been removed because it was meaningless anyway:
It was disabled only for the insert-node-on-link feature, which works only for
completely unconnected nodes anyway, so there would be nothing to swap in the first place.
2015-12-03 13:04:04 +01:00
762aad3777 Correct OpenMP pragma, wasn't updated for looptri 2015-12-03 22:56:32 +11:00
9019523161 Buildbot: Followup to previous commit
Path is to be fully specified, so it's independent form the working directory.
2015-12-03 17:00:09 +05:00
c825c81c38 Buildbot: Another attmept to solve windows
Also de-duplicate bit of code.
2015-12-03 16:55:46 +05:00
8c453b5995 Remove redundant zero area face check 2015-12-03 22:45:33 +11:00
80fa528529 Fix FileBrowser 'context-editing' properties shortcuts not being displayed in tooltip.
Also related to T46918.
2015-12-03 12:51:12 +01:00
56fcb18a22 Buildbot: attempt to solve packing on windows 2015-12-03 16:48:14 +05:00
66067f3a97 Buildbot: Disable tests on Linux builders
No idea why they works on windows, but points are:

- libs/tests folder is NOT checked out on any platforms
- render_povray addon does mkdir on a path which might not have parents

There might be some other issues, but those are kinda stoppers for us.
2015-12-03 16:46:15 +05:00
a4e151704f Fix isect_point_tri_v3 w/ degenerate faces
Ensure point_in_slice returns false when zero area faces are passed.
2015-12-03 22:37:46 +11:00
59e4a56d87 Cleanup: change WM_key_event_operator_id to WM_key_event_operator and make it return kmi pointer directly.
All three usages of this func were only using kmi_id to find again kmi itself, pretty dumb!
2015-12-03 12:39:40 +01:00
2c7a70395c Buildbot: Fix typo
What a shame..
2015-12-03 16:37:17 +05:00
27c0997417 Buildbot: Make sure install directory always exists 2015-12-03 16:35:04 +05:00
91d8a9d035 Buildbot: Make sure buildbot_upload.zip is created in the right place 2015-12-03 16:30:52 +05:00
a7dbc0704f Fix T46918: - Cleanup - FileBrowser - get rid of useless operators and update a bit keymap.
Looks like FILE_OT_hidedot was actually the only one to remove here.

Also, added more common parentdir/previousdir/nextdir shortcuts, and R for reload.
2015-12-03 12:21:57 +01:00
f0d405ec67 Buildbot: Fix wrong builder name check 2015-12-03 16:15:37 +05:00
27e7c78bae CMake: Use implicit compiler library paths to find OpenMP library
Was lost since the original patch sent to Cambo, didn't notice the failure before
because had it applied locally.

Without this flag certain configuration wouldn't fins libgomp.
2015-12-03 15:34:41 +05:00
2880480693 Buildbot: Switch Linux builders to the cmake ones
There'll still need to be some tweaks to be done, but it's required first step.
2015-12-03 15:19:02 +05:00
95e2ee6f50 Buildbot: Always expect buildbot_upload.zip to be in install/ folder
This we we don't have difference between builders on different platforms.
2015-12-03 15:16:48 +05:00
7cb9b49f73 Buildbot: De-duplicate some path definitions in pack target
Should be no functional changes.
2015-12-03 15:08:36 +05:00
981f544f5f Expose flush edits as an operator (for Py access) 2015-12-03 20:19:44 +11:00
5c63415afe Fix crash w/ metaball undo & track last-selected
Meta-balls would access freed memory on undo.
This fixes the bug and stores the active-meta in the undo state.
2015-12-03 20:01:38 +11:00
6e10ad5ea8 Fix T46913: Crash adding hook to linked mesh dupli
Follow up to T46738, we need to tag the object data for recalculation.
2015-12-03 10:54:12 +11:00
285b09d8b9 Cleanup: remove unused struct 2015-12-03 10:54:12 +11:00
a491277f5d Fix T46899 sculpt normals not getting updated after exiting sculpt mode.
Habit is a bad thing: Update polys, not tessfaces.
2015-12-03 00:14:09 +01:00
98b95fb325 Error in own recent commit, (left in debug test) 2015-12-03 08:09:04 +11:00
736ce9c8fd Buildbot: Attempt to resolve wrong path to the buildbot_upload.zip
It is expected to be in the build folder for the cmake.

Ideally it should be build/<builder> or install/<builder> but that's a bit more
involved change. Will look into it later.
2015-12-02 23:39:08 +05:00
6af1cde239 Buildbot: Attempt to fix cpack target on windows
Was using wrong working directory.
2015-12-02 23:30:33 +05:00
62521fce48 Buildbot: Don't specify install directory for Windows builds
Installation is to happen within the build folder, no special folder for
this is required.
2015-12-02 22:56:24 +05:00
9bcd604e1d BMesh Decimate: don't collapse zero weighted edges 2015-12-03 00:21:08 +11:00
227fb30a18 Fix T46905: UV/Image Editor - Can't add shortcut to Mirror / X Axis menu item
Yet another Space/NoSpace mismatch when searching keymaps in WM_keymap_guess_opname().

Spent again some time trying to chase those, was the only one I found...
2015-12-02 14:20:12 +01:00
bfd7b45887 Buildbot: Fix typo 2015-12-02 18:18:58 +05:00
956bd92a60 Buildbot: Initial work to move linux build environment to CMake
This is so called "seems to work in dry tests" commit which is aimed to switch
linux release environment to CMake.

Some notes:

- There's no special handle of libstdc++, but it wasn't really static for quite
  some time in SCons configuration and nobody really complained.

- It was quite tricky to get OpenMP linked statically with just using some
  configuration so we went ahead and added a special option to CMake now which is
  only exist on Linux and advertised as shouldn't be used.

- Packing is happening manually in slave_pack.py. This is because we have to add
  some really special files to the archive (mesa libraries for example) which we
  can't really handle from CMake/CPack in a nice generic way.

  Don't think it's bad approach, at least crappynness is localized and it's not
  _that_ crappy anyway.

- Windows buildbot should keep working, but needs doublechecing. It's just a
  build folder changed, but you never know what it might imply.

- Some further tweaks are likely needed to ensure all builders are working.

Thanks Campbell for assistance in this patch!
2015-12-02 18:11:58 +05:00
ca3d014bd1 CMake: Enable Cycles OSL for the full blender configuration 2015-12-02 16:20:20 +05:00
6552d5bebd Cycles: Avoid recursion when doing constant fold
This reduces stress on the the stack memory which could be really handy
on certain operation systems which applies strict limits on the stack.

Reviewers: brecht, juicyfruit, dingto

Reviewed By: brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1656
2015-12-02 16:19:39 +05:00
d0a9ec5efc Cycles: Fix SSS object not properly reflected in glossy object with indirect clamping
This fixes remained issues reported in T46908.
2015-12-02 16:00:01 +05:00
3cd36f85b0 Fix T46815: Changing playback setting makes blender crash
Copied the fix from upstream audaspace.
2015-12-02 10:23:07 +01:00
4006474225 Cleanup: ignore unused args in stubs 2015-12-02 19:26:07 +11:00
aed5347b4c Using term 'origin' for mathutils.bvhtree docs
Matches rna ray-cast API
2015-12-02 19:25:08 +11:00
90b83a806a Update template for changes in ray-cast 2015-12-02 19:18:30 +11:00
08fb55eea2 PyAPI: Change ray_cast to fix & improve behavior
- It wasn't possible to know when Object.ray_cast was successful
  in the case when it hit a face with no original index.
- Take (ray_start, ray_direction) vectors.
- Take an optional distance argument.
- Scene/Object.ray_cast now use matching arguments & return values.

See D1650 (own patch)
2015-12-02 19:07:24 +11:00
e16d39b793 Transform Snap: add optional face index arg 2015-12-02 18:46:14 +11:00
a5c0964c70 Cleanup: transform snap arguments
This was getting very hard to follow,

- mixing input/output args.
- mixing arg order between functions.
- arg names (mode, snap_mode) rename to (snap_to, snap_select)
2015-12-02 18:08:48 +11:00
8d8bc24dd5 Cleanup: double-conversion warnings 2015-12-02 15:52:47 +11:00
fc9505c9c5 Cleanup: warnings & spelling 2015-12-02 13:15:52 +11:00
Julian Eisel
5cbf58ce8b Fix T46909: Text strip not themeable
Normally we don't allow adding new theme options if we can avoid it, but this is a legit exception since all other strips are themeable.

Default color for text strip is now yellow-ish. Not nice but there are also not many other colors left.
2015-12-02 00:01:36 +01:00
a6bbf05ba6 Cycles: Fix wrong SSS intersection refinement when this option is disabled
The code is disabled by default, but we'd better keep it all correct.
2015-12-02 03:14:54 +05:00
e82876589f Cycles: Fix wrong SSS on scaled instanced objects
Was a mistake on searching refined position form ray and hit distance.

Remember kids: SSS distance is in the object space!
2015-12-02 03:13:19 +05:00
70502578b1 Cycles: Remove TODO, it is possible there'll be more intersections recorded
It's just only few of them will be stored in the intersection array, nothing
wrong with that what's so ever.
2015-12-02 02:39:57 +05:00
e5e1010919 Cleanup: Remove some more code for BVH cache. I missed that somehow. 2015-12-01 18:17:28 +01:00
3526f7a28e Comment assert in id_us_min, currently we can get zero user count at this point. 2015-12-01 15:46:21 +01:00
842310a9b0 Outliner: add an option to "delete" libraries.
Caminandes team request. In current master it's not possible to do this in a total
clean way, so we are simply setting all user counts of given lib's datablocks to zero
(similar to rna_ID_user_clear()'s doing).

This is a bit crappy because it still lets datablocks floating around (with invalid
user count values), and requires a save & reload cycle to be finalized. But for now
it should be good enough. Propper implementation will be added to id-remap.
2015-12-01 15:46:21 +01:00
8512e284a0 Fix T46906: Cycles syntax error while compiling OpenCL kernels
The safe normalization was using a float as a condition, now the intended non-zero test is explicit.
2015-12-01 13:53:29 +01:00
b2e36dcd7d Fix auto-merge loosing edge/faces selection 2015-12-01 22:12:12 +11:00
d9f5a4ed79 Report error when removing presets fails 2015-12-01 20:07:10 +11:00
607150d058 Fix T46898: OpenCL Fails to compile after recent SSS changes 2015-12-01 13:55:40 +05:00
d1c46c7b35 Fix out-of-bounds access in recent shader updates 2015-12-01 19:39:43 +11:00
e751ee5526 Fix minor order of init error w/ text draw 2015-12-01 19:00:55 +11:00
9e56c570c3 Cleanup: use more logical names for View3D.around
D1651 (own patch)
2015-12-01 18:53:26 +11:00
Kevin Mackay
2f80d304b0 Fix T39935: Duplicate looses active curve spline 2015-12-01 17:56:09 +11:00
260d2adcf1 minor error in recent text-draw commit 2015-12-01 17:56:06 +11:00
6783c673e6 UI: mono-space font user preference 2015-12-01 16:58:47 +11:00
0b1b774674 Python Console: store font id in a drawing context 2015-12-01 15:49:52 +11:00
4e46473c8e Text Editor: store font id in a drawing context 2015-12-01 15:31:42 +11:00
520feda277 Cleanup: struct declarations 2015-12-01 13:31:26 +11:00
1650b656c6 Cleanup: Collada: make gcc (partially) happy.
Still grumpy about using tmpnam... ;)
2015-12-01 01:09:38 +01:00
b29ee36f6a Fix T46900: Inset Faces Thickness & Depth Do Not Use Scene Units (i.e. Imperial).
Was the case of several Mesh operators actually (and probably others, but cannot check
everything). Added `RNA_def_property_float_distance` helper, avoids having to
set PROP_DISTANCE subtype explicitly each time...
2015-12-01 01:09:38 +01:00
09fdacdb39 Add shortcuts for copying data path from RNA
- Ctrl-Shift-C: copy-data-path
- Ctrl-Shift-Alt-C: copy-full-path
2015-12-01 10:31:10 +11:00
9307202807 RNA: de-duplciate rna-path create in tooltip code 2015-12-01 10:31:10 +11:00
b7978e984b CMake: Add some missing license files in the install target 2015-11-30 21:33:57 +05:00
f798c791cd Libquery: fix double-handling of object pointer in scene's basact base.
Looping twice on same ID pointer may not be an issue in master currently, but with work done in id-remap
branch this should be avoided as much as possible, so for now assuming we do not need this here.

Note: if we really need this and have to add it back, then please at least use IDWALK_USER, and not
IDWALK_NOP flag!
2015-11-30 15:34:56 +01:00
c69ce97438 install_deps.sh: add libsndfile (seems to be mandatory for correct flac export?)
Related to T46886.
2015-11-30 14:41:54 +01:00
Julian Eisel
ecbbb02c88 Fix T46628: Strips overlapping in VSE
Caused by rB27b2ab8cf4ae (although patch D1096 was correct).
2015-11-30 14:15:04 +01:00
faa0fdb13e Buildbot: Enable sndfile library
It was enabled for other platforms already and this could fix some of the
reported bugs.
2015-11-30 15:15:12 +05:00
a149a6784b Fix T46891: Error removing PropertyGroup 2015-11-30 11:03:49 +11:00
c1f05c30f9 PyAPI: expose low level RNA to bpy.types 2015-11-30 11:03:49 +11:00
5bfc32bab4 Cleanup: warning w/ unknown define 2015-11-30 11:03:49 +11:00
5b90a6e188 Fix T38245: render slot getting lost when switching slots while compositing. 2015-11-30 00:54:45 +01:00
f448659a56 Fix T46896: Outliner group 'hide' doesn't update viewport render 2015-11-30 09:23:58 +11:00
753b6b3c47 Cleanups:
- rework includes order in intern/openvdb: first include should be the
source file's header, then other header in the same directory, following
by system/library headers and finally other local headers.

- move ScopeTimer cdtor definitions to openvdb_util.cc, no reason for
them to be in a header.

- add a DEBUG_TIME macro to switch Timer macro on and off instead of
using NDEBUG macro (doesn't make much sense to time in debug mode)
2015-11-29 22:07:33 +01:00
7bacb0080e Merge branch 'master' into openvdb 2015-11-29 21:50:26 +01:00
3e499c1a31 Cleanup: sync edgehash w/ ghash remove logic 2015-11-29 17:51:12 +11:00
09c2bff32f Cleanup: rename hash -> bucket_index, edgehash API
Was confusing since a hash isn't typically used as an index on its own.

Also C99 for loop for bucket resize loop.
2015-11-29 17:51:12 +11:00
472599402f Cleanup: ghash/edgehash style
Call functions on own lines (nicer for debugging)
2015-11-29 17:51:12 +11:00
37801588d4 install_deps.sh: always give py version arg to cmake/scons (same as we already do with llvm).
This should avoid 'casual builders' to have issues when we switch py versions.
2015-11-28 19:52:45 +01:00
fb0fa3cb9e Move linux's scons to py3.5 too! 2015-11-28 19:52:45 +01:00
Julian Eisel
57628cb562 UI: More minor UI cleanups for keymap editor
Place non-editor related keymaps together, place animation editor keymaps together, move 'Header' keymap (which had exactly 1 entry) into 'Screen' keymap, move SCREEN_OT_header (for showing/hiding header) into 'Header' keymap.

Again, this shouldn't break any key configs, but key configs that contain SCREEN_OT_header will add an entry for this under 'Screen' again. Just a very minor glitch.
2015-11-28 18:24:21 +01:00
a3ddaa3d8c Render pipeline: Remove dead code
Remained since some rather recent render speedup commits.
2015-11-28 22:08:49 +05:00
Julian Eisel
3123194e88 UI Cleanup: Mask keymap shouldn't be part of Clip Editor keymap
Also removed unrelated comment (copied & pasted from a few lines above I guess).
Shouldn't break any custom key configs.
2015-11-28 17:46:55 +01:00
Julian Eisel
175110ec87 Cleanup: 'area' vs 'region'
Apparently this is the result of some sloppiness during 2.5 project and since then it confused people who were trying to understand the area-region relation (myself included).

Sorry if this causes merge conflicts for anyone, but at some point we really had to do it :/
2015-11-28 17:22:44 +01:00
51f996836c C++ RNA: Pass structures by reference
C++ structures might be rather big and passing them by value is not really
optimal. There should be no functional changes apart from better memory
access pattern when synchronizing huge scenes to Cycles.
2015-11-28 21:20:30 +05:00
2ae7593700 Cycles: Avoid having two consequence getenv() calls 2015-11-28 21:05:12 +05:00
6147c4037d Cycles: Fix wrong volume stack after SSS bounce
Was introduced by a recent fixes, now it should be all correct and additionally
it solves the TODO mentioned in the code.
2015-11-28 20:07:34 +05:00
f5d1551b6e Cycles: Fix wrong original ray used for SSS baking
Also de-duplicated some code by moving to an utility function.
2015-11-28 20:07:34 +05:00
1e43f0d742 Cycles: Set of fixes for delayed SSS ray tracing
There were multiple issues which are solved now:

- It was possible that ray wouldn't be bounced off the BSSRDF, for example
  when PDF or shader eval is zero. In this case PathState might have been
  left in pre-bounced state which would have been gave incorrect shading
  results.

  This is solved by having separate PathState for each of the hits.

- Path radiance summing wasn't happening correct as well, indirect rays
  were using wrong path radiance in the case when there were more than
  one hit recorded.

  This is now using a bit trickier state machine which calculates path
  radiance for just SSS (both direct and indirect) and then sums it back
  to the final radiance.

- Previous commit wasn't totally correct either and was an induced bug
  due to wrong path state left from the "un-happened" ray bounce.

  There should be no special case happening here, BSSRDFs will be replaced
  with diffuse ones due to PATH_RAY_DIFFUSE_ANCESTOR flag.

- Merged back codebases for "delayed" and "immediate" indirect SSS ray
  tracing, hopefully making it easier to maintain the codebase.

Sure this changes brings memory usage back by about 4-5%, but overall
it's still about 2x memory reduction for the experimental kernel here.

Thanks Brecht for the review!
2015-11-28 20:07:34 +05:00
8919ed3a62 Cycles: Fallback to diffuse BSDF for the indirect SSS rays when BSSRDF is hit
This is actually how it was intended to work, just didn't notice it wasn't
really happening in the main ray loop.

Solves some memory issues reported in T46880.
2015-11-28 20:07:34 +05:00
299fae1838 Cycles: Fix missing indirect subsurface initialization in the bake code 2015-11-28 20:07:34 +05:00
c76fbf10e2 OpenGL: remove unnecessarily paranoid bound texture preservation. 2015-11-28 15:35:34 +01:00
8e1c63b396 OpenGL: assume GL_TEXTURE_ENV_MODE GL_MODULATE is the default state. 2015-11-28 15:35:34 +01:00
e1b8a5dc6f OpenGL: set OpenGL lights through simple shader API. 2015-11-28 15:35:34 +01:00
b5f9746dae OpenGL: update simple shader API.
Restore fixed function lighting code for now and control use of GLSL shader
with a variable, make light types more clear, reduce state changes, some other
minor tweaks.
2015-11-28 15:35:34 +01:00
263f4cd342 OpenGL: rename GPU_enable_material to better indicate it's binding shaders. 2015-11-28 15:35:34 +01:00
34f51cd498 Fix a regression introduced by https://developer.blender.org/D1396 on video playing
Fix a regression introduced by https://developer.blender.org/D1396 on video playing

Look at @mariomey example file.

Reviewers: panzergame

Subscribers: mariomey

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1623
2015-11-28 14:56:22 +01:00
96cff85610 Fix possible hang on buffer allocation failure. Reported by coverity
scan, thanks...errr.
2015-11-28 09:33:48 +01:00
c5ac037c8e BMesh: pass loops instead of edges/verts to filter funcs
This allows to check the source face we're walking over.
2015-11-28 13:40:18 +11:00
a12fa185f8 BMesh: use typed filter callbacks (const args too) 2015-11-28 13:37:02 +11:00
bafccb00de OpenGL: fix cycles texture draw mode not respecting double sided lighting. 2015-11-27 21:56:08 +01:00
d3612cfca8 Fix T46883: VSE Meta Strip crash on leaving Meta editing (tab).
Own stupid copy/paste error in recent commit.
2015-11-27 21:38:03 +01:00
da6578e647 Fix T46827: Appending Specific Groups Doesn't Work on Windows.
Issue was with datablocks which names would include '/', new filebrowser filelisting code
would cleanup the entire filepath, hence giving invalid filename in this case.

That 'path separator in ID names' bit us already in lib/datatype/datablock separating func,
this is really stupid to allow that in something handled as a filepath imho, but well...

Note: would have break the same under *nix with '\' char.
2015-11-27 21:18:06 +01:00
bab8deef17 Fix (unreported) broken BLI_join_dirfile() in some cases on Windows.
That function was epic failing in case trying to join '//' and 'foo.blend', would
give '//\foo.blend'... Now check for both SEP and ALTSEP!
2015-11-27 21:18:06 +01:00
85362dfe80 fix T46868: added workaround for a collada issue with UTF8 filenames 2015-11-27 14:56:52 +01:00
20fc9c00fd Cycles: Fully roll-back to non-delayed SSS indirect rays for CPU
There are some issues to be solved with the recent optimization we did for
the indirect rays for the SSS. Those issues will take a bit of a time to
be fully solved still and we need to unlock Caminandes team now, so let's
revert some changes back.

CUDA will still use delayed indirect rays since it's an experimental
feature.

For the details about what's to be done still please refer to T46880.
2015-11-27 17:15:02 +05:00
175f00c89a Revert "Cycles: Fix wrong SSS with regular path tracing and clamping enabled"
This wasn't really a complete fix and only worked if there was a single scatter
event recorded only. Proper fix requires some more thoughts to make it correct
without memory use increase.

This reverts commit bf9e88bfbe.
2015-11-27 17:15:02 +05:00
a28e014313 BMesh: Add API call BM_face_calc_point_in_face
Was local to knife code, but this is generally useful.
2015-11-27 22:08:16 +11:00
bfaebeaee6 Fix T46799: Blender crashes when enumerating POCL devices
The issue was caused by a conflict between std::error_code linked into
Blender which is compiled without C++11 support and POCL's expectations
of std::error_code which was actually linked against C++11's STL.
2015-11-27 14:48:26 +05:00
5680ac911b missed last commit 2015-11-27 18:00:02 +11:00
2fa1f60d8e CMake/SCons: set Python to 3.5 2015-11-27 17:26:08 +11:00
254282c6cb Fix crash when ding dyntopo sculpting
This is a regression introduced by 77ac33d and was caused by use-after-free
mistake.
2015-11-27 00:18:35 +05:00
b3808a4e06 BGE: Fix ray cast with unfound property.
To return a valid ray cast result the object must not be NULL and KX_RayCast::RayTest must return true.
2015-11-26 19:54:27 +01:00
d00a3316e7 Fix assert in UI align code in some specific situations.
Situations like [top_button over [label, button]] need some subtle handling, since
we only store one neighbor per side of a button...
2015-11-26 14:28:47 +01:00
b061b5ae7a Fix (unreported) libquery's IDLooper for constraints not handling correctly referenced ID pointers... 2015-11-26 12:16:50 +01:00
bf9e88bfbe Cycles: Fix wrong SSS with regular path tracing and clamping enabled
Radiance sum and reset was happening in different order after 26f1c51.

This is a quick fix to unlock Caminandes team, perhaps we can avoid having
separate variable to detect when radiance is to be sum.
2015-11-26 16:11:41 +05:00
Stefan Werner
c8a041f489 Fix T46760: Branched Path Tracing converges to different result than plain Path Tracing
Multiple importance sampling for branched path tracing light samples needs to be
calculated separately per BSDF, not with Veach's one sample model.
2015-11-26 14:59:58 +05:00
35cf545e3a Fix recent c99 cleanup w/ openmp 2015-11-26 18:04:56 +11:00
e060c90ebc Fix assert navigating into dir w/ .blend suffix 2015-11-26 15:39:29 +11:00
6483575b35 Fix error with intersect handling split-wire edges 2015-11-26 13:16:45 +11:00
cd8a84c869 Cleanup: warnings 2015-11-26 12:38:31 +11:00
d7708d135e Partial revert of last commit
Keep index using the outer scope for GHASH iter macros,
while its often nice, in some cases to declare in the for loop,
it means you cant use as a counter after the loop exits, and in some cases signed/unsigned may matter.

API changes should really be split off in their own commits too.
2015-11-26 12:38:31 +11:00
77ac33db7b cleanup: C99 and vertex array comments
GPU_buffer no longer has a fallback to client vertex arrays, so remove
comments about it.

Changed a few internal structs/function interfaces to use bool where
appropriate.

Use for-loop scope and flexible declaration placement. PBVH does the
same thing but needs ~150 fewer lines to do it!

The change to BLI_ghashIterator_init is admittedly hackish but makes
GHASH_ITER_INDEX nicer to use.
2015-11-25 19:49:54 -05:00
7bbcb643f2 OpenGL: remove unused VBO_DISABLED from PBVH
Was almost certainly being compiled out anyway, but now we don’t have
to read it!
2015-11-25 19:49:54 -05:00
88556d801f Fix T46870: bge globalDict kept between sessions 2015-11-26 11:08:35 +11:00
d0b453577a Cleanup: whitespace 2015-11-26 11:08:25 +11:00
2d52f65c60 Cleanup: use const for linklist API 2015-11-26 08:50:35 +11:00
532c8be974 Fix error in shadowing cleanup (wrong pointer free) 2015-11-26 08:46:38 +11:00
b2a4aab9e4 Fix T46848: more OpenNL crashes due to uninitialized variables. 2015-11-25 20:31:52 +01:00
d4ad89c1ee Fix OpenSubdiv geometry shader error on Linux / AMD.
Differential Revision: https://developer.blender.org/D1638
2015-11-25 20:31:46 +01:00
d2a822fe07 CUEW: Update to latest version
It is now updated against CUDA Toolkit 7.5. Currently should be no functional
changes, just begin some ground work for the future.
2015-11-25 23:30:46 +05:00
816cdf262b OpenGL: GLSL always supported
In gpu lib:
- GPU_glsl_support() always returns true
- internal cleanup & comments

Outside gpu lib:
- remove check from various code, remove the “else” path

- sprinkled a few C99-isms

We can remove GPU_glsl_support() when BGE stops calling it.
2015-11-25 11:51:12 -05:00
feb574f21c Use different approach to the antialias node
It uses edge extrapolation code from Gimp's antialias plugin now,
which has advantage of giving symmetrical results, which makes it
possible to add two antialiased ID masks and have a constant 1.0
all over the frame. But has difference from the old implementation
because it uses 3x3 matrix only, which doesn't give so much smooth
looking edges. Perhaps it's not so bad, since if edges are really
need to be smooth one might use Blur node.

Another advantage is that the node is now nicely threaded.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: ania

Differential Revision: https://developer.blender.org/D1617
2015-11-25 21:16:57 +05:00
bbd33b3a8e Cycles: Create proper sockets for OSL script nodes
Previously render nodes will be always created with just a VECTOR socket
type and then those sockets will try to be set as all point, vector and
normal to work around lack of such a subtype distinguishing in blender.

This change makes it so subtype is being queried from OSL itself and
proper subtupe is being used for socket.

It's still not in use for the official builds because it requires changes
applied recently on the 1.7 branch of OSL:

  https://github.com/imageworks/OpenShadingLanguage/commit/f70e58f

This solves artists confusion reported in T46117.

Reviewers: #cycles, juicyfruit

Reviewed By: #cycles, juicyfruit

Subscribers: juicyfruit

Differential Revision: https://developer.blender.org/D1627
2015-11-25 20:23:52 +05:00
50c08bdc0e Fix bplayer (c) 2015-11-25 16:22:52 +01:00
2700ab1de1 Cycles: Whitespace cleanup from the recent changes 2015-11-25 20:15:35 +05:00
1bec2aa54e Cycles: Fix crash in constant folding introduced by recent commit
Graph::disconnect() actually modifies links, needs to create a copy to iterate
if disconnect happens form inside the loop.

Question tho whether we can control this somehow..

Reported by BzztPloink in IRC, thanks!
2015-11-25 20:14:01 +05:00
485ea4353f Sequencer: nested scene strip support (like metas)
This makes it possible to use scenes as a kind of
multi-user meta-strip (with their own time).

Currently this supports rendering & drawing nested strips,
but no convenient way to tab-enter into a scene strip.
2015-11-26 00:15:08 +11:00
456fdaba67 install_deps.sh: Updated official boost version (grrr). 2015-11-25 14:10:27 +01:00
a9ddee0e56 Fix T46867: Face-Mask hiding failed on mode switch
Since GPU refactor, hidden faces are cached.
However this needs to be re-calculated when state of hidden faces changes.
2015-11-25 23:54:39 +11:00
d7d1fc5c74 Cleanup: use correct name in prints 2015-11-25 23:54:39 +11:00
6894fe3b7a Accept non-existing files from the CLI
When a user tries to load a non-existing blend file from the CLI, the path
is set and Blender acts as if it is loaded. This allows the user to create
a new file by typing 'blender filename.blend' and then saving. This
behaviour is common in other tooling, such as vim and Mypaint.

Blender's current behaviour (print an error message and open the default
scene) doesn't make much sense. It ignores the filename passed on the CLI,
whereas with this patch that filename is actually remembered, and used when
saving.

Reviewers: campbellbarton, sergey, mont29
2015-11-25 13:59:21 +01:00
e796581655 Cycles: Refactor of constant fold.
* Move constant folding from nodes to the shader graph. This way it's part of our (later) 4-step optimization process.
* Instead of only doing a one level constant fold, we can now do a recursive constant fold, allowing us to simplify shaders much further.
Constant folding is implemented for Blackbody, Math and VectorMath nodes.

Example (the highlighted nodes are removed before rendering):
Before: http://archive.dingto.org/2015/blender/code/one_level_constant_fold.jpg
Now: http://archive.dingto.org/2015/blender/code/multi_level_constant_fold.jpg

Thanks to Sergey and Brecht for Review!
Differential Revision: https://developer.blender.org/D1626
2015-11-25 13:57:54 +01:00
415b5a4369 Fix T46646: Point Cloud Density crashes on real time rendering
The issue was caused by possible use of object->derivedFinal from the render
thread, The patch tries to eliminate (or at least minimize, huh) amount of
access to the derivedFinal of a source object. It's still possible that in
the case of particle source derived mesh will be still unsafely used, but
with the patch applied we can easily change runtime part of the code and
cache derived mesh on the preparation stage.

Some ideas for the future:

- Check whether cache() was called on the point density node when calling
  calc().

- Cache derivedMesh in the runtime part of point density node to avoid
  possible remained thread conflicts.

- NULL the runtime part of the node on .blend load

Reviewers: campbellbarton, plasmasolutions

Reviewed By: plasmasolutions

Differential Revision: https://developer.blender.org/D1614
2015-11-25 17:43:44 +05:00
328208a6a6 Cycles: Fix shader update bug introduced by recent commits
Seems set_intersection() requires passing explicit comparator if non-default
one is used for the sets. A bit weird, but can't really find another explanation
here about whats' going on here.
2015-11-25 16:05:57 +05:00
00afa02528 PyAPI: remove workaround for Py3.4 bug 2015-11-25 21:54:02 +11:00
bdd1ecef03 install_deps.sh: Updated official Python (to 3.5.0) and NumPy (to 1.10.1). 2015-11-25 11:58:00 +01:00
95bc8389a9 MOD_weightvg: switch from OMP to BLI_task's parallelized 'for loop'.
Also gives about 5-6% speedup...
2015-11-25 11:51:05 +01:00
0f609d5d04 BLI_task: BLI_task_parallel_range_ex: add some per-chunk userdata.
This mimics OpenMP's 'firstprivate' feature. It is sometimes handy to have some persistent local data during a whole chunk.

Reviewers: sergey

Reviewed By: sergey

Subscribers: campbellbarton

Differential Revision: https://developer.blender.org/D1635
2015-11-25 11:01:59 +01:00
8294452b14 Fix T46782: Updating Shaders very slow with complex nodegraph
The issue was caused by not really optimal graph traversal for gathering nodes
dependencies which could have exponential complexity with a long tree branches
connected with multiple connections between them.

Now we optimize the depth traversal and perform early output if the node was
already traversed.

Please note that this adds some limitations to the use of SVM compiler's
find_dependencies() in the cases when skip_node is not NULL and one wants to
perform dependencies find sequentially with the same set. This doesn't happen
in the code, but one should be aware of this.
2015-11-25 13:46:51 +05:00
443b159f02 Cycles: Ensure order of shader nodes in the dependnecies set
The issue was than nodes dependencies were stored as set<ShaderNode*> which
is actually a so called "strict weak ordered", meaning order of nodes in
the set is strictly defined, but based on the ShaderNode pointer. This means
that between different render invokations order of original nodes could be
different due to different pointers allocated for ShaderNode.

This commit makes it so dependencies and maps used for ShaderNodes are based
on the node->id which has much more predictable order. It's still possible
to trick the system by doing some crazy edits during viewport rendfer and
cause difference between viewport and final render stacks.

Reviewers: brecht

Reviewed By: brecht

Subscribers: LazyDodo

Differential Revision: https://developer.blender.org/D1630
2015-11-25 13:07:32 +05:00
de35827612 Cycles: Fix wrong volume stack update with SSS object intersecting the volume
There's no need in moving ray at all, stack should always be updated from the
original hit point to the scattered one.
2015-11-25 13:01:22 +05:00
26f1c51ca6 Cycles: Trace indirect subsurface rays by restarting the integrator loop
This gives much lower stack usage on GPU and reduces kernel memory size to
around 448MB on GTX560Ti (comparing to 652MB with previous commit and 946MB
with official release). There's also a barely measurable speedup of around
5%, but this is to be confirmed still.

At this stage we're using only ~3% for the experimental kernel and SSS
rendering seems to be faster by 40% and after some further testing we might
consider making SSS and CMJ official features and remove experimental
precompiled kernels.
2015-11-25 13:01:22 +05:00
2a5c1fc9cc Cycles: Delay shooting SSS indirect rays
The idea is to delay shooting indirect rays for the SSS sampling and
trace them after the main integration loop was finished.

This reduces GPU stack usage even further and brings it down to around
652MB (comparing to 722MB before the change and 946MB with previous
stable release).

This also solves the speed regression happened in the previous commit
and now simple SSS scene (SSS suzanne on the floor) renders in 0:50
(comparing to 1:16 with previous commit and 1:03 with official release).
2015-11-25 13:01:22 +05:00
8bca34fe32 Cysles: Avoid having ShaderData on the stack
This commit introduces a SSS-oriented intersection structure which is replacing
old logic of having separate arrays for just intersections and shader data and
encapsulates all the data needed for SSS evaluation.

This giver a huge stack memory saving on GPU. In own experiments it gave 25%
memory usage reduction on GTX560Ti (722MB vs. 946MB).

Unfortunately, this gave some performance loss of 20% which only happens on GPU.
This is perhaps due to different memory access pattern. Will be solved in the
future, hopefully.

Famous saying: won in memory - lost in time (which is also valid in other way
around).
2015-11-25 13:01:22 +05:00
e6fff424db OpenGL: set geometry shader input length implicitly
Input array length is implicitly set at link time, based on the geometry
shader's layout. Specifying the wrong value here is an error; specifying
no value is the same as getting it right. (inspired by a recent codegen
change)
2015-11-25 01:49:07 -05:00
22ec7b17d2 BMesh: raise exception face-split w/ adjacent loops
Was raising "internal error".
2015-11-25 12:08:50 +11:00
b6084d56c9 BMesh: remove double faces when triangulating 2015-11-25 11:55:46 +11:00
69cdddd4cf Fix error in recent check for duplicate tris 2015-11-25 11:28:25 +11:00
Martijn Berger
e8b3a14dfb OSX bump python to 3.5 2015-11-24 23:18:31 +01:00
697acebeb7 Sculpting optimization: Avoid iterating the PBVH for intersection during
the paint cursor drawing when a stroke is underway; this information is
already available from the stroke itself.

Should improve performance when "show brush" is enabled (which is
always, for sane people). Finding an intersection is not always cheap,
especially on heavy meshes.

Cudos to the dyntopo test thread for the report and the sculpt love :)
2015-11-24 21:40:52 +01:00
fe3aaac118 Fix T46855: Limit Location Max value limited to 1000 units.
Those should be UI limits, not hard absolute limits...
2015-11-24 20:29:33 +01:00
14221521fb Fix previous own fix - second message was actually OK, first one had bad comma placement...
Thanks to psy-fi for the head-up.
2015-11-24 15:36:49 +01:00
0b422900c8 Fix broken windows 'MessageBox' calls (UI messages).
Reported by Bzzt_Ploink on IRC.
2015-11-24 15:14:22 +01:00
069c867eb7 Merge branch 'master' into openvdb 2015-11-24 12:49:53 +01:00
edb2e96cd5 Fix T46851: Crash on multires more than million
yet another bug introduced by recent shadowing changes -- q and r CCG arrays
were overwritten by the temporary evaluation because the code was changed to
use global pointers instead of the local ones.

Naming of the variables could be changed to be a bit more accurate.
2015-11-24 15:25:19 +05:00
678fe87c85 Buildbot: Switch Linux builds to Python 3.5 2015-11-24 14:45:55 +05:00
9ea4202816 Fix T46839: New dependency graph missed time update on motrack constraints 2015-11-24 14:44:38 +05:00
f7c987b0ab Fix outliner crash after recent no-functional-changes cleanup commits 2015-11-24 14:25:09 +05:00
ebf3979cab install_deps.sh: update official numpy version. 2015-11-24 10:13:16 +01:00
fa6bdfd622 Cycles: Support per-render layer world AO settings
This is sort of extension of existing Use Environment option which now allows to
disable AO on the render layer basis.

Useful in cases like disabling AO for the background because it might make it
too flat and so.

Reviewers: juicyfruit, dingto, brecht

Reviewed By: brecht

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1633
2015-11-24 13:21:40 +05:00
31cc60e76b BGE: Save screenshots in a different thread
This patch allows the game engine to keep running while performing things like PNG compression and disk I/O.

As an example, my crowd simulation rasterizer saves a screenshot for every frame. This now takes up 13 msec per frame, which was 31 msec before this patch. Effectively, it allows the simulation to save every frame and still run at 60 FPS.

Reviewers: lordloki, moguri, panzergame

Reviewed By: moguri, panzergame

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1507
2015-11-24 09:15:15 +01:00
Julian Eisel
c026aa6d54 Cleanup: Unsued variables
Unused since rB291afea8ccdea5.
2015-11-24 09:01:52 +01:00
ef5fff4adc OpenGL: when checking GL version, assume >= 2.1
Mostly glBlendFunc related.
2015-11-24 02:34:54 -05:00
291afea8cc OpenGL: clean up use of old extensions 2015-11-24 02:21:07 -05:00
4ebede5d1f fix error in last commit 2015-11-24 17:57:47 +11:00
6ba9d1094a Fix T46805: Scale along axis fails w/ Python
't->value' no longer has constraint matrix applied for translate,
fix for T46003 is no longer needed.
2015-11-24 16:50:21 +11:00
c3e7dfa82d Fix T46816: Vert/Edge snap fails at edge of bounds 2015-11-24 12:16:14 +11:00
68922e4660 View3D: move snapping functions out of ruler 2015-11-24 11:48:34 +11:00
df5532b502 UV Smart Project: restore 'Stretch to UV Bounds'
This option wasn't exposed since 2.4x.

D1622 by @candreacchio
2015-11-24 07:28:42 +11:00
39957b85d9 install_deps.sh: Fix dependencies between (built) libs.
Who in hell did make OSD dependant on llvm???
2015-11-23 21:05:54 +01:00
029a92ded6 install_deps.sh: Cleanup: Use correct boolean checks.
Yeah... that is correct bash boolean check syntax. Pretty sure even BASIC or Perl do better.

See http://stackoverflow.com/questions/2953646/how-to-declare-and-use-boolean-variables-in-shell-script
2015-11-23 21:05:54 +01:00
f31e82d448 install_deps.sh: add option to force building libs instead of using packages, and limited fallback for unsuported distro.
This commit adds '--build-foo' options to force the script to build relevant libraries
instead of trying to use packages from the distribution.

In addition, it also now offers (with those '--build-foo' options) the possibility
to build libraries on distributions that are not fully supported.

This is limited, but should still help people once they have installed themselves
the basics of dependencies - boost, llvm, osl/osd etc. are not libraries that are
really easy to build.

DISCLAIMER: I did not take the 20 (or more) hours needed to test all combinations
over all distributions, and given the size of the changes, bad sneaky typos are quite
probable, so please report if you get some errors!
2015-11-23 21:05:54 +01:00
1d7ed584db install_deps.sh: refactor message about needed dependencies, and add option to show it and exit (--show-deps).
More info about 'official' source and versions of main libraries handled by the script have also been added to that info option.
2015-11-23 21:05:54 +01:00
d27da6f79c Git ignore BUILD_NOTES.txt from install_deps.sh. 2015-11-23 20:17:02 +01:00
Brecht Van Lommel
e556287a3b CMake: enable -std=gnu99 for clang and icc. 2015-11-23 18:22:53 +01:00
Brecht Van Lommel
880258a0db Fix T46848: OpenNL crash on Windows due to uninintialized variables. 2015-11-23 18:20:32 +01:00
f021d97e8f Fix T46842: Removing World is missing AO update in viewport render 2015-11-23 17:44:52 +05:00
940f7a6d53 Cleanup: shadowing (unwrap) 2015-11-23 22:12:29 +11:00
47dd7d7133 Fix T46841: Thick lines w/ graph visible 2015-11-23 21:55:35 +11:00
f997449f84 OpenSubdiv: support OpenGL 3.x
GLSL 130, 140, 150 with extensions as needed.

Similar logic to my recent gpu_extensions changes.

Partially fixes T46706. Matcaps now work with OpenSubdiv, as do basic
materials. Anything with UV coordinates is still broken.
2015-11-23 03:35:16 -05:00
d3cd113ab0 Merge branch 'openvdb' into cvdb_ray_isect 2015-11-23 09:13:57 +01:00
e971f0a47e Merge branch 'master' into openvdb 2015-11-23 09:09:46 +01:00
8d47dbccbe OpenGL: Replace some more ARB suffix from glBindBufferARB. 2015-11-23 09:09:26 +01:00
4fe413a419 CMake: use -Wshadow warning for C source
C source now builds without shadowing, enable with GCC by default.
2015-11-23 17:43:55 +11:00
64ab452131 Cleanup: shadowing (interface) 2015-11-23 17:40:55 +11:00
48b1656a6c Cleanup: shadowing (editors) 2015-11-23 17:40:50 +11:00
6e4cb463c4 Cleanup: shadowing (rna, modifiers, *misc*) 2015-11-23 17:40:49 +11:00
daa90de3fd Cleanup: shadowing (bmesh) 2015-11-23 17:40:10 +11:00
e2a79e8b6c Cleanup: shadowing (render) 2015-11-23 17:40:10 +11:00
2e348fd43e Cleanup: shadowing (blenkernel) 2015-11-23 17:40:10 +11:00
bc8504cb4c Cleanup: shadowing (blenlib, gpu, imbuf) 2015-11-23 17:40:10 +11:00
676d790d29 Cleanup: use rna_enum_ prefix for RNA enums
Definitions could shadow local vars.
2015-11-23 17:40:09 +11:00
a269287f36 Cleanup: use single struct for freestyle globals
Was shadowing local vars.
2015-11-23 17:40:09 +11:00
6a393fc998 Cleanup: redundant string escape 2015-11-23 17:40:08 +11:00
6edc573663 Cleanup: warning 2015-11-23 17:40:08 +11:00
8f2e9ac7b1 OpenGL: fix hq viewport dof on Mac / GL 2.1
My earlier fix for GL >= 3 on Windows broke it. Should work for both
platforms now.
2015-11-23 00:32:35 -05:00
2d708d9aec OpenGL: codegen formatting
Formatting of generated GLSL code:
- attribute/varying for version 120
- in/out for version 130+
- minor cosmetic stuff

Tested working on Windows 10, GL 4.3.
2015-11-23 00:13:57 -05:00
076e2ff2aa OpenGL: update geometry shaders, fixes T46838 2015-11-23 00:08:09 -05:00
05ffe2d174 OpenGL: choose compatible GLSL version
Fix GLSL version & geometry shader support query to consider core vs
compatibility.

All shaders need to be compatible with each other, and for now that
means GLSL 120. For drivers that support compatibility profiles, choose
the highest available (up to 150). If only core profile is supported,
max out at GLSL 130.
2015-11-22 21:14:23 -05:00
754df5cda8 revert file mode to 644 2015-11-22 21:14:22 -05:00
708779e60b OpenGL: bump gpu_extensions to GL 2.1, prepare for 3.x
Several changes. Tested working on Windows 10 GL 4.3 and MacOS 10.11 GL
2.1.

- document extensions used in this file
- some simple ARB/EXT suffix deletion
- stop checking for pre-2.1 features — they’re available!
- convert old ARB shader API to the one adopted in GL 2.0
- remove checks for old (pre-R600) ATI cards
- choose GLSL version at runtime, between 1.2 and 1.5
- prefer GLSL 1.5 for geometry shaders, fall back to
EXT_geometry_shader4 if needed

Differential Revision: https://developer.blender.org/D1632
2015-11-22 21:14:22 -05:00
d28431a648 OpenNL: make the API thread safe by always passing context.
Previously two laplacian smooth or deform modifiers executing
simultaneously could crash.
2015-11-22 22:49:43 +01:00
47ce2d7bef OpenNL: significantly simplify code using Eigen / STL. 2015-11-22 22:49:03 +01:00
e6c58df74e OpenNL: replace SuperLU by Eigen SparseLU solver.
Performance is roughly the same because it's using the same COLAMD ordering
and supernodal LU factorization algorithms. Solve results also appear to be
identical.
2015-11-22 22:49:03 +01:00
5e52433371 OpenNL: convert source file to C++, remove some unused functions. 2015-11-22 22:49:03 +01:00
90b55ae1e5 OpenNL: removed unused softbody code. 2015-11-22 22:49:03 +01:00
b9e0fe2003 CMake: check GNU compiler before using extension
Minor edit, don't assume non-msvc compilers are gcc/gnu compatible.
2015-11-23 08:31:29 +11:00
4ff0126e89 C99 is now the C standard for all our C code.
The main new feature is mixed variable declarations and code, which can help
reduce uninitialized variables or accidental variable reuse.

Due to incomplete C99 support in VS 2013, variable length arrays are not
supported, BLI_array_alloca must still be used. The header <tgmath.h> is also
not supported.

Differential Revision: https://developer.blender.org/D1631
2015-11-22 22:31:22 +01:00
db1f0e3616 Error out on Windows if driver does not support OpenGL 2.1 with an error
messagebox.
2015-11-22 20:53:57 +01:00
c402a379a2 Remove vertex array support from GPUBuffers. Remove USER_DISABLE_VBO. All
GPUBuffer rendering is now done using vertex buffers.

Vertex arrays are completely removed from GL 3.2 core profile, so we'll
have to do this change at some point anyway.

This commit, though big, is not modifying blender in any way. Use should
be exactly as if the vetex buffer option is constantly on.
2015-11-22 19:47:54 +01:00
3e1a9ee386 Smoke drawing code cleanups (and little refactor)
This patch contains the following changes:

- the vertices and edges arrays would be assigned default values, and
then reassigned new ones right away. It appears that those arrays were
once global and then made local
(rB06a2ee4afed4237398b69ddf253e29a730b2f9f0), so it makes sense now to
initialize them with the right values.
- the flame spectrum texture was created whether it was needed or not,
so now it's only created if there's flame to be drawn, also split the
code in a separate function.
 - reduce the number of parameters to the main draw function, as most of
them are member of SmokeDomainSettings.
- some other minor cleanups: fold multiple operations into one to get
rid of one local variable, mark variables as `const` when necessary,
unecessary gl draw calls, reorder the code a bit...

Reviewers: campbellbarton, psy-fi

Differential Revision: https://developer.blender.org/D1368
2015-11-22 18:18:43 +01:00
8623d75b46 Add check for OpenGL version 2.1 on linux.
Unfortunately there's no easy way to show a messagebox here, so just
print a warning on fstderr and exit. If we don't call exit() here we get
crashes on other blender systems (python, opensubdiv) and it can get
tricky to track the initialization state here, so just using exit()
should do the trick for now.
2015-11-22 18:14:46 +01:00
4310a76b60 OpenGL: bump gpu_buffers to GL 2.1
simple stuff!
- remove ARB suffix from core functions & enums
- remove checks for core features (VBOs, generic attribs)
- keep checks for non-core features (draw elements base vertex)
2015-11-22 11:35:21 -05:00
307f1e7d23 Fix T46678: Extending left handle of a VSE multicam effect strip with snap creates frame stills.
Also fixes cache handling for those strips, they need more radical flushing...
2015-11-22 15:33:45 +01:00
56ead9d34b Cycles: Make branched path tracer covered with requested features
This gives few percent extra memory saving for the CUDA kernel when
using regular path tracing.

Still more like an experiment, but will be handy in the future.
2015-11-22 13:54:51 +05:00
5c5df9dc18 Cycles: Save one transform inversion in the camera sync
Summary: By calculating the Camera-to-Screen-Matrix first, one inversion can be saved in the Camera sync.
It won't really improve speed and/or precision, it's mainly a small cleanup.

Reviewers: sergey, dingto

Subscribers:
2015-11-22 00:58:40 +01:00
f547bf2f10 Cycles: Make requested features struct aware of subsurface BSDF
This way we'll be able to disable SSS for the scene-adaptive kernel.
2015-11-21 23:00:29 +05:00
c08727ebab Cycles: Quick experiment with using feature-adaptive kernels for CUDA
Gives few percent of memory improvement for regular feature set kernel
and could give significant memory improvement for Experimental kernel.
It could also give some degree of performance improvement, but this I
didn't really measure reliably yet.

Code is ifdef-ed for now, since it's only working on Linux and requires
CUDA toolkit to be installed (other platform only use precompiled
kernels).

This is just an experiment for now and a base for the proper feature
support in the future (with runtime compilation using CUDA 7?).
2015-11-21 22:16:01 +05:00
f8ab3fd30f Cycles: add utility function to calculate MD5 hash of a given string 2015-11-21 22:07:59 +05:00
52d7bc624a Cycles: Make CUDA device internally operate with requested features
This just replaces internal argument `experimental` with `requested_features`
making it possible to access particular requested settings when building
kernels.
2015-11-21 21:49:00 +05:00
a106da7f1d Cycles: Move build options constructions to DeviceRequestedFeatures
This way it's easier to re-use requested features logic across multiple
device implementations.
2015-11-21 21:42:31 +05:00
9aafec1ce1 Cycles: Avoid multiple spaces in OpenCL build options
This should solve some compilation errors with compilation on OSX.
2015-11-21 21:33:08 +05:00
48f298f09d Fix/Request T46798: Alt+I removes keyframes from all bones, not only selected in Pose Mode
Technically this was more of a feature request, but now the Alt-I operator will
only remove keyframes related to selected bones in Pose Mode. In Object Mode,
it will continue to operate on all keyframes of the object.

This change makes this operator more meaningful when animating in the 3D view.
2015-11-21 16:38:11 +13:00
d47fbece51 BMesh: improve face-path-picking w/ tri-fans
Face paths including triangle-fans would often be avoided because
the face center and edge would 'zig-zag'.

Resolve using wighted face center and picking an edge-point between face centers.
2015-11-21 10:12:10 +11:00
9a2290a30b Fix T46826: EXR Compression method set in UI does not always get passed correctly to the actual OpenEXR writing code. 2015-11-20 19:22:51 +01:00
7e71be261b Cycles: Fix filter glossy being broken after recent changes
Basically we can not use sharp closure as a substitude when filter glossy is
used. This is because we can not blur sharp reflection/refraction.

This is quite quick and not really clean implementation. Not really happy
with manual handling of original settings, but this is as good as we can do
in the quick patch. It's a good acknowledgment and we now can re-consider
some aspects of graph simplification to make such cases more natively
supported.

P.S. This failure would have been shown by our regression tests, so please,
bother a bit to run Cycles's test sweep before doing such optimizations.
2015-11-20 18:18:27 +05:00
c4188c2bba Correct error in background job template
Remove check for the path being writable,
the operator raises error in this case.
2015-11-20 16:09:02 +11:00
d96ffde491 Fix switching scenes w/ background render
Caused by own de-duplication, b3492978

Scene switching relies on the window context being cleared.
2015-11-20 09:35:37 +11:00
86cb772eb7 Cleanup: variable names, ascii diagram 2015-11-20 08:22:44 +11:00
410ca0ed92 Recent change to bmesh_jekv caused assert
Note that the mesh was valid, this just stops the radial check from failing.
2015-11-20 08:22:44 +11:00
29d9140fce Fix T46804: Crash using triangulate modifier on a specific mesh.
Issues was again the ugly hack of swapping last generated tri with original face
we use in BMesh triangulate code - here it could lead in some rare case to have
invalid face pointer in doubles list.
2015-11-19 22:02:22 +01:00
c7c3f09269 Recent edits to grid-fill removed edgeloop flip 2015-11-20 07:30:16 +11:00
8bdb884289 Fix related to T46804 - BMesh validate code would use invalid pointers after checking them!
Note that this does not fix the issue reported in T46804, juts makes it crash later down in code...
2015-11-19 20:42:46 +01:00
c8bf45c323 Fix T48806: mesh.materials.clear() does not decrement users counts. 2015-11-19 18:03:38 +01:00
70cf77e1ce Fix new UI align code behavior with very small buttons.
In case two neighbor buttons are very small, their total width (or height) can remain below
max authorized delta, and hence wrong side could be detected as 'common side' for the pair.

This is now fixed by checking both opposite sides at once.

Also, we expect buttons to have some width and height to be considered alignable now!

Took me two days to sort that out, grrrr!
2015-11-19 15:13:38 +01:00
d573bb4f66 BMesh: support for grid-fill non uniform grids 2015-11-19 22:52:17 +11:00
b1c4d21e2e BMesh: support splitting edge-loops when expanding 2015-11-19 22:52:17 +11:00
9c044b4773 BMesh: new API call to collapse an edge
Existing collapse functions were strict regarding the number of verts sharing an edge.
BM_edge_collapse allows any edge to be passed in without first having to manipulate geometry.
2015-11-19 22:52:17 +11:00
93fb07fbd5 BMesh: bmesh_jekv check for degenerate faces
Move check for degenerate faces from BM_vert_collapse_faces into bmesh_jekv.
2015-11-19 22:52:17 +11:00
ae8e4d3718 Cleanup: redundant 'break', minor edits 2015-11-19 22:52:13 +11:00
b8c40d47e0 Cleanup: remove unused bmesh iterator 2015-11-19 22:13:35 +11:00
eeed28fefc Fix T46818, crash with Glossy node on Windows. 2015-11-19 08:43:43 +01:00
8dea06565f Cycles: Add Blackman-Harris filter, fix Gaussian filter
This commit adds the Blackman-Harris windows function as a pixel filter to Cycles. On some cases, such as wireframes or high-frequency textures,
Blackman-Harris can give subtle but noticable improvements over the Gaussian window.
Also, the gaussian window was truncated too early, which degraded quality a bit, therefore the evaluation region is now three times as wide.
To avoid artifacts caused by the wider curve, the filter table size is increased to 1024.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D1453
2015-11-18 20:50:06 +01:00
24a387d6ff Fix T46807: image/clip/sound load has one user
Loading data from Python gave it one user (unlike 'new' which has zero).
2015-11-19 06:24:21 +11:00
0639ba8ea5 Cycles / Shader graph: Fallback to Sharp closures for very small roughness.
We fallback to Sharp closures for Glossy, Glass and Refraction nodes now, in case the Roughness input is disconnected and 0 (< 1e-4f to be exact).
This way we gain a few percentages of performance, in case the user did not manually set the closure type to "Sharp" in the UI.

Sharp will probably be removed from the UI as a followup, not needed anymore with this internal optimization.

Original idea by Lukas Stockner(Differential Revision: https://developer.blender.org/D1439), code implementation by myself.
2015-11-18 18:47:56 +01:00
836c69c92f Cleanup: Add some notes in code for upcoming graph simplification process. 2015-11-18 17:20:39 +01:00
38bbc920a6 Cycles: Add utility functions to get a ShaderInput / ShaderOutput by name. 2015-11-18 17:12:26 +01:00
c2c11debe5 BMesh: simplify calculating grid edge loops 2015-11-18 21:41:06 +11:00
f9dff86363 Correct recent commit 2015-11-18 21:41:06 +11:00
3555ef184b RNA: reuse axis enum 2015-11-18 12:23:05 +11:00
a374ff16b5 Cleanup: editor api naming
- use ED_ prefix for api calls
- use ED_*_select_pick for mouse selection (was already done in parts)
2015-11-18 12:22:00 +11:00
eab0063481 Fix mixup w/ wmOperator/BMOperator flag 2015-11-18 11:09:44 +11:00
22931f2f9f BMesh: symmetry aware decimate
Support for decimating while maintaining symmetry on a single axis.
2015-11-18 10:52:00 +11:00
d6f9ba76a5 KDTree: add BLI_kdtree_range_search_cb
This performs a range search on the kdtree, running a callback instead of allocating an array.

Allows the caller to perform extra checks in the case of overlap,
avoids redundant array allocations, since caller can handle matches.
2015-11-18 10:51:54 +11:00
1dc1e9e4ae Cleanup: kdtree: use sq suffix for squared dist 2015-11-18 08:48:20 +11:00
18c4f1ad40 KDTree: store node references as ints (were pointers) 2015-11-18 08:42:26 +11:00
a189e544ec Fix for previous own commit (logical error - I hate bash). 2015-11-17 21:50:30 +01:00
f08ab30d14 Install_deps.sh: More attempt to fix building OSL on newer distro.
Now it looks like our version of OSL is not compatible with OIIO 1.5... sigh...
2015-11-17 20:38:01 +01:00
41d7e294ab Fix (unreported) install_deps.sh --force-openexr option not working. 2015-11-17 14:31:16 +01:00
f219986b2c install_deps.sh: point to newer own OSL rev (should fix issues on recent distro featuring recent ilmbase libs). 2015-11-17 14:31:16 +01:00
d81b9555e5 Fix T46793: VSE OpenGL renderer crashes when using grease pencil
Own regression in recent speedup commit.
2015-11-17 15:31:35 +05:00
a3530b35bd Fix T46784: Connect vertices (follow up)
Another fix for a slightly different case from the original report, to give better orientation.

Vertex normals influence on the orientation is now scaled by the alignment with the cut direction.

Also use face normal instead of loop normal which can be unreliable when the corners edges are co-linear.
2015-11-17 14:36:22 +11:00
98931d9e39 Fix T46764: Crash toggling region + fullscreen 2015-11-17 11:32:15 +11:00
304266b986 Clear timer on region duplicate, avoid double free 2015-11-17 11:22:30 +11:00
2ced9326bb Fix crash changing screen + region overlap fade 2015-11-17 11:02:28 +11:00
1cfe2748f4 Usual i18n messages fixes... 2015-11-16 19:13:24 +01:00
41bdd3fc39 Fix/enhance BKE_mesh_validate_arrays.
Aside from some minor cleanup, this commit:
* Fixes checking twice for multiple usage of same vert by a same poly.
* Fixes handling of ME_VERT_TMP_TAG vert flag by that check (there was no guaranty
  that flag was cleared for a poly's vertices before we start checking).
2015-11-16 15:46:56 +01:00
57a3163096 Speedup OpenGL sequencer animation rendering
The idea is to avoid having roundtrip from byte to float and back to byte buffer
and use render result's byte buffer to store result of sequencer rendering.
This actually matches to what regular render pipeline is doing and this gives
around 2-3 times speedup of sequencer export on a simple scenes.
2015-11-16 18:20:41 +05:00
5576524e88 ImBuf: Fix typo in duplicating float z buffer 2015-11-16 17:22:07 +05:00
59ed62fb5f Remove unused arguments from RE_WriteRenderViewsMovie() 2015-11-16 16:53:46 +05:00
19bfc3eb38 Followup to previous commit: similar thing was happening for multiview case 2015-11-16 16:48:34 +05:00
b5d900c272 Color management: Skip doing float->rect conversion twice when rendering animation
This is something what IMB_colormanagement_imbuf_for_write() is intended to do.

Gives around 40% speedup in test wile with OpenGL render and about 20% when
rendering simple cube scene animation.
2015-11-16 16:43:45 +05:00
093451e33d Fix own error w/ camera-dof in GL-render commit 2015-11-16 22:20:14 +11:00
dc14629b26 GHOST: rename suffix X11 to Unix for non X11 files
We may use these for Wayland or SDL back-ends.
2015-11-16 21:57:05 +11:00
86154b11ee Cleanup: typos 2015-11-16 21:06:40 +11:00
5fd5106740 minor cleanup: typo 2015-11-15 23:29:08 -05:00
e38a80d5f6 Fix T46784: Connect vertices uses odd orientation
Use connected faces to calculate the paths orientation
when normals are aligned with the direction.
2015-11-16 15:21:22 +11:00
24d2e46296 Add missing newlines for debug prints 2015-11-16 15:19:30 +11:00
21195a9ea4 check compute shader support for OpenSubdiv
Built into OpenGL 4.3, or 4.2 plus ARB_compute_shader extension.
2015-11-15 23:15:00 -05:00
711e3564b8 Keymap: Add delete-key for paint curves 2015-11-16 09:51:37 +11:00
f7b8bc45b2 Python: use keyword only args for addon_utils 2015-11-16 09:41:42 +11:00
dbc29cb147 Cleanup: remove unused profiling from bpy 2015-11-16 09:40:56 +11:00
603b867588 UI: support cycling for image space menus
also remove arrow buttons.
2015-11-16 07:14:47 +11:00
0d267737e2 UI: support cycling callback for non RNA menus 2015-11-16 07:14:46 +11:00
a70357104e Cleanup: replace pointer array w/ struct 2015-11-16 07:14:46 +11:00
bb6a580756 Fix uninitialized read in previous commit 2015-11-15 20:58:48 +01:00
4848d7329e Fix T46763: OpenGL render doesn't show 'Slots' 2015-11-16 05:32:37 +11:00
bc1d1aed80 windows / msvc bump to python 3.5 2015-11-15 11:21:26 +01:00
f9e8de0b26 minor cleanup: spelling/wording 2015-11-14 13:48:15 -05:00
f34cb5ab5a tweak GL extension check for OpenSubdiv drawing
Once we adopt GL 3.2 across Blender, the check will be:

return GLEW_VERSION_4_0 || GLEW_ARB_gpu_shader5;
2015-11-14 13:43:39 -05:00
46478ad2bc enable OpenSubdiv Transform Feedback on Intel
Fixed extension check.

This feature requires ARB_texture_buffer_object which was subsumed into
OpenGL 3.0. Intel driver on Windows doesn't claim to support this
extension, but GL version is > 3 so it actually does work.
2015-11-14 13:34:41 -05:00
175f8e49e7 enable OpenSubdiv on Intel graphics
Tested working on Haswell i5-4670 running Windows 10.
2015-11-14 13:27:09 -05:00
9ac08840ae Fix T46701: Sampled FCurve looks jagged when FModifiers (doing nothing) are present
This was caused by interpolation between samples being performed incorrectly
(i.e. wrong order of arguments) when sampling more than once per frame.
2015-11-14 18:09:10 +13:00
4d33c37c9e Fix T46726 shading issues in sculpt mode.
This fixes two issues:

* Normals were not being recalculated correctly when not using optimized
drawing for CDDerivedMesh (Multires actually handles that correctly).

* Loop normals (autosmooth option) were also not being calculated. Doing
this calculation is not desirable, since it can't be done correctly
without a severe performance hit. This is easy to test by doing a
dependency flush on the mesh after each scuplt stroke step. Instead they
are now disabled during sculpting.
2015-11-13 21:58:30 +01:00
92819425d8 Fix T46762: UV transfer Object transform crash.
Own very stupid mistake this time... :|
2015-11-13 20:54:07 +01:00
1e361880a9 Fix T46469: Data Transfer Modifier don't work.
Pretty nice copy/paste typo in looptri work...
2015-11-13 20:31:34 +01:00
8ad2808fd7 Tighten checks around unlinkable datablocks becoming LIB_EXTERN.
We have currently a gooseberry file (scenes/01_island/01_meet_franck/01_01_01_A/01_01_01_A.anim.blend)
that links against two -pre repo libs, which are hence not available for common mortals,
and generate warnings and placeholders during load step.

Issue is, among those missing (directly) linked datablocks, we have two shapekeys!

This should never happen nor be possible at all. I tried understanding how this could happen,
with no luck at all, best bet would be some wild/bad call to `id_us_plus()` over those skeys
at some point...

Anyway, this commit:
- Handles a bit better those 'cases that should never happen' at load time.
- Adds several checks in ID handling code (and save/load code) to try to detect where/when
  a non-linkable datablock becomes LIB_EXTERN (i.e. directly linked).
2015-11-13 15:34:07 +01:00
400e8c6449 Cleanup: readfile: cleanup a bit error messages.
Printing those twice is already not so nice, but at least let's try to print same thing,
and avoid repetition of 'ERROR' in it.
2015-11-13 15:26:22 +01:00
6d497d4f3b Cleanup: readfile: avoid some verbose if() checks which are already done in called code. 2015-11-13 15:04:06 +01:00
45cae17b25 Fix T46757: Blender Close when try to render an Animation
Was a missing NULL-pointer check in recent frameserver commit.
2015-11-13 11:05:14 +05:00
a7ac59414b Cleanup: rename line to segments, avoids confusion
Differentiate between lines and segments.
2015-11-13 07:48:05 +11:00
930771d0cf Fix T46749: Texture paint & shadeless mode fails
Using shadeless did nothing in texture-paint mode.
(regression in 2.76)
2015-11-13 06:35:42 +11:00
bd9005ef3b Frame Server: use main render loop
Avoid duplicate checks/updates when the frameserver is used.
2015-11-13 03:29:10 +11:00
63f2f82f92 Fix T46641: Bicubic transform on ID channel is not bicubic
Better support of bicubic sampling of ID mask output.

The idea is to generate ID mask into a temporary buffer which is then being
interpolated using current sampling method.

This works fine for upscaling or rotating the ID mask but does not work for
scaling down. This is much-much bigger problem of the compositor design and
can't really be solved currently. Same will happen with other nodes like
blur for example.

Reviewers: campbellbarton

Subscribers: ania

Differential Revision: https://developer.blender.org/D1612
2015-11-12 20:29:54 +05:00
03e8202b7b Fix T46320: New Depsgraph: Auto-IK doesn't work
The issue is caused by transform tool temporary affecting on the pose
constraints, which actually changes the way how pose is to be evaluated.

This isn't ideal patch from the performance point of view, but only
limited to the new depsgraph, so we've got some time to work on partial
graph updates.
2015-11-12 20:19:30 +05:00
8ef68bf989 Fix T46729: Render result different between animated and still renders
The issue was in fact a feedback loop between render database init which needs
to know which render layers to initialize and scene update for newframe which
needs to know which layers to update.

Worked around by updating scene animation before render database initialization
which isn't really ideal, but doesn't really have much better alternative.
2015-11-12 19:31:43 +05:00
19cdceaee4 Fix T46748: OpenEXR output different when frame saved with F3 vs. in an animation
The issue was caused by the image save operator ignoring Z-Buf if the input
buffer due to the way how IMB_dupImBuf() worked. There's no reason to to
ignore z-buf on imbuf duplication, it only asks for issues in the future.
2015-11-12 19:19:30 +05:00
46f452e96b Fix error cutting node links
Accessing theme from outside drawing code isn't reliable, pass space-type.
2015-11-13 00:03:12 +11:00
833ef0cfdd Transform input: don't change initial cursor value
Store previous coords in cursor data instead.
2015-11-12 22:58:35 +11:00
2d96666a71 Fix for factory settings loading without UI
When load-ui was disabled, resetting factory settings kept existing UI too.
2015-11-12 21:52:25 +11:00
6cbccdd31c Cleanup: unused defines 2015-11-12 18:54:26 +11:00
60505728d9 Correct error in own matrix normalize commit 2015-11-12 18:54:26 +11:00
d75bca1842 Cleanup: replace more direct id->us handling by calls to BKE_library API. 2015-11-11 20:21:37 +01:00
9cff20e5c6 Correct assert in own last commit 2015-11-12 05:51:39 +11:00
d74fa9c12c Cleanup: readfile.c: use id_us_ensure_real() instead of own custom 'at least one user' handling.
Note that in master this is mere cleanup, which shall not change much things
(aside from FAKE_USER now being taken into account here too), and mostly
makes things more consistent, but in id-remap branch this becomes mandatory
due to better handling of this ugly 'ensure_real' stuff re user count.
2015-11-11 19:52:42 +01:00
a2e51eb66a Merge branch 'master' into openvdb 2015-11-11 18:02:25 +01:00
137ca0b241 Fix T46741: Transform ignores constraint space
Calling transform operator from Python didn't apply the constraints space.
2015-11-12 02:21:56 +11:00
9d18e46ddf And another fix to psys ID handling - ParticleSystem->part **is** user counted! 2015-11-11 16:14:44 +01:00
256f091cbd Fix (unreported) foreach ID looper going over some psys' IDs twice... 2015-11-11 14:59:50 +01:00
7b96f02f5b OpenGL Render: Support full-sample Anti-Aliasing
This brings back old (slower), higher quality method.
Useful since graphics cards often use a faster MSAA which only oversamples edges.
2015-11-12 00:25:09 +11:00
145298e2d3 Cleanup: GL Render (simplify internal logic)
Reduce code-paths so improvements to 3D view render apply to sequencer too.
2015-11-11 23:07:07 +11:00
497c35aa78 CMake: don't overwrite C/C++ flags for MSVC
Wasn't possible to define custom build flags.

This does change some of the build flags,
as far as we can tell they aren't important (see D1615).
2015-11-11 22:57:28 +11:00
fa959715fd Free libraries last, and not first - most datablocks may have link to those... 2015-11-11 12:28:06 +01:00
a9df76b167 Fix (unreported) potential crash: ParticleSystem->part shall never be NULL. 2015-11-11 11:46:25 +01:00
69674f3875 Fix T46694: UVLoop incorrectly copied flag
Error in copying customdata flag lead to pin being randomly enabled.
2015-11-11 19:07:04 +11:00
8c84a1873d Cleanup: use func definitions for wm/notifiers/editors ID callbacks. 2015-11-10 20:35:43 +01:00
78836c0211 Fix T46743: Crash w/ limit rotation constraint
Using axis-angle + limit rotations 'Transform' option was crashing.
2015-11-11 04:46:55 +11:00
3c1b00ef7e Docs: create link pointing to latest API docs 2015-11-11 04:14:11 +11:00
8323e9f790 Cleanup: make readfile.c also use ID_FAKE_USERS. 2015-11-10 17:29:12 +01:00
8d9c7e6988 Correct order-of-freeing error from last commit 2015-11-11 03:18:41 +11:00
d9c89f175f Cleanup: ID usercount: moar checks and factorization. No change in behavior expected. 2015-11-10 16:21:09 +01:00
3b38fd6bf9 Fix T46720: Crash applying subsurf modifier
Freeing a modifier that had data in the derived mesh could crash
(applying or removing).
2015-11-11 02:05:13 +11:00
0024306362 Fix T46711: view3d UI limits not scaled w/ scene
With the scene scale set to 0.001, buttons were clamped to 10m.
2015-11-11 00:58:22 +11:00
c23179f367 Cleanup: minor deduplicate of code. 2015-11-10 14:50:32 +01:00
3dbc123061 BGE: allow setting velocity to zero in a motion actuator.
The motion actuator goes out of its way to prevent setting zero velocities,
which should actually be supported. This patch just works around it as a
first test. We should investigate whether the flags
`m_bitLocalFlag.ZeroLinearVelocity` and `m_bitLocalFlag.ZeroAngularVelocity`
are actually needed/desired at all.

One of the issues that's already visible with this simple change, is
that objects aren't actually frozen but still move a little bit; see
test with {F241908}.

Reviewers: lordloki, hg1, moguri, panzergame

Reviewed By: lordloki, panzergame

Differential Revision: https://developer.blender.org/D1545
2015-11-10 13:39:20 +01:00
7bb16a5ccf Fix (unreported) broken background mode of Blender (due to OSD cleanup called also in background mode). 2015-11-10 10:38:41 +01:00
738bc300c7 Fix T46738: Crash adding hook to linked mesh dupli 2015-11-10 20:27:27 +11:00
e26a0c5782 Fix compilation error with IME enabled after recent changes 2015-11-10 14:09:34 +05:00
22c3d2efeb "Fix" assert in new UI align code.
Looks like UI code can produce widgets with same left/top positions (in very narrow space case).
Not nice, but we do not really care, UI becomes unusable way before we reach that point anyway.
2015-11-10 09:27:36 +01:00
54a04effff Prevent non-button space used as a SPACE_BUTS from template_preview 2015-11-10 13:00:53 +05:00
b3184640fe OpenSubdiv: Enable GLSL Compute for AMD devices
There was a bug in OpenSubdiv library which is now fixed by updating library in
the build environments.

Still requires testing, but now being at the beginning of release cycle is
should be safe to simply enable option and let everyone to test :)
2015-11-10 12:16:18 +05:00
ee761ebda9 Text Editor: use line-number color for margin
also use stipple so you can see the cursor behind it.
2015-11-10 09:19:34 +11:00
39497bbb48 Cleanup: move ui-selextend defines into header 2015-11-10 09:07:43 +11:00
0d5f845bb5 UI: support editing >400 length text buttons
RNA could define strings as dynamically sized,
but the interface ignored this and clamped them to UI_MAX_DRAW_STR.

Fixes T46734, also fixes possible pasting non-utf8 text into utf8 buttons.
2015-11-10 08:53:42 +11:00
6860ccabc0 Cleanup: BKE_library_update_ID_link_user: use id_us_ensure_real for IDWALK_USER_ONE. 2015-11-09 21:15:11 +01:00
9c6fe810a3 Fake user: add BKE_library helpers to set/clear that flag.
Since it also involves usercount manipulation, safer and cleaner to do it in BKE_library...
2015-11-09 21:00:53 +01:00
f761ae8f11 Rework a bit id_us_min, and make it assert on usercount error. 2015-11-09 21:00:53 +01:00
865796375b Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.
We have callbacks for that, they also do some checks and help ensure things are done
correctly. Only place where this is assumed not true is blenloader (since here we
may affect refcount of library IDs as well...).
2015-11-09 21:00:53 +01:00
cf959a879e Cleanup: readfile: get rid of USER_ONE, replaced by USER_REAL everywhere.
USER_ONE was only ensuring id->us was non-zero, while USER_REAL ensures
it is non-zero **and** >1 in case fake_user flag is set (which at least
ensures us unsetting fake_user won't leave id->us in invalid zero state).
2015-11-09 21:00:53 +01:00
92f059774d CMake: remove setting of policy CMP0043 to OLD.
CMake 3.0 ignores the suffixed COMPILE_DEFINITIONS_<CONFIG> variants if policy
CMP0043 is NEW, preferring instead to consume the unsuffixed COMPILE_DEFINITONS
property and evaluate generator expressions in it.

Setting the policy to OLD causes CMake 3.0 to not ignore those properties.

Use the suffixed properties for compatibility only for CMake versions older
than 3.0 using an explicit version check.  Use the non-suffixed property with
generator expressions otherwise.

These definitions should mostly not be needed at all - CMake already sets
NDEBUG in suffixed CMAKE_CXX_FLAGS_<CONFIG> variables.  The _DEBUG macro is
non-standard, but is used in several places in blender (usually in an OR
combination with the DEBUG macro).  Additionally, blender overwrites (instead
of appending to) the CMAKE_CXX_FLAGS_<CONFIG> variables on WIN32.

Rather than try to fundamentally change how debug-macros are handled in
blender, change the buildsystem to keep the same behavior without requiring the
CMP0043 policy set to OLD.
2015-11-10 06:31:09 +11:00
edc780c3b0 UI: avoid duplicating the string to set the cursor
Internal change only.
2015-11-10 05:31:29 +11:00
cfbbf72d89 Revert "Increase CMake minimum version to 3.0"
This reverts commit ff3cf93405.

Turns out distros only a year old still use CMake 2.8x
2015-11-10 02:53:10 +11:00
18ecc8a78f Fix broken groupobject usercount handling.
As we can see in (original) read code, ob pointer in groupobject is actually a 'USER_ONE' case.
This was not done in 'add object to group' code, probably because we can assume objects always
have at least one user in that case? Made it explicit now. Also fixed foreach_ID_link looper.

In general we have waaayyyyyy too much 'own handling' of ID->us count in code currently,
will clean up that...
2015-11-09 14:53:03 +01:00
ff3cf93405 Increase CMake minimum version to 3.0
This allows us to use newer features of CMake, and less hassles having to test & support older versions.
2015-11-09 23:37:53 +11:00
56933373e2 Code cleanup: remove some unused mesh laplacian code. 2015-11-08 15:17:29 +01:00
73977064a6 Remove outdated TODO, it's supported already 2015-11-08 10:20:54 +05:00
d6059e991a Point Density: Prevent crash when scene is not sent to calc_point_density() 2015-11-08 10:10:55 +05:00
5f95a4fb33 Remove unused header files
Was a left-over from recent OpenSubdiv changes.
2015-11-08 07:56:39 +05:00
15a1faefe9 Fix T46712: Crash while rendering Freestyle scene
The issue was in fact caused by missing initialization of motion blur shutter
curve for all new scenes when not using "Copy Scene Settings" option.
2015-11-08 07:29:12 +05:00
Martijn Berger
8c3538c3e7 Cmake Cpack fix cpack on Apple and Linux 2015-11-07 22:42:21 +01:00
ee8fbebd46 Change cpack package name to be "blender" instead of "Blender" 2015-11-07 08:34:27 +01:00
659af5d4f2 [Windows] Make installer use the template 2015-11-07 08:26:45 +01:00
6208ca25fa Cleanup: ui align header 2015-11-07 17:36:10 +11:00
dcc41c4f78 Cleanup: spelling, headers 2015-11-07 17:31:28 +11:00
02f3cebf6e Fix T46522: DataTransfer modifier: Impossible to set multiple transfer modes by script
(if they're on different properties).

This patch basically gets rid of (ui-related) hack where we was adding specific
'fake' enums for datatypes needing additional options.

That was done because of broken UI code - to summarize, 'align' code did not support
correctly layout mixing vertical and horizontal sub-layouts, in particular if
it was 'column-major'.

A complete rewrite of this align code has been done, so now we can use a more
sane UI code.
2015-11-06 19:27:39 +01:00
e77e018d48 Fix typo in new error reporting during arg parsing. 2015-11-06 18:54:52 +01:00
3d39b98f94 New uialign code, based on 2D positions of widgets.
This new code fixes a tons of issues with previous one, which basically was epic-failing
in many non-basic cases (especially mixed columns and rows with column-dominant layout).

It basically no more relies over order of buttons declaration in the uiBlock, instead it
finds and stores spatial neighbors and uses that data to compute needed stitching.
See code comments for details.

New code seems to be roughly ten times slower than old one (for complex grouped layouts),
that is, about a few microsecconds per alignment group - this remains reasonable.

Also, ui-align code becomming rather big in itself, it was separated in
own new `interface_align.c` file.

Reviewers: campbellbarton, severin

Reviewed By: campbellbarton, severin

Differential Revision: https://developer.blender.org/D1573
2015-11-06 18:54:33 +01:00
a25df21631 Command line args: print error w/ invalid numbers 2015-11-07 02:07:06 +11:00
Julian Eisel
cf08dc9f0c Use toggle buttons instead of checkboxes for VSE proxy percentage
Was inconsistent with Clip Editor which uses toggle buttons. Toggle buttons are narrower, so changing to them.

Reported in T46708.
2015-11-06 15:01:19 +01:00
97c8619b42 Fix T46587: Drivers do not work in node groups
This commit makes drivers on node groups to with when using new dependency graph.

Still TODO: Need a relation between drivers and tree evaluation  perhaps, so we
guarantee proper order of all operations.
2015-11-06 18:36:22 +05:00
1ffdb1b472 Fix T46696: Voxel crash indexing over INT_MAX
Use int64_t for index values.
2015-11-06 20:09:56 +11:00
Julian Eisel
4b316e78b6 Draw limit & mist indicators darker for non-active cameras
Darkens the colors for limit and mist indicators of non-active cameras. This makes it easier to see which indicators belong to the active camera and which don't.
Useful for layouts with multiple cameras.

Requested by the Caminandes team.
2015-11-05 19:41:39 +01:00
7a09d15ade Cleanup: comments/style 2015-11-06 05:34:05 +11:00
1adc196723 Correct error in recent commit 2015-11-06 01:56:29 +11:00
131c2a2bef Use 'beauty' for sculpt triangulation
Causes fewer degenerate quads.
2015-11-06 01:13:23 +11:00
0f769afe07 Fix T46692: Triangulate creates duplicate faces
Caused a crash in dyntopo.
2015-11-06 01:13:23 +11:00
cb39a4171b Fix T46691: Graph Editor, Channel, Toggle Channel Editability. Cannot reassign hotkey after removing it.
Anim Channels keymap is not editor-related...
2015-11-05 12:57:52 +01:00
fcf8f01ca0 BGE: Cleanup occlusion buffer in CcdPhysicsEnvironment.cpp
This patch cleanup spaces/braces and newlines.

Reviewers: moguri, kupoman

Reviewed By: moguri, kupoman

Subscribers: kupoman

Differential Revision: https://developer.blender.org/D1607
2015-11-05 12:34:31 +01:00
ebb2a78c7a Error in last commit 2015-11-05 22:25:09 +11:00
06ef778e08 Fix T46699: copy_prev_settings() gives misleading error message when previous version's config dir doesn't exist. 2015-11-05 11:10:49 +01:00
3863660c37 Fix face creation using incorrect loop-custom-data
Custom-data on newly created face data was often rotated.

Now the API doesn't copy data from adjacent loops when creating faces.
Most functions were already overwriting this anyway.

Since such decisions are better made at a higher level, now it's the responsibility of the caller.
2015-11-05 20:19:09 +11:00
41e267b4b4 API Docs: use importlib in examples 2015-11-05 19:08:17 +11:00
534c0af4d3 Fix BMesh memory leak w/ multires data 2015-11-05 19:07:22 +11:00
23344bca6c BMesh: triangulate & poke - multires data support 2015-11-05 17:40:33 +11:00
ce49c70956 BMesh: generalize logic for quad/ngon triangulate
Avoid having 2 different code-paths for face triangulation.
2015-11-05 08:19:05 +11:00
3152419e7e Add missing check for multires interpolation 2015-11-05 06:03:26 +11:00
206c42f3ce Fix compilation error with OpenSubdiv disabled 2015-11-04 22:31:06 +05:00
a5f4f1e2ce OpenSubdiv: Use pool for delayed OpenGL buffers free when freeing from non-main thread
This is really similar to what GPU module was already doing. There are number of
possible improvements still:

- Re-use allocated VAOs when requesting new ones instead of going to the trouble
  of freeing VAO and then re-creating it again.

- Move VAO handling to GPU module.

Fixes T46589: OpenSubdiv crash with drivers
2015-11-04 21:30:25 +05:00
4ff6e08a6d Tracking: Solve annoying "script needs updating" warning printed to the console 2015-11-04 20:13:21 +05:00
321a609caa Fix T46687: Animating tracks properties from objects didn't use proper path 2015-11-04 20:13:21 +05:00
7db2979dcf Tracking: Move tracks list base search to an utility function
No functional changes expected, just makes it easier for reuse.
2015-11-04 20:13:21 +05:00
b566adec52 File Selector, support filepath dropping
This adds support for dropping a filepath on an open file-selector to set that path.
2015-11-05 01:33:50 +11:00
e43b6e2f97 Fix T46672: Concurrent access to source DM in datatransfer modifier.
There is no real elegant solution here, ideally a modifier shall never *modify*
a source DM, but that would imply much better ways to ensure required data
is available in that source DM, which we do not have currently.

So instead, let's use brute force solution for now and always create a local copy
of our source DM, that we can modify to our heart content!
2015-11-03 21:16:58 +01:00
584f439112 imp: show alert color if mesh has weight groups but no active group is selected 2015-11-03 20:19:16 +01:00
8c25c1c484 Fix T46683: High pitch sound artifact on import of 48k audio
The bug header is wrong, the file contains the high pitched sound, but the bug that existed was that animation rendering did not use the high quality resampler, while audio mixdown does.
Blender uses the low quality resampler to be as little CPU consuming as possible.
2015-11-03 19:34:33 +01:00
7f57bc9ef4 Avoid assert weight painting w/o an active group 2015-11-04 04:37:47 +11:00
020fdeb760 Cleanup: de-duplicate quad_coord & resolve_quad_uv_v2 2015-11-04 04:01:15 +11:00
1fb512f4a9 Fix T46611: Vertex group locking fails 2015-11-04 03:00:50 +11:00
883a894d77 Fix related to T46567: Skin modifier: add a warning message when no valid root vertex is found.
Otherwise user may have a hard time understanding why their modifier is no more working
after they e.g. deleted some vertices... including the root one. ;)
2015-11-03 14:53:11 +01:00
537bd0eb51 Fix T46671: Cycles assert with CMJ sample function
With current formulation of cmj_fast_div_pow2() it should always return 0
in the case of first argument is zero and no assert really needed anymore.
2015-11-03 18:49:27 +05:00
268538853c Correct error in recent commit 2015-11-04 00:01:41 +11:00
aa15ede3b9 Don't expand toggle brush on linking
Toggle brush is more a runtime only feature, not really supposed to be used
as real ID linking as it's done for modifiers i.e.
2015-11-03 15:30:57 +05:00
bed91b623f Edge/Vert slide: improve multires interpolation
Need to re-interpolate the entire face, not just the connected loop.

Also add BM_face_interp_multires()
2015-11-03 20:38:23 +11:00
f29f4c92f2 BGE: Remove KX_IPOActuator.
KX_IPOActuator is not used since 2.4.

This patch removes:
	- KX_IPOActuator.h/cpp;
	- Python doc;
	- Write of IPO actuator in write.c;
	- Allocation of IPOactuator in sca.c;
	- Conversion in KX_ConvertActuators.cpp;
	- Initialization of the python proxy in KX_PythonInitTypes.cpp;
	- Other minor remove in logic_windows.c and in KX_PythonInit.cpp.

Reviewers: sybren, campbellbarton

Reviewed By: campbellbarton

Subscribers: moguri

Differential Revision: https://developer.blender.org/D1603
2015-11-03 10:31:08 +01:00
6063790732 Fix T46677: OpenSubdiv crashes when witching from simple and CC subdivisions
Crash was happening due to OpenGL free from the non-main thread. Ideally we need
to implement somewhat delayed unused buffer free for OpenSubdiv similar to what we
are doing in GPU module.
2015-11-03 14:26:56 +05:00
0d0fa446b7 Fix: edge/vert slide ignored multires data
Multires data fails the CustomData_layer_has_math() check,
so meshes without UV's for eg werent getting interpolated multires.
2015-11-03 19:14:19 +11:00
f75d6c4a8f BMesh: add BM_loop_interp_multires_ex which takes cached vars
Avoid recalculating face centers (for each loop) when interpolating multires.
2015-11-03 18:28:13 +11:00
77e223ddd5 BMesh: inline vert-loop iteration for normal calc
Calculating normals is called often (sculpting for eg),
so avoid using high-level iterator here.
2015-11-03 17:46:09 +11:00
ac7abb55d7 Cleanup: use 'const' for BMesh checking funcs 2015-11-03 17:06:56 +11:00
073ae9c572 Fix flip normals w/ multires
Needs Z axis flip to maintain the shape.
2015-11-03 15:50:59 +11:00
5f0f861b1d BMesh: avoid mdisp lookups (minor optimization) 2015-11-03 15:50:52 +11:00
d0d523d809 Better fix for pthread ID comparison crap on windows.
Suggested by Sergey, thanks!
2015-11-02 19:25:00 +01:00
d2fbbed462 Attempt to fix win32 compilation after own recent commits. 2015-11-02 18:48:14 +01:00
15fb2bd477 Filebrowser: fix preview handling to make correct use of task scheduler.
We needed the 'background' feature here, since we never wait on those preview-generation tasks.

Note that it also simplifies the code, and as usual testing is needed here on all possible platforms...
2015-11-02 17:04:31 +01:00
04ac8768ef BLI_task: add support for full-background taskpools.
With current code, in single-threaded context, a pool of task may never be executed
until one calls BLI_task_pool_work_and_wait() on it, this is not acceptable for
asynchronous tasks where you never want to actually lock the main thread.

This commits adds an extra thread in single-threaded case, and a new 'type' of pool,
such that one can create real background pools of tasks. See code for details.

Review: D1565
2015-11-02 16:57:48 +01:00
44774f8160 BLI_task: add freedata callback to tasks.
Useful in case one needs more complex handling of tasks data than a mere MEM_freeN().
2015-11-02 16:52:19 +01:00
952afbf916 BLI_task: Fix/enhance logic of exiting worker threads.
In previous code, worker would exit in case it gets awoken from a condition_wait() and
task queue is empty. However, there may be spurious wake up (either due to pthread itself,
or to some race condition between workers) that would lead to wrongly exiting a worker before
we actually exit the whole scheduler. See code for more details.
2015-11-02 16:42:39 +01:00
ba5d6f5b6b Fix/workaround T46622: crash w/ metas & particles
Metas are scanning all scenes duplis,
which can go into particle systems without an initialized derived-mesh.

For now just do NULL check, its not correct but real fix is not fitting well with current design.
2015-11-02 23:08:44 +11:00
7b7aba31f2 Fix T46626: Crash generating previews
Brush.toggle_brush was allowed to be an invalid pointer,
it worked for the one operator that used it - but in general bad practice,
requiring a lookup on every access.

Ensure the pointer is kept valid now.
2015-11-02 21:42:47 +11:00
7a9693fa8b Library API: pass Main struct to unlink functions 2015-11-02 21:20:03 +11:00
56bcda8bc6 Fix BMesh selection flushing w/ mixed modes
Fix for T46494 wasn't working properly when de-selecting faces,
adjacent faces would remain selected but have unselected edges.

Logic here is admittedly rather fragile since it relies on both
selection functions and flushing afterwards.
2015-11-02 17:04:29 +11:00
8e7eb0b733 Fix T46660: No need to set explicitely UI range of auto smooth angle anymore. 2015-11-01 19:58:41 +01:00
9bce104c8c Cycles: Partially revert previous commit
Apparently removing kernel arguments broke NVidia OpenCL.

Needs more investigation, for the time being revering changes which caused problem.
2015-11-01 21:01:12 +05:00
b387d7fb47 Merge branch 'openvdb' into cvdb_ray_isect 2015-11-01 13:48:30 +01:00
f5a0a3b66f Merge branch 'master' into openvdb 2015-11-01 13:40:36 +01:00
dc9e0b819b Cycles: Remove unused argument from the split kernel functions
Should be no functional changes, just simplifies operation with kernels.
2015-11-01 17:22:42 +05:00
84e8b05e97 Cycles: Minor code style cleanup 2015-11-01 15:40:17 +05:00
99df433ea7 Fix T46655: crash reading unknown ID types 2015-11-01 14:27:25 +11:00
632ed6a0d6 Cleanup: remove unused scene recalc 2015-11-01 12:49:43 +11:00
cf5154dcff Cleanup: old comments 2015-11-01 12:49:40 +11:00
df61c50ffa Fix T46651: Select linked crash w/ wire seam edges 2015-10-31 17:10:22 +11:00
92ab3ba385 Fix T46648: Recalculate normals fails
Certain shapes could trick the inside/outside test.
An edge between 2 planar faces could be selected for detecting face-flipping (which failed).
While this could be prevented by skipping those edges,
use a method which searches for the outer most face-loop, then check it faces the center.
2015-10-31 13:52:28 +11:00
a0d9953841 Fix netbeans project generator
Need to escape defines
2015-10-31 11:31:58 +11:00
a43e087fb8 Cycles: Add split kernel headers to project generation 2015-10-31 04:08:19 +05:00
Julian Eisel
37fbabc64b Fix T46647: Crash when using redo panel after extrude individual faces
Caused by rBe0c60985b6.
2015-10-30 21:54:47 +01:00
cb1cb63d40 Cycles: Fixes for few typos in OpenCL kernel 2015-10-30 23:31:24 +05:00
16845a5f34 Fix memory leak caused by recent shutter curve commits 2015-10-30 18:01:53 +05:00
5bfa43d385 Include Python binary in system-info.txt 2015-10-30 22:33:24 +11:00
0a5fdb6354 Python: check version binary name first
Check version name first since 'python' binary may be a different version.
2015-10-30 22:33:24 +11:00
43bf78c946 Image editor: Add options to display separate R, G and B channels
Works totally similar to backdrop in the compositor.

Requested by Sean Kennedy, but could be useful for lots for VFX guys.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: sebastian_k, hype

Differential Revision: https://developer.blender.org/D1590
2015-10-30 16:07:10 +05:00
e6abc3ad57 Transform: Support storing virtual cursor location
Grabbing now doesn't 'jump' when shift is released (matching rotation modes).

This simplifies most logic for transform input,
where mouse input callbacks can choose to use the 'virtual' cursor,
which accounts for precision when shift is held.
2015-10-30 18:24:02 +11:00
d2af140151 BGE: Fix SetMass function affecting own object gravity.
Each time we setted the mass the own object gravity was divided by its
old mass (i.e you could convert you car in a flying DeLorean with a
simple mass car modification).

A note will be included in release notes due to retro compability
issues.
2015-10-30 06:51:22 +01:00
c03598955b Optimization: use dot product for angle comparison 2015-10-30 16:20:22 +11:00
a3c9374440 Fix T46507: Cycles baking re-orders face
Regression in 2.76, order of tessellated vertices needs to follow MFace tessellation.
2015-10-30 14:59:48 +11:00
d8233d2308 Fix T46619: Levels node becomes Undefined
regression caused by 79c345ac
2015-10-30 10:57:02 +11:00
8014180720 Vertex Paint: orbit last stroke support
This option works for all paint modes now.
2015-10-30 09:56:33 +11:00
Julian Eisel
cd1d6d7770 Fix T46632: Graph editor frame navigation shortcuts not working 2015-10-29 20:50:30 +01:00
286f5ffa59 BGE: Fix T38986: Start object position not initialized in IPO.
The start position must be initialized at the first call of KX_IpoSGController::Update when m_ipo_start_initialized is to false, not when also the frame time is not 0.
2015-10-29 18:44:09 +01:00
537f41250f Cycles: Fix typo in split kernel
Shadow blocked kernel was using wrong array for storing intersection.
2015-10-29 21:52:56 +05:00
3300b1f232 Cycles: Add option to force mega kernel to be used
This way it's possible to test mega kernel on various hardware.

That being said mega kernel seems to work on Fiji card here in the studio.
2015-10-29 21:52:56 +05:00
4ca688a963 Cycles: OpenCL split kernel cleanup, move casts from .h files to .cl files
Ideally we shouldn't use char* at all, but for now we have to, so at least
let's assume common .h files are free from pointer magic.
2015-10-29 21:52:56 +05:00
fc5f717888 BGE: Cleanup KX_IPO_SGCOntroller.
- Add spaces around operators.
- Replace !(a == b) by a != b
- Add "f" at end of float value.
- Remove extras lines in fonctions declaration.
- Remove indentation to align attributes definition.
2015-10-29 17:24:35 +01:00
6005bb5846 OpenCL wrangler: Update to latest version to fix issues with -1001 error code 2015-10-29 20:37:38 +05:00
324d20bc64 Fix error introduced by D1588 2015-10-30 00:09:25 +11:00
8d3d931f6a BGE: Fix T46338 replace mesh from an other scene.
To make consistent with KX_GameObject.replaceMesh, we don't allow this behavior but print an error message for the replace mesh actuator.
e.g : Warning: object "Cube" from ReplaceMesh actuator "Edit Object" uses a mesh not owned by an object in scene "scene1"

Reviewers: youle.
2015-10-29 12:14:40 +01:00
0e80d0893f New depsgraph: Optimize updates flush
Previously it was possible that same component will be tagged for update
again and again, making update flushing really slow. Now we'll store flag
whether component was fully tagged.

This is still temporary solution because ideally we should just support
partial updates, but that's for the future.

Gives around 10% speedup on file from jpbouza.
2015-10-29 14:19:25 +05:00
a15a3952f4 BGE: Fix T35188: Duplicate an instance of group.
This behavior caused a double free.
Before when we duplicated an instance of a group the new instance keep the pointer of the group but was not added in the group instance list (normal).
And during the object deletion we tried to remove the object in the instance list but anyways if it failed decrement the reference count.
Set the group and the instance list to NULL in ProcessReplica avoid these kind of problems.
2015-10-28 22:11:15 +01:00
Dalai Felinto
138decb7dc Temporary "fix" for crash when saving OpenEXR Multi-View from Image Editor 2015-10-28 14:06:55 -02:00
Dalai Felinto
20a94e956a Fix T46617 File Output Node seems to save only black images into OpenEXR image data
If the node output had only one layer, it would be detected as singlelayer, and it would miss the blender exr header string
2015-10-28 14:06:55 -02:00
734af18651 Freestyle: Fix for 'Distance from Object' modifiers without a target object.
'Distance from Object' color/alpha/thickness modifiers without a target
object were raising a run-time exception although it is not considered an
error condition.
2015-10-28 23:33:25 +09:00
efd774ce5a Fix T44231: Freestyle causes crash on render.
The reported crash was confirmed as a segmentation fault in std::sort().
The cause of the crash was traced down to a binary comparison function
that was not satisfying the so-called strict weak ordering requirements of
the C++ standard sorting function.  Specifically, the comparison operator
has to return false when two objects are equivalent (i.e., comp(a, a) must
be false), but that requirement was not met.

Since the binary comparison operator in question could be a user-defined
Python function, here a safety measure is implemented in the C++ layer to
make sure the aforementioned requirement is always satisfied.
2015-10-28 23:22:58 +09:00
ced1c34f74 Ceres: Update to the latest version
It brings all the performance improvements, bug fixes and stability improvements
which were done in the last year of Ceres development.
2015-10-28 19:20:50 +05:00
f10db730bc BGE: Fix T45945: Action bouncing.
Bug introduced in 583fa7d1e, KX_GameObject.setActionFrame can make BL_Action::m_starttime negative. But in BL_Action::Update m_starttime is set to the current time if it's negative.
To fix it we use a boolean BL_Action::m_initializedTime to know if we should initialize the time in BL_Action::Update, it's more stable than comparing times.

Tested with bug task T45945 and T32054, with an extra patch about to fix suspend resume scene issues with actions : D1569
2015-10-28 15:13:12 +01:00
e0c60985b6 Transform: Replace t->imval w/ t->mouse.imval
Initial mouse position was saved in two different places

D1588 by @mauge
2015-10-28 23:31:15 +11:00
d1e18c35d3 Docs: support alternate binary path for PyAPI 2015-10-28 23:30:37 +11:00
5196da4b98 Cleanup: warning/style 2015-10-28 23:30:37 +11:00
0e76c52033 Cycles: Fix compilation error with MSVC 2015-10-28 17:33:31 +05:00
fd8c3fe070 Follow up to previous commit, proper fix for T46284, incorrect Texture
shading in Texture paint mode and cycles
2015-10-28 12:51:50 +02:00
e3d882b335 Revert "Fix T46284: Texture paint, wrong shading mode"
Should fix T46616 but will reintroduce T46284.
The second, original bug needs different handling

This reverts commit 904db487a7.
2015-10-28 12:36:25 +02:00
40b2e75b20 BGE: Fix T46557: Empty collision bounds option with character physics
- Fix in rna_object.c rna_GameObjectSettings_physics_type_set->The
collision bounds type can't be empty for character physics
- Add do_version for the .blends already saved with collision bounds
option empty (characters)

Reviewers: campbellbarton, panzergame, lordloki

Reviewed By: panzergame, lordloki

Subscribers: lordloki

Projects: #game_engine

Maniphest Tasks: T46557

Differential Revision: https://developer.blender.org/D1576
2015-10-28 02:04:30 +01:00
9eb7eb5379 BGE: Fix T44448: LOD will display wrong LOD level object if zoomed out
then in

Current object distance hasn't to be cached.
2015-10-28 01:22:16 +01:00
fd1487977b Fix T46471: Sculpt strokes doesn't mark file as modified 2015-10-28 04:10:00 +05:00
16796c2813 Buldbot: Disable 32bit kernels
Currently disable all of them, in practice i think way to go should be:

- Disable Experimental kernels on 32 bit, build up to sm_35
- Later we can drop all 32bit kernels, but try to keep at least one release
  with some of the kernels (they'll cover 99% of users anyway)

Before doing any changes we should surely communicate such a changes before
we apply them.
2015-10-28 02:43:06 +05:00
b909dfdae1 Cycles: Expose user-defined shutter curve to the interface
Shutter curve now can be controlled using curve mapping widget in the motion
blur panel in Render buttons. Only mapping from 0..1 by x axis are allowed,
Y values will be normalized to fill in 0..1 space as well automatically.

Y values of 0 means fully closed shutter, Y values of 1 means fully opened
shutter.

Default mapping is set to old behavior when shutter opens and closes instantly.

This shutter mapping curve could easily be used by any other render engine by
accessing scene.render.motion_blur_shutter_curve.

Reviewers: #cycles, brecht, juicyfruit, campbellbarton

Differential Revision: https://developer.blender.org/D1585
2015-10-28 02:43:06 +05:00
6a529e14f4 Cycles: Support user-defined shutter curve
Previously shutter was instantly opening, staying opened for the shutter time
period of time and then instantly closing. This isn't quite how real cameras
are working, where shutter is opening with some curve. Now it is possible to
define user curve for how much shutter is opened across the sampling period
of time.

This could be used for example to make motion blur trails softer.
2015-10-28 02:43:06 +05:00
c07c066685 Cycles: Use new CDF evaluation utility for the pixel filter
Filter table should stay exactly the same, no changes in the render
results are expected at all.
2015-10-28 02:43:06 +05:00
548ef2d88b Cycles: Add utility functions to evaluate CDF of a given functor 2015-10-28 02:43:06 +05:00
868717e312 Support symmetrical curve mapping presets
Previously curve mapping was always setting to only a single slope which then
was symmetrizied by a tools (such as brush or compositing).

With this change it's possible to set curve to symmetrical slopes as a part
of preset.
2015-10-28 02:43:06 +05:00
4f6b01ce1f Fix curve mapping linear preset not setting handle type correctly 2015-10-28 02:43:06 +05:00
25b99b1922 Fix makesrna generated C++ header have consistent whitespace for strings. 2015-10-27 22:11:33 +01:00
68f677e655 Fix OS X user preferences open crash when changing virtual pixel size.
The separate window state setting caused a crash due to doing live resize code
redrawing a window that has not yet been fully initialized.
2015-10-27 20:06:04 +01:00
1617f3e425 Docs: callback comments 2015-10-28 03:14:27 +11:00
242246e9fc Fix T46605: Compositing causes access violation when rendering from command line
Seems was caused by the race condition in the stats printing, should be all fine now.

Nice for 'a' release.
2015-10-27 21:03:22 +05:00
7e7527d3ce OpenSubdiv: Fix wrong handling of vertex parent
Vertex parent was not registered as CPU data requirement.

Should be in the 'a' release.
2015-10-27 20:44:14 +05:00
f1555c8bba Compositor: Use mask name as mask node label
This way it becomes much easier to navigate in roto compositor where it could
be 100s of masks in a production shot.
2015-10-27 20:36:02 +05:00
ea67f55b87 Compositor: Add Invert option to the movie clip stabilization node
This appears to be really common workflow when you stabilize shot to make compo
easier (roto, some effects and so) and then re-introduce the motion back.

Surely it's doable with some magic nodes and manual network for transforming
but such workflow is too common in VFX to resist adding one small option in
single node for this.
2015-10-27 20:01:10 +05:00
b2f57190d9 BGE: Fix T43218: Text of framerate and profile glitch in Multitexture shading
Fix T43218: Text of framerate and profile glitch in Multitexture shading

Reviewers: lordloki, panzergame

Reviewed By: panzergame

Subscribers: medved

Projects: #game_engine

Maniphest Tasks: T43218

Differential Revision: https://developer.blender.org/D1536
2015-10-27 15:29:09 +01:00
Dalai Felinto
3f85eeddaa View3D offscreen buffer was interferring with view navigation
the RegionView3D matrices need to be re-set after drawing.

Review and touch ups by Campbell Barton
2015-10-27 11:29:21 -02:00
Julian Eisel
505a31bd22 Fix: Open tmp windows with size multiplied by virtual pixelsize
Opening a tmp window on a 4K display with virtual pixelsize set to double results in a too small window. For Retina this seems to be handled on GHOST level already, so multiply by virtual pixelsize only.
2015-10-27 12:53:58 +01:00
19137e86bb Fix T46606: Trackball Rotate jumps releasing shift 2015-10-27 21:49:51 +11:00
13a4bcd148 BGE: Fix T31357: wrong zoom when sets camera.
This patch makes independant the override camera zoom and the default camera object zoom. The override zoom is 2.0f and the camera object zoom is computed with the RegionView3D camera zoom.
These features are only used for the embedded BGE, so there's no compatibility issues with the blenderplayer.
I let the override zoom with a setter to allow later to create an override camera in blenderplayer easily.

Tested with the 3 framing modes in embedded and standalone.
2015-10-27 11:10:12 +01:00
95164a09a7 BGE: generic python callback list + replace KX_PythonSeq.
I made this patch to declared a python list without converting all elements in python object (too slow) or use a CListValue which required CValue items (too expensive in memory).  In the case of a big list of points like a collision contacts points list, to use a CListValue we must implement a new class based on CValue for 3D vector to create a python proxy even if mathutils do it perfectly, we must also convert all points (frequently ~100 points) when fill the CListValue even if the list is not used (in the case of the collision callback). The easy way is to use callback (it doesn't worth to do an inheritance) which convert the item in PyObject only during an acces.
5 callbacks are used :
- Check if the list is valid = allow acces (like PyObjectPlus.invalid)
- Get the list size
- Get an item in the list by index.
- Get an item name in the list by index (used for operator `list["name"]`)
- Set an item in the list at the index position.
All of these callback take as first argument the client instance.
Why do we use a void * for the client instance ? : In KX_PythonInitTypes.cpp we have to initialize each python inherited class, if we use a template (the only other way) we must add this class each time we use a new type with in KX_PythonInitTypes.cpp

To check if the list can be accessed from python by the user, we check if the python proxy,  which is the `m_base` member, is still a valid proxy like in PyObjectPlus. But we can use a callback for more control of user access (e.g a list of collision point invalidate a frame later, in this case no real python owner).

This python list is easily defined with :
```
CPythonCallBackList(
void *client, // The client instance
PyObject *base, // The python instance which owned this list, used to know if the list is valid (like in KX_PythonSeq)
bool (*checkValid)(void *), // A callback to check if this list is till valid (optional)
int (*getSize)(void *), // A callback to get size
PyObject *(*getItem)(void *, int), // A callback to get an item
const char *(*getItemName)(void *, int), // A callback to get an item name (optional) use for acces by string key
bool (*setItem)(void *, int, PyObject *) // A callback to set an item (optional)
)
```
To show its usecase i replaced the odd KX_PythonSeq, it modify KX_Gameobject.sensors/controllers/actuators, SCA_IController.sensors/actuators and BL_ArmatureObject.constraints/channels.

Example : {F245193}, See message in console, press R to erase the object and see invalid proxy error message.

Reviewers: brita_, #game_python, youle, campbellbarton, moguri, agoose77, sergey

Reviewed By: campbellbarton, moguri, agoose77, sergey

Subscribers: sergey

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1363
2015-10-26 20:27:08 +01:00
5b3af3dd46 Fix T46537: UV Image Editor. UV Sculpt toggle button doesn't show hotkey label when active.
Poll function of that keymap was slightly... agressive.
2015-10-26 16:37:59 +01:00
3751eb18c3 Fix broken comment about our WM progress report for python (its not a progress bar at all). 2015-10-26 14:10:25 +01:00
52d074ba39 Fix T46604: Crash in ChainPredicateIterator instantiated without predicates.
Also fixed a potential crash in the copy constructor case.
2015-10-26 20:55:37 +09:00
3e9f6fc281 Freestyle: minor speed-up by omitting the calculation of the smallest edge size.
BlenderFileLoader tries to find the smallest edge size but the computed value is not used.
2015-10-26 20:55:34 +09:00
afe3b55483 Cleanup: warning & whitespace 2015-10-26 22:22:30 +11:00
85876923bf Cleanup: Remove ToDo comment.
I don't see how this could conflict, madd() in util_ssef.h has a different function signature.
2015-10-26 11:52:24 +01:00
aa49c16bd9 Cleanup: Avoid some warnings on OS X with clang and update comment. 2015-10-26 11:52:24 +01:00
72592cfbe0 Cleanup: Move pixel aspect to blender_camera_init(). 2015-10-26 11:52:24 +01:00
04ff2784da Fix: Prevent warnings from popping up when trying to edit driver expressions from buttons
Previously, a warning was added to provide feedback to users trying to change the values
of driven properties why their edits would not have any effect on the propeerty. However,
it turned out that instead of only showing up when the user tried to increment/decrement/slide
the property's value, it was also firing everytime they were trying to edit the expression.
That however is not what we want at all!

This fix assumes that BUTTON_STATE_TEXT_EDITING is used for expression editing, and
BUTTON_STATE_NUM_EDITING (or everything else) refers to the user trying to adjust the
value normally.
2015-10-26 23:24:41 +13:00
0a3ca175af Graph Editor: Use Cursor X in Drivers mode during Transforms (where appropriate) 2015-10-26 20:18:13 +13:00
1b286352a3 Graph Editor: Snap and Mirror keyframes now respect Cursor X in Drivers mode
When using the "Current Frame" options for these operators, the Cursor X value
will now be used instead of the current frame. Perhaps the labels could be changed
too, but for now, I guess this will be good enough.
2015-10-26 20:18:12 +13:00
b3edd7bdcd Graph Editor: Adjusting Change Frame and Jump to Keyframes operators to work with Drivers Cursor 2015-10-26 20:18:11 +13:00
0860fdc53c Fix T46599: Copy Rotation behaves erratically when Use Y is disabled
When the "Use Y" option in the Copy Rotation constraint is disabled, the constraint
behaves eratically when rotating all the target on all axes at the same time.
This is partially to be expected due to the way that euler rotations work
(i.e. the rotation orders stuff - you should use a rotation order based on most to
least important/significant rotations). Hence, by locking Y, you're causing accuracy
problems for Z.

What was not expected though was that changing the rotation orders on the objects
involved (for the record, it's the constraint owner that counts) did nothing.
It turns out that for objects, the rotation order settings were getting ignored!
This commit fixes this problem, and this particular case can be resolved by using
"XZY".

Notes:
* Since all object constraints were previously working on the assumption that they
  used XYZ (default) order, it is possible that this change may have the unintended
  consequence of changing the behaviour of some rigs which relied on the buggy
  behaviour. Hopefully this will be a rare occurrence.
2015-10-26 20:18:11 +13:00
65072499c6 Graph Editor: Allow "cursor x" to have fractional values when working with Drivers (T46004)
When working is the Graph Editor it can be very important to be able to work with fractions
(sub integers), especially when working with Drivers. Currently the "Cursor Y" is hooked up
to "cursor_position_y" which allows fractions  but "Cursor X" is directly hooked up to
"frame_current" which is an integer.

This commit adds initial support for this feature.
* When in Drivers mode, the x-part of the cursor is mapped to a new "cursor_position_x"
  value which can have fractional values. Animation mode however remains mapped to frame_current

* This commit only adds the UI/property/drawing tweaks needed to support this.
  Many operators still need to be modified to consider this value instead of the
  current frame, for this to be more useful.
2015-10-26 20:18:10 +13:00
2092056745 Fix: Missing update after scrubbing time in Graph Editor
Sometimes the timeline header didn't update after time-scrubbing in the graph
editor ends, leaving the "Pause" button visible until the next refresh of the
timeline (e.g. on mouse over)
2015-10-26 20:18:09 +13:00
a93605b95b Fix: X-axis values in Graph Editor should not be displayed as timecodes in "Drivers" mode 2015-10-26 20:18:08 +13:00
21f4c77a76 Alternative presentation for interpolation indicator for discrete properties 2015-10-26 20:18:07 +13:00
ebe3923137 Graph Editor: Disable interpolation setting for enum/boolean FCurves, as no interpolation is performed on those 2015-10-26 20:18:07 +13:00
c3cec828e8 ndof: rework Mac driver glue
Load driver dynamically at runtime instead of weak-linking the
3Dconnexion framework. Driver no longer needed at build time!

Works with really old drivers (as in PowerMac old), more recent
versions, and the latest which allows us to process events on a
separate thread.
2015-10-25 21:19:26 +01:00
4f767e37e8 BGE: Cleanup: Code style BL_Shader
Reviewers: lordloki, youle, campbellbarton, sergey, kupoman, moguri, panzergame

Reviewed By: panzergame

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1397
2015-10-25 19:43:46 +01:00
06d2ad0185 BGE: Fix issues with async libload.
This patch fixes:
- the call of LibFree on a unfinished loaded library;
- memory leak created on end of game : the async libraries are loaded but not converted, so not freed with the master scene.

Reviewers: campbellbarton, sybren, youle, hg1, moguri, lordloki

Reviewed By: moguri, lordloki

Differential Revision: https://developer.blender.org/D1571
2015-10-25 19:22:29 +01:00
0d59acccd3 Use BLI_strncasecmp for text suggestions 2015-10-25 17:44:32 +11:00
6f2aa50a72 Avoid redundant normalize in obmat_to_viewmat 2015-10-25 17:30:16 +11:00
Dalai Felinto
3bc5399f72 Fix T46590 Strange camera behavior (partial revert of fbca69c6)
I'm sure there is a way of using the new functions for the
obmat_to_viewmat() routine. But for now let's get it back to a working
state
2015-10-24 21:02:42 -02:00
11c00caddc Fix error in bone UI 2015-10-25 05:50:40 +11:00
c5945ebb2c Cleanup: use quat to eul w/ mathutils API 2015-10-24 17:50:20 +11:00
25c00ae460 Fix invalid exceptions w/ preview API
D1575 by @januz
2015-10-24 17:50:20 +11:00
a6c9a09061 Fix T46538: Mark and Clear Seam in UV Editor, assigning Hotkeys.
UV Editor keymap is not bound to a given editor (spacetype)...
2015-10-24 08:38:13 +02:00
c4e1837e6a Fix related to T46538: do not popup choice menu of mark/clear seam UV editor op invoke when prop is already set! 2015-10-24 08:38:13 +02:00
fbca69c69a BLI_math: add mat3_normalized_to_* functions
Many uses of matrices for rotation keep them normalized,
so no need to normalize each time.
2015-10-24 07:02:51 +11:00
3a98426ed6 Cleanup: remove redundant math calls 2015-10-24 06:03:48 +11:00
ba1df8265d Cleanup: simplify ED_view3d_from_m4 2015-10-24 04:33:54 +11:00
9d8a01dba1 BLI_math: add invert_qt_normalized
When the quat is known to be unit length, so we can avoid scaling
(just conjugate_qt which asserts on non unit quats).
2015-10-24 03:51:00 +11:00
d5fb0e517c Cleanup: rename 'datablocks' -> 'data-blocks'
Similar to addons -> add-ons, for reading it fits better to hyphenate.
2015-10-24 02:44:43 +11:00
4ff10119f7 Node Border Select: only frames inside border
Without this you can't easily select a few nodes inside a frame,
without selecting the whole frame, noted in T46540
2015-10-24 01:06:28 +11:00
0870612268 Cleanup: use int for view_id's & view count
`size_t` is useful for memory sizes or offsets,
the number of views wont realistically exceed an int.
2015-10-24 01:01:10 +11:00
23848a70de Correct own error w/ snap-scale T46503
Don't use nan for comparisons.
2015-10-23 21:33:15 +11:00
0d638172ec BGE: Fix T30179 action actuator not stoped when state changed.
The function SCA_IActuator::DecLink is now under virtual : in some case the actuator have to know when is useless.
2015-10-23 10:54:08 +02:00
d04ad07f98 Quiet audaspace unused macro warnings 2015-10-23 18:40:42 +11:00
e435593fc0 Fix ffmpeg memory leaks
- audio_stream wasn't freed.
- audio/video stream + context weren't freed on failure.
2015-10-23 18:40:27 +11:00
050980e635 Fix ffmpeg saving long paths
Was checking wrong length on string copy.
2015-10-23 18:40:06 +11:00
48f4e1a63f Fix for error w/ RenderView in ImageView list 2015-10-23 17:06:42 +11:00
b2f8da1c53 Comments for link-list types 2015-10-23 16:47:44 +11:00
6222505739 Fix snap-scale w/ axis constraint
Related to T46503,
fix only worked when the snap target was axis-aligned.
2015-10-23 12:27:15 +11:00
586ec50022 BGE: Fix T46556: check on null sound datablock pointer. 2015-10-22 20:11:05 +02:00
ebf197724e Version Bump: 2.76.2, deprecate values
- RegionView3D.view RV3D_VIEW_PERSPORTHO
  only ever set on initialization, never checked for.
- Lamp.type LA_YF_PHOTON
  from old 2.4x yafray files.

Also iniitalize movie-clip + grease-pencil theme colors.
2015-10-23 04:56:37 +11:00
47b1279762 Cycles: Watertight fix for SSS intersection
Same as previous commit, just was missing in there.
2015-10-22 22:10:40 +05:00
f84cbae43e Cycles: Fix for watertight intersection
It was possible to miss some intersection caused by wrong barycentric
coordinates sign.

Cases when one of the coordinate is zero and other are negative was not
handled correct.
2015-10-22 22:07:28 +05:00
54a18f6d51 View3D: make ndof turntable & orbit speed match 2015-10-23 03:16:57 +11:00
80470b639c BLI_math: axis_angle_to_quat_single
Useful to avoid defining a vector for an axis-aligned rotation.
Matches axis_angle_to_mat3_single behavior.
2015-10-23 03:09:28 +11:00
0d54aa9c02 Fix T46521: Python: bvh.ray_cast doesn't find a plane facing in the other direction under certain circumstances
The issue was caused by wrong sign check. It originally came from more optimized
Cycles code where because of other reasons it wasn't visible yet. But in fact it
should be solved there as well.
2015-10-22 20:34:51 +05:00
9a6a3f5346 Fix T46569: Crash w/ mask & locked-track enabled 2015-10-23 01:40:36 +11:00
e6c943c917 Cleanup: remove script ID-types
Unused since 2.4x and unlikely to be reintroduced as ID-types.
2015-10-23 01:20:01 +11:00
e7cd64dc97 Fix T46561: Crash in outliner delete hierarchy
When children & parents were selected in the outliner,
it attempted to free the the object twice.
2015-10-22 18:42:44 +11:00
c6d98fa841 Fix T46565: Movie render crash w/o permissions
Rendering to a path that didn't have write permissions would crash.

Also fix error where `G.is_rendering` was left set when rendering failed.
2015-10-22 17:25:37 +11:00
85072eb4e9 BGE: Cleanup ConvertMaterial function.
- cleanup spaces;
- add braces;
- remove indendation around operator.
2015-10-21 22:28:33 +02:00
c272017868 Fix T46524: Use Alpha (Straight/Premultiply) option missing in 2.76, part II.
Different issue actually, here RAWTGA was simply forgotten in the alpha-capable formats...
2015-10-21 20:06:49 +02:00
729e9651ac BGE: Fix physics meshes conversion with modifiers.
Previously meshes with modifiers were considerate as empty (no polys).
2015-10-21 12:15:35 +02:00
6bc0076102 Usual i18n tweaks & fixes... 2015-10-20 20:08:37 +02:00
e96411aaad Fix T46544: Can't unpack generated image 2015-10-21 03:07:40 +11:00
24cc885057 RNA: Change behavior of Image.save()
Previously it would save packed file(s),
which would ignore the image.filepath,
making it impossible to set the destination.

Add image.packed_files[...].save() so you can save packed files if its needed.
2015-10-21 02:26:23 +11:00
af23b09e72 Fix T46496: GL Render fails w/ Anti-Aliasing
Needed to check if scaled-multisample-blit is supported.
2015-10-21 00:16:07 +11:00
e5916187e8 First step to handle missing libs/datablocks when reading a file.
Idea is, instead of ignoring completely missing linked datablocks, to
create void placeholders for them.

That way, you can work on your file, save it, and find again your missing data once
lib becomes available again. Or you can edit missing lib's path (in Outliner),
save and reload the file, and you are done.

Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon.

Future plans are also to be able to relocate missing libs and reload them at runtime.

Code notes:
    - Placeholder ID is just a regular datablock of same type as expected linked one,
      with 'default' data, and a LIB_MISSING bitflag set.
    - To allow creation of such datablocks, creation of datablocks in BKE was split in two step:
        + Allocation of memory itself.
        + Setting of all internal data to default values.

See also the design task (T43351).

Reviewed by @campbellbarton, thanks a bunch!

Differential Revision: https://developer.blender.org/D1394
2015-10-20 14:44:57 +02:00
dcb56d79a8 BLI: add new 'memory_utils' module with func checking a whole memory chunk is filled of zero,
and an helper to ensure all memory of a given structure passed a given member is filled of zero.
2015-10-20 14:44:15 +02:00
f08dad0e03 Minor edits to sytem-info script
- list script paths on their own line.
- use title util function.
2015-10-20 17:38:15 +11:00
8bcc68b21c Add operator to close a window
Useful for Python scripts, which could duplicate but not close windows.
2015-10-20 15:42:30 +11:00
Dalai Felinto
0173116117 New function to draw offscreen, and related API changes
This expose the capability of handling offscreen drawing. The initial
support lays the barebones for addons to work with framebuffer objects
and implement 3d viewport offscreen drawing. This can be used by script
writers to make fisheye lens preview, head mounted display support, ...

The complete documentation is here: http://www.blender.org/api/blender_python_api_2_76_1/gpu.offscreen.html

Review and many changes by Campbell Barton (thank you :)

https://developer.blender.org/D1533
2015-10-20 01:15:03 -02:00
70dfb61300 Cleanup: remove _POSIX_C_SOURCE undefine 2015-10-20 14:06:29 +11:00
ed7c7a0a05 BGE: Cleanup BL_Action
Remove initialization of m_endtime : fix compile about previous BL_Action cleanup.
2015-10-19 20:28:05 +02:00
2c369b1490 BGE: Cleanup BL_Action.
- Rename m_localtime to m_localframe to avoid ambiguity : it's a count for the actual action frame, not time.
- Delete m_end : it's unused.
2015-10-19 20:27:04 +02:00
38cd6329d6 Py API docs: fix extracting bmesh.ops from C code. 2015-10-20 03:55:31 +11:00
43c0f60523 Fix T46534: Crash loading corrupt HDR's 2015-10-20 02:13:14 +11:00
69c163b367 Cleanup: use UNLIKELY for checking corrupt HDR's 2015-10-20 02:13:14 +11:00
728d1ec504 BGE: Fix T46381 : last action frame not updated.
It fix T46381. Normally BL_Action::Update (manage action time, end, loop…) should be called the same number of times as BL_Action::UpdateIPO (update action position, scale ect… in the game object).
But the bug report shows that UpdateIPO is called one less time than Update. To fix it i revert the commit 362b25b382 and implement a mutex in BL_Action::Update.
Example file : {F245823}

Reviewers: lordloki, kupoman, campbellbarton, youle, moguri, sybren

Reviewed By: youle, moguri, sybren

Maniphest Tasks: T39928, T46381

Differential Revision: https://developer.blender.org/D1562
2015-10-19 16:03:40 +02:00
2b12cf40a1 Fix T46529: Unwrap UV w/ use-subsurf fails
Regression since moving to looptri.
2015-10-19 22:15:03 +11:00
67e1c97350 GPU: check for blit support, using MSAA FBO's
Used for reading off-screen buffers,
possible cause of failure for drivers that don't support it.
2015-10-19 12:36:15 +11:00
a25892543a Fix T46531: Cannot use % in filenames.
Same case as with space char really, one should not use those special chars in
filenames, but they are globally supported by all current FS/OS, so no real reason
to enforce that behvior on users here.

To be backported to 'a' release.
2015-10-18 18:51:08 +02:00
f56392f224 BLI_task: fix bad freeing of current task_thread in case POSIX thread creation fails.
Trying to MEM_free a single item of a whole MEM_calloc'ated array, tsst...
Luckily looks like POSIX thread creation does not fail often! :P
2015-10-18 14:39:37 +02:00
5551948b31 Fix T46520: mathutils.bvhtree crashes with distance input.
Should be backported to 'a' release.
2015-10-18 12:09:42 +02:00
94791bd5da Fix T46524: Use Alpha (Straight/Premultiply) option missing in 2.76 for DDS files.
All optional image format are not #define'd in submodules like DDS read/write code.
This means values of `eImbTypes` would not always be the same in all contexts, yuck!

This is a regression and should be backported to 'a' release.
2015-10-18 11:13:33 +02:00
6158a9826d BGE: Use references in CcdPhysicsEnvironment::RemoveConstraint.
It avoids assert calls on rigid body destructor.
2015-10-17 21:49:37 +02:00
0a2b48e3c6 Fix T46429: Movie clip is deformed by resolution multiplier when offset is added in sequence editor. 2015-10-17 11:32:04 +02:00
2927fa4450 correct own error in rectangle clamping 2015-10-17 18:52:05 +11:00
88767a1939 IMB_thumbs: add missing error check 2015-10-17 16:16:08 +11:00
eb49a76dca Cleanup: warnings
- remove NULL checks for args already set as ATTR_NONNULL.
- double promotion.
2015-10-17 16:06:45 +11:00
3d69ef240e Cleanup: BLI_path comments 2015-10-17 16:04:54 +11:00
0b23799b6f Cleanup: remove unused BLI_string_to_utf8 2015-10-17 16:00:59 +11:00
bfdb42047a Fix broken CD_NORMAL interpolation callback (would generate non-unit vectors).
Even if the weights are normalized, the weighted sum of normalized vectors
usually does **not** give a normalized vector (unless all source vectors
are aligned).

This probably was not a big issue in most cases, since we usually interpolate
similar vectors here - but still!
2015-10-16 21:56:42 +02:00
8172712841 Fix T46508: data_transfer of normals fails in case objects are transformed.
The final stage of the process (copying/interpolating new dst cddata from src cddata)
was simply broken in normal case, where we need to convert from source to destination
object space.

This patch is a bit verbose, but I cannot see how to avoid it really.

To think this code is in master since over 6 months and it only gets reported now... :/
2015-10-16 21:56:42 +02:00
a88ae6fa70 Mesh remapping: fix loop 'best matching normals' not using transform space.
Also, cleanup, reduce declarations of tmp_co/_no...
2015-10-16 21:56:42 +02:00
d307c24a8b Cleanup: style
Also use gcc style file:line: syntax for errors.
2015-10-17 02:46:38 +11:00
a1b34c0d28 Fix T46510: VSE View-all crops out image 2015-10-17 02:03:17 +11:00
1ec549886b Cleanup: use bools for v2d, minor ws edits 2015-10-17 01:01:57 +11:00
34e749beef Fix popup menu glitch, scrolling at high dpi
Popups were clamped be screen-margin,
then clipped by UI_POPUP_MENU_TOP, causing regular popups
not to have enough room & add scroll buttons.
2015-10-17 00:31:11 +11:00
b6b15f07a1 UI: expose UI_POPUP_MENU_TOP for use elsewhere. 2015-10-17 00:22:51 +11:00
e6aa464757 BLI_rect: add BLI_rctf_clamp
Clamp one rect within another.

This is done inline in the UI code, which gets verbose.
2015-10-17 00:03:29 +11:00
99cf636e84 Cleanup: redundant struct qualifiers 2015-10-17 00:02:07 +11:00
85f3b21cc8 error in last commit 2015-10-16 21:57:59 +11:00
7dc80097a4 Fix for missing id_lib_extern, assigning ID's 2015-10-16 21:53:01 +11:00
b5a4a00998 Fix T46502: Linked dupli-group lost on reload 2015-10-16 20:56:39 +11:00
7bf7f67a46 Revert part of rB4d9345479aa86f61, and cleanup a bit.
'thumbnail_size' is now used in all cases, it controlls column width in other viewmodes
of filebrowser. We cannot (easily) rename that DNA member, but I also renamed RNA
property, and fixed its tooltip...
2015-10-16 11:21:12 +02:00
4d9345479a UI: only show thumbnail size when its enabled
Also make enum identifiers less cryptic.
2015-10-16 18:51:33 +11:00
c9d3243f2b Cleanup: simplify BLI_stringdec use 2015-10-16 15:17:54 +11:00
2f35217849 Fix T46503: Snap scale fails using corner pivot 2015-10-16 15:00:18 +11:00
c62468aabb VBO implementation for GLSL subsurfed meshes (non-mapped case)
As with cdderivedmesh, performance here is still CPU-limited if material
needs tangents/UVs/vcolors. Draw calls have much less overhead though.
Also, as with derivedmesh, kept an exception for old drawing for NVIDIA
+OSX+VBO off or setDrawOptions callback not being NULL.

setDrawOptions should be ommitable and fully VBOfialbe (?) in the
future, usually those just check for hidden flag of poly or similar.
2015-10-15 23:20:30 +03:00
2f0db80155 Fix crash pressing +/- in file-selector
Filenames over 128 chars would crash.
Move BLI_newname into file_ops,
this was only used in one place and isn't all that re-usable.
Also remove special behavior for 4 digits.
2015-10-16 04:57:52 +11:00
cebaedd709 Fix crash w/ PlayAnim & long filenames
Paths >128 chars could crash.
Replace BLI_newname with direct BLI_stringenc/dec use which makes more sense in this case.
2015-10-16 04:31:17 +11:00
14de9a5982 Knife tool: generalize angle snapping code
Replace hard-coded snap angles with function that allows arbitrary snapping increments.

Currently no user visible change.
2015-10-16 04:04:45 +11:00
99142ec7e0 BLI_math: isect_ray_plane_v3 now takes 4d plane
Was taking a triangle and doing ray-tri intersect.
2015-10-16 03:06:12 +11:00
2746bbe30e Fix T46493: Wrong camera zoom blur with non-unit pixel aspect 2015-10-15 19:33:02 +05:00
fa3dd5d9f4 Cleanup: BLO_read: linking API arg order and name.
linking API funcs would use 'name, idcode', when all other code here uses
(more sensible) 'idcode, name'.

Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and
'idname' arg name when we expect a complete ID name.

And here too, idcode shall be short, not int!
2015-10-15 16:12:00 +02:00
25f79d97de Cleanup: BKE_idcode: idcode (types) are short, not int...
Also, use 'idcode' var name, as in many other places in Blender.
2015-10-15 16:12:00 +02:00
df1e9fac06 Fix error w/ printing knife header angle-snapping 2015-10-16 00:41:14 +11:00
e60d535443 3D View: support non-uniform scaled lamps
D1378 by @youle

Non-uniform scaled lamps now cast oval/rectangular shadows, viewport & BGE.
2015-10-15 22:36:31 +11:00
3de81314fa Error in last commit 2015-10-15 21:30:24 +11:00
83d6b73e96 Error in last commit 2015-10-15 21:28:07 +11:00
0a82a20fe4 BLI_math: add normalize_m#_ex functions
Useful when we need to use the axis lengths too.
2015-10-15 21:03:27 +11:00
f53a21747c Fix T46494: Can't de-select a face w/ mixed modes 2015-10-15 19:57:51 +11:00
a595cda2cd Fix memory leaks in PlayAnim
Was never freeing filenames or pictures.
2015-10-15 17:45:53 +11:00
0be6ca0b83 Fix T46465: Lag scrubbing w/ PlayAnim 2015-10-15 17:25:43 +11:00
b4b2caffd8 PlayAnim: avoid list count setting frame from mouse 2015-10-15 16:56:30 +11:00
0296642794 Change version cycle to 'alpha' 2015-10-15 16:56:30 +11:00
767d3f23b7 Fix T45900: Allow again white spaces in file names.
Should probably be added to 'a' release, should we do one...
2015-10-15 07:44:25 +02:00
f823b9ece8 Fix T46483: vertex/edge slide with correct UVs sometimes pinning UVs. 2015-10-15 03:14:38 +02:00
12c705ec86 Fix related to T46223: memory leak when loading multilayer multiview images.
Differential Revision: https://developer.blender.org/D1549
2015-10-15 01:58:33 +02:00
8191066c0b Fix T46223: multiview image sequences crashing.
Differential Revision: https://developer.blender.org/D1549
2015-10-15 01:58:28 +02:00
4965c43df7 Fix T46451: vertex/edge slide clamp not available in redo popup. 2015-10-15 01:51:57 +02:00
75e4e4b67f BGE: Fix animations update when scene is suspended. 2015-10-14 22:54:20 +02:00
59ba52628f Fix T46487: OpenSubdiv objects are invisible in Blender Internal "Rendered" viewport mode 2015-10-15 00:19:38 +05:00
51fc7aee34 Fix T46453: JPEG quality not stored in file
This is a feature unique to jpeg that would store the quality it was saved.

- Use struct instead of bit-shifting.
- No longer store the 'flag'.
2015-10-14 21:04:17 +11:00
2635f5b2c8 Cleanup: remove historic, blender-only jpeg io 2015-10-14 20:18:18 +11:00
ad58310161 Comment cleanup, use better lower bound for waveform 2015-10-14 12:23:17 +03:00
6562e4ebe9 Fix T46189, draw style for waveforms occludes sequence strip text.
Used old (2.49 era) filled style for drawing here, with white color and
alpha blending.
Also changed drawing to do linear interpolation between samples instead
of ugly square wave in high zoom.
This could be improved upon, with real waveform drawing in higher zoom
levels, but I'll leave this for later since it may need some hacking on
audaspace level.
2015-10-14 12:15:03 +03:00
904db487a7 Fix T46284: Texture paint, wrong shading mode
Project-paint now supports painting to cycles materials.
2015-10-14 16:22:23 +11:00
56021cad31 Support for multi-sample sequencer GL render
OpenGL sequencer render now uses a single fbo for all rendering.
2015-10-14 12:50:03 +11:00
53d73c51a7 Support for multi-sample off-screen buffers
Replaces much slower manual accumulation buffer which simply did multiple renders.

Needs OpenGL3.2, otherwise multi-sample is disabled.
2015-10-14 10:51:17 +11:00
5d3e07862c Cycles: Add support for motion blur position
This adds an option to control at what time relative to the current frame
the shutter is fully opened. Supported options are:

- Shutter is starting to open at the current frame
- Shutter is fully opened at the current frame
- Shutter is fully closed  at the current frame

Custom shutter time offset is possible, same as custom curve for shutter
openness but those are considered nice things to have rather than something
crucial.

Reviewers: juicyfruit, dingto

Subscribers: venomgfx, hjalti

Differential Revision: https://developer.blender.org/D1380
2015-10-13 21:05:27 +05:00
ccbf48330f Make sure submodules are pointing to master branches 2015-10-13 18:02:51 +05:00
0426f74ca6 Missed this in previous commit... 2015-10-13 13:58:43 +02:00
af9002dc3f Fix T46467: Clean Keyframes removes the channels. 2015-10-13 12:58:04 +02:00
e1b67c9bc0 Fix T46002: mathutils.geometry.intersect_line_line_2d doesn't operate on lines, but on line segments.
Ugly issue really, but at least doc now matches behavior of the function. :|
2015-10-13 09:59:42 +02:00
8f92cbd4a7 missed last commit (use utility function) 2015-10-13 16:31:43 +11:00
0528c16b3a Cleanup: simplify view3d trackball logic 2015-10-13 16:28:18 +11:00
5e75acf81d Fix T46450: Seams from islands, wont show 'Sharp' 2015-10-13 09:00:03 +11:00
e32430df34 Fix T46458: BGE Crash on load
regression from 96dd213e7
2015-10-13 08:43:41 +11:00
cee8a3148c Usual UI message fixes... 2015-10-12 21:34:14 +02:00
cdd727b7ce Add functions to compute normals (verts, polys and loops ones) for a given shapekey.
Title says pretty much everything, we now have BKE and RNA funcs to get vertex, poly and
loop normals of a given shapekey.

This will be used e.g. in FBX exporter (shapekeys need normal data too).

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1510
2015-10-12 20:12:55 +02:00
ee688e24a7 Fix T46451: edge slide even and flipped not available in redo popup. 2015-10-12 17:40:34 +02:00
591f4549c9 WM linking code rework.
New code loops much less, does re-open & close .blend files for each data type,
and is much much more flexible - it is also ready for id-remap & co work being done in branches.

Main idea is to store libraries & datablocks to link in a dedicated struct, in a way
that avoids too much looping, and also allows to search for a single datablock in several libraries.

Here again, no change is expected in current behavior of link/append tool, please report
if anything goes different!
2015-10-12 15:20:51 +02:00
2e8fcac15d Cleanup & rework of BLO_linking code.
This commits does mostly two things:
* Get rid of bContext parameter: I can see no real good reason to pass such a high-level data
  to such low-level code... It also makes it more difficult to call when you do not have
  a context available.
* Cleanup the instantiating part.

Last point is the most risky - previous code was sometimes quite confusing and hard to follow,
from tests nothing behaves differently in new code, but some hidden corner case may show up.

Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
2015-10-12 15:07:07 +02:00
d24bafa0d5 Cleanup: BLO: use proper typedef for expand_doit callback. 2015-10-12 14:31:47 +02:00
6f41febff1 Cleanup: BLO: move func doc comments to definitions of functions.
Follows our conventions and makes include file itself much cleaner.
2015-10-12 14:30:00 +02:00
4bc08d09ae Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, but only linking of datablocks! 2015-10-12 13:47:44 +02:00
6af043424d Workaround for glew initialization bug
It turns out libGL from Intel crashes when calling glxewInit (where mesa, nvidia work fine),
unfortunately the only option without making larger changes to glew,
is to inline the parts of glew we're using - before the glx context is created.
2015-10-12 22:07:24 +11:00
07332dd2bb Fix T34446: Make Local on linked mesh object: object gets removed if redo function is used.
Root of the issue is that we do not re-read lib data blocks and ID placholders (ID_ID bheads)
in undo context (in `blo_read_file_internal`), because `BLO_read_from_memfile` copies
lib datablocks and Main data directly from oldmain.
The idea being, linked data do not change from undo/redo.

This is valid as long as linked data was not changed by the undo step - but if some
was deleted or localized, it will be missing from oldmain, leading to data loss
(note that does not only concern objects, all linkable data types can be affected,
at least in theory).

This commit addresses that issue by carefully mixing reuse of needed data from oldmain,
and "normal" re-reading of missing one. Makes us swimming in some rather dark waters,
and gives a rather non-easy-to-follow code, but it seems to work quite well,
and only other solution would be to get rid of that optimization
(not re-reading all libs on undo/redo), which is not acceptable.

Also, thanks to @carlosdp for initial investigation of the issue.

Differential Revision: https://developer.blender.org/D1485
2015-10-12 12:15:05 +02:00
9cea429f78 Fix T46431: Init glew before glx-context crashes
Initialize glxew before glew,
so we can check whats supported before creating the context.

This also removes need for mxIgnoreNoVersion.
2015-10-12 15:08:20 +11:00
e0c05a1e6a Support applying scale for font objects 2015-10-12 13:13:38 +11:00
e302105981 Cleanup: RNA naming, use 'max' as a suffix 2015-10-12 12:31:55 +11:00
eb6e8521c2 RNA: correct tips 2015-10-12 12:31:55 +11:00
ea7ce7fcf4 Fix T46447: fix build on non-x86 platforms. 2015-10-12 03:22:43 +02:00
758febba45 Fix T46446: texture nodes image node not working with image sequences. 2015-10-12 03:22:43 +02:00
c2ce38b102 Fix T46434: Shear w/ local-center & editmode fails 2015-10-12 12:02:22 +11:00
1b8a4fd9bd Fix T46444: Crash importing DAE w/ empty armature 2015-10-12 11:35:08 +11:00
d7ceca8c93 Fix T46085: UV project modifier artifacts with vertices behind the camera. 2015-10-11 20:36:38 +02:00
bd6febc4c4 BGE: Change KX_WolrdInfo mathutils vector to color
Change the mathutils callback from vector to color for mistColor, backgroundColor and ambientColor.

Reviewers: lordloki, campbellbarton, panzergame, moguri, sybren

Reviewed By: panzergame, moguri, sybren

Projects: #game_engine, #game_logic

Differential Revision: https://developer.blender.org/D1432
2015-10-11 18:43:05 +02:00
3dd83b533a BGE: Adding a Max Jumps value to the character physic window
Actually we only have a Python API that allows to change the max jumps value.
The patch also allows non programmers to change the maximum numbers of jumps.

Reviewers: panzergame, sybren, campbellbarton, lordloki, moguri, agoose77

Reviewed By: lordloki, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1302
2015-10-11 18:28:43 +02:00
88005475db Cycles: Make light behavior in local view matching BI
Title says it all, based on feedback of artists from gooseberry team.

This mainly affects cases when going to a local view from layers setup
when some lamps were on invisible layers. Those lights are no longer
becoming visible to the object in local view.

Reviewers: brecht, juicyfruit, dingto

Reviewed By: juicyfruit, dingto

Subscribers: maxon, eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1326
2015-10-11 20:16:53 +05:00
3f4c0612fe Fix T45058: Cycles hair shader reflects incorrectly for meshes
The issue was caused by non-continuous tangent space calculated for triangles.

This commit adds a Tangent input to Hair BSDF node which can be used to hook up
Tangent calculated form UV as an input to the node in order to make sure the
tangent space is continuous.

Doing this as an input instead of using default tangent layer from UV because of
several reasons:

- This way it's really easy to preserve compatibility with existing setups.

- Default UV map is not necessarily giving continuous space, one might want to
  use other tangent space sources or distort the space for some artistic
  decision.

Reviewers: juicyfruit, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D1428
2015-10-11 19:43:30 +05:00
34e7285b0a Cycles: Gracefully handle out-of-memory happening in device vector
Currently only image loading benefits of this and will give magenta color
when image manager detects it's running out of memory.

This isn't ideal solution and can't handle all cases. For example, OOM
killer might kill process before it realized it run out of memory, but
in other cases this could prevent some crashes.

Reviewers: juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1502
2015-10-11 19:41:59 +05:00
27be9a2f3b CMake: Enable WITH_PYTHON_INSTALL for lite builds
This is needed to run on OSX and Windows when system python isn't found.
2015-10-12 00:53:52 +11:00
83721682bb BGE: Change character jumping to char
* Change the character jumping variables and methods from int to char.
* Limit the maxJumps integer value from 0 to 255.
* Allow to set the minimum jump amount to 0.

Reviewers: panzergame, lordloki, moguri

Reviewed By: lordloki, moguri

Subscribers: agoose77

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1305
2015-10-11 15:41:40 +02:00
5295202c2c Revert "Buildbot: Test enable CUDA binaries for Win32"
This reverts commit 4f29613894, since Cuda fails again on win32 buildbot...
2015-10-11 15:35:48 +02:00
8a1afc28db Cycles: Increase number of textures allowed for OpenCL render
Currently OpenCL devices are packing images into a single texture,
which means technically number of textures is not limited here.

Now OpenCL will use same number of textures as CPU. If we want
to bump number of textures further, this values are to be modified
in sync.

NOTE OpenCL still does not support float textures.

Original patch from a guy called bliblubli in the tracker with
some own modifications.

Reviewers: brecht, dingto, sergey

Differential Revision: https://developer.blender.org/D1530
2015-10-11 18:22:01 +05:00
9b247bdf61 BGE: Fix for last commit
The icon16 and icon32_mesh_capsule.dat files are committed with 0 Kb, because I used the patch from the differential from the Phabricator which I done with a regular .diff file.
2015-10-11 15:19:44 +02:00
cdb8bf0c96 BGE: Add icons to collision shapes.
This patch adds icons to the physic collision shapes.
Adding a new capsule shape 'mesh_capsule' icon which represent the shape better then the metaballs icon.
And replace the metaballs icon for the Blender collision shape.

{F206628}

Reviewers: moguri, sybren, agoose77, lordloki, mont29, panzergame, campbellbarton

Reviewed By: lordloki, panzergame, campbellbarton

Projects: #game_engine, #game_ui, #user_interface

Differential Revision: https://developer.blender.org/D1403
2015-10-11 14:32:20 +02:00
2247ebe16e BGE: Add recursive dupli group deletion
This patch will delete all associated objects from a group instance (dupli group) if the are deleted.

Reviewers: brita_, sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Projects: #game_engine

Maniphest Tasks: T36388

Differential Revision: https://developer.blender.org/D1205
2015-10-11 14:08:38 +02:00
d1ee195260 BGE: Adding a screenshot function to game actuator
Extending the existing game actuator with a screenshot function, to give also non programmers the ability to take screenshots in the BGE.

Reviewers: lordloki, campbellbarton, moguri

Reviewed By: lordloki, moguri

Subscribers: lordloki, Genome36

Projects: #game_engine

Differential Revision: https://developer.blender.org/D651
2015-10-11 13:41:38 +02:00
3748bbf2d9 Cleanup: warning with new glew 2015-10-11 12:54:14 +11:00
93bc81f495 Upgrade glew to v1.13 2015-10-11 12:53:41 +11:00
6e66ddf5ed Fix warnings and remove casts by adding copy_vx_vx_uchar() functions. 2015-10-11 02:15:44 +02:00
bb580664e6 Fix T46441: texture paint soften brush at 0 strength works at full strength. 2015-10-10 23:20:31 +02:00
307d4b3139 Revert "Fix T46406: Cycles ignores default socket value associated with group socket"
Fixes T46442.
2015-10-10 21:57:00 +02:00
df1a3b0fda Fix T45152: multiview/stereo render not working with Freestyle + Cycles. 2015-10-10 19:18:42 +02:00
fc7c856da2 Fix T44048: freestyle lines in Cycles are in the wrong color space. 2015-10-10 18:44:19 +02:00
b098609186 Fix various compiler warnings. 2015-10-10 17:35:30 +02:00
2a97c17549 CMake: minor message cleanups. 2015-10-10 17:35:30 +02:00
fd506623d8 Fix T46437: Make progress report py helper resitent to 'zero steps' passed value...
To be backported, should we need an 'a' release.
2015-10-10 17:21:09 +02:00
05acf3d43a Random Select Seed Option
Add 'Seed' option for all random select operators

D1508 by @mba105, w/ edits
2015-10-10 23:52:11 +11:00
240f356166 Fix T45167: OS X inertial scrolling can lead to unexpected zooming.
Differential Revision: https://developer.blender.org/D1539
2015-10-10 14:00:02 +02:00
a8dd0af8cf Fix T46341: OS X trackpad and magic mouse gestures not working with 10.11 SDK.
Differential Revision: https://developer.blender.org/D1539
2015-10-10 14:00:02 +02:00
f42ae6c569 Fix/Workaround T46431: blender-softwaregl crashes
Order of initialization bug only impacted mesa's software-gl.

For now effectively revert support for glx-context-flags.
2015-10-10 19:39:35 +11:00
64e4f9967f Fix T46403: motion tracking not workig with Xcode 7 on OS X.
Caused by use of the uninitialized shape_ variable in Resize().
2015-10-10 04:09:37 +02:00
db3dfb76a8 Fix T46426: 2D-version of zoom border operator is available in 3DView context. 2015-10-09 22:24:58 +02:00
165c87dc4f Cleanup: 3DView object drawing: afterdraw lists: better 'loop & remove' with BLI_pophead.
Saves two lines and a temp variable for each loop...
2015-10-09 21:26:33 +02:00
01f235e138 Fix T46418: Constraints - influence other than 0 or 1 - bad results with non-homogeneous scaled matrices.
Use new interp_m4_m4m4 instead of blend_m4_m4m4.

Note that maybe we could replace other usages of blend_m... by interp_m...,
but this should be investigated on a case-by-case basis.
2015-10-09 21:26:33 +02:00
be72df4f06 BLI_math: add mat3_polar_decompose, interp_m3_m3m3 and interp_m4_m4m4.
mat3_polar_decompose gives the right polar decomposition of given matrix,
as a pair (U, P) of matrices.

interp_m3_m3m3 uses that polar decomposition to perform a correct matrix interpolation,
even with non-uniformly scaled ones (where blend_m3_m3m3 would fail).

interp_m4_m4m4 just adds translation interpolation to the _m3 variant.
2015-10-09 21:26:33 +02:00
8159718faf BLI: add SVD solver for mat3 (using eigen3). 2015-10-09 21:26:33 +02:00
ad5f6a95dd Cycles: Fix compilation error of CUDA kernel after recent decomposition changes 2015-10-09 17:53:29 +05:00
b54447c0eb Cycles: Make sure ray direction is always normalized
Ray direction is assumed to be normalized in such areas as scaling intersection
distance on instance push/pop when doing ray-scene intersection, but it was
possible that some closures wouldn't give normalized direction which could cause
wrong intersection checks.

Now normalization will happen on surface bounce, which could be a bit of a waste
if closure actually gives normalized direction, but currently only transparent
BSDF seems to give guaranteed normalized direction.
2015-10-09 15:58:03 +05:00
29247a7a05 Cycles: Fix wrong intersection with motion blur and degenerate object transform 2015-10-09 15:58:03 +05:00
4974ed93ef Cycles: Fix issues with quick inverse of degenerate matrix
This fixes part of the issues reported in T46322. Still need to solve
issue with wrong intersection distance scaling.
2015-10-09 15:58:03 +05:00
8fa4fccec4 Cycles: Fix intersection issues caused by degenerate instance matrix
Issue was caused by wrong intersection distance scaling on instance pop,
which could cause intersection distance to become zero, confusing following
intersection checks.
2015-10-09 15:58:03 +05:00
c8005703f2 Fix T46420: Segfault when instancing smoke domain.
Looks like instancing of smoke sim is not supported at all
(was fake-working in 3DView in 2.74, but not rendered).

But it should not crash - code was adding temp 'fromdupli' base to the delayed
drawing list...

Nice to backport this to 2.76 I think.
2015-10-09 10:51:38 +02:00
46ad220305 BGE Fix T41943: Zeroing out angular velocity not possible
This patch makes it possible to zero out angular velocity. tiny angular
velocities may cause instabilities, according to the discussion in T41943,
so they are mapped to (0, 0, 0) instead.

It also applies the same reasoning to the linear velocity, unifying the
different approaches.

Differential revision: D952
2015-10-09 09:50:20 +02:00
ff7effdc04 Correct own error in editmesh bvh
Flag mix-up and uninitialized var.
2015-10-09 16:35:42 +11:00
e9b9b883fb Fix leak creating 'empty' looptri bvh tree 2015-10-09 11:22:41 +11:00
103e38cbec Fix T46415: empty node group in GLSL shader has incorrect socket type conversion. 2015-10-09 01:29:13 +02:00
05ee31e38c Fix error after change to IDWalkFunc 2015-10-09 09:27:23 +11:00
24c94eaf9c BGE: Use BLI_task instead of pthread in KX_BlenderSceneConverter. 2015-10-08 21:38:12 +02:00
fd2bdc07ca Fix crash loading modifiers with missing IDs
Was very visible with barcelona file from Cycles benchmark repository.
2015-10-08 21:06:09 +05:00
216f1916a2 Fix compilation error with bullet disabled 2015-10-08 21:01:44 +05:00
350cf8ea7f Cycles: Cleanup, whitespace around keywords 2015-10-08 19:08:28 +05:00
7083423eb4 Fix T46407: Enabling OSL breaks Vector Transform node 2015-10-08 19:04:42 +05:00
e3abcd6723 Cycles: Add an interpolation option to environment textures
This commit exposes the interpolation parameter for environment textures (requested by DolpheenDream on IRC), just as it already is for image textures.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1544
2015-10-08 15:45:45 +02:00
3ab5075cf9 Add logicbricks to ID looper. 2015-10-08 15:05:37 +02:00
4f0f0d1bce Add rigidbodyworld to id looper. 2015-10-08 15:05:37 +02:00
74f557982d Add id looper for particlesystem. 2015-10-08 15:05:37 +02:00
b0bce65d67 Add a bunch of missing IDs in ID looper... 2015-10-08 15:05:37 +02:00
f375028a25 Modifiers: add 'cd_flag' parameter to their ID looping callbacks, needed
since some IDs (objects) are not 'refcounted' while others (textures) are...

Partial merge from id-remap branch.
2015-10-08 15:05:37 +02:00
fb5328d59f Fix: Do not show "Paste Flipped" in the Dope Sheet's Grease Pencil mode 2015-10-09 01:14:04 +13:00
0a7aaa99d8 Fix T46236: NLA transition strips do not get resized when neighbouring strips change
Transition strips in the NLA should always stick to whatever strips are beside it,
and are allowed to grow/shrink as needed to achieve this. Previously the code here
was only checking if the neighbouring strips started encroaching on the transition,
but not whether the transition needed to grow to fill a gap. It was also just
moving all strips when there was insufficient space, even though that would alter
timing down the track.

Now transition strip resizing works as follows:
* It will grow/shrink as necessary to absorb any changes in the length of its neighbours
  instead of shunting everything around to maintain its length
* If the neighbour has been resized by an amount greater than the transition's length,
  all the strips will need to be shunted away to make way for the neighbour. In this
  case, the transition will shrink down to being 1 frame long to ensure that it is
  still visible (so that it can be removed if necessary).
2015-10-09 01:10:13 +13:00
bf969e9dde Fix T46391: Sync Length in NLA is not working on all instances of clip 2015-10-09 00:08:07 +13:00
afeca633c2 Fix: "Tweak user" red-alert flag was not getting set on strips on active track
The "tweak user" flag used to flag strips using the same action as the active strip
was not getting set on other strips that live on the same track as the active one.
Strips with this flag set are shown with a red colour to indicate that editing the
action may have the unintended consequence of modifying another strip.
2015-10-09 00:08:07 +13:00
1730c3666f Fix T46406: Cycles ignores default socket value associated with group socket 2015-10-08 16:05:51 +05:00
fca1d14214 Cycles: Fix wrong float3->float3 conversion node 2015-10-08 16:05:50 +05:00
97b6948181 Fix T46386: Duplicate fails updating driver links
Duplicate wasn't updating links,
so duplicatinvg a objects would still point to the originals for curve-taper, texmesh, drivers.

Use generic id-looper to handle replacing data.
2015-10-08 20:29:49 +11:00
5eb500f2fc Add USER flags to BKE_library_foreach_ID_link
This way callbacks can know if adjusting user-count is needed.
2015-10-08 20:14:15 +11:00
8702dff2b9 Cleanup: use newlibadr_us 2015-10-08 19:42:10 +11:00
9f2e225f5c Add missing object-data ID loop pointer 2015-10-08 19:25:51 +11:00
be92598a85 Off by one error in own recent commit 2015-10-08 19:05:16 +11:00
9fdc3abb84 Fix bplayer (c) 2015-10-08 10:09:58 +02:00
8d108db184 Fix T46405: Cycles point density missing update when modifying source object 2015-10-08 12:41:05 +05:00
ac098007fb Cycles: Fix for point density always using render settings for modifiers 2015-10-08 12:41:05 +05:00
1d9de55949 BKE_key: add BKE_key_from_id helper functions 2015-10-08 18:19:28 +11:00
04c7894f4d Cleanup: remove unused fluidsim members 2015-10-08 18:17:10 +11:00
58869a3ecb Add missing object ID loop pointers 2015-10-08 18:15:35 +11:00
b349297861 File Read: de-duplicate command line file-load
WM_file_read must support background mode already
since it can be called by Python scripts in background mode.
2015-10-08 16:00:01 +11:00
a5e631171b BLI_path api, minor changes to CWD handling
- BLI_current_working_dir's return value must be checked, since it may fail.
- BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure.
- avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
2015-10-08 15:05:58 +11:00
e47177e301 Cleanup: redundant code in anim player
Was setting the path to a directory when no file was given -
then checking its a loadable file.
2015-10-08 14:42:25 +11:00
08f61b0fe3 Cleanup: remove unused arg 2015-10-08 14:22:16 +11:00
0499c5a623 Cleanup: headers 2015-10-08 11:11:48 +11:00
bfff1d7aa8 Cleanup: typos 2015-10-08 11:11:31 +11:00
0a3c342692 Fix T46410: VSE Mask ignores animated properties 2015-10-08 10:46:11 +11:00
8918e089a5 Fix T46408: Transform (bicubic) ID channel fails 2015-10-08 10:16:54 +11:00
27ff2be921 UI: no need to update drag-edit for scroll buttons 2015-10-08 09:05:27 +11:00
720d4521cd BGE : Collision mask support in raycast + and raycast cleanup.
I have removed the m_pHitObject, m_xray and m_testPropName and replace them by a temporary struct "RayCastData" which contains these datas and a collision mask. Finally i add a collision mask argument in the python function "rayCast" :
```
rayCast(to, from, dist, prop, face, xray, poly, mask)
```

It can be useful to hit only object which are on the right colision layer. for example if you have hitbox for a charater or vehicle you don't want to hit it with raycast.

test file : {F237337}
left mouse click on two planes and see console messages.

Somewhat more elaborate test file by @sybren: {F237779}
Look around and click on the cubes. One cube lamp responds, the other doesn't, based on their collision groups.

Reviewers: moguri, hg1, agoose77, campbellbarton, sybren

Reviewed By: agoose77, campbellbarton, sybren

Subscribers: campbellbarton, sergey, blueprintrandom, sybren

Projects: #game_engine, #game_physics

Differential Revision: https://developer.blender.org/D1239
2015-10-07 22:14:43 +02:00
Philipp Oeser
7a06613b82 Fix T46402: UILists fail to scroll using click+drag 2015-10-07 21:20:46 +02:00
d5882352b3 Cleanup of BKE_library_foreach_ID_link.
This func is long enough, there's no real need to make it even longer with
verbose local varnames and multi-line for loops...
Also, avoid mono-leters names as well for data pointers.
2015-10-07 20:50:34 +02:00
0e290d75fc Fix T46401: bad step size w/ radians 2015-10-07 19:40:18 +11:00
0d36233dd8 Fix for T41536: 2.71 getActionFrame no longer returns frames accurately
We now keep actions around when they are finished playing so scripts can
still get access to information such as the current frame. Playing a new
action in the same layer still overwrites the previous action as before this
commit. Using an explicit KX_GameObject.stopAction() will free the memory. The
action is also freed when the KX_GameObject is freed as before.
2015-10-06 22:22:47 -07:00
e4e8e359a1 BMesh: maintain select-history when sorting 2015-10-07 15:40:32 +11:00
077b4ab846 Fix T45886: cont.deactivate(ActionActuatorInPropertyMode) does not work
Make sure the Action Actuator actually deactivates when given a negative
event while using the property play mode.
2015-10-06 21:18:49 -07:00
b333a7570f Cleanup: spelling 2015-10-07 15:02:06 +11:00
68797eda1f Fix mesh validate: 'r_changed' ignored loop edits 2015-10-07 14:38:36 +11:00
f456c8d8d3 Fix game-property use-after-free error
D1538 by @hal01
2015-10-07 11:05:27 +11:00
f834cb0356 Fix FileBrowser: do not show 'advanced filter' panel outside of lib browsing context,
it’s only used there so far.

Reported by Thomas Beck (plasmasolutions) over IRC, thanks.

Safe enough for 2.76.
2015-10-06 20:19:36 +02:00
64aaf0cbe1 Fix T46390: Sound sequencer API doesnt' work when built with SCons
The issue was caused by original patch efde4dbb.

This seems to be really old bug, but safe for 2.76.
2015-10-06 21:01:52 +05:00
dded01aa52 Fix T46392: Navmesh generator error.
We now have to explicitely enure tesselation of DMs when we need it.

Notes: Maybe we could use looptris here as well?

Not a regression (bug already present in 2.75, but not 2.74), nice to backport to 2.76 nontheless.
2015-10-06 16:04:21 +02:00
8471362987 WM: Fix crash when a new window can't be created
Report an error instead of crashing if a new window can't be created
(typically caused by bad drivers).
2015-10-07 00:36:39 +11:00
Julian Eisel
867c49b962 Fix T46345: Registrable props could be modified 2015-10-06 21:51:35 +11:00
8d08976ef0 Cleanup: return PROP_EDITABLE rna flag
Harmless, since the flag happens to be 1.
2015-10-06 21:43:04 +11:00
359d1bd580 Cleanup: use BLI_path_basename 2015-10-06 19:49:58 +11:00
9f15bcb218 RNA: Add check_existing arg to other load() funcs
Note: movieclip was doing this already by default,
now split into 2 functions, matching image behavior.
2015-10-06 19:44:02 +11:00
65bd2a6e6a Fix T46389: Shrinkwrap fails in editmode
Own regression caused by fix for T46067,
edit-mode bvh only contained unselected faces.

This commit adds support for an edit-mode bvh containing all faces.
2015-10-06 17:57:15 +11:00
51f00499cd Cleanup: only check paint mode for active objects 2015-10-06 16:24:57 +11:00
541d28f1a3 Fix T46385: Duplicate w/ vertex parent fails
Depsgraph customdata flag was set on the parent,
then cleared once the parent object was handled.

This is initialized to zero for new nodes, no need to clear.
2015-10-06 15:43:32 +11:00
1cdf82d7f8 Image Py API: Expose 'load_exists' to RNA image load(), and extend load_image() helper.
Expose our `BKE_image_load_exists` feature through an optional parameter to `Image.load()`.

Extend `image_utils.load_image()` with two optional parameters, to return existing image datablock
if possible, and in that case, to force reloading said image.

Needed by incomming 'import images as planes' addon enhancement.
2015-10-05 18:49:20 +02:00
e5552f8241 Cleanup: use proper ObjectWalkFunc typedef in modifiers' object callback func.
Also, fix own stupidity, no need to define ID callback in case we only have objects,
calling code knows to fallback to `foreachObjectLink()` when `foreachIDLink()` is missing...
2015-10-05 15:57:10 +02:00
90b925f76d Fix T46333: Particle Info Node broken w/ BI
Patch from @a.romanov

This also fixes multiple particle systems - which never worked.
2015-10-05 23:26:57 +11:00
a451c480fa Cleanup: warning 2015-10-05 23:19:33 +11:00
93fa359d08 Fix T46375: Inverted scroll in node template menus 2015-10-05 22:23:54 +11:00
776a98f3e8 Fix T46354: Curve Modifier does not update (new Dependency graph)
Result of curve modifier depends on transform of the object which should
be reflected by the depsgraph relations.
2015-10-05 16:16:58 +05:00
3ba6cea84d Buildbot: Disable use of own Clang for OSX builds
Our version of clang fails with latest SDK. It's not really clear if such
change will disable openmp or not (-fopenmp doesn't throw an error, but
it might be a silent fail).

In any case, builds without OpenMP is better than no builds at all.\
2015-10-05 16:00:02 +05:00
413036b0d8 Fix T46377: No python executable in 2.76 rc3 distribution for OSX 2015-10-05 15:44:36 +05:00
3b2ad704f5 Metadata display: support word-wrapped note
- Match layout from stamp buffer (note last so it can wrap)
- Correct vertical spacing (didn't take decender into account)
- Use U.pixelsize when setting font-size.
2015-10-05 21:28:47 +11:00
86aeb7df96 Fix T46379: Bad behavior of bUnit_ToUnitAltName() with default units.
It would simply remove default units (in most case), cannot see any good reason for such behavior?
Might work in case default unit is the only one present, but breaks consistency (and it may not be
always obvious for user which unit it is). Comes from original patch from five years ago, rB7d8f0fce.

This will break keyboard-setting of values, e.g. '2m 33.4cm' would become '2 33.4cm',
totally useless and invalid entry!
2015-10-05 12:02:02 +02:00
3d5622a208 Cleanup: pass pointer to rctf 2015-10-05 20:48:53 +11:00
57408177d2 SCons: Support compilation with 10.11 SK on OS X 2015-10-05 14:48:04 +05:00
91f1886b8e Fix T46352: Cycles fails to render when material contains UV mapped texture as volume input 2015-10-05 14:45:03 +05:00
518d68fae0 Cycles: Add some TODO comments about derivatives 2015-10-05 12:54:05 +05:00
a771e27b84 Cycles: Fix for builtin textures when linking against OSL 1.6.8
Issue was caused by changed function signature. This is still not really full
support of new OSL API since we don't store anything in the derivatives which
could confuse mipmapping.
2015-10-05 12:52:07 +05:00
2a2e12772c Cycles: Remove redundant coordinate clipping in voxel SVM node
It is now handled via texture extension type.
2015-10-05 12:41:16 +05:00
d784568805 Cycles: Fix missing z-coordinate check in volume sampling 2015-10-05 12:40:50 +05:00
1a65289a12 Fix T46358: Cycles point density uses repeat extension type 2015-10-05 12:28:36 +05:00
8e08c50646 Fix T46305: normal map display issues in viewport when using VBOs. 2015-10-05 00:17:36 +02:00
fccb14b5d2 CMake: detect OS X 10.11 / Xcode 7. 2015-10-04 18:11:08 +02:00
f2499b6015 Fix T46368: Subtitle Export: Subtitles are not sorted by time.
We need a temp list of Text effect strips here, to be able to sort it as we want...
2015-10-04 16:43:24 +02:00
c919ce3aa9 Fix (unreported) broken export of timecodes in SubRip VSE exporter.
Would write 1.04 seconds as `00:00:01,40` instead of `00:00:01,040`...

Anyway, we already have BLI API for timecodes, much better to add
SubRip timecode format there, heavily simplifies code.

To be backported to final 2.76.
2015-10-04 16:43:24 +02:00
123b64f818 BMesh: improved smooth subdivision
Instead of offsetting along normals, smooth positions are now
calculated on a sphere defined by the vertices and their normals.

This removes visible seams along original edges, which were common previously.
2015-10-05 00:03:10 +11:00
52f74923e6 Fix (coverity-reported) broken 'transform helpers' drawing.
E.g. trackball-arrows (R-R) were no more visible.

Caused by wrong cast of an array from int to float, we need an int version of those helpers (`glTranslatenxv`) too.
2015-10-04 09:31:17 +02:00
61218546cb Clenup: Text Editor: Fix inconsistencies in textline handling (makes coverty happy). 2015-10-04 09:00:59 +02:00
5884a0d66e Correct last commit, picky type warnings 2015-10-04 15:11:38 +11:00
a3cf661108 Correct last commit, check before freeing 2015-10-04 15:02:29 +11:00
74a2fa3095 BLI_Buffer: add BLI_buffer_reinit
Useful for re-using a buffer when the existing data can be thrown away.
2015-10-04 14:29:27 +11:00
9f046e95c0 BLI_Buffer: support over 2gb allocations
Also move comment to C-source and enumerate useful features.
2015-10-04 14:10:26 +11:00
38f4aeb2d3 BLI_Buffer: fix BLI_buffer_resize w/ calloc flag
When resizing, zero memory when the calloc flag is set,
even when no realloc is done.
2015-10-04 13:52:13 +11:00
5443d41882 InstallDeps: Fix broken OSL (would not generate valid default names for its .oso pre-compiled files).
Also, externalize temp/hacky patches in own dir, much much cleaner than integrating them in bash script!
2015-10-03 16:28:09 +02:00
d9d3a2a500 Fix T44605: OS X continuous grab issues. 2015-10-03 13:08:37 +02:00
ffe03cd264 Fix Broken Font Preview (reported over IRC by kopias, thanks).
Broken by font wrap commit rBf2341f829654c4dc97, there was actually two things here:
* Using non-initialized color (which lead to transparent drawing...), we need to use new
  `blf_draw_buffer__start/end` helpers here too, made them shared internally.
* Using `draw_str_i18n_nbr` as `draw_str[i]` length, ugh! That's the number of utf8 glyphs of
  translated string, not the length of untranslated string!

This fix must be backported to final 2.76.
2015-10-03 09:29:37 +02:00
41d0547490 Cleanup: style 2015-10-03 08:22:48 +10:00
caf98e29c5 rename ui_but_dragedit_poll
This isnt only checking, its initializing draglock
2015-10-03 08:19:50 +10:00
e49b934955 Fix T46346: Hide/Mask menu, Hotkey for lasso mask in sculpt mode unchangeable.
One can only edit keyboard shortcuts from that menu, others will now show a short
info about that instead of stupid 'Add' option!
2015-10-02 13:11:27 +02:00
550527bed0 Fix memory leak in compositor code with RGB curve nodes. 2015-10-01 18:11:12 +02:00
9ad829da7b Cycles: Correction to point density with particle source and world mapping 2015-10-01 19:34:37 +05:00
066df84f73 Fix T46340: Auto scrolling in text editor with upward selection not work.
Cleanup and rework a bit text_cursor_set_to_pos_wrapped(), it did not handle correctly negative y valuesi,
because it was only checking lines starting from first visible one.

Mostly, we now directly get line matching given y position (be it an invisible one) from the helper
(renamed `get_line_pos_wrapped()`), instead of first visible one, which allows us to get rid of
additional complexity of looping over next lines until we find correct one.

This code remains rather complex to follow, added some asserts to ensure everything works as expected,
and tested it rather seriously, but DO NOT backport this to 2.76!
2015-10-01 15:34:24 +02:00
29c2a64694 BGE: Fix T46302: abort call for unnormalized quaterions. 2015-10-01 13:06:57 +02:00
0f43fbcd8c Fix T46339: Edge sliding when there is only one vertex in the mesh crashes blender.
If t->mode remains edge/vert slide, restoreTransObjects() ends up calling
projectVert/EdgeSlideData(), which tries to access invalid customdata...

Not sure why we call again restoreTransObjects() and resetTransRestrictions() here tbh,
but safer not to change that for now.

Should be backported to 2.76 if possible.
2015-10-01 12:06:57 +02:00
83a94cb3f2 Fix T46321: 3D view not refreshed immediatelly after pasting keyframe in dope sheet (for a single channel) 2015-10-01 18:47:37 +13:00
e5117108aa Fix potential memory leak baking 2015-10-01 17:21:08 +10:00
22ec991e6b Fix T46331: File open does not show thumbnails, when a filter_glob is provided by python scripts.
No reason to exclude usual file-type 'guessing' for operator-filtered extensions...

Safe for 2.76, should we need to merge more fixes.
2015-09-30 20:20:44 +02:00
fabde2ab43 Fix T46332: Can't select an object with OpenSubdiv enabled
The issue was introduced by a wrong fix for T46247. Now both reports should
be properly solved.
2015-09-30 20:59:19 +05:00
95763b8c8a Revert "Fix T46247: Side-reported, bbox for zero-verts object with OSD subsurf and GPU compute would be -INF."
This reverts commit b278e8742b.
2015-09-30 20:57:02 +05:00
de360c4090 Fix T46313: Cycles bake normal map
Regression moving to bake to looptri
caused by mismatch w/ MFace and MLoopTri when the 3rd index was 0.
2015-10-01 07:25:45 +10:00
1030b22b0a Fix T46325: Armature: No more possible to rotate a bone with only its tip selected, in EditMode.
Regression from rB312cb0a957b81233ea, now we make an exception for TFM_ROTATION mode...
2015-09-30 10:51:16 +02:00
Julian Eisel
491b1899de Fix T46306: Cursor sometimes jumps with num-slider buttons & Continuous Grab
More precise description of the issue: Clicking on the right side of a num-slider button with Continuous Grab enabled sometimes caused cursor to jump to the inner value indicator even though text editing was started.

Happened because data->ungrab_mval wasn't reset correctly after dragging.
2015-09-30 01:58:59 +02:00
Julian Eisel
32365bb06c Add drag-threshold for number slider buttons
Was already used for normal number buttons for ages, makes sense to use here too.
2015-09-30 01:58:59 +02:00
7d2a62ef65 Fix T46299: Windows: File Browser Crash while listing big folders in preview mode (fonts, images...).
Windows-only bug, mmap & co are not threadsafe by default on this platform, so we have to add a dedicated
spinlock for them in win32.

Note that we may try to get rid of those mmap later, but not for 2.76!

To be backported to final 2.76...
2015-09-29 19:54:25 +02:00
2eb0c990f1 i18n extraction tools: keep even better order of entries in PO files.
Important to avoid too much changes, especially on the git repo (we are still getting
way too much changes there currently...).
2015-09-28 20:32:09 +02:00
3a58de3bf1 Blender Internal: Fix regression in point density texture
The issue was introduced by original Cycles point density support commit,
it lead to a constant density of 1 for object verticies point density source.
2015-09-28 21:33:45 +05:00
4c09f47a99 Cycles: Fix wrong particles min/max calculation for point density
Solves wrong object mapping reported in T46301.
2015-09-28 21:33:45 +05:00
fc97204742 Fix T46293: Text Editor: Convert to spaces/to tabs was totally broken with non-ASCII strings.
Code was totally unaware of UTF8, also it was needlessly complicated...
2015-09-28 10:04:37 +02:00
1a6d45527f BGE docs fix: link to the correct method name 2015-09-27 17:20:10 +02:00
8ea5cfd448 BGE documentation updates
Mostly added missing :arg: clauses -- these caused the :type:-clauses
that were already in the RST files to be hidden from the output HTML.

I also fixed some argument types from 'list' to 'Vector' where applicable
and corrected some obvious mistakes.
2015-09-27 16:32:16 +02:00
d187c6d8d6 Fix T46285: "Select parent" if there is no parent doesn't work correctly. 2015-09-27 10:24:11 +02:00
14bac995f3 Fix T46268: All Hotkey "C" are unexpectedly translated in menus.
We need custom context here, those are often very short names so context collision is pretty easy.

Also some minor changes (and avoid shadowing varnames)...
2015-09-27 09:51:56 +02:00
3bc16c3362 Fix T46271: switching between textures in texture buttons not updating preview. 2015-09-27 02:40:30 +02:00
b0951f4954 Fix T46212: blender internal lights in exclusive light group wrong in viewport. 2015-09-27 02:20:16 +02:00
97b1b6775f Fix crash reporting render errors during baking. 2015-09-27 02:18:42 +02:00
Julian Eisel
5a16c85a53 Fix file browser not sorting file list when opened from editor menu 2015-09-26 13:40:13 +02:00
4aad17c622 Use PyThreadState_GetDict, avoid Python internals
Works around problems caused by exposing Py internals (Py_BUILD_CORE).

- Build error with GCC, Py3.6 & OpenMP
- Linking error on MSVC
2015-09-26 12:02:17 +10:00
02b7896423 Fix T46260: Shadeless option ignores Object-Color 2015-09-26 01:37:39 +10:00
Julian Eisel
0419d3bb01 Fix node auto-offset to left broken
Own, really stupid mistake in rBc653077bf56 :| Kids, don't commit at night!
2015-09-25 17:08:33 +02:00
cf12e51eba Fix T46249: Boid goal object that has a force field set to 'Every Point' shape causes crash.
This is a mere bandage, that whole area is known broken anyway, but at least it should prevent the crash.

Note that that kind of stuff (the efd->index being a pointer) is really bad practice imho...

Should be backported to final 2.76.
2015-09-25 15:53:14 +02:00
a4a6e9b3f5 Fix T46239: Cross effect strip input fields can't be changed (in its properties panel).
Those shall not be editable in UI...
2015-09-25 10:54:38 +02:00
7967da2515 Fix T46263: bpy api - assigning to object.matrix_basis with AXIS_ANGLE rotation mode does not work correctly.
Drot in axis angle does not make that much sense anyway (it's even disabled in UI), but let's apply
it correctly at least!
2015-09-25 09:03:30 +02:00
b278e8742b Fix T46247: Side-reported, bbox for zero-verts object with OSD subsurf and GPU compute would be -INF.
Trivial fix, to be backported to final 2.76 if possible.
2015-09-25 08:38:45 +02:00
de80e68768 Cleanup: And one more commit... (BVH Cache). 2015-09-24 17:01:58 +02:00
97a3fa17d6 Cleanup: Remove some more BVH cache code, for reading/writing the cache. 2015-09-24 16:49:10 +02:00
dfadf18659 Cleanup: Remove some underlying code for the BVH disk cache.
Notes:
- There is still some bvh cache code, but that is from the engines initial commit, we might clean this up further or keep it.
- Changes in util_cache.h/.c are kept, this might be re-used in the future.
2015-09-24 15:47:27 +02:00
3804a3660e Cleanup: Typo fixes in OpenCL log messages. 2015-09-24 15:34:41 +02:00
3e59691df5 Cycles: Remove the BVH cache feature
This removes the BVH cache feature from the UI, underlying code will be removed in a separate commit.

The BVH cache was added before we had a multi-threaded BVH build, and a lot of other optimizations were done since then, which makes this not useful anymore.

Fix T46162.
2015-09-24 15:30:15 +02:00
Dalai Felinto
6aed771fac Multiview: fix Image Editor not showing Views menu when rendering
non-stereo Multi-View camera rigs (unreported)
2015-09-24 09:15:18 -03:00
fc6f4c11ae Add test scripts to ctest & rename 2015-09-24 20:52:58 +10:00
81f64312d2 Fix T46226: Bake normals multi-res crash 2015-09-24 20:14:51 +10:00
4269c56904 Fix T45865: NLA: Auto Blend is not recalculated when adjusting repeat. 2015-09-24 10:53:09 +02:00
f26a3f4bc5 Fix T46227: ShapeKeys Lattice by the driver, problem updates in new depsgraph
The issue was caused by driver referencing path outside of the key datablock.
2015-09-24 13:13:00 +05:00
3352b56d05 Fix T46232: Boids crash w/ random rule selection 2015-09-24 16:07:30 +10:00
ecf0529efd Quiet warning 2015-09-24 15:17:02 +10:00
741cf193f1 Knife: Improve clamping extents in ortho view
- measure extents from mesh center instead of origin.
- use clamping method, guaranteed not to flip the input vectors direction.
- use cage coords when available (since knife operates on the cage).
2015-09-24 13:34:26 +10:00
4493cac21a Fix T46219: Knife cuts fail away from center 2015-09-24 03:00:52 +10:00
Dalai Felinto
1827f99a78 Fix T46225: Crash when rendering halo flare
Error introduced in the multiview commit.
Also bringing back the "continue" statement instead of "return", as it
was before multiview.
2015-09-23 13:37:01 -03:00
d0a2a8086c Fix T46222: Eyedrop picking objects inconsistently 2015-09-24 01:45:19 +10:00
c34993160d Fix T46220: Add torus has no 'layers' option
Add layers property for all operators using AddObjectHelper
2015-09-24 01:05:55 +10:00
Julian Eisel
982a06ac22 Fix UV editor scope background color not correct after theme reset
Missed to do that in rBcbeb76da952cd.
2015-09-23 16:01:44 +02:00
365d8ceac0 Workaround for linking Python on win32 2015-09-23 23:20:15 +10:00
f964334b88 Fix T46215: Explode modifier looses textures 2015-09-23 22:57:00 +10:00
abfc9e59e2 Fix T46217: Make normal artifacts 2015-09-23 20:19:46 +10:00
0ec814c91d Cycles: Support building with latest OSL-1.7dev
So now the following OSL versions are supported (at least for compilation):

- 1.5 with closure alignment patch applied
- 1.6.8 release
- 1.7 development version from latest git
2015-09-23 12:27:02 +05:00
cc22f1b571 Merge branch 'openvdb' into cvdb_ray_isect 2015-09-23 03:59:54 +02:00
99fd1603eb Merge branch 'master' into openvdb 2015-09-23 03:59:14 +02:00
1cae9c4af4 Fix T46202: OS X (and Windows?) crash when going fullscreen.
Calling event handling recursively during window live resize is problematic,
the code wasn't designed to do that. Instead postpone event handling until
after live resize.
2015-09-22 23:20:17 +02:00
0cf842a989 Update module test to pass w/o freestyle enabled 2015-09-23 03:36:32 +10:00
7615073e77 Update test to RNA API 2015-09-23 03:11:17 +10:00
1a59b63e1c Show error when unsupported movie format used
Was silently failing.
2015-09-23 03:02:07 +10:00
ad873ca92d prevent assert: select-linked UV delimit w/o UV's 2015-09-23 03:00:30 +10:00
c3ebab3e45 OpenSubdiv: Fix crash with empty mesh
Reported by newbz in IRC, thanks!
2015-09-22 21:11:17 +05:00
dc9f906d42 FFmpeg: Solve memory leak happening on encoding video 2015-09-22 21:11:17 +05:00
c6049d1371 Fix T46194: Crash rendering particles
Off by one error in 38940662
2015-09-22 22:16:40 +10:00
a1e2b292bb Install_deps: Hopefully fix broken checks for numpy package in fedora-like distro. 2015-09-22 11:00:35 +02:00
f2418f48fa Install_deps: Add command line options to saved BUILD_NOTES.txt.
Requested by Daniel Salazar (zanqdo) over IRC.
2015-09-22 09:45:01 +02:00
e51272f663 Fix report banner text width 2015-09-22 17:18:43 +10:00
e29f8c600b Reporting was done before before addons were loaded
On the very first start, reporting of missing engines wasn't working.
2015-09-22 16:53:07 +10:00
b87cb9ad2c Remove arbitrary simulation time limit in liquid sim. Tested and works fine with more than 100s 2015-09-22 00:35:22 -06:00
70f0499139 Fix for error reporting w/ a new-file
Reports are now initialized before reading startup.blend
2015-09-22 15:56:03 +10:00
9a62164d94 Cleanup: indentation 2015-09-22 15:02:11 +10:00
98807ca751 Report loading file with no matching engine
Re-enable old code, now show in header instead of popup.
2015-09-22 13:30:12 +10:00
28fa49f168 Cleanup: de-duplicate post file read update calls 2015-09-22 12:50:41 +10:00
12ea90b707 Fix T46201: Popup menu in post_load handler crash
Match regular file loading logic for new-file operator.
2015-09-22 12:26:24 +10:00
32578db1bd Fix bplayer (c). 2015-09-21 17:40:50 +02:00
b53eb9e18b Cleanup: use malloc when calloc is overwritten 2015-09-22 01:03:32 +10:00
e4d016ce48 Makefile: show build dir when configuring 2015-09-22 00:16:53 +10:00
894fd0c2fc Sequencer: show X,Y in text effect location 2015-09-22 00:15:37 +10:00
84b074baed Armature drawing: custom shape scale options
- Custom scale:
  Avoids having multiple custom-shapes at different sizes.
- Option not to use bones length:
  So changes in edit-mode don't resize the custom-shape.
2015-09-21 23:57:08 +10:00
0dbde559cf Render: Free persistent image storage when loading new file 2015-09-21 18:42:48 +05:00
7b9bd5b546 Recent change for Py3.6 compat caused fatal-error
Revert back to old method, and define Py_BUILD_CORE to expose internals.
2015-09-21 23:08:18 +10:00
df80aeb162 Fix (unreported) Append/link code: All library datablocks could end with same name.
This was broken since ages I think, did not really hurt since we usually never use libs' names
to access them. Rather bad behavior however, breaking a ground rule of our ID system!

And no real reason to add new libraries to new (split) Main at all, libraries are
never considered linked datablocks, which means they should always be in 'main' Main->library list.

Not a regression, but should be included in 2.76 imho.
2015-09-21 15:06:07 +02:00
8da3c5c1b9 Fix T46159: OpenSubdiv does not always give same results as Blender own subsurf code with crease edges 2015-09-21 17:53:21 +05:00
dbdb1064e7 Small fix for depsgraph debug graphviz: empty labels for edges require an explicit id. 2015-09-21 12:46:07 +02:00
1ee9c5d6a3 Some minor tweaks to depsgraph debug graphviz output.
- Removed relation labels, since these mostly just reflect connected nodes, and also appear too far off the edge lines
- Draw cyclic links in dark red
- Slightly thicker edges and larger margins
2015-09-21 12:16:30 +02:00
ff3c7460e5 Fix view-selected w/ custom bone shapes
Was ignoring bone-length, also check that drawing shapes is enabled.
2015-09-21 15:15:59 +10:00
034cc855f0 Fix T46186: Panel doesn't update on brush change 2015-09-21 10:32:14 +10:00
5031dbcee5 Fix linker warning about zero length memset. 2015-09-21 01:59:52 +02:00
726727191a Fix T43715: IK pole target + stretch not working for a single bone chain. 2015-09-21 01:59:50 +02:00
0b714abacc RNA: angle step-sizes were too small
These were ignored previously, so it wasn't noticeable.
2015-09-21 09:49:13 +10:00
Julian Eisel
c653077bf5 Fix node auto-offset failing during heavy compositing (sometimes)
Compositing might make main thread so busy that animation is considered done due to duration before final position is reached.

Also added check to avoid unnecessary redraws.
2015-09-21 01:03:36 +02:00
8f25c12110 Fix T46050: blender internal geometry node UV not working inside node group. 2015-09-20 23:15:34 +02:00
196d26fb14 Fix T46144: blender internal face texture color wrong in raytraced reflection. 2015-09-20 23:14:55 +02:00
Julian Eisel
5ad8489c1d Fix compiling with GE
Enabled Freestyle instead of GE :| Sry
2015-09-20 21:11:08 +02:00
Julian Eisel
cbeb76da95 Fix T46180: Theme > UV Image editor > Scope Background does not have any effect 2015-09-20 20:17:19 +02:00
Julian Eisel
28da385ac2 Cleanup: Use new vector transform functions 2015-09-20 18:11:25 +02:00
Julian Eisel
a28a1f11d6 GL-utils: Add vector transform functions
Might also be useful to have _neg versions of these (done quite often),
but decided to keep it simple for now.
2015-09-20 18:03:36 +02:00
605a2c8490 Cleanup: warning, style 2015-09-21 06:59:50 +10:00
d0017eb5f2 fix build error w/ clang 2015-09-20 20:27:09 +10:00
fa19af6a93 Word wrap support for frame node 2015-09-20 18:17:34 +10:00
c0d5523e6c Fix T46169: Link to bpy API in addons tab of user preferences is outdated.
Now use auto-generated one, like e.g. for link in Help main menu...
2015-09-20 09:49:36 +02:00
cfc109eb92 Fix T46161: Rotate around selection changes bezier curve handle type.
Issue is, when 'Rotate Aroud Selection' is set, in Edit mode we do a fake transform operation
to get center point around which to rotate. For curves, most transform operations involve
a check of handle types. For now, added 'TFM_DUMMY' as an exception here.

Think it would be best to actually undo those changes in case of cancelled operation,
but this is much more involved, while this fix is safe enough to be included in final 2.76.
2015-09-19 11:08:21 +02:00
6844b02a71 Fix for building w/ Python3.6 2015-09-19 17:49:38 +10:00
631d08aaed Fix leak in UI Panels
Switching screens quickly didn't free the panels activedata.
2015-09-19 17:49:04 +10:00
cbeab360f1 UI: tooltip layout tweaks
- enable word-wrap for all tip text to align vertically.
- draw enum identifier at the end of the last line, not first.
2015-09-19 15:22:03 +10:00
cb27d38cf4 BLF: correct ResultBLF.width value when wrapping 2015-09-19 15:22:03 +10:00
e6a413b1ec UI: word-wrap for tooltips, broke text alignment
This wasn't visible with default settings,
but caused problems w/ pie-menu's & manually adjusted theme font-size.

Now only draw from the bound-box top w/ word-wrap enabled.
2015-09-19 15:22:03 +10:00
Julian Eisel
36d64240e6 File Browser: Scroll view on normal selection too
Adjusts view after mouse/border selection if some selected items are out of view bounds.
To get as much of the selection into view as possible, this adjusts view first for the last, then for the first element in the selection.
Also, if region is pretty small, view adjustment is skipped, as otherwise the view is focused on the first element only, which isn't really useful IMHO.

Maybe not so nice: Since we do two view alignment iterations, UI_view2d_curRect_validate, which is a rather big function *might* be called twice under certain circumstances (border select & total size of selected elements is exceeds view bounds). I think that's totally acceptable though.
2015-09-19 04:24:48 +02:00
Julian Eisel
d7e88fe1fd File Browser: Scroll view with arrow keys navigation
Adjusts view to display active file after using arrow keys to navigate through files.
2015-09-19 03:34:00 +02:00
Julian Eisel
bc5238e3cc Correction to previous commit 2015-09-19 03:17:06 +02:00
Julian Eisel
1bb89a6028 Fix file key select using wrong file after border select in scrolled view
Basically, after border selecting, a wrong file was selected by using arrow keys if the screen was scrolled a bit vertically. Reason was that we didn't use correct view space coordinates but region space coordinates for measuring distance from mouse to first/last file in selection after border select.
2015-09-19 03:12:46 +02:00
6e19aa42bf Fix T46155: Sequencer Text Effect: wrong vertical 'TOP' alignment.
Logic was broken for this vertical alignment option - we need to remove one line height here...
2015-09-18 23:01:31 +02:00
de7b7572c2 Fix T46030: Strange behavior of Cycles Brick Texture
Added some extra seed to the hash, so it's now less likely to give repetitive
patters at values around zero.

This will change distribution of bricks for existing files. but it's something
inevitable.
2015-09-18 17:32:17 +05:00
910aaa3951 Image Stamp: word-wrap support for 'note' text 2015-09-18 20:44:06 +10:00
0aa0a1a966 Sequencer: word-wrap support for sequencer text
Also add vertical alignment option,
default align to bottom for subtitles.
2015-09-18 20:44:06 +10:00
d435b0d24d UI: word-wrap support for tooltips
Tooltips will automatically wrap when exceeding UI_TIP_MAXWIDTH.
2015-09-18 20:44:06 +10:00
f2341f8296 BLF: initial word-wrap support
- Adds support for word wrapping to Blender's BLF font library.
- Splits lines when width limit is reached or on explicit \n newlines.

Details:

- Word wrapping is used when `BLF_WORD_WRAP` flag is enabled.
- There is a single loop to handle line wrapping,
  this runs callback, passing in a substring,
  this way we can avoid code-duplication for all word-wrapped
  versions of functions... OR... avoid having to add support
  for word-wrapping directly into each function.
- The `ResultBLF` struct was added to be able to get the number
  of wrapped lines, when calling otherwise unrelated functions
  such as `BLF_draw/BLF_width/BLF_boundbox`,
  which can be passed as the last argument to `BLF_*_ex()` functions.
- The `ResultBLF` struct is used to store the result of drawing
  (currently only the number of lines wrapped, and the width).
2015-09-18 20:43:52 +10:00
e9dd060102 Doc: remove todo's from BMesh code
These were out of date and better have outside the source.

Also clarify BMLoop description.
2015-09-18 16:40:55 +10:00
803d1563ec Minor edits to sys-info
- remove byte b''
- remove always false check for missing buildinfo.
- use textwrap module
2015-09-18 16:40:55 +10:00
247b68476b Cycles: simplify logic for calculating dof-dist
Matches change from BKE_camera
2015-09-18 16:40:55 +10:00
f1422c40af Use squared length where possible 2015-09-18 16:40:55 +10:00
2eb50d450c Cleanup: simplify PyBMesh customdata API use 2015-09-18 16:40:54 +10:00
b2e206a0af Cleanup: remove unused WriteFile members 2015-09-18 16:40:54 +10:00
1d6c1e90aa Support relative frames w/ start/end args 2015-09-18 16:40:54 +10:00
be73170bf6 Fix UI crash entering very long strings
Strings exceeding UI_MAX_DRAW_STR weren't null terminated.
2015-09-18 16:40:54 +10:00
f7239e9084 Fix T46148: Sculpt view-clip fails in ortho mode 2015-09-18 16:40:54 +10:00
276732ee62 Address request from T46136: make softrange for 'simple deform' angle from -360 to 360 degrees...
This should be safe enough for final 2.76, sould we make other RC.
2015-09-18 08:27:04 +02:00
ec26830776 Initial work to perform volume ray intersection next to the bvh intersection 2015-09-18 01:20:36 +02:00
208e064721 Doc: escape enum name & description
Needed since key enum now uses many characters as they're typed.
2015-09-18 01:47:58 +10:00
a9c5e1d9b7 2.75 splash
by The Alike Team
2015-09-18 00:10:19 +10:00
Julian Eisel
7238ae1df4 Fix hidden auto-offset glitch
Steps to reproduce were: Open F233831, insert floating node into nearby link (so that it's not attached to frame).
2015-09-17 16:00:04 +02:00
174a1f1a45 Fix for broken tree offset after recent change for cyclic nodes support 2015-09-17 17:28:13 +05:00
3cee28ebf3 Fix T46143: Faces missing with GPU render
Epsilon was quite arbitrary for GPU, replaced with checking for zero-sized faces.

It should solve both original report and the new one. After the release we can check
why GPU doesn't produce accurate math here and go to the root of the issue.
2015-09-17 17:21:17 +05:00
c4bcb6a479 Fix T46134: units degrees increment are too small
The user interface was ignoring the precision step size for degrees,
making all rotation inputs drag by a 100th of a degree.

Now use a 10th of a degree instead.
2015-09-17 22:09:18 +10:00
209ca1e746 Fix T46139: Crash when inserting a node in a looped node structure 2015-09-17 16:17:04 +05:00
7fcaa7feac Fix for recent regression clamping materials
Mixup between gpu/derivedMesh total materials, fix and name more clearly to avoid confusion.
thanks to Sergey for finding root cause!
2015-09-17 20:46:38 +10:00
9744c8ca58 CMake: Another attempt to solve compilation error on Windows 2015-09-17 14:29:56 +05:00
a712459603 CMake: Attempt to fix compilation error on Windows after recent changes 2015-09-17 14:17:00 +05:00
eca704f579 Fix T46090: Blender game embedded player crash
SCons didn't pass `-DWITH_AUDASPACE` to the compiler, so it skipped the
instantiation of the "aud" Python module. This caused a crash of the BGE,
which did get the `-DWITH_AUDASPACE` directive, and expected that module
to exist.

Reviewed by: lukastoenne
2015-09-17 10:14:08 +02:00
1aeac7c0c4 Merge branch 'master' into openvdb 2015-09-17 00:04:48 +02:00
8d89417778 Remove 'OPENVDB_USE_BLOSC' from SConscripts as well 2015-09-16 23:31:06 +02:00
79c668dbec Correction to previous commit.
Mostly styling, but also str_exec would often remain undefined...
2015-09-16 22:23:05 +02:00
4fb9cc24a8 Fix (unreported): Filebrowser key navigation entry did not change caption correctly
As of this release we're able to navigate with the keyboard in the filebrowsing area. The button caption is changing to an appropriate string whenever a new entry is selected. In @Severins original code a different method was used to determine if a directory was choosen or not, but this got lost while merging the filebrowser rework.

Thanks to @mont29 for review!
2015-09-16 22:08:04 +02:00
9d087ad0b5 Fix T46130: Vertex/wire no visible with OpenSubdiv in edit mode
For now simply show warning in the interface and fallback to regular subsurf
code. Supporting OpenSubdiv in edit mode in possible but not high priority
currently.
2015-09-16 23:02:41 +05:00
1fa3bd6148 Fix T46128: High Quality DoF broken
The issue was caused by some special tricks needed to compile OpenSubdiv shader
which was using stupid check whether geometry shader is used or not.

Now made it more explicit call whether special OpenSubdiv trickery is needed or
not.

Its not ideal solution, but it's not really easy to do a proper solution for
this, because while we can do half of the work with if-defs in the shader code
but we'll still need to somewhat define layout of the input blocks which isn't
really doable with current shader version we're using.
2015-09-16 22:38:46 +05:00
89de6e9eac OpenSubdiv: Fix crash caused by accessing OpenGL vendor from non-main thread 2015-09-16 22:25:13 +05:00
f0023b0dbe Comment unused sequencer prefetch 2015-09-17 03:00:32 +10:00
5a13f8a750 UI: Curve clipping didn't enforce zoom. 2015-09-17 02:55:30 +10:00
cb4e358735 Fix T46126: Anchored sculpt fail when cursor leaves mesh 2015-09-17 02:14:56 +10:00
cf4711bdf9 OpenSubdiv: Attempt to solve crash in background mode 2015-09-16 20:33:16 +05:00
0f19e6d1a7 Code cleanup, whitespace 2015-09-16 20:26:58 +05:00
7b3491f2c6 OpenSubdiv: Fix for missing caching of vendor string parsing result 2015-09-16 20:23:32 +05:00
19d17c8d90 Fllowup to previous commit, remove unused code 2015-09-16 20:20:16 +05:00
3f05d72a98 Fix T45708: OpenSubdiv crashes on Windows with Intel cards
Disable Intel cards for until we'll go to the root of the issue of the crash.
This will take a bit, so being so close to the release we go safe and disable
unstable GPU, so blender at least doesn't crash.

This could be bypassed by setting OPENSUBDIV_ALLOW_INTEL environment variable.
2015-09-16 19:28:40 +05:00
182b5736fb Get rid of leftover from refactor of VBO code. Thanks to severin for
noticing
2015-09-16 17:23:27 +03:00
0b959458ff CMake: Don't modify global CFlags when enabling/disabling OpenJpeg 2015-09-16 19:10:41 +05:00
2d16622068 Fix T46105, disable viewport compositing when non power of two texture
support is missing.

Supporting those (really) old GPUs requires us to make shaders more
expensive by converting between real and scaled coordinates and be wary
of such conversion caveats when handling uv coordinates in shaders. Not
worth the cost for supporting hardware that old.
2015-09-16 17:04:12 +03:00
e3ff9b2044 Fix T46073: crash w/ out-of-bounds material 2015-09-16 07:49:59 +10:00
7f63eaafd6 Fix T45389 Windows thumbnails not working.
Also they did not work when using blender -R from
command line in 64-bit systems.
Issue was checking for wrong define which would
cause code to detect if the blender executable
functions under 32 bit emulation.
For 64bit executables this is false, leading
blender to believe we are operating under a 32bit
system, and registration would try to register
the 32bit thumbnailer.

This 32 bit dll is (correctly) missing for local
installs and from the new installer, thus no thumbnails.
2015-09-16 00:28:09 +03:00
b8a8059e21 Fix for text editor un-indent undo
Same issue as T44381, re-use logic for indent.
2015-09-16 03:35:25 +10:00
860e25fe29 Fix T46093: Thumbnails/previews of materials/textures not displaying in Blender filebrowser when only one thread is available.
Using the global scheduler here is not a really good idea - `filelist_cache_previewf()` is not a short task
that run once, but it's a loop that keeps cheking for work in a TODO queue. This means it won't quickly allow other tasks
to start, so it should not be in the global scheduler.

In fact, asynchronous tasks (that is, tasks that will live for quite a bit of time, and often sleep a lot) should never use
global scheduler, they would steal computing resources from heavy-duty, short-time living ones - and possibly even completely
stall threaded tasks (if all worker threads are executing long-life tasks...).

We could probably even completely bypass the scheduler/task thing here (and directly use threads), but it does not have
that much of an over-head, and still offers easy handling of threading stuff...
2015-09-15 13:57:47 +02:00
0c2be4d8e8 Fix T46113: Color picker erratic outside 0-1 range 2015-09-15 21:28:21 +10:00
745510844b Cleanup: hide clnors warning prints behind G.debug, those can get annoyingly verbose... 2015-09-15 12:03:58 +02:00
841202fd06 Fix wm leak loading factory-startup 2015-09-15 19:31:17 +10:00
Dalai Felinto
07a7d64c06 BGE: make error message more clear when trying to de/activate actuator from non-active controller 2015-09-15 00:01:32 -03:00
dbe1829183 Fix T46114: paint face-mask hide clears sharp flag 2015-09-15 05:55:42 +10:00
0271414aad Fix T46109: Bitmap font objects leads to unfreed memory. 2015-09-14 17:12:40 +02:00
3056add0e0 Fix T45699: BGE auto-run exits immediately 2015-09-14 23:39:58 +10:00
34843a855e Fix T46099: snapping failed on objects with some NULL-dimension in their bbox.
Added a helper that ensures a bbox has some non-NULL dimension along all its axes.

Also, fixed some (rather unlikely) NULL dereference cases (though it should not in this context,
`BKE_object_boundbox_get()` can return NULL).
2015-09-14 12:53:52 +02:00
2db71782e7 Fix T46106: Hidden socket w/ node link from Py API
Internally this was OK, but an invalid state from the users POV.
2015-09-14 20:39:20 +10:00
5611237391 Fix T45699: own regression w/ looptri update
Baking was still checking tessface in parts.
2015-09-14 15:55:43 +10:00
bfea087d96 Alternate fix for offscreen render w/o npot
Store the original texture size,
since its needed for reading pixels and passing to glViewport.
2015-09-14 13:18:43 +10:00
754fb6b907 Revert "Fix crash in opengl render caused..."
This reverts commit d64b1221c6.

While this prevents the crash, offscreen renders still aren't working right.
2015-09-14 13:13:48 +10:00
d64b1221c6 Fix crash in opengl render caused by gfx being blacklisted for
non-power-of-2 texture support.  Note that all I did was pass
the correct width/height into glReadPixels; the result may not
be the same as if non2 textures were enabled.
2015-09-13 14:52:31 -07:00
e443dd4d97 Fix T43033: VideoTexture module repeated loading of images causes memory leak
Fix proposal for memory leak caused by png decoding in videoFFmpeg.cpp

T43033

Author: Ulysse MARTIN (youle)

Reviewers: dfelinto, ben2610, moguri, lordloki, panzergame

Reviewed By: lordloki, panzergame

Subscribers: panzergame, lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1396
2015-09-13 20:59:24 +02:00
09e40a4956 Cleanup: spelling 2015-09-14 02:22:22 +10:00
7900d697f0 Fix T46089: Text from Effect Strip is invisible in VSE Preview.
Deviding two ints together never yields a float... Also, logic of various proxies size corrections was quite broken.
Now we should always get the same (relative) size of text whatever proxy setting/render scale is chosen.
2015-09-13 14:51:50 +02:00
45a875fec4 Fix T46091: Video Sequencer rewrite *.png to _.png
Own mistake when adding filename safety check...
2015-09-13 08:20:48 +02:00
c56deb132e Cleanup: Quiet some picky warning from Coverity. 2015-09-12 16:46:27 +02:00
26041f9357 File Bookmarks: use volume label on Windows, and set name of recent entries
from system/user bookmarks' name if possible.

Volume label on Windows was request from T46083, makes Blender more in line
with 'common' filebrowsing on this OS.

And now, we automatically set name of recent entries from the bookmarks, if path
can be found there, more consistent too from user PoV.
2015-09-11 22:33:13 +02:00
a79c519e5d Fix T45755: Bad NLA text alignment 2015-09-11 23:32:15 +10:00
6212eb2845 Fix T45579: Custom Hotkeys Dissapear.
Due to how we find kmi to remove and kmi to add when patching final keymap with user defines,
we could actually end up with same kmi for both, see comments in code for details.

Note that it may be a good idea to make user-defined customizations specific to a given base keymap,
instead of applying them blindly?
2015-09-11 15:01:37 +02:00
21826af5f7 Fix T45165, OSX quicktime fails with diacriticals in filename.
Since Blender internal strings are UTF8, changed the initialization
of the string to use initWithUTF8String from default encoding.
Fix worked on OSX 10.5.5.
2015-09-11 07:32:05 -04:00
f628b5f843 Merge branch 'master' into openvdb 2015-09-11 12:19:12 +02:00
bb20c96da5 Fix memory leaks in collada import 2015-09-11 19:12:54 +10:00
42825dc1fc Fix T46074: Collada crashes importing animation
double-frees and freeing memory already inserted into Blender.
2015-09-11 18:46:08 +10:00
2f1e51a1f3 Fix T46058: Modifiers on curve shows different results on OpenGL and cycles render
Not really ideal fix, but should make Cycles behave same as BI. For some details
please refer to inline comment.
2015-09-11 12:02:17 +05:00
9355446716 Fix T46070: Content of folders with a .blend extension aren't listed until filtering is disabled.
Own stupid mistake somewhere during filebrowser revamp...
2015-09-10 22:09:42 +02:00
d1dcf91955 UI: increase threshold for color-band select
Was quite small, especially with hi-dpi displays.
Increase to 50 since theres no benefit to not select when clicking.
2015-09-11 05:57:55 +10:00
0d568e4186 Fix T46048: Custom properties UI redraw issue
Adding/removing custom properties didn't refresh elsewhere in the UI.
2015-09-11 04:29:31 +10:00
54daeb185f PyAPI: add an update method for properties
This is called when modifying an RNA property,
however it can be useful to be able to make a properties
update callback run without having to change it.
2015-09-11 04:29:31 +10:00
477e81128d Show correct syntax for id-properties 2015-09-11 04:29:31 +10:00
Julian Eisel
d234bf21b9 Correction to last commit
Did a fullscreen check in a function that should only be called in fullscreen mode. Not a big deal, but bad API practice.
2015-09-10 20:23:17 +02:00
Julian Eisel
487705d60a Fix T46069: Crash when saving a render with non-fullscreen file editor
IMAGE_OT_save_as assumes that active area is an Image Editor and the logic that should return to image editor after saving didn't run after fullscreen was manually exited.
2015-09-10 19:54:20 +02:00
37f4660637 Fix T44344: paint bleed fails in perspective view 2015-09-11 02:33:51 +10:00
84c44e026e Fix leak in ContextGLX 2015-09-11 01:48:31 +10:00
1d1b8bb196 Fix T46067: ShrinkWrap + Threaded depsgraph crash
Note that allocating DM arrays from an editmesh is currently not threadsafe,
however even if were resolved, its more efficient to avoid having to do it in the first place.
2015-09-10 18:33:24 +10:00
ac0e511619 Fix T46064: Sequencer view-selected does nothing 2015-09-10 15:31:37 +10:00
3225261f13 Fix incorrect textbox use w/ scaled fonts 2015-09-10 14:13:14 +10:00
e4baa9fb86 Fix broken logic in new FileBrowser caching of entries.
We were still using main borwser's FileDirEntryArr to own memory of entries currently in cache.

That was OK for common caching operation, but if was not released when clearing cache!
Nothing dramatic, since that was cleared too, but less often, so e.g. by changing sorting
options you could pile up more and more no-more-used entries there...

Anyway, there is no reason to do that, much more sound and clean to keep everything
cache-related in dedicated FileDirEntryCache struct.

This means main borwser's FileDirEntryArr is now always expected to not store any actual entry!

Note: this can probably be cleaned up a bit more, but would wait after 2.76 for this!
2015-09-09 21:36:10 +02:00
02b9921b75 bgl: fix implicit overflow 2015-09-10 03:59:18 +10:00
d4ca74c227 bgl: disable some defines not found in mesa 7 2015-09-10 03:54:40 +10:00
a9b0390bff Fix T45880: Texture Paint mask random angle fails
Random mask failed when the paint brush didn't have random angle enabled too.
2015-09-10 03:34:57 +10:00
4e759d6735 Fixes T46060 Regenerated the full list of constants we should expose 2015-09-09 18:35:05 +02:00
a2a0e7aed9 Add button for H.264 lossless output 2015-09-10 01:06:24 +10:00
8ff0d35744 Fix crash viewing passes w/ scopes
Scopes assumed all passes were RGBA, but some passes have 1-3 channels.
2015-09-10 00:41:10 +10:00
Dalai Felinto
5317dc716e Fix T45839 : Regression - Multi-layer image issues when using non-standard names
This was introduced in the fix for T44336 .
The code is now what it should have been in the first place at the time
of multiview commit.

ImageUser->passtype is being removed in favour of bringing
ImageUser->pass back.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1504
2015-09-09 19:42:35 +05:00
c028b5980b Fix (unreported) crash with undo/outliner and drivers.
To reproduce the crash:
* Add some shapekeys to default cube.
* Add at least on driver (can be default empty one) to a shapekey value.
* **Make this driver visible in Outliner**.
* Delete all shapekeys.
* Undo.
* Crash.

Root of the issue is outliner reading code in `blo_lib_link_screen_restore()`,
which would try to `restore_pointer_by_name()` for all `TreeStoreElement->id` pointers.
Thing is, those id pointers are not always IDs, they can be animdata, sequence, RNA struct/property...

That's really not so great design, but also has reasons like size of the struct, we have to live with it.

So now:
* TreeStoreElement->type defines are braught back into DNA.
* There we also define a `TSE_IS_REAL_ID` macro to check whether a given TreeStoreElement actually stores an ID pointer or not.
* And in Outliner read code we only try to retore pointers by name for actual ID ones, and set the others to default NULL value.

Also, added clear comment to TSE types that do not store a real ID pointer!
2015-09-09 16:36:23 +02:00
12e4103bdd Cycles: Attempt to fix 32bit CUDA kernels 2015-09-09 18:23:49 +05:00
0899f47d78 Formatting fix.
Reviewed by: Severin
2015-09-09 14:39:21 +02:00
a9b9478247 Fix: VSE text strip size was wrong when preview render size != 100%
Reviewed by: sergei
2015-09-09 14:36:12 +02:00
145617c5eb OpenSubdiv: More graceful handling of shader compile/linking errors 2015-09-09 17:27:08 +05:00
4f29613894 Buildbot: Test enable CUDA binaries for Win32
Linux 32bit seems to work fine now, let's see if Win32 also works.
2015-09-09 16:38:44 +05:00
42e15b9dd3 Fix T46051: Loading certain Jpeg causes system alert sound (Win32)
The issue was caused by RedCode library printing binary string to the terminal.
2015-09-09 16:18:37 +05:00
9307f08986 Fix (unreported) Outliner letting you edit path of indirect linked lib shown at 'first level'.
From Gooseberry team request indirect libs were also added at root of 'BlendFile' Outliner view,
but that allowed edition of their path, which is useless...
2015-09-09 12:26:58 +02:00
6ddf77f1c0 Fix crash in preview render w/ too small border 2015-09-09 19:43:39 +10:00
1a04179802 Cycles: Cleanup, typo
Spotted by Campbell, thanks!
2015-09-09 14:25:43 +05:00
ad86d6ebdc Fix T46056: User Preferences-> install from File freezes Blender.
Own stupid error in recent fix for buffer overflow in `BLI_testextensie_glob()`...
Also found & fixed another potential buffer overflow in this func.
2015-09-09 11:02:32 +02:00
c87ee8da2c Fix T46055: Volume doesn't render when PANORAMIC Camera is inside volume mesh 2015-09-09 13:57:54 +05:00
d13a0e8f4a Cycles: Limit triangle magnitude check for only GPU
Found a way to make AVX2 CPUs happy by reshuffling instructions a bit,
so now there's no weird precision errors happening in there.

This solves some render speed regressions on CPU, but unfortunately
this doesn't help for GPU rendering.
2015-09-09 13:39:36 +05:00
46d2abf78f Cycles: Only use ascii in comments 2015-09-09 13:39:36 +05:00
7fab7b63f9 Assert CustomData_from_bmeshpoly is used correctly
Follow up to last commit, since bugs here aren't so obvious.
2015-09-09 16:48:56 +10:00
1e7a8ab5e8 Fix T45733: Crash w/ VColor + BlenderInternal
Tessface CustomData layers were added multiple times when tangents were used.
This made BI crash accessing layers missing elsewhere.
2015-09-09 16:48:21 +10:00
1b98ece49d Buildbot: Enable 32bit kernels for linux builders
This is more an experiment, not guaranteed to work but at the same time
building of kernels seems to work manually in the same chroot. Perhaps
latest changes helped compiler to optimize registers usage.
2015-09-09 11:05:17 +05:00
c26a9eed92 Error in last commit
Had warnings disabled.
2015-09-09 02:39:40 +10:00
a2b80d4c48 Fix T46003: Scale w/ script ignores axis-align 2015-09-09 02:05:10 +10:00
91264cfdd0 Revert "Fix T45191 Speed strip behaviour not easy to predict."
This reverts commit 0e83b0854f.

Fixes T46038
2015-09-09 00:36:15 +10:00
d5f1f66f06 typo in last commit 2015-09-08 23:46:56 +10:00
a93e15aee3 Fix T45771: Walk mode fails on OSX 2015-09-08 23:39:37 +10:00
9d8aaf77ac Fix T45981: BGE, 2D filters leak memory 2015-09-08 19:42:59 +10:00
d1d0f8eb1a Cleanup: quiet warnings 2015-09-08 19:42:58 +10:00
abb63be099 Use C++ guarded alloc for FilterBase 2015-09-08 19:42:58 +10:00
5f120f7723 Fix for building with C++ guarded alloc
KX_WorldInfo is already inherits the overrides
2015-09-08 19:42:58 +10:00
f184202a9a Cleanup: API docs 2015-09-08 19:42:58 +10:00
2cdfa3ea5b Cycles: Support building with latest upstream OSL
Only affects standalone part.
2015-09-08 13:10:00 +05:00
cb7c61ad54 Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles
Issue was caused by wrong viewplane used for standalone camera.
2015-09-08 13:07:08 +05:00
310764603a Cycles: Add missing initialization of fov for prev/next frames 2015-09-08 13:06:17 +05:00
92d12ab38b Cycles: Correction to integrator's transparent shadows
It was possible that deleting transparent BSDF from shader wouldn't
disable transparent shadows in integrator when doing viewport render.
2015-09-08 11:47:39 +05:00
6b0544eaaf Cycles: Update TODO, camera in volume is supported already 2015-09-08 11:29:14 +05:00
0e12228bd9 Fix T46045: Missing viewport update when adding transparent shader to material 2015-09-08 11:28:02 +05:00
946b850b3e Fix T46040: Bake action cleans existing keyframes 2015-09-08 04:01:03 +10:00
9de20963cd Fix beautiful textbook case of string overflow in BLI_testextensie_glob... 2015-09-07 19:23:11 +02:00
04e12c617d Fix T46029. Center ngon in bevel got no attributes or interpolation data. 2015-09-07 09:33:42 -03:00
1a7eca3c54 Fix T46034: OpenCL kernel compilation error in latest buildbot
Simply expanded expression, so no float4->float3 conversion happens.
2015-09-07 15:02:44 +05:00
77b0b661dd Doc: PyAPI docs, quiet warnings, fix URL's 2015-09-07 18:23:16 +10:00
e106a212e8 Fix T46032: Crash w/ file-browser preview 2015-09-07 17:20:09 +10:00
1c5b15eab3 Doc: update Python 'gpu' module reference
- add missing uniforms.
- add uniform types.
- link to RNA equivalent.
- remove 'value' from uniforms (they were wrong, better use module members anyway).
- various corrections & edits.

Fixes T45505
2015-09-07 16:11:05 +10:00
7038c2c489 Cleanup: gpu constants weren't so clearly arranged
Also reminder to update docs w/ the API.
2015-09-07 16:11:05 +10:00
4ae181543f Fix viewport camera dof object distance
Also use simpler method to calculate the depth.
2015-09-07 02:32:34 +10:00
Julian Eisel
14dd88e817 Add icon for incremental grid snapping
As decided in D910, we use a new icon for incremental grid snapping and use its old one for absolute grid snapping.

This also touches the library_data_broken icon .dat files, seems some changes on its .svg entry landed in upstream without updating the other icon files (already noticed this when committing icon for auto-offset, but removed it from commit - leaving it in now to avoid further confusion)

Icon by @plyczkowski (made a tiny edit as it looked a bit blurry in 16x16). Thx!
2015-09-05 23:36:52 +02:00
Julian Eisel
b529b82830 Fix T45944: Ctrl+Wheel to cycle values failes in toolshelf
Now, ctrl+wheel for cycling tabs is passed to hovered button if it supports cycling values (RNA menus, color/row/number/slider buttons, list boxes)

This might feel a bit glitchy if ctrl+wheel is used to cycle tabs and in newly opened tab, a button with cycling support is under the mouse, which will get mouse input from this point on instead of region. Think this is still better than old behavior.
2015-09-05 19:42:05 +02:00
1478ac35c7 Depsgraph: Don't use legacy function when building without legacy depsgraph 2015-09-05 17:52:29 +05:00
9683807459 Fix T45938: Ocean modifier animation not working with NLA action-strip (old depsgraph only)
When a modifier was animated by a NLA strip, this animation was not working when using
the old depsgraph. This was because the code which checks if a NLA strip affects any
modifiers was missing - specifically, it was originally left out as it was thought
that it was unlikely that many users would need this, but adding in those checks
would have a (slight) negative effect files where there are heaps of NLA strips
but modifiers animated this way were absent.

The new depsgraph however doesn't suffer from this problem, as these sorts of checks
need ot be built into the graph-building stage for everything to work, so these links
had already been added.
2015-09-06 00:07:06 +12:00
b8e0b2db56 Math Lib: isect_plane_*_v3 avoid negation
Unmeasurable speedup for plane intersection.
2015-09-05 17:44:02 +10:00
ba188cf98d Math Lib: simplify isect_plane_plane_v3
Unlike the 3 plane method, the 2 planes squared cross-product _is_ the determinant.
2015-09-05 17:10:07 +10:00
ac51e2f326 Fix T46015: normals_split_custom_set_from_vertices doesn't work with zero vectors
This was simply broken for vertex case (indexing loop normals with vert indices...).

Turns out to be rather verbose to replace on-the-fly zero normals by default ones correctly,
and do not want to make a full copy of the given custom normals array, so now this one is
editied in place (replacing zero vectors by correct default normals). Don't think this
could be a serious issue anyway.
2015-09-04 22:41:10 +02:00
83a36b2829 Cycles: Fix for wrong optimization of bump node
It can't be simply removed in cases when it's connected to input which is
different from Normal. This is because the input wouldn't be connected to
default Normal geometry input, possibly breaking shading setup.

The fix is not really ideal, but should work at least.

This fixes skin having too much glossy reflection in the file from T46013.
2015-09-04 20:06:31 +05:00
713ce037ab Cycles: Fix wrong check for zero-sized triangles
Initial idea was to optimize calculation a bit by skipping calculation of actual
triangle edges and use vector from ray origin to triangles. In practice this
optimization didn't quite work in cases when origin point is too close to the
triangle.

Let's do 2.76 with a bit more complicated calculation, still looking into exact
reasons why watertight intersections fails in certain cases, but actual fix might
bit be ready so soon.

This fixes wrong eyes on the lady from T46013.
2015-09-04 20:06:31 +05:00
65a80708d4 Fix T46010: Bone offset between Rest Pose and Edit mode.
That one was hairy... To summarize:
* We were setting Bone.head/tail (aka **local** rest location of bone) from EditBone data, using **EditBone's parent computed armature space**.
* We use those local head/tail to define Bone's restpose (in `BKE_armature_where_is_bone()`), using **Bone's parent armature space** (aka parent's arm_mat).
* Because of bone's roll nightmare, the two above parent's matrices will often not be the same.
  In an ideal world, this should not affect locations (head/tail), but in real world of float it does - noticeably, in some extreme cases.

So! This commit cleans up things a bit (`fix_bonelist_roll()` was already doing much more than just fixing roll mess, has been renamed
to `armature_finalize_restpose()`), and ensures we do use (final!) parent's arm_mat local space to compute children's local head/tail as well.
This allows us to avoid too much imprecision here.

Checked the patch also with a complete Victor's rig from Gooseberry, seems to have no nasty side effects - fingers crossed!
2015-09-04 16:50:29 +02:00
c882cbd37c Cleanup: Better to assert over bad condition (which shall never happen anyway), than just return with un-initialized mat... 2015-09-04 16:50:29 +02:00
39752eb912 Fix for isect_tri_tri_epsilon_v3 w/ small faces
tris with ~1e-05 edge lengths would fail
2015-09-04 22:29:12 +10:00
1d71ad2eaa Math Lib: Use plane intersect from graphics-gems 2015-09-04 22:13:20 +10:00
d0e7ba3fd1 Math Lib: avoid sqrt w/ triangle intersection 2015-09-04 22:06:36 +10:00
2ea96df159 Correct own error in line_point_factor
Passing zero epsilon allowed divide by zero.
2015-09-04 22:06:36 +10:00
f79c748246 Armature: Cheap edit-to-object mode speedup.
`fix_bonelist_roll()` is already recursive, and was calling recursive `BKE_armature_where_is_bone()` twice!

Changed `BKE_armature_where_is_bone()` to controll whether we recurse over children or not.

With full Victor's rig, we gain 16% in `ED_armature_from_edit()` (from 31ms to 26ms).
With a dummy test-case 100 bones chain, we gain 80% in `ED_armature_from_edit()` (from 1.25ms to 0.25ms).

Not crucial, but still worth it. ;)
2015-09-04 12:26:52 +02:00
52fda9b0db Fix T45019: Cycles wrong render of motion blur mesh
The issue was caused by wrong detection whether number of verticies
changed or not. Basically, it wasn't working correct in cases when
number of verticies is increasing compared to the current frame.
2015-09-04 15:19:22 +05:00
3e63c604e3 Partial revert of warning cleanup
These warnings are false-positives
2015-09-04 14:40:03 +10:00
Julian Eisel
ef629e0d50 Quiet warnings
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-09-04 01:04:37 +02:00
c3fef001ee View-Selected: use custom bones boundbox
Support using custom pose-bone transform and object when calculating view bounds.
2015-09-04 04:23:18 +10:00
54ad576666 Small tri intersect fails when not normalized
Logic was ok, but would run into precision issues.
2015-09-04 01:59:44 +10:00
e709da3def Cleanup: minor RST edits 2015-09-04 01:11:26 +10:00
10c93a582b Check for no-op edge separates to quiet asserts when inset individual.
This causes no change in behavior, since code was alreadying doing
a no-op in bmesh_edge_separate if the edge is a boundary.
But it tripped an assert, annoying in debug builds.
We want to leave assert in bmesh_edge_separate in case callers
expect there to be separate loops after this always.
So putting test in caller.
(Same worry about bmesh_urmv_loop? I checked callers and they
appear OK to me - they deal with the no-op return.)
2015-09-03 10:42:16 -04:00
b899114a7e Fix T45937: Cycles hair not rendered if children count set to zero 2015-09-03 18:54:50 +05:00
a4bcd9bc96 Cycles: Fix missing packed images with newer versions of OSL
This isn't really complete fix, complete fix would require calculating
derivatives via OIIO API, but supporting this will either end up with
some code duplication or will require some non really safe changes at
this release cycle.
2015-09-03 18:16:30 +05:00
0bc4bc2e61 Fix T45946: Cycles texture interpolation bug
Coordinate clamping was done in the wrong order.
2015-09-03 18:16:30 +05:00
2c2f075929 BGE docs: resolution & fullscreen changes don't work in the embedded player
The documentation for bge.render.{setWindowSize,setFullScreen,getFullScreen}
did not mention that those functions are no-ops when using the Blender-
embedded player.
2015-09-03 15:05:36 +02:00
73b34ad06b PyAPI: tweak to ensure_ext don't lower entire path 2015-09-03 21:58:11 +10:00
8383a2d4cc Fix: Made bpy.path.ensure_ext compatible with compound extensions.
Extensions such as ".tar.gz" are now also supported. Before this patch,
ensure_ext('demo.tar.gz', '.tar.gz') would return 'demo.tar.tar.gz'.

This results in issues with the `ExportHelper` mix-in class; clicking
an existing file in the file dialogue warns about overwriting it
(highlighting the input box in red), but then saves to a different
file.

Also added a unit test for the new behaviour.

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1498
2015-09-03 13:09:16 +02:00
e5e65b1099 Fix T45984: Setting custom normals properly requires multiple calls to normals_split_custom_set()
The detection of needed sharp edges (based on given loop normals) would not fully work
on first run in case we started with a complete smooth cyclic loop fan (edge between
first and last loop of the fan would not get checked).
2015-09-03 12:20:50 +02:00
357e749957 Cycles: Fix nondeterministic pass ordering when using baker 2015-09-03 13:52:56 +05:00
f387fe2b65 Cycles: Fix for uninitialized closure data
This might confuse closure merger.

Spotted by Campbell Barton, thanks!
2015-09-03 13:48:43 +05:00
8e75abd29a ImBuf: Fix crash generating preview for really huge image
In fact, any user of IMB_scalefastImBuf() is now robust against working
with really hires images.
2015-09-03 12:49:04 +05:00
2ed4f98548 Compositor: Support changing distortion models in movie distortion node
Previously only polynomial model worked correct. now changing it to divisions
will work nicely as well.
2015-09-03 12:19:47 +05:00
6789d02112 Fix T45959: DistanceKey preview used wrong colors
Same issue as recent fix in ChannelMatte
2015-09-03 12:28:27 +10:00
46d731612d Animplayer passed -a, then warned its unknown
Also modify a copy of argv
2015-09-03 04:27:44 +10:00
1f16b3280f Fix T45979: animplayer crashes w/ DND and audio
Issues re-initializing audaspace
2015-09-03 04:15:08 +10:00
390bc05b32 Fix second part of T45987: Node preview was still using wrong color space 2015-09-02 22:46:06 +05:00
c8cc664ce3 Fix T45995: Auto-set preview range sets superfluous end key.
get_keyframe_extents() would add an extra frame in case of mono-key fcurves in selected set...

Now do the 'not same start/end frames' check later, and also use floor/ceil instead of round
(we want to start at frame 3 if first key is at frame 3.8, reversed-same goes for end frame).
2015-09-02 17:50:55 +02:00
5671611c40 CMake: use generator expressions 2015-09-03 01:26:28 +10:00
c8ebc8736e CMake: Fix building w/o FindGit 2015-09-03 01:24:25 +10:00
6f5d1e257e Add missing spin-lock to IMB_makeSingleUser 2015-09-02 23:23:44 +10:00
525d7e02d4 Fix T45991: Transfer Weight tool UI is inconsistent and crashes blender.
Since data transfer when called from this tool has reversed behavior (it transfers **towards**
active object, as previous tool), we have to also reverse source/destination layers selection options.

Also fix 'reverse' option being saved, otherwise calling regular operator after 'transfer weights'
would stay in reverse mode, ugly!
2015-09-02 13:10:29 +02:00
5fe9b36aa6 Cleanup: style 2015-09-02 18:39:19 +10:00
41b99e40c0 b5287b1 removed important CCG_key_top_level call
Caused subsurf to crash w/o OSD
2015-09-02 15:39:17 +10:00
f6e0262a83 Enable guarded-alloc when --debug-all is passed 2015-09-02 13:41:12 +10:00
b3e1edf7f8 Correct help message for debug options 2015-09-02 13:38:55 +10:00
881047de88 Fix snapping edit-gpencil to edit-mesh
Reported in T45978

Was checking mesh selection state.
2015-09-02 11:29:04 +10:00
4b1f3a7819 Fix T45931: Blender Fails to generate previews.
Root of the issue was, preview generator was filling ID preview with unsigned int,
when RNA only knows of signed integers (and thus generates a python exception
when converting uint outside of int range)...

Using the brand new and much simple float pixels accessor to PreviewImage now.

Why this was working perfectly OK (it seems...) under Linux, and why error (py exception)
was so badly and misleadingly reported on Windows, remains pitch black mystery to me.
2015-09-01 19:15:06 +02:00
a2714c9e4f RNA PreviewImage: add float pixels accessors.
Raw int pixels can be nice in some cases (much less memory used), but converting to/from float values
(as e.g. expected by/from Image) is not simple in py, error prone and rather slow.
2015-09-01 19:15:06 +02:00
b5287b1b81 Avoid reupdating pbvh data in upload functions, these should have been
taken care of in draw functions.

Those iterate the whole PBVH tree so better avoid doing them, twice or
thrice.
2015-09-01 19:56:32 +03:00
45eb406748 Fix T45978: Ruler ignores new edit-mesh data 2015-09-02 02:28:16 +10:00
312cb0a957 Fix T45974: Bones fail to snap to verts
Was an issue with individual-origins + snap
2015-09-02 01:34:03 +10:00
ef931fecc3 Fix uninitialized normal var w/ objects snapping 2015-09-02 01:25:13 +10:00
2fcc38ad54 Assert vec_roll_to_mat3_normalized's gets a normalized vector 2015-09-02 00:43:53 +10:00
282811f8b8 Fix projection painting normal culling operating on individual
triangles.

This made the normal-related artifacts of projection painting much more
apparent. Now we do culling based on
whole polygons. Pure backface culling still uses individual
triangles.
2015-09-01 16:00:07 +03:00
a660f27527 Don't use GCC-only pragma for all compilers 2015-09-01 17:40:10 +05:00
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
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
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
9304df5182 Fix T45939: Crash w/ BMesh.*.sort() 2015-09-01 16:07:34 +10:00
6db978f6d1 BMesh: add asserts for BMesh sort ghash lookups 2015-09-01 15:43:49 +10:00
a7b349d03c Cleanup: redundant cast 2015-09-01 15:01:13 +10:00
c86a519898 Use qsort_r for BMesh Py API 2015-09-01 13:56:08 +10:00
922d72355d Cleanup: pep8 2015-09-01 13:03:38 +10:00
b3f4bf87b4 Trade-marked BPlayer Fix (c) 2015-08-31 22:03:51 +02:00
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
0018483dfa error in last commit 2015-09-01 03:02:14 +10:00
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
879c5d4568 Cycles: Make the max value for World MIS Map Resolution a power of two.
Old value likely was a copy / paste error.
2015-08-31 18:17:16 +02:00
26bad9e8f0 Cleanup: Fix some typos in volume code comments. 2015-08-31 18:14:51 +02:00
929db33828 Write thumbnail directly
BlendThumbnail matches the on-disk format, so just write directly.
2015-09-01 01:52:27 +10:00
5f64b77ca5 Fix T45955: Python's pdb can't show script source 2015-08-31 23:41:13 +10:00
a603a3470c Revert fix for T45849 (part 2, tsk!) 2015-08-31 22:47:14 +10:00
06b14aa5f9 error in comments 2015-08-31 22:26:05 +10:00
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
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
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
489a5d34b7 Fix T45959: DistanceKey output incorrect 2015-08-31 16:22:16 +10:00
d9e71d5e16 Fix uninitialized vars in DistanceKey node 2015-08-31 16:22:06 +10:00
d267739be7 Fix incorrect cast 2015-08-31 13:47:32 +10:00
4ac5859f05 Cycles: Avoid copying objects in some places of BVH build
Gives barely measurable speedup of Spatial Split BVH build.
2015-08-30 16:48:16 +02:00
00d12ec04f Preview generation module: explicitly exclude any lib item.
Thanks to campbell for raising that point!
2015-08-30 15:49:26 +02:00
d8291ed88a missing NULL pointer check 2015-08-30 20:20:26 +10:00
6a80c2c48b Audaspace: fix for building with scons.
Removed duplicated code.
CMake so far built only the now removed version and scons tried to build both.
2015-08-29 22:42:20 +02:00
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
95ed5d4437 Add some more missing ID types to TREESTORE_ID_TYPE... 2015-08-29 15:51:11 +02:00
db25b33973 Fix missing 'case idx' line in (debug-only & disabled) valgrind-friendly BKE_main_free() code. 2015-08-29 15:07:09 +02:00
6d13143b89 OpenVDB 3.1 update.
This commit makes it so OpenVDB 3.1 is to used for compilation (the
current dev version at the time of the commit).

Changes are as follows:

- remove OPENVDB_USE_BLOSC, as this was due to a bug which "required"
client code to define this when it was also defined on OpenVDB's side.
- Cycles: make use of floating-point precision rays and volume
intersectors.
2015-08-29 03:11:23 +02:00
4ed92d8b31 Merge branch 'master' into openvdb 2015-08-29 02:17:56 +02:00
c749fe4031 Fix T45736: Channel key error: color spaces modes
Was missing conversion back to RGB space.
2015-08-28 18:44:27 +02:00
36c408d861 Fix remaining parts of T44881, missing update on loading file 2015-08-28 18:29:27 +02:00
a068629abe Fix UI font drawing getting width w/o kerning 2015-08-29 02:10:11 +10:00
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
a08d039e59 Fix assigning flag to bool 2015-08-29 01:05:43 +10:00
982533eb39 Revert "Blind attempt to fix T45931: Blender Fails to generate previews."
This reverts commit c4ab521e26, since it does not actually fix the issue...
2015-08-28 17:01:37 +02:00
b024ccd619 Fix T45929: OpenSubdiv was doing extra object recalc tags 2015-08-28 14:55:21 +02:00
c53b1e2a93 Readfile: Minor optimization in undo/redo case: do not call do_versions_userdef either. 2015-08-28 14:06:01 +02:00
c4ab521e26 Blind attempt to fix T45931: Blender Fails to generate previews.
Cannot reproduce the issue here on linux, but have the feeling windows builds are much
more easily broken with referencing bad data from bpy. So here guessing direct loop
over bpy.data.xxx when you do add and remove stuff from said xxx inside the loop
is not a good idea - which seems logical in the end. :P
2015-08-28 13:24:30 +02:00
a560122c4b OpenSubdiv: Remove some dead code 2015-08-28 12:46:52 +02:00
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
e515d64c3e UI: Panels shared same class-name 2015-08-28 15:33:01 +10:00
85edd8fc82 Fix T45933: Can't select scaled camera in camera view 2015-08-28 12:10:21 +10:00
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
43a4aaf8e6 Compositor: Reduce number of divisions in EWA filtering 2015-08-27 19:43:33 +02:00
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
9b3fa880a5 Support subframe evaluation for scene strips
Useful when used with the speed effect.
2015-08-28 01:25:23 +10:00
8d1f9b9f51 Update of our *nix .desktop file.
Based on patch by Alex (AlexL) (T45927), thanks.
2015-08-27 16:31:13 +02:00
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
987b3df9c0 Missed version update loading in background mode 2015-08-27 23:12:40 +10:00
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
90f667576f Buildbot: Correction to previous commit
Previous commit didn't really disable cuda binaries for some reason.
2015-08-27 12:22:44 +02:00
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
43dab7833a OpenSubdiv: Fix crash toggling edit mode with new depsgraph 2015-08-27 12:01:20 +02:00
efc6f9438f OpenSubdiv: Tweaks to detecting whether geometry data is needed on GPU with new DEG 2015-08-27 11:47:56 +02:00
8cd4966722 Buildbot: Disable CUDA binaries on win32
They started to give issues as well, need some dedicated time to look
into the issues.
2015-08-27 11:43:29 +02:00
c5f9255eed Fix T45921: Screw modifier flips vertex normals 2015-08-27 19:29:42 +10:00
5908340f79 OpenSubdiv: Attempt to solve crash on certain GPUs/drivers 2015-08-27 11:05:23 +02:00
74c3ebad12 Fix T45920: Loopcut w/ shrinkwrap crash 2015-08-27 17:45:56 +10:00
72aadc3597 Use correct size for BVH insertion 2015-08-27 17:45:56 +10:00
a8be746609 OpenSubdiv: Fix error found by PerfectionCat,
Use glew, not gl constants to detect presence of extensions.
glProgramParameterEXTi is part of GLEW_EXT_geometry_shader4
2015-08-27 10:05:58 +03:00
512f631af6 Fix T43826: Sculpt grab anchored fails
Regression caused by GSOC2013 merge f745564
2015-08-27 15:22:08 +10:00
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
a32a4059da Fix crash switching to rotate from edge-slide
Caused by own fix for T45458
2015-08-27 11:11:09 +10:00
2633928e1d Fix T45232: Cycles bake artifacts with transparent textures
The issue was caused by uninitialized ray used for composite and AO evaluation.

Can;t really think of "proper" ray configuration here, it's all a bit arbitrary
but think initializing the ray in a way so we look at the surface in a negative
normal direction is much better alternative to uninitialized ray.

Open for alternative suggestions tho.
2015-08-26 17:51:54 +02:00
f62748f10a Fix T45912: Opensubdiv meshes don't properly center when using <numpad .> 2015-08-26 17:12:08 +02:00
9cc75bc524 Fix T44945: Blender crashes when using multiple domains and multiple flow objects with subframes
This is more like a workaround to prevent obvious cases fail, but in theory
if some other area will start updating object for subframes blender will
crash again.

Perhaps proper way to solve this will be to copy objects for subframe updates.
2015-08-26 15:27:22 +02:00
3e4a7f4366 Fix T45275: F-Curve normalization might corrupt animation 2015-08-26 15:06:45 +02:00
76df0ec93a Fix T45631: Ambient update rendered bug
The issue was in fact caused by both preview and viewport renderers affecting
on the default material, conflicting with each other.

Preview render doesn't really need default material, so we can safely skip it's
initialization in the render pipeline for preview rendering.
2015-08-26 14:52:28 +02:00
d33557c52e Correct fix for T39161: Scaling & snap 2015-08-26 22:26:28 +10:00
2f766f8ad2 Fix T45709: Cached Hair system is not seen in 2.75
Don't force re-distribution of cached particle systems, this doesn't
cause actual evaluation of particles and there was a reason why particles
are baked actually..
2015-08-26 14:28:41 +02:00
3dd16946aa Fix T39161: Scaling fails w/ snap-to-point 2015-08-26 20:42:27 +10:00
fed0448f92 Fix for error in recent smooth-view commit
Was assuming there was a camera
2015-08-26 20:42:26 +10:00
6ca12d157f Fix T45909: Garbage output in Viewport with OpenSubdiv device set to GLSL Compute
This isn't a Blender issue and the same bug happens with official OpenSubdiv
examples. For until it's either worked around from OpenSubdiv side or fixed
in the driver we'll force disable GLSL Compute for AMD hardware.
2015-08-26 12:10:24 +02:00
bcc0d2fb1d OpenSubdiv: Fix/workaround bad shading on AMD devices
Uniform block data layout was different on CPU and GPU which caused wrong
data being used from shader.

In theory using layout(std140) is what we need to do, but for some reason
such layout specifier is being ignored. This is probably caused by the way
how we exploit extensions from older version of glsl.

For until we've upgraded our glsl pipeline used different approach which
is basically about removing unused fields form the struct manual in hope
that it'll keep memory layout consistent for both CPU and GPU.

This seems to work so far for both NVidia GTX580 and AMD FirePro W8000
here in the studio.
2015-08-26 12:07:38 +02:00
77ce7eb541 Revert "BGE: Fix T44557 GameLogic module memory leak."
This reverts commit cd24871706.
The commit re-introduced problems with starting the game engine
multiple times in the same run of Blender.
2015-08-26 11:13:50 +02:00
3699ab1843 Fix T45711: Color spill average algorithm broken
Thanks to @kevindietrich for finding the cause!
2015-08-26 18:38:55 +10:00
df9f4c2e4f OpenSubdiv: Add extra checks whether GPU compute available or not 2015-08-26 09:16:35 +02:00
207c360900 Fix T45793: ChromaMatte incorrect output
Port to new node system missed important step.
2015-08-26 16:49:34 +10:00
1d34f0feed Smooth-view: Ignored camera-viewpoint on exit to user-view 2015-08-26 15:13:19 +10:00
cc60f35a18 Delete could assign a temp screen 2015-08-26 14:14:50 +10:00
0b21657897 Fix T45369: Temp screen locks UI
It was possible to navigate into an unused temp screen
(using Ctrl+Arrow keys), but there was no way to navigate back out.

Now Ctrl+Arrows skips temp screens, and remove the ability to navigate away from a temp screen from RNA.
2015-08-26 14:04:03 +10:00
67970da107 Disallow navigating away from a full-temp screen 2015-08-26 13:51:41 +10:00
acb99cfd7b Return success when a screen was added/removed
Currently unused, but useful for screen-operators.
2015-08-26 13:49:58 +10:00
3ee74feb2b Fix for deleting screen w/ temp screens in list
If the next screen to use was temporary, deleting the screen would fail.
2015-08-26 12:41:23 +10:00
e066a33314 Fix crash setting the screen when one is maximized 2015-08-26 11:27:13 +10:00
2e6cbd9bda Fix T45901: Smooth-view w/ bg-image glitch
It was possible to rotate the view while the view was already moving
causing background images to show when they shouldn't.
2015-08-26 10:15:20 +10:00
2f0eb2bfc6 Revert "Increase Smooth_View limit to 10.000"
This reverts commit 1ed1f2f3ab.

Waiting 10 seconds to change view isn't practical.
Further it expose issues where users can attempt to activate tools during view motion,
Some work, others give issues, this just isn't going to be properly supported.

View animation features are fine, but this isn't the purpose of the smooth-view option.
2015-08-26 09:53:58 +10:00
c62ebefcfc Usual i18n messages fixes. Also had to update i18n scripts to new BLT module... 2015-08-25 21:12:36 +02:00
a879dd368c FileBrowser: Fix broken 'extend' behavior of walk select mode.
Glitch when I merged new walk code in asset-experiments most likely...
Thanks to Dalai (dfelinto) who notified that on IRC.
2015-08-25 19:36:51 +02:00
7dc75ea8f4 Fix T45904: Cycles bug after recent triangle intersect changes
Calculated cross product from wrong vectors by accident.
2015-08-25 18:32:11 +02:00
Dalai Felinto
9e188fdd53 Fix walk navigation: scene unit used even when unit not set 2015-08-25 13:31:04 -03:00
ad0c2d6cbb Fix T45789: Materials with transparency not properly rendered in viewport in Material Render mode
This is a bit tricky one -- ideally viewport should detect whether alpha is used
in the shader tree and if so do separate viewport pass for that objects. But in
practice it's really tricky to detect whether alpha is affected by shader or not
without evaluating the tree for all possible input values. We also can't assume
that alpha might always be affected because it'll slow viewport drawing down.

For until some smart solution is found simply expose alpha blending mode used
by the viewport. It could be found below the Viewport Color settings.
2015-08-25 18:12:35 +02:00
79af9b1260 Action Management Feature Request/Regression T45535
By popular request, restored the ability to shift-click on the X (unlink) button
to unlink the action (from the active action slot), clear the Fake User, and
also remove the NLA-stashed copy (only works for the current object/NLA stack though).
2015-08-26 02:30:09 +12:00
27bdc1a984 Preemptive fix for search-buffer size issues
Forgot to increase the size of the string buffer in b88d8916e4
While this wouldn't have caused problems in most cases (since most modifier names
are short), in the rare event that a long modifier name exists, the buffer may have
ended up being truncated prematurely, causing the wrong FCurves to get matched.
2015-08-26 02:30:08 +12:00
f4b65577ff Fix T45776: Rotate around selected fails in texture-paint mode w/ armature
Only rotate around the active pose bone when in weight-paint mode too.
2015-08-25 23:32:55 +10:00
af9838accb OpenSubdiv: Fix/workaround shader compilation when going to GLSL mode 2015-08-25 15:34:34 +02:00
41ae6d7829 OpenSubdiv: Support multiple materials for GLSL view 2015-08-25 15:22:26 +02:00
669f2f0088 OpenSubdiv: Remove partitioned mesh interface
It's hopefully no longer needed, at least not needed for as long as
single ptex face corresponds to a single patch which should be always
correct for uniform subdivisions as far as i know.
2015-08-25 15:12:12 +02:00
f1e68474e0 OpenSubdiv: Support for multiple materials in solid shading mode
Implementation is less optimal compared to non-opensubdiv drawing but
it is now as good as we can do it without affecting on how patches are
being created by OpenSubdiv.
2015-08-25 15:11:56 +02:00
50917edad5 Fix T45853: Edge-slide UV-correct jitter 2015-08-25 22:57:03 +10:00
ba5807c271 BGE: added bge.logic.{get,set}AnimRecordFrame functions
By using getAnimRecordFrame(), game developers have access to the frame
number used by the "Record animation" feature. This enables them to
record additional information in Blender's F-Curves and ensuring perfect
synchronization with the information already recorded by Blender.

The setAnimRecordFrame() can be used to change the frame number at which
animations are recorded, for example to introduce delays the recording that
do not require delays in the actual game/simulation run.

The getter/setter functions in KX_KetsjiEngine are not directly named after
property they access (m_currentFrame). I found "current frame" to be too
vague for a public interface, hence chose a more descriptive name.

Reviewers: moguri, hg1, campbellbarton, panzergame, aligorith

Reviewed By: panzergame, aligorith

Differential Revision: https://developer.blender.org/D1449
2015-08-25 13:42:09 +02:00
6f7eb623d3 Avoid include header from previous commit when building without OpenSubdiv 2015-08-25 13:24:02 +02:00
3db3145c33 OpenSubdiv: Make it more obvious that None compute type actually disables OpenSubdiv 2015-08-25 13:23:06 +02:00
0d33d30cc6 OpenSubdiv: Fill in some missing drawing callbacks of CCGDM 2015-08-25 13:16:55 +02:00
5cf519ac51 OpenSubdiv: Better approximation of vertex normals
Use vertex varying data which gives better approximation of normals.
Still not ideal but should be closer for higher poly meshes to correct
normal.

The only way to have proper smooth normals seems to be to implement
patch evaluation in tessellation shader, but that's a bit PITA with
current GLSL usage in our draw code.
2015-08-25 13:16:55 +02:00
51d969c6a9 Fix T45891: Crash generating previews 2015-08-25 18:34:44 +10:00
c6d7562896 Fix T45729: Cycles Bake break when building a special mesh
The issue was caused by CD_SHAPEKEY_INDEX layer being added to edge data,
now we make sure all the layers are nicely re-allocated.
2015-08-25 10:30:46 +02:00
540f9a3b11 Quiet warning with arg types 2015-08-25 17:27:18 +10:00
a7dd20983a Fix T45814: Writing MP4, h.264 not supported 2015-08-25 08:51:04 +10:00
1080a7d5e1 Cleanup: style 2015-08-25 08:50:53 +10:00
7d516f11f7 Fix for previous commit
uint is only used in Cycles, Blender is not really ready for this.

Pointed out by Thomas Szepe, thanks!
2015-08-24 23:11:45 +02:00
c5018c65b9 BLI_fileops: Some fixes and cleanup.
* Fix BLI_file_touch, used to add one dummy byte ((unsigned char)EOF) to empty files!
* Get rid of static global temp string in WIN32 area (very bad, and useless!).
* Get rid of paranoid NULL checks in WIN32's BLI_gzopen().
* Add non-relative filename asserts to WIN32 file operations too.
* ifdef-out BLI_move and BLI_create_symlink, unused (and the later is not even implemented for windows).

Partly based on patch and points raised by Jason Wilkins (jwilkins) in T32870, thanks!
2015-08-24 22:14:38 +02:00
e8a0478c63 Fix T45833: Light group instances are not rendered in the 3D viewport
The issue was introduced in c9ac51e by trying to use original's objects layers
for light visibility check instead of using duplicator's layers.
2015-08-24 22:02:41 +02:00
2fb639deed Fix T45778: Objects scaled to 0 cause black artifacts with Static BVH
The issue was caused by some numeric instability in triangle intersection which
was visible on avx2 CPUs and GPUs (at least sm_20 here) but maybe some others
too.

Committing rather a workaround for now to be safe for the release, still need
some investigation.

From tests with grass field from Gooseberry project didn't see measurable
slowdown.
2015-08-24 21:23:49 +02:00
3633499f4e Fix T45737: Vertex colors show washed-out
Blender-Internal and GLSL-nodes missed converting sRGB to linear color.
2015-08-25 01:02:28 +10:00
46d275b626 Fix DM_get_loop_array, was checking edge-data
Fixes T45728
2015-08-25 00:47:27 +10:00
68a9328a58 Fix T45084 correcting bending_damping for cloth stiffness, by Martin Norris. 2015-08-24 14:09:01 +02:00
70b7dc993e Fix T45823: PSD files save as JPG without warning
Don't allow image save (which overwrites without asking),
unless the input format can be written to.
2015-08-24 21:34:49 +10:00
aac6ee6b87 Fix T45885: Cycles coordinate extension modes not working as expected
Fix T45769: Image Texture Node clipping bug

Simple mistakes in the normalized/pixel-space coordinates handling.

Render tests for this feature are coming.
2015-08-24 10:40:37 +02:00
8cc8ce3d46 Fix some issues from lates coverity scan.
Unlikely, but still valid.
2015-08-24 09:59:50 +02:00
8031f36261 Tests: Ignore preview render script in module loading tests 2015-08-24 09:46:41 +02:00
2960630b7b Cycles: Use better policy for primitive array resize for spatial split
Gives around 50% of spatial split BVH build speedup with grass field from
cassette player shot from Gooseberry.
2015-08-24 09:46:41 +02:00
7be6dba091 Cycles: Implement reseve() for aligned array class
The title says it all actually, just support reserving memory in the array class.
2015-08-24 09:46:40 +02:00
2230130099 Cycles: Speedup of Spatial BVH split code
Avoid memmove() happening on every insert of duplicated node to the references
list. Temporary pre-allocated vector is used for new references which is then
being inserted into actual array in one go later.

Gives around 4x speedup building spatially split BVH for the grass field in the
cassette player shot from Gooseberry.
2015-08-24 09:46:40 +02:00
334208e670 Cycles: Implementation of object reference nodes spatial split
This commit implements object reference node spatial split making it possible
to use spatial split for top-level BVH.

The code is not in use yet because enabling spatial split on top level BVH is
not coming for free and it needs to be investigated if it's worth in terms of
improved render times.
2015-08-24 09:46:40 +02:00
c88c5db360 Cycles: Make primitive split code easier for re-use by reference splitting function 2015-08-24 09:46:40 +02:00
99c1870ad5 Cycles: Move primitive splitting into own functions
This way it's easy to add more reference types allowed for splitting to the
BVH reference split function without making this function too much big. This
way it's possible to experiment with such features as splitting object instance
references.

So far should not be any functional changes.
2015-08-24 09:46:40 +02:00
9b57d70f3b Cycles: BVH statistics print was missing for spatially split BVH tree 2015-08-24 09:46:40 +02:00
30067b499a Fix editmesh GLSL tangent drawing
The generic tangent calculation relied on CDDM arrays which aren't available in edit-mode.

Add a tangent calculation callback, which has its own implementation for editmesh data.
2015-08-24 15:20:23 +10:00
4f61de6588 Fix T45884: Crash copying keyframes
BLI_str_quoted_substrN could crash if the prefix wasn't found
2015-08-24 09:29:00 +10:00
231ee60ab5 mathutils.BVHTree: support overlap self-intersect
Use same logic as BKE_bmbvh_overlap
2015-08-24 08:23:24 +10:00
8a623b066e BVHTree.FromBMesh() missed epsilon arg 2015-08-24 08:23:24 +10:00
2ee0187ed2 Fix T45882: Sudden shutdown if the filebrowser is part of the area layout.
There is no guarantee in sfile's listener that FileList has already been created...
2015-08-23 20:27:59 +02:00
25bb5cb30c Fix T45860, missing extension in GLSL after recent own fix. 2015-08-23 18:20:08 +03:00
8444f7ba2b BGE: Fix T42679: Python physics environment not setted for python control script. 2015-08-23 14:34:04 +02:00
2672ee77a0 Cleanup: spelling/style 2015-08-23 21:12:48 +10:00
83e16a4a87 This commit makes it possible to select the sort mode whenever we invoke an operator.
It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).

Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)

Reviewers: mont29

Reviewed By: mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1476
2015-08-23 12:40:21 +02:00
b88d8916e4 Fix T45633 - Animated modifiers don't update in new depsgraph
* Resolved some todo's where FModifier paths were getting identified using the
  wrong pattern.
* Added the missing animation -> modifier link. The "hacky" part here is just
  to do with how we check if that link is needed; the link though should exist
  in the graph.
2015-08-23 22:23:25 +12:00
e7775833a7 Math Lib: Use same logic for 2d/3d functions
dist_squared_to_line_v2, dist_to_line_v2
2015-08-23 19:10:37 +10:00
0cb23fafe7 Math Lib: minor optimization interp_weights_poly 2015-08-23 17:07:35 +10:00
58c9a0b11a Cleanup: spelling 2015-08-22 21:17:32 +10:00
c1c07b68b8 Use epsilon for line-intersect collinear test
Also remove 2x vector normalize since other parts of the code already check this.

Fixes T45849
2015-08-22 21:12:46 +10:00
6c8db9fd5f FileBrowser: Tweak display of size/time of entries.
We have no size for blenlib entries, nor do we have time for those and 'parent' entry.

Thanks to Sergey for notifying this on IRC.
2015-08-22 11:02:12 +02:00
86690915f1 outliner: tweak GPLayer color button overlap 2015-08-22 16:49:58 +10:00
a22f3cccec Fix outliner grease pencil color button 2015-08-22 16:49:57 +10:00
4d146bdf13 Fix T45689: Pose Libraries cannot be used when using lib-linked actions as poselibs
This commit makes some tweaks that make it at least possible to use lib-linked
actions as Pose Libraries. Specifically:
* The apply poses button is no longer greyed out

* It is possible to select different poses from the list of poses

* All pose library operators which edit the poses stored in the poselib
  now have improved poll callbacks which perform extra checks for lib-linked
  actions (which cannot be edited, as all those changes will be lost)


Caveats:
* Due to the way the UI list template works, it doesn't seem to be possible to
  make it not grey out the items in the list. (While the double-click to rename
  thing shouldn't be allowed, items should at least look like they can be clicked on)

* The difference between clickable vs not-clickable isn't too great, making it hard
  to tell that that while the Add/Remove/Sanitise toggles are not usable,
  the Apply Poses is actually functional. But, this is a more of a  UI-toolbox
  level issue
2015-08-22 18:16:55 +12:00
79e3a27c7a Typo fix 2015-08-22 16:53:58 +12:00
24e56d4c39 BGE: Fix constraint free crash in RemoveConstraint.
Fix silly error getRigidBodyA() instead of getRigidBodyB()
2015-08-21 22:17:35 +02:00
7d0b29be69 Fix T45658: linked library object loses particle settings.
Simply make ParticleSettings datablock linkable, see absolutely no reason why those
were the only 'real data' ID type not linkable so far...
2015-08-21 18:31:23 +02:00
94c8f5a447 Anim Editors: All keyframe selection operators now perform undo pushes
This brings them into line with other editing tools (e.g. object/mesh selection),
and should help fix bugs like T45374 and T45846
2015-08-22 02:48:02 +12:00
b617dec065 Fix T45864: Wrong NLA Control Curves keyed when using the Graph Editor sliders
This commit simplifies the logic for finding the control curves for NLA strips,
thus eliminating a whole bunch of weird errors that were happening here. It should
also fix a number of other related issues here.
2015-08-22 02:48:01 +12:00
09b7ec1864 Fix T45865: Auto Blend is not recalculated when adjusting start/end/scale etc. of strip through RNA. 2015-08-21 16:18:20 +02:00
59e166c568 BVH-raycast: Use watertight intersections
By default watertight intersections are used,
For callbacks where its not needed,
BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag.

Fixes T45286
2015-08-21 17:48:33 +10:00
71919efd78 Math Lib: watertight intersection function
From Cycles with some very minor differences.
2015-08-21 17:45:04 +10:00
7e3781179e Math Lib: Add float/int conversion functions 2015-08-21 17:42:40 +10:00
c727fc59ab BVH-raycast: ensure input direction is unit-length
This was already the case for most users of ray-cast.
Doing this avoids 2x normalize calls per ray-cast in many places.
2015-08-21 17:09:18 +10:00
a98b02ff94 Fix uninitialized var use 2015-08-21 14:46:30 +10:00
aa746677cf Docs: correct some comments 2015-08-21 09:07:52 +10:00
10edaff5c1 Fix ATI part of T45708, crash when enabling opensubdiv.
In fact exit was getting called because we
had an error in shader compilation:

Uniform buffer objects are in fact required.

Since it looks like original intent was to
write the shader against older GLSL version,
I will be adding an extension here instead
of a version.

Thanks to Anshu Arya for letting me borrow his machine through
VPN to do the debugging :)
2015-08-20 16:23:33 +03:00
3fd89df6e7 Fix T45491 not all GPUs support those extensions, use check for
opensubdiv to enable.
2015-08-20 16:05:24 +03:00
f9791155e4 Minor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a false-positive assert). 2015-08-20 12:45:20 +02:00
cd24871706 BGE: Fix T44557 GameLogic module memory leak.
This reverts commit 7a28ca4398.
2015-08-20 12:06:54 +02:00
f4d8ce9781 Fix T43654: Radial distance for force fields was computed using the vec_to_point
vector, which already has the radial component removed.
2015-08-20 11:58:11 +02:00
3ec9ff16f8 Resolve MSVC/OpenMP compat issue 2015-08-20 19:37:14 +10:00
179a2e1b98 Use BVH-overlap for mesh self-intersection display
Add BKE_bmbvh_overlap, remove BKE_bmbvh_find_face_segment
2015-08-20 19:13:14 +10:00
66365589ff Hopefully fix mingw building after filebrowser rewrite.
The mystery here is, how MSVC could not break on such error? :(
2015-08-20 10:15:08 +02:00
176b806626 BVH-overlap: add callback to BLI_bvhtree_overlap
The callback checks if 2 nodes intersect (not just their AABB).

Advantages:
- theres no need to allocate overlaps which are later ignored.
- expensive intersection tests will run multi-threaded.

Currently only used for Python API.
2015-08-20 17:52:26 +10:00
67e32b3195 Fix T45514 crash entering texpaint mode.
In the file of the report, stencil and clone indices
have fallen out of synch with the uv/mtexpoly layers.

Looks like the file has a long history, coming from 2.49
even. Unfortunately reporter cannot recall exact steps
to reproduce, so "fix" is to patch mesh.validate to
fix those indices.
2015-08-20 10:35:14 +03:00
e9f432f73c BVH-overlap: use stack for overlap data array
This is known to be <32, so no need to malloc every item.
2015-08-20 16:31:05 +10:00
6b53b4afb9 Avoid redundant normal calculation in heat-weight 2015-08-20 15:09:25 +10:00
a2c9d87a99 Cleanup: de-duplicate ray-cast initialization 2015-08-20 13:25:21 +10:00
a6457f283e Cleanup: comment out isect_ray_tri_threshold_v3
Also define epsilon var for ray-cast functions.
2015-08-20 12:50:39 +10:00
5b6deea647 Transform: Use BVH for volume-snap (optimization)
Was performing ray-tri intersection checks on all faces.

Note, this isn't using isect_ray_tri_threshold_v3
which was used to prevent ray-casts slipping through between faces.

Instead we'll move to using watertight intersections by default.
2015-08-20 12:22:54 +10:00
023b1a3843 Cleanup: remove unused BVH_ONQUAD flag 2015-08-20 11:03:34 +10:00
4224d22039 Fix drawing subsurf & auto-smooth
Error caused by recent MFace removal from subsurf.
2015-08-20 09:20:41 +10:00
a64819b735 Cleanup: unused vars 2015-08-20 09:20:11 +10:00
6c0cdda8e1 Cleanup: whitespace 2015-08-20 08:51:50 +10:00
5c3b95e1a8 FileBrowser: Fix some minor issue with fileentries creation.
An entry could already exist in misc cache, when creating it for block cache, leading to double-creation.
Issue was not that serious (no memleak or so), but nasty still. Thanks to Severin for notifying the assert.
2015-08-20 00:51:21 +02:00
c11222e31a Fix 32bit builds... :/ 2015-08-19 23:54:49 +02:00
f69e9681fa Final 'FileBrowser First Stage' merge.
It basically rewrites most of filelist.c, with some more limited changes in other areas of filebrowser.

From user perspective, it:
* Removes some info in 'long' drawing mode (owner, permissions) - OS-specific data that do not really matter in Blender!
* Makes short/long display 'fixed' size (among four choices, like thumbnails mode).
* Allows to list several layers of dirtree at once, in a flat way (inside .blend files and/or real directories).
* Consequently, adds datablocks types filtering.
* Uses way less RAM when listing big directories, especially in thumbnail mode (we are talking of several hundred of MiB spared).
* Generates thumbnails way faster.

From code perspective, it:
* Is ready for asset engine needs (on data structure level in filebrowser's listing).
* Simplifies and makes 'generic' file listing much lighter.
* Separates file listing in three different aspects:
** 'generic' filelisting (in BLI), which becomes a shallow wrapper around stat struct.
** 'filebrowser drawing' filelisting, which only contains current visible subset of the whole list (sliding window), with extra drawing data (strings for size, date/time, preview, etc.).
** 'asset-ready' filelisting, which is used for operations common to 'basic' filehandling and future asset-related one.
* Uses uuid's to handle file selection/state in the browser, instead of using flags in filelisting items.
* Uses much lighter BLI_task handling for previews, instead of heavy 'job' system (using the new 'notifier' timer to handle UI refresh, in similar way to jobs).
* Moves .blend datablocks preview handling to IMB_thumbnail (necessary to avoid storing all datablock previews at once, and gives better consistency and performances too).

Revision: https://developer.blender.org/D1316

Thanks to Campbell & Sergey for the reviews. :)
2015-08-19 22:41:39 +02:00
Julian Eisel
5c659574e6 Fix T45847: Pie looses focus when mouse cursor passes through a pie button 2015-08-19 20:53:16 +02:00
5668fc0938 More BLT/Windows fixes... :/ 2015-08-19 11:01:52 +02:00
314e40b6ce Hopefully fix broken windows after recent i18n split.
We need to include BLI_utildefines.h when using __func__...
2015-08-19 10:10:29 +02:00
a3b151f341 Fix for accessing looptri's from subsurf
Use poly count since tessfaces may be zero
2015-08-19 17:26:32 +10:00
Dalai Felinto
bb479704d0 Multi-View: fix Multi-View camera suffix test
If we had ambiguity in the SceneRenderView > Suffix matching test, the
first match would be used. And this would happen everytime a
SceneRenderView had an empty camera suffix.

We now take the longest matching suffix instead.
2015-08-19 03:41:02 -03:00
cd8581af8e Fix T45706: Axis aligned tri-tri intersection 2015-08-19 12:20:39 +10:00
7c352ed43a Cleanup: style + doxy 2015-08-19 08:49:12 +10:00
6a5303ab43 Fix error in recent library API updates 2015-08-19 08:49:12 +10:00
1ed1f2f3ab Increase Smooth_View limit to 10.000
Request from @zuggamasta: For turntable like view rotations a very slow and smooth turn is needed. This is now possible with the new limit.
2015-08-18 20:41:21 +02:00
a67a51ed55 IMB_thumb: Allow blen-handling func to also load datablock previews from .blend file.
Notes:
* Not yet used, this is the last piece of 'side changes' before the big filebrowser commit.
* We can probably be more effective here (like e.g. reading and storing all previews for a given
  group in thumbnails cache at once, instead of re-opening and parsing the whole file each time),
  but will do this later.
2015-08-18 14:32:13 +02:00
2735f6fda6 Replace 'BLO_is_a_library' by 'BLO_library_path_explode'.
This new func will be fully used by upcomming code (it mostly adds
the extraction of library item name as well as library file and ID group).
2015-08-18 13:18:50 +02:00
d85e94da07 IMB_thumb: add thread locking API.
General idea is that, if several threads are handling thumbnails at the same time,
they can end working on the same file at some point, which will generate conflict.

To avoid this, threads can now lock a given filepath.

Note that locking data is allocated on a ref-count basis, to avoid keeping the GSet
in memory when not needed. Also, we are using global LOCK_IMAGE mutex for now.

Needed for upcomming filebrowser rework.
2015-08-18 12:39:45 +02:00
81afa2953c BGE: Fix mesh not registered in scene libload. 2015-08-18 12:24:38 +02:00
3a8e73943e Fix T45824: Pie's no longer show enum icons 2015-08-18 19:18:16 +10:00
1190da3ad9 UI: avoid property lookup w/ expanded enums 2015-08-18 19:04:06 +10:00
92fe4e52fd system-info.txt was quoting ffmpeg lib names 2015-08-18 16:09:51 +10:00
6cee6607a2 UI: avoid subtracting shadow from winrct
For popup interactions we need to know if events are in the region or not,
however subtracting the shadow isn't so reliable, since its not always added to all sides of a popup.

Instead, get the winrct value from a popup using the block rect, otherwise the winrct as-is.
2015-08-18 14:16:58 +10:00
a08f8a4708 Readfile: more efficient OldNewMap lookups
Even when lasthit can't be used to find the next address,
use it as a starting point for the full array search.
Gives approx 1/3 less array searching in own tests.
2015-08-18 11:39:23 +10:00
ac62d44e4f Docs: function comments 2015-08-18 07:11:55 +10:00
2e2dc9b9e3 Refactor translation code out of blenfont
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-08-18 07:01:26 +10:00
3047b96eaa Lattice min_max: add a version of the func using lattice's final DispList,
and use it for bbox computing.

Revision: https://developer.blender.org/D1462
2015-08-17 17:02:22 +02:00
ad43262fdb BGE: Fix T45817 Convert curve object in group instance.
Now group instance conversion allow unconverted object like curve, meta ball ect…
2015-08-17 16:51:35 +02:00
cb7f7b9abd Subsurf: don't reserve MFace by default
Instead, the cache can be calculated only when its needed (fixes T45787).
2015-08-17 18:14:54 +10:00
6e65185854 Fix for Ghost/OSX w/ core profile 2015-08-17 16:17:22 +10:00
ce2d342df5 Fix T45802: View Lock w/ Curve-Parent fails 2015-08-17 14:58:03 +10:00
c58757006d Cleanup: remove unused Object.ipoflag 2015-08-17 14:24:47 +10:00
709a31da93 Simplify thumbnail blend parser
No need to convert the BHead code to an int, just compare the bytes.
2015-08-17 12:37:38 +10:00
0c420a2e49 Fix T39486, screwed object bevel made bevel amount go out of control.
There is an adjustment pass in bevel that tries to make the bevel
widths at either end of a beveled edge as equal as possible.
When there are hundreds of beveled edges end-to-end, these adjustments
can accumulate out of control and result looks awful.
Yet the adjustment pass is sometimes needed to avoid equally awful
appearances in other cases (see the "Bent test" in the bevel regression
tests).
This change uses the 'Clamp overlap' flag of bevel (on by default in
the modifier, not in the tool) to limit the amount of adjustment to within
10% of the desired width. When the flag is off, there is no limit to the
adjustment.
2015-08-16 15:15:13 -04:00
9b43fce3c1 Fix T45795, bevel treated one-edge-beveled case inconsistently.
When one edge is beveled at a vertex among more than 1 other unbeveled
edges, the code makes a polygon around the vertex. The position of the
vertices on the non-adjacent-to-beveled-edge edges depended on the
ordering of edges, which leads to inconsistent-looking results in seeming
symmetrical situations.  Changed to use the bevel amount as slide
distance, which fixes this.
2015-08-16 11:13:53 -04:00
493f9b9155 Fix for numpy with nmake and missing directory
When using the nmake generator from cmake, numpy fails to extract during build because the working directory doesn't exist yet.

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D1466
2015-08-16 14:34:45 +02:00
9437acb7f3 BGE: Fix memory leak and crash with certain physic types
Fixing crash if the physic type is set sensor or character. Caused by a790e172d0.
Fixing memory leak, if the constraint is deleted with Python API removeConstraint().
Add RemoveConstraint() method to avoid code duplication.
Rename old RemoveConstraint() to RemoveConstraintById() which is more suitable name for this method.
2015-08-16 11:38:25 +02:00
7b6a841cde Merge branch 'master' into openvdb 2015-08-16 10:27:04 +02:00
Julian Eisel
19cc75d642 Fix T45807: Instant crash adding any modifier to NLA track
Caused by rBcbf936a3327282
2015-08-15 14:48:38 +02:00
Julian Eisel
119cda0a0d Cleanup: Avoid calling function twice
Own stupidness from rB17422124eca332
2015-08-14 22:23:06 +02:00
Julian Eisel
9b729adb6e Remove redundant workaround for T41548
Reverts 7a026971dc which isn't needed anymore after b347f523cececdf
2015-08-14 22:23:06 +02:00
Julian Eisel
d9a720a709 Fix T45750: Closing search menu by clicking root button doesn't work when clicking on lower half 2015-08-14 22:23:06 +02:00
fa86efdc97 Fix T40070, Bevel didn't bend as expected sometimes.
Two problems fixed. One, the comparison of angles to
'almost straight' or 'almost zero' needed a bigger epsilon.
Two, using the corner normal instead of the average face normal
is usually the right thing to do, and what the code was doing,
but in some cases the corner normal could be very wrong.
2015-08-14 15:51:27 -04:00
18648bef7b Fix dyntopo not warning anymore when vertex colors or uvs are present.
We check against loop data now, not tessface data
2015-08-14 17:11:31 +02:00
Julian Eisel
5fafd493c2 Fix unnecessarily added undo steps when deleting only scene
Steps to reproduce were: startup.blend, move any object, delete active scene (nothing happens), undo (nothing happens), second undo is needed to revert object transformation
2015-08-14 15:54:58 +02:00
a662980f31 Remove already-ifdef'ed out PRE_275_ALGORITHM code from bevel.
The new algorithm has soaked enough that we are unlikely to go back now.
2015-08-14 09:46:49 -04:00
d94137ee7d Outliner: Context menu for scenes
Adds context menu for scenes in the outliner, for now, with only a 'Delete' entry.

D1448 by @lichtwerk, review by @aligorith and @Severin
2015-08-14 15:22:52 +02:00
8b286bf35a Cleanup: style 2015-08-14 17:46:26 +10:00
fdfd87f2f4 Docs: comment BHead.code values 2015-08-14 17:40:55 +10:00
3fa0a1a5bc Add real boundbox support to lattice, and update armature one.
* draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices]
* give proper values for lattice objects ".bound_box" in bpy
* give proper values for armature objects ".bound_box" in bpy
* lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures
* remove redundant calculations in "boundbox_armature()"

Armatures boundingboxes were already drawn in 3dView, if "show_bounds" was used.

Based on report T45735: Lattice's bounding_box doesn't update,
and a comment in code by @campbellbarton ("later we may want to add dimensions for lattice, armature etc too").

Revision: https://developer.blender.org/D1460
2015-08-13 18:12:08 +02:00
d2383ec6c0 Fix T45783: Problem selecting all objects on a layer from a script if any 3d view is in local mode.
Do not take into account lay bits used for local view, when doing exact match.
2015-08-13 14:25:26 +02:00
828710d2ac Fix T45782: bpy.ops.object.select_by_layer match='SHARED' option is not working.
Looks like some half-done change from enum to bool (or vice-versa), that op was just broken!
2015-08-13 13:18:45 +02:00
c62eb919ec Fix T45775: Bad 'Normal' transform space for edge of non-uniformed scaled object.
Non-uniform scaled obmat will lead to transformation not preserving angles, so
we must ensure our normal is orthogonal to the edge **after** applying obmat.
2015-08-13 12:45:13 +02:00
487d2cb4f3 Displace Modifier: add an option to displace along (averaged) custom normals, instead of vertex normals.
User suggestion/request from 'boby'.
2015-08-12 18:21:41 +02:00
883b420a51 Fix T45739: Number slider precision handling inconsistent between unit systems.
When using unit system, step was multiplied by 100, could really not find any good reason to that.
Easy to revert anyway if needed, but in this case please explain why in code. ;)

Investigated and patch by Thomas Radeke (ThomasR), thanks.
2015-08-12 16:43:41 +02:00
39ce0a9916 Fix T44049, edge bevel with sometimes breaks UVs.
Fairly large changes to bevel code to do a better job
of keeping UVs from crossing islands, etc.
Updated http://wiki.blender.org/index.php/Dev:2.5/Source/Modeling/Bevel
to explain algorithm used for maintaining UVs.
Updated the bevel_regression.blend tests in lib tests.
2015-08-12 10:18:58 -04:00
4eefba091d Fix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no more edges to draw). 2015-08-12 11:42:35 +02:00
8a2371e408 Usual UI message cleanup/fixes. 2015-08-11 22:29:16 +02:00
253ee0b490 install_deps: fix broken force/skip-osd options.
Bash scripts are such a PITA, having to redefine the options in three different places... :(
2015-08-11 22:08:01 +02:00
b36c6b9c47 BGE: Fix delete constraint for replicated physics controllers.
Replicated controllers didn't free constraints list before.
2015-08-11 21:49:54 +02:00
d22153425a Cycles: Enable some extra debug prints for OpenCL kernel loading 2015-08-11 18:03:54 +02:00
a790e172d0 BGE: Fix T38448: Bullet constraint memory leak. 2015-08-11 13:02:17 +02:00
10dbe966e1 Add WM_event_add/remove_timer_notifier() helpers.
This basically does the 'timer' part of Jobs system: it sends a given notifier on every timer step.

This is needed for background tasks (not full-fledged jobs, lighter BLI_tasks based) that want to update UI
(like for up-comming new thumbnail handling in filebrowser).
2015-08-11 12:11:48 +02:00
bccc6c393c BGE: Fix T33187 constraints replication for libloaded objects.
Reviewers: Moguri
2015-08-11 11:30:23 +02:00
c1506454ec UI drag&drop: make code able to free dragpoin if needed.
Only for image and strings for now. Needed for incomming filebrowser work.
2015-08-10 18:01:11 +02:00
8d37aaeca1 Data previews: add utils to generate/clear previews.
Not much to add, you can now clear previews from current .blend file, or a set of non-opened files.
Likewise, you can generate previews (for mat/tex, objects, groups, scenes, ...).
2015-08-10 17:45:16 +02:00
8f837e0ac5 BGE: Fix T33564: UI obstacle panel disable for character and no collision objects. 2015-08-10 17:32:09 +02:00
7b467a6fea Cycles: Fix for typo in previous commit 2015-08-10 17:24:14 +02:00
3c77822f96 BGE: Fix T19377 restore dynamics after unparenting object.
Reviewers: scorpion81
2015-08-10 17:08:11 +02:00
0c82ba4213 Data previews: add preview to Object, Group and Scene.
This commit does not add anything yet to users, it’s purely internal one.
Useful commit is next. ;)
2015-08-10 15:41:28 +02:00
d70ffd375f BLI_threads: add an helper to wait on a condition using a global mutex.
Also, factorized internal code to get global mutex from its ID.
2015-08-10 15:03:31 +02:00
c6d13716c1 Install_deps: add basic listing of needed dependencies to error message for unsupported distro. 2015-08-10 13:09:57 +02:00
65c3207517 BGE: Fix T44782 suspend/restore dynamics on inactive object. 2015-08-09 19:17:24 +02:00
49f3998a0f Install_deps: add (non-tested) OSD-building code.
Not tested for fedora-like and arch distro, would expect it to work though. Please report otherwise.

Also, always inatll git now (and a few other XOrg -dev packages).
2015-08-09 15:58:53 +02:00
64dc38f089 install_deps: Add libxcursor packages, seems to be needed now? 2015-08-09 15:42:27 +02:00
ded665a2c9 Compile fix cycles network. This code is crusty and not super
functional. But is should compile.
2015-08-09 15:31:32 +02:00
Dalai Felinto
63265fd0c3 Cycles: Follow up on cc0bbc28 (Collapse multiview panel) 2015-08-09 00:25:34 -03:00
d9fc9882dc Optimize reading of fcurves
Reading fcurves wasn't really optimal because restoring fcu->group pointer was
changing lasthit pointer, which required full lookup over the oldnewmap happened
at the next call to newdatadr().

This reduces loading franck_sheep.blend file from ~2.2sec to 1.5sec.
2015-08-08 22:17:03 +02:00
cc0bbc28e2 Collapse multiview panel in render layers by default
This is not so much common panel to access to and having it fully
visible just adds clutterness in cases when one only need to work
with render passes.
2015-08-08 20:55:51 +02:00
f4ba4c6826 Fix for SeqCache hash ignoring multi-view
Thanks to @chadf for finding
2015-08-09 13:53:36 +10:00
115c867190 Fix: opening missing file didnt remove in recent-files.txt
Refactor recent-file.txt handling, split into smaller functions.
It wasn't possible to write the current state to disk (depended on current context).
2015-08-09 13:12:21 +10:00
281f4eb964 SPeedup for particle point cache reading
Order of saving and reading particle point cache was totally different which
made newdataadr() falling back to full data block list traversal for every
point cache entry.

This commit makes it so reading code uses the same order of reading structs
and lists ad the writing code. This required to add special version of list
linking which is capable of running a callback after linking a list element.
This seems to be more robust approach than splitting writing code into
several loops.
2015-08-08 19:54:20 +02:00
Dalai Felinto
e1cea53066 Fix T45705: Selected to Active Cycles Baking no longer working 2015-08-08 14:40:41 -03:00
a9f6b27281 Use polygon normals for baking 2015-08-09 11:05:25 +10:00
e229d66e99 Fix crash baking in cycles
Error in recent move to looptri
2015-08-09 08:29:23 +10:00
dbdc55ab6a Support building OpenSubdiv libraries under Debian (Ubuntu) with our build_deps.sh script.
Use --skip-osd to skip building opensubdiv libs,
use --force-osd to force a rebuild of the libs.

I added all needed user information (where to find the include dir, which -D options to set) to the print_info method that is called at the end too, so it should be pretty intuitive to use.

Reviewers: sergey, mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D1452
2015-08-08 14:12:02 +02:00
Julian Eisel
fef31aadc4 Remove leftover from sticky keys 2015-08-08 02:37:03 +02:00
8af8bab0c5 Fix T45726: Wrong handling of 'failed to generate' audio waveform data in VSE strip draw code. 2015-08-07 23:42:32 +02:00
Dalai Felinto
e96e0ddbee Fix T45715: Blender crashes when creating Environment Map textures in Multi-View mode 2015-08-07 15:46:18 -03:00
Dalai Felinto
58133d4ab2 Fix T45721: Panoramic render in Cycles camera : depth of field issue with bump maps - patch by Brecht Van Lommel 2015-08-07 15:04:12 -03:00
96f20c34a2 Data Transfer operator: Add a 'freeze' setting to prevent operator from re-running when changing settings.
This is likely weak design, but allows people to change several settings without having to wait
several tenth of seconds each time, when e.g. transferring UVs between heavy geometries.
2015-08-07 16:35:39 +02:00
c677bd44ce Fix (unreported) crash in mesh remap (i.e. data transfer).
Issue from rBabbd82a50, loops data were not correctly protected against multi-freeing in bvhtree data.
2015-08-07 16:35:38 +02:00
930fc7d157 Mesh remap: Fix two potential numeric issues in corner cases, and enhance poly projection.
Null-area face could generate an int overflow, and potential numerical imprecision in face area computation
could lead to negative number of rays-to-cast (though highly unlikely).

Also, use domnant axis of poly normal as 'flattening' one, instead of always using Z axis.

Points raised by Campbell, thanks!
2015-08-07 16:35:38 +02:00
c30c3fde51 Attempt to fix T45718, crash when enabling GLSL mode with UV layers.
I can't  reproduce issue here but crash is most likely caused by passing
a NULL pointer to glUniform2fv.

This is caused by OpenSubdiv changes to the codegen module, which pass
mtex layers to the uniform system
even when not needed.

Since Sergey is demoing OpenSubdiv in a few days, I'll
go with the easy fix for now which is just checking for NULL pointer, but
this needs to be fixed properly at some point.
2015-08-07 16:16:23 +02:00
9becee445e Fix scrubbing only treated as animation for sequencer
Intent was to act as animation everywhere
2015-08-07 15:39:32 +02:00
Julian Eisel
20bd253809 Fix T45713: Numselect for confirm popup not working anymore 2015-08-07 14:39:50 +02:00
44384c698d BGe: Fix T45597 wrong object layer for linked object in blenderplayer. 2015-08-06 17:07:26 +02:00
f5a333fe65 Fix: Sliders in animeditors were getting drawn too far left
Sliders in for FCurves in the animation editors were leaving space for
one extra setting that they didn't need to be accounting for (and which
wasn't shown, as it isn't valid for FCurves).
2015-08-07 02:46:38 +12:00
599d8291ad AnimEditors FModifiers toggle: Add a bit more space beside it so that it doesn't seem to collide with the mute toggle 2015-08-07 02:46:37 +12:00
579329388a Fix T45166: Keyframes pasted at wrong position when NLA strip has offset
Paste keyframes code seemed to have overlooked the NLA mapping issue, causing
keyframes to get pasted in the wrong places.
2015-08-07 02:46:37 +12:00
0e80e3d20c No need to count layers to check empty 2015-08-07 00:00:28 +10:00
b9ce21fd0f GPencil UI: Streamline the data panel workflow
Restored the "New Layer" button in the NKEY Grease Pencil panel (as was found
pre-2.73) for two cases:
 1) When no Grease Pencil datablock is active - This shortcut makes it possible to
    add a new layer to start drawing in with a single click again (instead of two
    clicks - one to add a datablock, and a second to add the layer)

 2) When there are no layers - There is no need to display the UI list in this case,
    thus saving a bit more space in the rare cases where this applies.
2015-08-07 01:48:27 +12:00
376e729de0 T44932: Disable pressure handling for "poly" mode too 2015-08-07 01:48:27 +12:00
e660079e47 StopGap Fix for T44932: Ignore pressure values when drawing straight line segments with GPencil
After some testing of the behaviour of this stuff, it became clear that the current
pressure handling here isn't very useful. The initial point would invariably get a
low pressure value (due to the way that the initial tap needs time to "take"), while
the end of the stroke suffers from similar issues (i.e. when the pen is released).
Meanwhile, the line thickness would flicker while drawing the stroke, as the endpoint
pressure varied.

So, until we find a better way, all straight line segments are now drawn without
pressure sensitivity.
2015-08-07 01:48:26 +12:00
c587302ea1 Timeline: Make GPencil keyframes slightly taller than normal keyframes to make them easier to distinguish
This commit makes GPencil keyframes in the timeline slightly taller (80% height
vs 60% height) so that they will not be that easily confused.
2015-08-07 01:48:26 +12:00
03b2bccca8 Remove MFace use w/ fluidsim 2015-08-06 22:33:45 +10:00
8f45e1156f Docs: comment BKE_scene_set_background 2015-08-06 21:03:35 +10:00
2c5efd5b3f Fix typo in cmake when OpenSubdiv is not found 2015-08-06 11:51:18 +02:00
be1a684755 Fix T45695: Assigning material reverts MaterialSlot.link
Setting the material was resetting the link bit, this is OK from the UI,
confusing for scripts.
2015-08-06 18:07:44 +10:00
fa4172c28c OpenSubdiv: Make sure faces are exported with consistent normal
This is currently a requirement of OpenSudiv and original orientation code
was depending on this quite a lot.

This makes mesh conversion and comparison slower but solves some crashes.
With some trickery it could be optimized and become closer to original
performance.

Probably Campbell has some nice ideas here as well :)
2015-08-06 09:49:13 +02:00
ced9381e20 Simplify defvert_remove_group(), use realloc
Patch by @chadf
2015-08-06 16:52:39 +10:00
c2cfec64e3 Cleanup: unused warning 2015-08-06 16:52:28 +10:00
43c756ac95 CMake: AUDASPACE_ROOT_DIR wasn't working 2015-08-06 13:03:07 +10:00
300f33a8ea Cleanup: style (match other find modules) 2015-08-06 13:03:07 +10:00
fdc8b12726 Cleanup: whitespace, unused var 2015-08-06 13:03:07 +10:00
5af7257309 Cleanup: whitespace 2015-08-06 13:03:07 +10:00
89edddb26c Fix T45691 crash on material view
Call glProgramUniform1i only when OpenSubdiv is requested and only when
the GPU supports it.
2015-08-06 01:09:07 +02:00
dd67538178 Merge branch 'master' into openvdb 2015-08-06 00:52:38 +02:00
e3ed51deba Cleanups: unnecessary includes, small de-duplication, accidental/
unwanted changes, ...
2015-08-06 00:25:26 +02:00
868d3605ee Fix T45693: Fix for using 4-component vector as 3 component in osd shader 2015-08-05 21:35:38 +02:00
4140312c36 OpenSubdiv: Make sure normals passed to OSD are all up to date
Solves shading artifacts with animated characters.
2015-08-05 19:19:05 +02:00
02f553cc7a OpenSubdiv: Changes to texturing
Use first material slot for until multiple materials are fully supported.

Also respect setMaterial()'s return value to avoid drawing unnecessary
geometry.
2015-08-05 18:29:43 +02:00
9a995c11d3 OpenSubdiv: Initial OsdMesh construction missed clearing out-of-date coords flag 2015-08-05 16:07:32 +02:00
5fe5118845 Cleanup: unused warning 2015-08-05 23:50:22 +10:00
5e050918d8 Fix dereference before NULL check 2015-08-05 23:47:13 +10:00
11bfeb45ce OpenSubdiv: Completely avoid possible access to non-existing CPU data
Make it so CCGDM reports 0 number of geometry when it uses GPU backend for
drawing. This screws up a bit statistics in info header and requires to have
some special handle of CCGDM in the drawing code, but makes it so non of the
areas will try to access non-existing geometry.
2015-08-05 15:11:50 +02:00
6146fdc7b0 OpenSubdiv: Edit mode was not checking for Use OpenSubdiv flag 2015-08-05 14:51:08 +02:00
0208c95986 OpenSubdiv: Correction to previous commit 2015-08-05 14:46:27 +02:00
6cba20a8e6 OpenSubdiv: Tweaks to AABB calculation when using opensubdiv for subsurf
Use coarse coordinates to calculate AABB which gives much better approximation
of AABB than using unity AABB size.
2015-08-05 14:43:51 +02:00
5b76f72904 Mirror modifier: Fix for wrong dependency relations
Mirror modifier was reporting that it depends on geometry of the object
used for mirror center which is incorrect -- only object matrix is needed
for modifier evaluation.
2015-08-05 14:29:18 +02:00
8d179e3c1f OpenSubdiv: Resolve regression with unity AABB for CCGDM calculated on CPU 2015-08-05 14:20:40 +02:00
0ea45676d0 OpenSubdiv: Fix crash happening when disabling Use OpenSubdiv option
The issue was caused by the changes from this morning.
2015-08-05 14:15:46 +02:00
a474409f0b OpenSubdiv: Enable by default on the supported platforms
This commit makes sure Linux and Windows buildbots are using OpenSubdiv
and also enables OpenSubdiv by default on Windows.

OSX is kept disabled still, this is due to OpenGL restrictions which are
not solved in any way yet.

Linux is defaults to OpenSubdiv disabled because it needs precompiled
library.

The documentation could be found there:

  http://wiki.blender.org/index.php/User:Nazg-gul/OpenSubdiv
2015-08-05 13:29:39 +02:00
c54df2ad47 Remove files from recent-files list on failed open 2015-08-05 21:26:10 +10:00
cae25ff240 Fix T45647: Incorrect results w/ color spill node 2015-08-05 21:26:10 +10:00
d4a9da28e8 Doc fix: rather then -> rather than 2015-08-05 12:48:04 +02:00
7742926403 Only show interpolation buttons w/ bezier splines 2015-08-05 20:28:31 +10:00
7853cb3c5a Remove redundant addition in BKE_mesh_calc_volume 2015-08-05 20:26:52 +10:00
a7442bef59 Fix selecting linked edges 2015-08-05 20:24:27 +10:00
25f381a9b2 Fix T45641: crash cutting meta-strips 2015-08-05 20:18:57 +10:00
80c50a1d49 OpenSubdiv: Make subsurf behavior closer to original one when built with OpenSubdiv but without enabling option 2015-08-05 11:55:06 +02:00
b5c602c9c2 Buildbot config: disable gooseberry branch from nightly builds
There's no updates happening in the gooseberry branch, so no really reason
to waste time on rebuilding the branch overnight.
2015-08-05 11:45:52 +02:00
864c154a41 Buildbot config: remove windows scons and mingw builders
They are defunct at this moment, no reason to try scheduling builds on them.
2015-08-05 11:44:36 +02:00
Julian Eisel
d39e18853f Nodes: Link lines & link arrows not scaling to DPI/pixelsize correctly 2015-08-04 21:56:43 +02:00
c18e6fd87c Cycles: Remove 32bit cuda workaroudn and disable cubins for buildbot
Recent changes to kernel broke compilation of the kernels again, need some
other kind of solution for this issue.

Don't have much time for this currently, but will be addressed before the
release.

Meanwhile it's better to have some buildbot builds instead of totally failing
one.
2015-08-04 18:50:37 +02:00
8bd425188c OpenSubdiv: Preparation for enabling it for linux buildbot 2015-08-04 18:33:55 +02:00
687a321be3 OpenSubdiv: Modifiers module missed WITH_OPENSUBDIV define 2015-08-04 18:32:21 +02:00
ea40df582f OpenSubdiv: Fix for missing OpenMP device when building with SCons 2015-08-04 18:25:34 +02:00
16b619b77d OpenSubdiv: Correction for compute devices detection in SCons
SCons was still using file names from 2.x branch.
2015-08-04 18:18:21 +02:00
dfc672f8bb SCons: Fix for really nasty bug with polluting configuration environment
The issue was caused by the following construction:

  def = env['SOMETHING']
  defs.append('SOMETHING_MORE')

Since first assignment was actually referencing environment option it was totally
polluted hawing weird and wonderful side effects on all other areas of Blender.
2015-08-04 18:06:28 +02:00
1fc32249f5 Fix fast navigate winding being incorrect (apparent when backface
culling was on)
2015-08-04 16:03:20 +02:00
Julian Eisel
4041e654cd Nodes: Make method to detect hovered link during transform more predictable/responsive
The old method:
The "old" method used the node dimensions to get a number of lines and checked if they intersect with the node link. Issue with this is that only a small part of the actual node surface is checked, making the method a bit unpredictable or unresponsive.

The new method:
The new method checks for intersections within the entire node surface. If multiple links are intersected, the node with the smallest distance from the *upper left corner* to the link is chosen.

Reviewed by @campbellbarton (tm)
2015-08-04 15:25:19 +02:00
07b525ffe2 Remove alloc checks in laplaciansmooth
These arrays aren't especially big or likely to fail.
2015-08-04 22:34:29 +10:00
4b6fba355c Remesh modifier has unnecessary MFace calculation 2015-08-04 22:11:43 +10:00
ae9ccec7c4 Missed from last commit 2015-08-04 22:08:21 +10:00
f1a9a8cbfd Remove MFace use w/ laplacian smooth
Use polygons for calculation
2015-08-04 21:58:35 +10:00
c1938eb127 OpenSubdiv: Report when OSD can't be enabled due to dependencies
Should be useful for debugging cases when enabling the option doesn't
cause any performance improvements.
2015-08-04 12:23:53 +02:00
b50916d172 OpenSubdiv: forgot this in the previous commit
Need to find better approach for dealing with shadeless materials.
2015-08-04 11:04:27 +02:00
abb976ae88 OpenSubdiv: Optimize drawing shader
The idea is to cut as much code as possible and use compile-time
ifdefs rather than runtime if() statements.

Gives about 2x speedup on catmark_car model from OpenSubdiv repository
making our FPS much closer to what glViewer is capable of.
2015-08-04 10:52:50 +02:00
cff288cf3a Use PyC_ParseBool to parse bools
This could cause problems since they could be any int,
then passed directly to internal functions that assume bools.
2015-08-04 18:49:42 +10:00
62c8f46ab6 Docs: comment functions in BLI & Py API 2015-08-05 02:09:03 +10:00
Mateo de Mayo
23f54076db BGE: Added getActionName() function to KX_GameObject()
It works similar to getActionFrame(), you have to give a layer or not (for layer 0) as the argument and it returns the name of the animation that the object is currently playing.

Example:

```
import bge
own = bge.logic.getCurrentController().owner
own.playAction("SomeAction",0,20)
print(own.getActionName())
```
>> SomeAction

Here is an example file, just open the blend file with the terminal opened
and press P, you can see how the current animation is being printed:
{F217484}

Reviewers: moguri, hg1, panzergame, campbellbarton

Reviewed By: panzergame

Subscribers: campbellbarton, hg1, #game_engine

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1443
2015-08-04 00:10:33 +02:00
44ba08d147 Merge branch 'master' into openvdb 2015-08-03 22:04:27 +02:00
12649fbc21 Use openvdb::Name for passing strings around.
Although openvdb::Name is just a typedef for std::string, this change is
for two reasons:
- it makes it a bit more consistent API wise
- it sort of documents we are passing a name and not just a string
(which could be anything: a password, a brand, a poem...)
2015-08-03 21:55:53 +02:00
c17ccb165e Definitely remove the exception safety code.
It was first included as a safety net, but after close inspection of
where exceptions are used in the OpenVDB library, it appears that about
half of them are not used at all whilst the others are fairly dumb and
can be avoided gracefully (e.g. openvdb::ValueError is thrown in some
place if a negative value is passed, so don't pass a negative value ;).

Also the only place where it was used could hardly result in an
exception (only happens if the file is not a .vdb file, so let's trust
the user on that).
2015-08-03 21:38:46 +02:00
73522e1157 OpenSubdiv: Fix/workaround for missing generated coordinates in viewport
This actually requires some bigger work to make it fully supported but
for now at least avoid breaking shading with OpenSundiv option disabled.
2015-08-03 20:39:00 +02:00
0951ea2c6d OpenSubdiv: Support shadeless shading 2015-08-03 20:18:33 +02:00
c2dc6aa946 OpenSubdiv: Smooth shading became broken in recent commit 2015-08-03 19:47:40 +02:00
9b51a9e885 Sculpt: Fix tiling with brushes that use a locked plane
Patch by Tilman Blumhagen, thanks!
2015-08-03 19:41:34 +02:00
2411027a79 Multires sculpting drawing optimization:
Use OpenGL 3.2 extension ARB_draw_elements_base_vertex, which allows us
to add offset in index buffer indices automatically. This should reduce
the number of draw calls significantly.

We may have some errors on the Mac with VBO setting off.
OSX OpenGL extensions don't play well with vertex arrays.
Will test that more later.

We might also use a full element buffer here, like we do when hiding
some quads, but this approach keeps the memory savings intended
originally.
2015-08-03 19:09:21 +02:00
b9f6757cdb Viewport: always draw the voxel along the grid, not just when using
adaptive domain.
2015-08-03 18:29:28 +02:00
7667ad2d4e OpenSubdiv: Made it a modifier option to enable OSD for viewport
The idea of this commit is to make it so we can enable OpenSubdiv by default
for the release builds but keep it limited to the viewport only for a specific
meshes. This is a temporary solution for until all the needed features are
supported on the OpenSubdiv side.

Flag itself is done as a dedicated field in modifier DNA so we can easily
remove it in the future without ending up with some temporary flag hanging
around forever.
2015-08-03 17:51:18 +02:00
89dc5469d5 Cleanup: make API a bit more consistent. 2015-08-03 17:47:40 +02:00
e90fea72c1 Fix T45654 fast navigate artifacts.
Was overdrawing the buffer, in case of fast drawing just use one
draw call. Should also make performance quite smoother.

Note:
Just discovered we are doing one draw call - per grid - in multires
apparently to keep reusing the same element buffer.
This is horribly, dreadfully slow and will check about fixing it later.
2015-08-03 17:47:03 +02:00
e5f7b0f330 OpenSubdiv: Avoid crashes when GPU subsurf is tried to be used on CPU
The issue was caused by CCG code being confused by number of geometry returned
by utility functions in the case of the skipped grids.

Made it so that code is always only working with CCG data and handled drawing
code in a bit special way now.

This solves such crashes as i.e. snapping.
2015-08-03 16:44:46 +02:00
fb7fd2fcea Merge branch 'master' into openvdb 2015-08-03 16:42:20 +02:00
23627f717d Add an operator to free the cache and delete the cached files. 2015-08-03 16:35:26 +02:00
36ea543f82 Also disable checkboxes in panel headers when the simulation was cached. 2015-08-03 16:11:58 +02:00
4a0f3bece3 OpenSubdiv: Make new geometry relations ensures dependent data exists on CPU 2015-08-03 16:04:33 +02:00
7cfb05dcb0 OpenSubdiv: Resolve crashes when other object depends on subsurf-ed object
Cases like using subsurfed object as a boolean operand can't be evaluated
on GPU and needs to have all the CCG on CPU.

This commit resolves existing configuration to survive, but new configurations
would need to have some sort of forced object update so all the data is being
moved on CPU if it was previously on GPU.
2015-08-03 15:57:22 +02:00
09aef78229 Fix for previous commit not taking into account the possibility that there is no cache. 2015-08-03 15:45:31 +02:00
af730061f2 Disable UI is there is cache, similar to what the pointcache is doing. 2015-08-03 15:30:48 +02:00
b4e1b7b18c OpenSubdiv: Remove workaround for simple subdivision mode
This case is now supposed to be supported by OpenSubdiv.
2015-08-03 15:30:25 +02:00
b26eb47961 OpenSubdiv: Corrections to GLSL version
Was own mistake in the last minute fixes, now matcaps should
work just fine.
2015-08-03 15:27:42 +02:00
9036fa6b2e Fix buffer overrun lofting nurbs 2015-08-03 23:18:09 +10:00
1d549530d8 Fix own mistake in curve refactor 2015-08-03 23:06:03 +10:00
86dd099619 Cleanup: remove dead code. 2015-08-03 15:00:02 +02:00
8d945bf3cb OpenSubdiv: More proper loop for UV map evaluation on CPU
This is just updating code from our side, actual evaluation is still
disabled because it doesn't support face farying data evaluation.
2015-08-03 14:50:31 +02:00
3a9897f8ce OpenSubdiv: Fix crash caused by applying subsurf on non-mesh object 2015-08-03 14:33:03 +02:00
3aa2dd74b5 OpenSubdiv: Correction to vert edge/face orientation code
non-manifold case didn't start ordering from the correct edge.
2015-08-03 14:27:34 +02:00
60c8cdf763 OpenSubdiv: Switch CPU evaluator to use uniform refinement
This way the result matches GPU viewport and becomes really close to out
legacy subsurf code.
2015-08-03 14:27:31 +02:00
4bf26fda97 OpenSubdiv: Mark non-manifold verts as sharp 2015-08-03 14:27:31 +02:00
11ad18c82a OpenSubdiv: Disable topology check happening from OpenSubdiv side
This check doesn't handle multiple non-manifolds cases which is rather
really annoying currently.
2015-08-03 14:27:31 +02:00
dd1e7f16ca OpenSubdiv: Work on better vert edge/face orientation code
Previous version of code didn't handle cases like hourglass connectivity
with loose edge. The new code is supposed to handle all this cases.
2015-08-03 14:27:31 +02:00
c2c4e02d41 Fix T45620: Coplanar faces w/ flipped normals not selected 2015-08-03 20:47:37 +10:00
1b8afac652 Cleanup: remove redundant normalize 2015-08-03 20:47:36 +10:00
Martijn Berger
230d93ad54 Fix bgl so that get-methods that take a string use strings instead of bgl buffer objects again 2015-08-03 12:20:08 +02:00
42d65ef5cc Add bool parser for PyArg_ParseTuple
Use for mathutils.bvhtree
2015-08-03 20:00:16 +10:00
0f690e2186 Fix T45625: Unpredictable grid fill
Detect when there are < 3 corners & automatically calculating the span isn't useful.
2015-08-03 17:44:50 +10:00
1dd4e933d8 Fix grid-fill offset option
Wasn't applied relative to the active vertex.
2015-08-03 16:14:22 +10:00
88d63905a8 Fix T45644: bpy.utils.smpte_from_frame drops frame
D1444 by @lichtwerk, with minor fix & docstring updates
2015-08-03 14:01:24 +10:00
00857bec52 Fix T45649: Adding Point Density Texture to World Color Crashes Blender.
Crash was caused by missing field in NodeShaderTexPointDensity.

Committed with @dingto blessings.
2015-08-02 23:46:38 +02:00
df67565ae0 User feedback: merge pointcache and openvdb cache panel together so it's
easier to work with, and avoids potential issues between vdb and point
caches.

Also finally separate the pointcache and openvdb cache code for the
smokeModifier_process function.
2015-08-02 19:08:55 +02:00
024d59ca31 Merge branch 'master' into openvdb 2015-08-02 17:16:41 +02:00
Julian Eisel
e896f4e77d Use auto-offset after adding node from search menu as well 2015-08-02 15:42:16 +02:00
93d1acfb5c correct ifdef 2015-08-02 23:36:42 +10:00
4cf92c4831 Aduaspace: fixing playback in the game engine. 2015-08-02 11:27:02 +02:00
559e1434d8 parenthisize macro args to avoid errors 2015-08-02 13:54:06 +10:00
a4f55617d1 Cleanup: quiet int overflow warnings 2015-08-02 12:53:12 +10:00
Julian Eisel
3b4a8f1cfa Fix VSE showing FPS during scrubbing
Was intended to be disabled in rBa3b86611a8182, but disabled 3D View FPS drawing instead of VSE drawing. Triple checked but 3D View doesn't draw FPS now, so everything seems fine now.

Note: To recreate this you had to play animation once before scrubbing.
2015-08-02 00:10:52 +02:00
Julian Eisel
2ec0d53034 Fix VSE not able to playback after scrubbing (and a couple of crashes)
After scrubbing, Blender kept thinking an animation is played (see animation "Play" button), even after mouse release. This resulted in a couple of crashes, e.g. by pressing Alt+a and then Esc.

(Also minor cleanup)
2015-08-01 23:59:39 +02:00
Julian Eisel
a3c5de3e3c Use Auto-offset for move_detach_links (alt+D) operator too 2015-08-01 21:01:14 +02:00
Julian Eisel
6098e48d0c Correction to previous commit, git messed up icon binaries :/ 2015-08-01 18:35:42 +02:00
Julian Eisel
47bc66fc8d Note Editor: Auto-offset nodes on insertion
Implements "Auto-offset" (called "insert offset" in code) feature for Node Editor, developed during and after LSOC :)
Idea and sponsoring by Sebastian König, blendFX, Mathias Eimann, Mikavaa, Knick Design

When you drop a node with at least one input and one output socket onto a an existing connection between two nodes, Auto-offset will, depending on the direction setting, automatically and animated move the left or right and all of its following nodes away to make room for the new node.
The direction for offsetting can be toggled while you are moving the node by pressing „T“.

The auto-offset is enabled by default but can be disabled in the header of the node-editor. The offset margin can be changed in the editing section of the User Preferences.

Thanks a lot to the sponsors, and especially to Sebastian who helped *a lot* with this. That's how users can help developing Blender!
2015-08-01 17:56:44 +02:00
Julian Eisel
31bf82c17d Node Editor: A bunch of new utility functions
Needed for node insert offset (Auto-offset in UI), but kept separate so people notice it without having to check insert offset commit (not for commit ratio of course ;) )
2015-08-01 17:23:32 +02:00
Julian Eisel
fa1945c9e5 Allow accessing modal keymap strings directly from keymap
Previously you had to pass operator which in some cases might not be available or hard to get.
2015-08-01 13:01:30 +02:00
2904007d31 Docs: Python API, minor edits to download link 2015-08-01 20:10:25 +10:00
e31f8e756f Fix T45582: Connect vertex hangs
With multiple branches it was possible the search could run for a long time,
especially when there was no possible path to the target.

Now use a heap to keep track of the best path and finish immediately once its reached.
2015-08-01 19:04:09 +10:00
0e9051fbfe BMesh connect pair, fallback to identity matrix
For overlapping vertices, a matrix for the operation can't be calculated.
2015-08-01 15:11:45 +10:00
d894fcb799 Replace checks for tessface w/ polygons
In these cases we're only checking the mesh has faces.
2015-08-01 14:42:14 +10:00
c851d1d045 Missed when updating effects to looptri 2015-08-01 14:37:20 +10:00
c4b2bef163 Remove MFace use w/ cloth 2015-08-01 14:13:59 +10:00
49f88326af Docs: doxy cleanup/minor edits 2015-08-01 12:37:52 +10:00
1c626f823d Complete fix for T45618
Two issues here, normal update was not happening due to own sillyness in
viewport refactor, also normal update code still used triangles.
Now reused Campbell's poly normal recalculation code.
2015-07-31 22:52:37 +02:00
Dalai Felinto
527ee3f1f1 Fix T45632: motion blur (2d filter) not working - in OSX at least
This regression was introduced in Blende 2.73a when we went through a
ghost context refactoring :(
2015-07-31 16:45:05 -03:00
03f00eb91d Docs: doxy corrections 2015-07-31 23:44:37 +10:00
12b7850d4f Cycles: Fix for transmissive microfacet sampling
This is an alternate fix for T40964 which resolves bad handling of
caustics reported in T45609.

There were too much transmission rays being discarded by the original
fix, which caused by caustic light being totally disabled. There is
still some room for investigation why exactly original paper didn't
work that well, could be caused by the way how the pdf is calculated.

In any case current results seems rather correct now.
2015-07-31 13:46:58 +02:00
55fead4767 Use polygon normals for sculpt drawing
Wasn't working correctly since using MLoopTri,
this is improved over 2.75 which only handled tris & quads.
2015-07-31 21:04:23 +10:00
31fe49626f Remove MFace use w/ softbody 2015-07-31 19:17:39 +10:00
63215aea6f Use looptri's for softbody face collision 2015-07-31 19:01:51 +10:00
70f8b5b1ff Don't calculate tessface before sculpting 2015-07-31 16:19:58 +10:00
7575dbaf2a Docs: MLoopTri info and example usage 2015-07-31 15:41:07 +10:00
c582e186d9 Replace MFace w/ vert-tri's for collision modifier
Note that the collision modifier doesn't have any use for Loop indices,
so to avoid duplicating the loop array too,
MVertTri has been added which simply stores vertex indices (runtime only).
2015-07-31 14:00:07 +10:00
6b7313be94 Don't initialize CDDM with MFace from Meshes
Caused crash because MFace is no longer a layer which is added unless requested,
causing CDDM to have numTessFaceData nonzero, but mface set to NULL.
2015-07-31 11:57:50 +10:00
4d4c3b36a7 Cleanup: Remove unused variable in PathState. 2015-07-30 21:07:37 +02:00
2ec00ea0c1 Move tangents and baking to looptris:
Notes:

* Code in rendering and in game engine will still convert
tangents to a tessface representation. Added code that
takes care of tangent layer only, might be removed
when BGE and rendering goes full mlooptri mode.

* Baking should work discovered some dead code while
I was working on the patch, also tangents are broken
when baking from multires (also in master), but those
are separate issues that can be fixed later.

This should fix T45491 as well
2015-07-30 14:43:58 +02:00
9d335d29c7 CustomData: quiet error on 0 element copy 2015-07-30 22:14:59 +10:00
2ae67de944 Fix T45577 tiled sculpting not working with brushes requiring a sculpt
plane.

Make sure sculpt plane is recalculated for every tiled dab.

Note this is not the optimum thing to do, we could cache the original
sculpt plane and reuse that, but this would require us to rearrange the
logic of tiled sculpting somewhat. This can be a TODO, but for now this
will fix the issue.
2015-07-30 14:10:54 +02:00
820d191626 OpenSubdiv: Add CMake option to enable -Werror in subsurf code 2015-07-30 10:31:22 +02:00
5c7cdfcb42 OpenSubdiv: Remove debug-only leftover 2015-07-30 10:22:31 +02:00
7b8230898e Cleanup: safe-free macro for collision modifier 2015-07-30 15:44:03 +10:00
5fabcd099b Use looptri for smoke bvhtree
Missed from D1424
2015-07-30 14:52:55 +10:00
75e387d6c5 error reordering args 2015-07-30 09:58:00 +10:00
4737b12462 Cycles: Fix issue in closure merge function.
* Did not check data2, this partially fixes T45583.
* Initialize data2 in some closures to avoid potential problems.

Differential Revision: https://developer.blender.org/D1436
2015-07-29 22:04:36 +02:00
d49703b298 Fix SCons path issue on Windows. 2015-07-29 21:48:24 +02:00
7380166db2 OpenSubdiv: Workaround for vertices which are adjacent to several manifold islands 2015-07-29 18:41:05 +02:00
26c1ae81be OpenSubdiv: Proper detection of crease changes 2015-07-29 18:05:29 +02:00
48c2f7b288 OpenSubdiv: Some debug-only code sneaked into previous commit 2015-07-29 17:43:43 +02:00
51c1927ccb OpenSubdiv: Make topology orientation optional 2015-07-29 17:41:57 +02:00
717a303a18 OpenSubdiv: Fixes for crease in non-manifold meshes
Basically non-manifold edges are expected to be sharp by OpenSubdiv.

There\s still some work required, see the inlined comment.
2015-07-29 17:38:06 +02:00
ce5e62b78a OpenSubdiv: Typo fixes in comments 2015-07-29 17:13:15 +02:00
b8e2b8ae8a OpenSubdiv: Rework vert-edge and vert-face ordering
Now the code survives multiple non-manifolds happening on the vert.

Still not totally optimal but at least gives much better mesh support.
2015-07-29 17:13:15 +02:00
af6bbab5b4 OpenSubdiv: Fix for weirdly ordered lines 2015-07-29 17:13:15 +02:00
becf20e29f Fix T45605 crash with editmode selection on solidify modifier.
Looks like derivedmesh draw code always assumed a mesh is available.
Make sure that if we use a bmesh, a flag is used to control that.
2015-07-29 16:22:01 +02:00
30679179dd Audaspace: fixes for building with Quicktime on Mac. 2015-07-29 16:13:22 +02:00
a3b86611a8 Do not show fps while scrubbing. 2015-07-29 15:15:55 +02:00
cbf936a332 Gooseberry animation feature: Add toggle that disables modifiers on fcurves.
Feature is found as per channel option in graph editor.
2015-07-29 14:56:03 +02:00
ce1bc1838b Clean channels tool for Hwoozeberry.
Basically it's a clean keyframes tool, but also removes a channel if the
only remaining keyframe has the default value only and is not used by
drivers or generative modifiers.

It's was used to help with performance of keyframe-heavy scenes in
gooseberry.

Note, as always the curve left after the clean tool is used is not the
same as the original, so this tool is better used before doing custom
editing of fcurves and after initial keyframe insertion, to get rid
of any unwanted keyframes inserted while doing mass keyframe insertion
(by selecting all bones and pressing I for instance)
2015-07-29 14:45:50 +02:00
18af73e461 Add mathutils.bvhtree API
Originally D966 by @lukastoenne, with own additions

- trees can be initialized from Object's, BMesh,
  or passed in as vert+polygon arrays.
- original indices of ngons/faces are used. (instead of tessellated indices).
- ray_cast, find_nearest methods
- find overlapping faces between 2 trees
2015-07-29 21:24:12 +10:00
ba32d9d4cd Expose bvhtree_sphereray_tri_intersection for general use 2015-07-29 21:22:28 +10:00
8e9534a850 OpenSubdiv: Make empty meshes supported and not crashing 2015-07-29 13:10:19 +02:00
8b84c5f9de Port optimization from gooseberry branch:
Treat scrubbing as animation.

This is checked during various updates to avoid
some costly calculations.
2015-07-29 12:52:03 +02:00
18c0a15e1e Cleanup 2015-07-29 20:18:22 +10:00
90655d06d4 Math Lib: add isect_tri_tri_epsilon_v3 function 2015-07-29 20:11:54 +10:00
792d66527b Remove not really helpful debug print
If it's still considered useful please move it inside G.debug or ifdef code.
2015-07-29 12:01:41 +02:00
d4b5dd31a3 ImBuf: Fixes for openexr images
- Fixed crash loading multilayer EXR
- Fixed another memory leak loading multilayer EXR
2015-07-29 11:59:29 +02:00
32157d8d01 Triangulate wasn't clearing arena after each use 2015-07-29 12:01:55 +10:00
339915a962 Optimize PySequence_Fast usage
Access arrays directly, avoiding type-check every time.
2015-07-29 10:49:35 +10:00
96f08bf9a8 Fix leaks in mathutils PySequence_Fast usage 2015-07-29 10:49:35 +10:00
376e4c945e Fix leak in BPy_BMElem_PySeq_As_Array
Also add BPy_BMElem_PySeq_As_Array_FAST
2015-07-29 10:49:34 +10:00
d226a4ba6d Fix leak in PyC_AsArray
Would only happen when the list-length was an unexpected size.

Also add PyC_AsArray_FAST
2015-07-29 10:49:34 +10:00
31cb14f5de Cleanup: check exact error w/ mathutils functions 2015-07-29 10:49:34 +10:00
cff71fee21 Cleanup: style 2015-07-29 10:49:34 +10:00
Dalai Felinto
c6688aeddd Fix build with Quicktime after Audaspace update 2015-07-28 21:48:13 -03:00
335c3013f4 Sequencer: Disable Refresh Sequencer button while rendering
This code is not thread-safe and there's no easy way to synchronize
render and viewport threads for this operation, so for until we've
got some nicer solution we just disable dangerous buttons.
2015-07-28 18:28:35 +02:00
79a51f0839 cdderivedmesh: don't prepare a normal buffer when selecting, even
if we skip creating the selection color layer.
2015-07-28 18:24:21 +02:00
1e6e3dcbd7 Fix T45529: Texture Compositor node composition artifact (random pixels)
The issue was caused by the non-threaded texture API used by the node.
While the node itself is single threaded there might be texture nodes
in different execution groups running in parallel.
2015-07-28 17:56:04 +02:00
20c5c5e14b Audaspace: fixing a memory access violation in the audio device list. 2015-07-28 17:40:36 +02:00
a6b2650c7d Cycles: Correction to image extension type commits
Clipping wasn't working totally correct, need to check original coordinates,
not the integer ones,

Now CPU gives the same exact results for both SVM and OSL, CUDA is still doing
something crazy with edges.
2015-07-28 16:31:27 +02:00
971affb436 Fix T45590: Some more missing glsl functions
Also SSS node was using wrong Normal input index.
2015-07-28 15:57:14 +02:00
a7b4e8a75c Merge branch 'master' into openvdb 2015-07-28 15:48:46 +02:00
be047fe455 Audaspace: building without audaspace.
- Fixed building without for cmake.
- Scons can now build without audaspace too.
2015-07-28 14:53:06 +02:00
f29625922f Cycles: Expose Clip image extension type
This type causes pixels outside of 0..1 coordinate range to become transparent.
2015-07-28 14:39:53 +02:00
4690281b17 Cycles: Add implementation of clip extension mode
For now there's no OpenCL support, it'll come later.
2015-07-28 14:36:08 +02:00
3fba620858 Cycles: Prepare for more image extension types support
Basically just replace boolean periodic flag with extension type enum in the
device API.
2015-07-28 14:14:24 +02:00
29ebb56f4d Audaspace: support the device list returned by the new audaspace library.
- use the device names returned from the library.
- system settings UI changed as new audaspace might contain longer and more device names.
2015-07-28 14:01:53 +02:00
a0cbebf404 Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.
2015-07-28 14:01:53 +02:00
58956f3b91 Audaspace: fix the new wm_playanim.c (from gooseberry branch) to use the new API. 2015-07-28 14:01:52 +02:00
f700c1f3a8 Audaspace: name fixes and external library update. 2015-07-28 14:01:52 +02:00
009bb9e5c9 Audaspace: adapt internal C-API naming to external audaspace library. 2015-07-28 14:01:52 +02:00
8528d76dad Audaspace: external audaspace library update. 2015-07-28 14:01:52 +02:00
733073550f Audaspace: use standalone library.
- Added the cmake configuration option WITH_EXTERNAL_AUDASPACE.
- Fixes to build without standalone library as well.
2015-07-28 14:01:52 +02:00
96dd213e7e Audaspace: preparing to use standalone library.
- Renamed some functions.
- Using C API instead of C++ in the game engine, as the standalone is C++11.
2015-07-28 14:01:52 +02:00
d3acfa1d87 BGE: Navmesh fixes and improvements
The navigation mesh functionality was broken for quite a while. This patch
contains fixes: recalculating tesselations before getting the number of
tesselation faces (it otherwise returned 0) before calculating the navmesh,
and calling `DM_ensure_tessface()` on the navmesh's `DerivedMesh` object
(which fixes visualisation in Blender). This allows one to create a new
navmesh, which also works in the BGE.

Furthermore, the patch adds several return values, and shows more error
messages when things go wrong. In several places in the navmesh creation
code, return codes weren't checked and errors silently ignored.

Reviewers: nicks, brita_, campbellbarton, lordloki, moguri, panzergame

Reviewed By: panzergame

Differential Revision: https://developer.blender.org/D1435
2015-07-28 13:54:41 +02:00
038d6ce2cc Cycles: Correction to image extension setting commit
Technically it was all wrong and it should have been called Extend instead
of Clip. Got confused by the naming in different libraries.

More options are still to come.
2015-07-28 13:41:09 +02:00
c6396d9204 Fix for file unpack checking existing files
Wasn't expanding the path '//' before checking the path on-disk.
2015-07-28 21:35:35 +10:00
cd324654b0 Fix T45581: GPU failed to find function node_bsdf_refraction
This commit fixes shader tree compilation, but the shading result wouldn't be
doing actual refraction because it's a bit involved change which isn't really
considered a bug for now. There are more closures which are falling back to
diffuse BSDF currently.
2015-07-28 11:17:18 +02:00
ad7e3c302e CMake: modify recent platform defaults
Now only disable Jack and NDof on OSX

Also comment main block for platform checks
2015-07-28 17:58:47 +10:00
33bac1f401 CMake: use same defaults on all-platforms
Previously Linux had disabled libs that were enabled on other platforms.
Use a reduced feature set on all, since libs such as Jack & OSL aren't totally reliable on Win/OSX.

Keep 'option_defaults_init' since platform maintainers may want to adjust later.
2015-07-28 14:48:12 +10:00
6df3e3a959 Jpeg2000: Fixed for DCP pipeline
Profile and color space were not properly set.
2015-07-27 22:35:24 +02:00
2b632dd8c2 BGE: Fix T37074: GLSL max texture units limit
Actually for the the amount of GLSL textures units is limited by the amount of multitexture units (GL_MAX_TEXTURE_UNITS_ARB).
Most of the Nvidia graphic cards supports only 4 multitexture units, so Nvidia users can not use more then 4 GLSL textures for a custom shader.
This patch removes this limitation by using GL_MAX_TEXTURE_IMAGE_UNITS_ARB if GLSL is supported, but still limit the amount to the maximum texture limit of 8.

Reviewers: lordloki, agoose77, danielstokes, panzergame, sybren, moguri

Reviewed By: panzergame, sybren, moguri

Projects: #game_engine, #game_rendering

Maniphest Tasks: T37074

Differential Revision: https://developer.blender.org/D1389
2015-07-27 20:34:13 +02:00
7973363e34 Cycles: Final-ish tweaks for 32bit cubin compilation 2015-07-27 16:55:50 +02:00
40a866dad4 Doc fix: wolrd -> world
The documentation for bge.types.KX_WorldInfo had two typos.
2015-07-27 15:53:15 +02:00
168bb36bc9 Buildbot: Include branch name to the cmake builds 2015-07-27 14:21:20 +02:00
61e4800b45 Cycles: One more attempt to fix compilation of 32bit CUDA kernels 2015-07-27 14:18:20 +02:00
79ffa03620 Compositor: Add note that bilateral blur is not really correct
The code does stupid box filter which doesn't give nice results and doesn't
match old compositor at all. Need some better gaussian weighting here. Will
look into it later.
2015-07-27 14:15:50 +02:00
c61e4f2683 Don't allocate MFace's by default
This removes CD_MASK_MFACE from CD_MASK_BAREMESH, CD_MASK_DERIVEDMESH and others.

Callers that need it must explicitly add it to their data-masks.
2015-07-27 21:47:41 +10:00
67fe5726af Use loop data instead of face data
Replace checks in various places
2015-07-27 21:47:40 +10:00
15676bcc85 Error in looptri update, was checking wrong layer-type 2015-07-27 21:47:40 +10:00
76beb7b7d4 BGE: Fix T19241: draw debug shape with overlay/background scene.
It's for the function render.drawLine and physics debug.
2015-07-27 13:49:06 +02:00
ba146899c8 Image painting 2D:
Deprecate wrap (BRUSH_TORUS) option, we now have paint flags for tiling
and we can reuse those. Also allows seperate tiling in X/Y
direction for 2D painting now.

Only one tiling is allowed for now.

Options can be found in new "Tiling" panel under the tools tab.

For version patching, we just turn off brush wrapping,
to allow reuse of the flag in the future.
New option is paint mode wide instead of per brush so
a brush having the old wrap option will not enable it
for the whole mode in the version patch.
2015-07-27 12:55:57 +02:00
e355d557f8 CPack: Use hash of the head for the file name
Upstream is not always configured ad might give empty results.

Ideally we need to re-use the same code as we use for buildinfo,
but it's also a bit of a question which exact hash we want to put
to the name by default.
2015-07-27 12:20:16 +02:00
ce092a58a2 Buildbot: Missed this in the previous commit 2015-07-27 11:49:05 +02:00
e5d7cbd191 Buildbot: Attempt to make windows cmake builds names matching buldbot's names
Did this in packaging buildbot rule because of several reasons:

- CMake doesn't deliver name of package which we expect it to be for buildbot
- CMake doesn't really know that building happens for buildbot
- Making default CPAck name matching buildbot's naming is kinda stupid

Probably we can pass CPack name via command line arguments, but i'm happy with
the current state and one might change things in the future.
2015-07-27 11:17:57 +02:00
20ec508ca3 Replace MFace with MLoopTri in laplacian_deform 2015-07-27 18:03:09 +10:00
b74fa38581 Missed last commit 2015-07-27 16:46:12 +10:00
e48c4d73d3 Replace MFace with looptri for dynamicpaint
D1429 by @lichtwerk, with edits
2015-07-27 16:01:56 +10:00
cdf2dbeb1f Cleanup: deprecate some G.fileflags comment others 2015-07-27 10:55:19 +10:00
2fe7e60633 Fix T45563: Crash rendering hair dupli's 2015-07-27 10:04:20 +10:00
Martijn Berger
27a20c2c60 Make cmake windows 32 bit buildbot use the 120xp toolkit, restoring
windows XP compatibility

Fixes T45559
2015-07-26 21:14:24 +02:00
fb7281fb6a Fix T26141: render setting affects only first scene. 2015-07-26 18:01:56 +02:00
c27a1cfd63 Fix bug in particle API accessing the emitter 2015-07-26 12:22:23 +10:00
Julian Eisel
88ebffec96 Fix T45510: Animation channel textbox field to small
It now takes (almost) the whole available width of the region. Icons on the right hand side are hidden during text input now, they can't be used then anyway. Using this space for the text input button makes more sense.
2015-07-26 02:12:16 +02:00
Julian Eisel
1fab327fdf Fix T45562: Crashing pre 2.5 file with grid subdivisions set to 0
Seems like the original version patch for this wasn't made correctly.
2015-07-26 00:18:44 +02:00
8fa1da9213 minor cleanup, reuse existing variable 2015-07-25 22:32:55 +02:00
f1f4a16eab Convert CCGSubsurf VBO system to also sort hidden and visible faces.
It's not actually used during drawing though.
2015-07-25 22:02:43 +02:00
53f6a31c4d GPU Buffers:
This commit begins implementation of the idea about hidden face
separation outlined in

http://code.blender.org/2015/06/optimizing-blenders-real-time-mesh-

We split hidden and visible faces to different parts of the triangle
buffer.
Mapped drawing will now skip iterating through hidden polys.
Of course the final target, when all derived mesh types use
VBO sorting, is to skip checking for hide flag per face
completely. All faces will be pre-sorted anyway and we'll
be able to draw them with one draw call.
2015-07-25 20:00:49 +02:00
17e3f905e1 Style cleanup + fix sign on previous commit. 2015-07-25 18:02:07 +02:00
a6b1e281eb Cleanup - we don't need a bogus enable material function, just pass
NULL.

All derivedmesh types check if we have an enable function, we can get
rid of this.
2015-07-25 17:18:45 +02:00
e2652bc5ad Fix tile feature not working outside mesh boundaries.
We need to generate strokes up to a brush radius around the bounding
box.
2015-07-25 16:21:09 +02:00
5878050a4b Fix T45515, dynamic paint not displaying colors correctly.
Looptri refactor artifact
2015-07-25 16:16:37 +02:00
50a46a5973 GPU buffer materials:
Separate and reuse some shared code.

Also avoid counting for information we already know,
such as total loop triangles etc.
2015-07-25 14:42:26 +02:00
38e19536bf Fix compile warning in 04b369 2015-07-25 14:00:46 +02:00
04b3694d93 BGE: Fix T35454: Soft body joints crash.
Constraint on soft bodies are special and return 0 as constraint id.
So we have to check that the id is not 0 in function setParam, getParam, getAppliedImpulse and removeConstraint.
2015-07-25 13:50:15 +02:00
221aee7ecd BGE: Fix T45278 sleeping deactivation with overlay scene.
this commit fix also angular and linear threshold sleeping value update via bge.constraints.
2015-07-25 13:09:01 +02:00
9ff869e4fb Fix T45555 crash with subsurf edge drawing.
Loose edge count was double. It didn't fail on own
tests because they had a small number of loose edges,
but for bigger meshes it hit garbage indices at draw time
and crashed.

Also cleaned up the code to make it less verbose and easier to
understand how indices are counted.

Hope it's the last edge-related fix (fingers crossed)
2015-07-25 12:51:35 +02:00
9dc0fed877 Fix grease pencil selection
When zoomed in could int overflow and select the wrong vertex.

also correct clipping check.
2015-07-25 20:36:12 +10:00
8cd14d421e Fix T45553: Object parent_type 'ARMATURE' disappeared in Blender 2.75.
Own stupid mistake in rBb318795c3b3d (ideally we should really not have that kind of ugly hacks :/ ).
2015-07-25 10:39:04 +02:00
9939c18900 BGE: Fix T35288 Touch/Ray/Mouse sensor and Constraint actuator with material check doesn't work.
Now we look at all materials instead of the first. So m_auxilary_info is useless and removed.
2015-07-25 09:43:06 +02:00
e301cf3ec2 Cleanup: double-promotion warnings 2015-07-25 13:26:20 +10:00
2a286829f7 Correct check for angle-rake stroke 2015-07-25 13:07:05 +10:00
e4b716a03f Cleanup: warnings, style 2015-07-25 07:44:25 +10:00
5acce60d37 Compositor: Fixes for the debug pass
This commit fixes issues with wrong socket type being added to the Cycles debug
pass compositor operation, which lead to crashes with non-value pass types.

This commit also reverts socket renaming thing because while it's was behaving
ok on runtime file reload might have loose the links which is annoying.
2015-07-24 23:05:11 +02:00
7c5c7b5ef6 Fix T45537: cycles bake crashes with motionblur on
The crash was due to baking with motion blur but without a camera.

Reviewed by Brecht.
2015-07-24 21:18:17 +02:00
75f8f1907a Experiment with setting proper socket name for debug pass 2015-07-24 18:41:54 +02:00
33bd2c1597 Deduplicate some logic around debug passes 2015-07-24 17:45:14 +02:00
68a9d80739 Compositor: Make it work for debug passes other than float 2015-07-24 17:16:29 +02:00
d2fac7df32 BGE: Fix T45544 Adding Armatures takes an increasing amount of logic time
Armatures were not totaly freed (only the armature object not the armature) and the original armature user count was not decrease after replication.
2015-07-24 17:08:55 +02:00
dc80ff9b56 Fix T45541 crash when mixing flat and smooth shaded faces in sculpt
mode.

Issue from looptri merge.
2015-07-24 16:28:38 +02:00
a028575c4a Compositor: Allow using debug pass output in the compositor
Currently only works correct with single float output, RGBA and vector are not
supported so if one need to use this passes he'll need to wait a bit still.

It is coming, don't worry.
2015-07-24 15:39:09 +02:00
54e6413d67 Make it easier to create debug passes with more than 1 channel 2015-07-24 15:39:09 +02:00
6322867e54 Cycles: Don't explicitly add debug passes, this is now handled via RNA 2015-07-24 15:39:09 +02:00
eff1b54362 Fix subsurf edge drawing when more than one loose edge vert exists 2015-07-24 14:39:52 +02:00
b55ed89b66 Fix yet another issue caused by my recent changes. 2015-07-24 14:32:11 +02:00
2dce6dccbb Fix out of bounds memory access when copying loose vertices in cddm
Caused by own fix for too much allocated memory not taking all code
into account.
2015-07-24 12:24:57 +02:00
95f698f840 Adjust CMake platform dependant release options 2015-07-24 19:39:36 +10:00
d6ebf72f9f Fix for building with OpenSubdiv 2015-07-24 17:11:50 +10:00
dc6153453a Cleanup: comments (remove outdated & update) 2015-07-24 16:59:39 +10:00
7f32601159 PyAPI: update bgl to OpenGL 3.3
Adds (currently unused) deprecated option
so we can remove support for older API versions.
2015-07-24 16:48:40 +10:00
07fa1b49d9 parenthisize macro args to avoid errors 2015-07-24 15:53:52 +10:00
8d237503c5 Compile Fix: setenv() is not defined for mingw either 2015-07-24 15:08:43 +12:00
20d516dc35 Fix: Autokeying of buttons doesn't work on NLA Strip properties 2015-07-24 14:20:16 +12:00
15cb94c65a Fix: NLA Strip properties cannot be keyframed if Visual Keying/Only Needed options are enabled 2015-07-24 14:20:15 +12:00
ea3dae74d8 Cleanup: remove redundant __doc__ from bgl 2015-07-24 09:45:25 +10:00
3b362950e9 Cleanup: move defines inside bgl C source
- remove number-of-args arg from BGL_Wrap.
- use doxy groups.
2015-07-24 09:35:39 +10:00
b8481f4683 Minor cleanup - use integers for counters. 2015-07-23 23:21:19 +02:00
0c0db92d7a Sculpt Tiling Feature
Adds 3D-Tiling options to the sculpt tool. This is very similar to the
symmetry options in the sense that it replicates the strokes. For tiling
this replication happens with a linear offset to fill the whole object
along one or more axis.
This allows to create geometry that can be tiled seamless. One use case
is the creation of tileable textures by sculpting high resolution
geometry and then rendering it with an orthographic camera to create
maps for diffuse, normal, etc

Notes:

Patch by Tilman Blumhagen with minor changes (move tile flags to paint
symmetry flags).

After some feedback from artists, leaving tiling value to constant
offset, though I suspect that some method that uses the object
bounding box dynamically might be good to have too. It can
be added later though :)

Thanks a lot for the patch!

Patch: D1426
2015-07-23 22:52:27 +02:00
36630b7e85 Fix memory leaks mesh w/ mesh remapping 2015-07-24 05:04:33 +10:00
d47e565598 Subsurf: Optimize edge drawing, now it uses VBOs.
Also the refactor exposed an error where we requested too much
memory from the video memory in general for all mesh types.

Now we are back to normal :)
2015-07-23 20:02:57 +02:00
b3ac7c07ff Added NlaStrip.fcurves.find(data_path, array_index=0)
This is the same as D1427 / 89e5c75666
except for NlaStrip.fcurves instead of Action.fcurves. It makes finding
a specific fcurve in Python much easier, as you don't need a Python-side
loop any more.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1430
2015-07-23 15:38:25 +02:00
0e2bbd0904 Freestyle: Fix for round/square stroke caps causing line thinning.
This is a regression introduced in rBce729677db3e and rBb408d8af31c9.

RoundCapShader and SquareCapsShader had to remove (almost) overlapping
stroke vertices to avoid sudden thinning of line thickness.  For instance,
the test .blend file from https://developer.blender.org/T36425#231460
suffered from the reported line thinning (although T36425 was originally
caused by a different bug).
2015-07-23 20:29:23 +09:00
2ee0301554 Merge branch 'master' into openvdb 2015-07-23 11:31:40 +02:00
6ee2f79f33 Cycles: Previous commit broke compilation on Windows
Apparently MSVC doesn't have setenv() function.
2015-07-23 12:53:23 +05:00
1788293a01 Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card
Previous fix didn't work well enough because on Windows Python has different
environment than Blender ans setting variables in there made no effect from
Blender point of view.
2015-07-23 12:10:38 +02:00
cc5d48e8dd Use looptri for sampling UV's in smoke.c
D1424 by @scorpion81
2015-07-23 20:08:26 +10:00
253f416a36 Fix regression of custom nodes not triggering material preview re-render
Issue was introduced in b0df196.It's not the nicest ever solution but it's
quite close to be as nice as we can do it with current custom nodes and
notifier system design.
2015-07-23 11:50:13 +02:00
08fbc303e1 Cycles: Resolve compilation error of avx2 kernel with certain compilers
It was redefined macro happening with Clang 3.6 here.
2015-07-23 11:48:54 +02:00
4be7fb7651 ImBuf: Fix OpenExr leaking memory when reading file with IB_test flag 2015-07-23 09:11:26 +02:00
b6cf4f777d Use looptri for smoke collisions & particle edit 2015-07-23 17:07:14 +10:00
5c98848895 Use looptri for RNA BVH functions 2015-07-23 15:40:47 +10:00
6aabc1bde4 Cleanup; duplicate header 2015-07-23 15:40:47 +10:00
0a249f9853 Cleanup: arg names 2015-07-23 15:17:26 +10:00
abbd82a504 Use looptri for mesh remapping 2015-07-23 15:10:12 +10:00
8155d25d39 Utility function to get poly -> looptri mapping 2015-07-23 15:08:27 +10:00
60822ec183 Use looptri for BVH raycast (simple cases) 2015-07-23 14:41:09 +10:00
717046ad2a Use looptri for volume snapping 2015-07-23 14:41:09 +10:00
748899a50a Missed adding BVH callbacks in recent commit 2015-07-23 14:41:09 +10:00
0bf2b207e2 Add missing break checking for tangents 2015-07-23 11:51:03 +10:00
368bd34573 Mesh Deform: support for ngons when binding
Weights were calculated using tessellation data, giving slightly uneven weighting.
Now only use tessellation for ray-cast but weight the influences from the original polygons.

Also cache arrays from derived-mesh, they we're called each intersection.
2015-07-23 11:30:47 +10:00
0b7d0f913d Fix weight painting + mask not drawing in latest master.
Same issue as vertex painting - though one might wonder if we really
need to set material on such occasions.
2015-07-22 16:58:18 +02:00
0795f62ddf GPU debug: Only flush stderr if needed. 2015-07-22 13:57:57 +02:00
5983280b4f Use looptri for MeshDeform modifier 2015-07-22 21:40:45 +10:00
b604d5ade0 Add bvhtree_from_mesh_looptri utility function 2015-07-22 21:40:45 +10:00
b305041ce6 Add DM_get_looptri_array utility function 2015-07-22 21:40:41 +10:00
a6f00bb75c Use doxy sections in bvhutils 2015-07-22 21:32:14 +10:00
df41f7bf4f Use const for BVH mesh arrays 2015-07-22 21:32:14 +10:00
f9a6780dc6 Cleanup: use struct for storing callback data 2015-07-22 21:32:14 +10:00
75d1723518 OpenSubdiv: Optimize speed of topology refiner construction
Now the conversion code uses mesh element mapping to speed up lookups.
Gives really nice speed improvement here, but the cost is higher memory
usage during refiner construction.

On the dragon scene here topology refiner construction time goes down
from 5 seconds to around 0.01.

It's possible to reduce the memory footprint by allocating mapping in
stages (don't allocate all of them at once, but do it on demand only
and free them after they're not needed anymore).
2015-07-22 12:51:10 +02:00
461340525e OpenSubdiv: Resolve crash when trying to do weight mcol 2015-07-22 12:01:38 +02:00
945f32e66d Fix crash with recent refactor of customdata writing.
Caused by own rBff3d535bc2a6309 - since we now only write the exact amount of layers
needed to store saved customdata, we have to adjust CustomData->maxlayer too.

Otherwise, on next read, customdata code believes it has more layers allocated than
actual number.

Issue reported by Campbell over IRC, thanks.
2015-07-22 11:58:18 +02:00
cf6002737d Don't make Python classes of StructRNA on startup
This gives small start time speedup, classes are lazy loaded instead.

Keep existing behavior in debug builds to catch any errors early.
2015-07-22 19:51:03 +10:00
3dd8f287e1 Render preview: Make preview render database lazily loaded
Gives about 5-10% of startup time improvement here.
2015-07-22 11:25:21 +02:00
ec8b7edf53 Fix: solved issue with "make doc_py"
The error was "ValueError: Function <function normal_at_I0D at 0x7f2aad1feb70>
has keyword-only arguments or annotations, use getfullargspec() API which can
support them", and was first seen in eeeb845d33
2015-07-22 10:31:31 +02:00
e3461a02ac Fix T43779: Cycles texture interpolation issues
That was basically not an issue with interpolation, but rather missing wrapping
options and periodic wrapping was always used.

It's still a bit questionable why certain graphics cards were doing clamping in
the file from the report, that's not something what is expected to happen from
the settings of textures being passed to GPU. In any case this issue i still
didn't manage to reproduce on any of the available GPUs, might be something
related on driver glitch or so.

In any case CPU now should behave just fine, rest of the issues we'll need to be
able to reproduce first.
2015-07-21 22:13:25 +02:00
f2c54df625 Cycles: Expose image image extension mapping to the image manager
Currently only two mappings are supported by API, which is Repeat (old behavior)
and new Clip behavior. Internally this extension is being converted to periodic
flag which was already supported but wasn't exposed.

There's no support for OpenCL yet because of the way how we pack images into a
single texture.

Those settings are not exposed to UI or anywhere else and there should be no
functional changes so far.
2015-07-21 21:58:19 +02:00
dc3563ff48 Cycles: Implement camera zoom motion blur
Works totally similar to camera motion blur and majority of the changes are
related on just passing extra arguments to sync() functions.

Couple of things still to look into:

- Motion pass will not include motion caused by the zoom.
- Only perspective cameras are supported currently.
- Motion is being interpolated on projected coordinates, which might give
  different results from constructing projection matrix from interpolated
  field of view.

  This could be good enough for us, but we need to consider improving this
  at some point.

Reviewers: juicyfruit, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D1383
2015-07-21 17:40:03 +02:00
1df42798d4 Try to remap buffer before rejecting.
I suspect code here can be cleaned up but for now try this.
Alternatively we can check for errors around buffer allocation
but this needs bigger changes.
2015-07-21 16:41:13 +02:00
89e5c75666 Added Action.fcurves.find(data_path, array_index=0)
Finding a specific F-Curve is often needed in Python, and usually
consists of a construct like:

```
 [fcurve
  for fcurve in ob.animation_data.action.fcurves
  if fcurve.data_path == "location"][1]
```

This can now be written as
`ob.animation_data.action.fcurves.find('location', 1)`

This new function `Action.fcurves.find()` is still O(N) in the number
of FCurves in the Action, but at least it allows us to remove
boiler-plate code. It is also faster than the Python equivalent, as
only the found F-Curve is converted to Python.

Reviewers: campbellbarton, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1427
2015-07-21 16:01:26 +02:00
e7fc8d98f5 Failure to alllocate vertex buffer would not fall back to vertex array
properly.

This should fix failure to use vertex arrays in OSX with high
polycounts.

Note this will not suffice as a fix when we move to VBOs exclusively
(GL 3+), we'll have to think of some way to separate huge meshes to many
VBOs.
2015-07-21 15:42:11 +02:00
78041fa14a Fix: fixed UI description of Action.new() function 2015-07-21 14:44:48 +02:00
9ae39a1312 Math Lib: use vector funcs for isect_line_line_v2_point 2015-07-21 21:49:29 +10:00
ff3d535bc2 Fix T45471: Blend file: Bad old_addr handling in mesh's customdata writing.
Issue is rather well explained in T45471: our current customdata writing code easily generates several different blocks in blend file with same 'old' address. This is bad, because those addresses are used as 'uid' during reading process (it kind of work in Blender's own reading process, by mere luck mostly, but breaks the file specs).

Solution (suggested by Campbell, thanks) implemented by this patch is to avoid duplicating everything, and instead just overwrite what we needs to skip some cdlayers on write:
* the CustomData's `totlayer` number;
* the CustomData's `layers` array of CustomDataLayer (keeping its original address using the `writestruct_at_address` helper).

New design allows us to get completely rid of the no_free flag stuff in `write_customdata()`.

Note that this implies written data is **not** directly valid from Blend PoV, since its written typemap does not match written layers (this is not an issue because typemap is rebuilt on read anyway - and it's easy to fix this if really needed).

Also, the backward compatibility saving of mface data remains an issue here, see comment in code.

Reviewers: sergey, campbellbarton

Projects: #bf_blender

Maniphest Tasks: T45471

Differential Revision: https://developer.blender.org/D1425
2015-07-21 12:02:11 +02:00
b91d64a3d1 Cycles: Another attempt to solve CUDA compilation errors on 32bit platforms 2015-07-21 11:42:59 +02:00
b0df19667f Fix T45317: Cycles material preview unnecessarily re-rendering
The issue was caused by wrong fix for T22741 which forced redraws on any window
event, like Expose. Use proper NV_WM | ND_UNDO listener instead,
2015-07-21 11:26:42 +02:00
b23c6c430f Fix assert in Outliner. 2015-07-21 10:43:22 +02:00
7ae44e8a30 Cycles: Workaround for sm_50 on 32bit platform
Basically this commit totally disables new SVN Voxel node, which solves some
of the compiler's issues.
2015-07-21 10:18:04 +02:00
23831b2161 Cleanup: style 2015-07-21 17:29:23 +10:00
ae00011956 Fix T45496: Crash loading file during preview
Regression from multi-view
2015-07-21 16:02:27 +10:00
9eb6dcbb46 Fix T45453: Driver button's ignore DPI 2015-07-21 15:30:34 +10:00
a48db0894a Fix T45363: Bone attrs ignore editing all selected 2015-07-21 15:22:32 +10:00
39cf1de33d Fix Clear vertex group ignoring selected option
Thanks to @chadf for spotting
2015-07-21 14:35:48 +10:00
9dc9f84740 Fix T45458: Edge Slide Mirror doesn't preserve UVs 2015-07-21 14:15:31 +10:00
5e1a8055f4 Fix T45361: Camera does not rotate in walk mode 2015-07-21 13:02:11 +10:00
3c911ff8a5 Fix T45450: Loop-select fails to cycle between overlapping edges 2015-07-21 12:27:41 +10:00
1d9fbdc9a0 Fix T45455: Select linked issue w/ hidden faces 2015-07-21 12:02:11 +10:00
1d02d34de9 Fix T45434: GPencil on editmode surface fails
Z-offset use for drawing & picking was problematic for extracting locations from depth values.

Use flag to optionally disable.
2015-07-21 11:12:39 +10:00
ef950d6937 Fix T45502: Crash showing thumbnails 2015-07-21 10:01:42 +10:00
2bfa950438 Cleanup: warning 2015-07-21 09:54:23 +10:00
b5f282b211 Remove nonnull attribute, NULL arg is valid here. 2015-07-21 09:41:48 +10:00
30772b6f09 SCons: Weirdly enough at some point scons became broken in OpenSubdiv branch 2015-07-20 22:43:13 +02:00
3d36489672 OpenSubdiv: Commit of OpenSubdiv integration into Blender
This commit contains all the remained parts needed for initial integration of
OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU
backends which works in the following way:

- When SubSurf modifier is the last in the modifiers stack then GPU pipeline
  of OpenSubdiv is used, making viewport performance as fast as possible.

  This also requires graphscard with GLSL 1.5 support. If this requirement is
  not met, then no GPU pipeline is used at all.

- If SubSurf is not a last modifier or if DerivesMesh is being evaluated for
  rendering then CPU limit evaluation API from OpenSubdiv is used. This only
  replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG
  structures exactly the same as they used to be for ages now.

This integration is fully covered with ifdef and not enabled by default
because there are several TODOs to be solved first:

- Face varying data interpolation is not really cleanly implemented for GPU
  in OpenSubdiv 3.0. It is also not implemented for limit evaluation API.

  This basically means we'll have really hard time supporting UVs.

- Limit evaluation only works with adaptivly subdivided meshes so far, which
  basically means all the points of CCG are pushed to the limit. This gives
  different result from old code.

- There are some serious optimizations possible on the topology refiner
  creation, which would speed up initial OpenSubdiv mesh creation.

- There are some hardcoded asumptions in the GPU and DerivedMesh areas which
  could be generalized.

  That's something where Antony and Campbell can help, making it so the code
  is structured in a way which is reusable by all planned viewport projects.

- There are also some workarounds in the dependency graph to make sure OpenGL
  buffers are only freed from the main thread.

Those who'll be wanting to make experiments with this code should grab dev
branch (NOT master) from

  https://github.com/Nazg-Gul/OpenSubdiv/tree/dev

There are some patches applied in there which we're working on on getting
into upstream.
2015-07-20 22:29:26 +02:00
2466c4f8ce OpenSubdiv: Add OpenSubdiv files which are related on the CCGSubSurf and GPU
Those files are still not in use (SCons will tyr to compile new CCGSubSurf files
but no code will be in use at all because those new files are fully wrapped by
ifdef WITH_OPENSUBDIV check).
2015-07-20 22:29:25 +02:00
a040157e5d OpenSubdiv: Add new OpenSubdiv related files
This includes C-API bindings in intern/opensubdiv and CMAke module
which finds the OpenSubdiv library. This filea are not in use so
far, making it a separate commit to make actual integration commit
more clear.
2015-07-20 22:29:25 +02:00
ccc3c2dbda CCGSubSurf: Split file into several smaller ones
This is a preparation commit for having OpenSubdiv integrated into Blender
and new layout is the following:

- CCGSubSurf.c contains implementation of common functions used by both
  legacy subdivisions code and by the new code in the future.

- CCGSubSurf_inline.h contains internal functions which are to be inlined
  due to the performance reasons. Those functions are only ment to be used
  bu CCGSubSurf* files.

- CCGSubSurf_intern.h contains declarations of private functions and data
  structures used by CCGSubSurf module.

- CCGSubSurf_legacy.c contains legacy implementation of subdivision algorithm.

- CCHSubSurf_util.c contains utility functions which are not directly related
  on the subdivision code (i.e. debug functions, hash implementation etc).

There should be no functional changes so far.
2015-07-20 22:29:25 +02:00
6190d75b5a Usual UI messages fixes. 2015-07-20 22:22:31 +02:00
a4a3d5650d Minor optimization in CustomData_update_typemap(). 2015-07-20 17:28:29 +02:00
66dd9fbf22 Fix (unreported) broken MixWeight modifier in debug builds.
defvert_find_index() & co now assert when '-1' invalid vgroup index is passed.
We used to rely on NULL value returned in this case, but with the assert...

The assert completely stalls blender actually (repeated for every vertex!).
So much better to not call that func when vgroup index is invalid.
2015-07-20 16:55:46 +02:00
9ee1f96a0f Fix (unreported) potential serious bug in CustomData_merge().
It was always only using the flags from the first source layer of a given type, not from
the layer actually being handled.

This was (probably) more or less harmless for the CD_FLAG_NOCOPY test,
but could be really bad when checking CD_FLAG_NOFREE, and when
copying the flags over to new copied data!
2015-07-20 16:25:01 +02:00
40d4da829c Fix/Workaround for CMake buildinfo error
Correcting the paths for buildinfo to point to the real header,
ended up breaking buildinfo (by not running every build).

It turns out we relied on the output _never_ existing,
so CMake generates a new buildinfo each time.
This is quite bad, but I didn't see a way for CMake to do this,
so explicitly point to a missing file and comment whats going on.
2015-07-20 23:27:56 +10:00
432d24f998 Fix recent own stupidity with indexed sculpt drawing. 2015-07-20 15:28:05 +02:00
ed3b19f46d Ugly hack to avoid GLEW context error printing when initializing GLX. 2015-07-20 14:56:36 +02:00
db38a65b02 Filter the debug callback to only report errors unless debug value is
20.

stderr was getting flooded with too many error messages, most of which
were not really relevant.
2015-07-20 14:46:11 +02:00
2e2164d5d4 Resolve compiler warning for clang 2015-07-20 22:31:19 +10:00
87328bde47 Fix T45218: Crash when trying to open System in the User preferences
Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card

The issue is basically caused by graphics card driver which crashes when
querying OpenCL platforms. This isn't something we can really solve from
the CLEW side, because opencl.dll does exist in old driver and even has
all the needed symbols, but first ever call to clGetPlatformIDs crashes.

While rest of the blender works fine with those older ATI/AMD cards it's
really needed to solve crashes of OpenCL device enumeration.

Solution here is to force disable OpenCL platforms if we've detected that
display card is using old ATI/AMD driver. It's not really proper solution
so it's done in the python side where it's easy to do tweaks. Reasoning
behind this change is:

- If one uses really old driver it's likely because it's the latest one
  he/she can ever to install (because of discontinued support from AMD).

- If old card is used it's likely to not have dedicated GPUs for rendering.

- Even if there's a dedicated GPU device enumeration is likely to crash
  because of attempt to query OpenCL from the old card.

There are still some tweaks needed likely, but this commit should make
some of the configurations to work.
2015-07-20 12:46:56 +02:00
bd28c25f9b Fix broken GLEW initialization. Initialize GLEW twice, once to get GLX
extensions, once to get final context extensions.

Not so nice because we get a warning on startup from GLEW, but at least
it GL extensions should work now.
2015-07-20 12:35:58 +02:00
5f25b91b65 Dyntopo should be supported on systems without VBOs now. 2015-07-20 12:18:39 +02:00
cb6fc9d141 Use abstraction to unbind buffers, should avoid crashes in systems that
don't support VBOs.

Exposed by initialization error in GLEW, which should be fixed
seperately.
2015-07-20 12:12:28 +02:00
422ffd252a Pixel format selection now favours a format with a number of samples
closer to the one requested on Windows.

Patch D1384 by Benoit Bolsee.
2015-07-20 10:59:30 +02:00
05ee9d2dd0 Minor edits for consistency 2015-07-20 17:07:40 +10:00
bf6ac302cd Correct own error w/ recent changes to triangulate 2015-07-20 16:12:30 +10:00
e3f86c6580 Replace MFace use by MLoopTri w/ heat-weighting
D1418 by @scorpion81 with edits
2015-07-20 14:42:48 +10:00
e5e9fbfaf0 Replace MFace use by MLoopTri w/ remash modifier
D1419 by @lichtwerk
2015-07-20 14:42:35 +10:00
86e6d6695e GHOST/X11: Support GLX-Context flags
GHOST_ContextGLX was incomplete, ignoring profile-mask and profile-flags.
2015-07-20 13:32:20 +10:00
b368724464 Fix define issues w/ WITH_GL_PROFILE_COMPAT off
This still fails to build, but at least fail where its supposed to (using unsupported API's).
2015-07-20 13:08:26 +10:00
cd91fd655d GHOST: use simple stack array for glx attributes 2015-07-20 11:45:42 +10:00
98bf205c39 GHOST: correct GLX flag w/ WITH_GL_PROFILE_CORE
note that this is currently ignored, but better at least build for now.
2015-07-20 11:32:49 +10:00
b3e7a51ebd Freestyle: disabled debug code in ViewMapBuilder::ComputeIntersections(). 2015-07-20 06:18:03 +09:00
ee263c2566 Freestyle: Removed tesselated forms of silhouettes for displaying in the UI.
The tesselated silhouettes were not used in Freestyle for Blender at all.
2015-07-20 06:18:01 +09:00
1f748d2324 Freestyle: code cleanup.
Removed unnecessary header files and replaced some other heade files with
forward class declarations.
2015-07-20 06:18:00 +09:00
160c65845d Freestyle: minor optimization for space in the FEdgeXDetector.
Member variables and auto variables were changed from real (double) to float
in most part of the FEdgeXDetector (except for curvature computations).
2015-07-20 06:17:59 +09:00
86572dd7c9 Freestyle: commented part of FEdgeXDetector::ProcessRidgeFace() that has no effect. 2015-07-20 06:17:57 +09:00
b9895df36f Freestyle: internal switch from double to float in mesh loading and construction of winged edges. 2015-07-20 06:17:55 +09:00
6705786540 Freestyle: minor optimization for space from mesh importing to feature edge detection.
Several class member variables were removed (at the cost of computing their values
when retrieved) or changed to a type of smaller size.  Also fixed whitespace.
2015-07-20 06:17:54 +09:00
431cee2ba0 Freestyle: minor code cleanup. 2015-07-20 06:17:53 +09:00
66423364ca Freestyle: removed redundant instantiation of vector objects. 2015-07-20 06:17:51 +09:00
be980c4ee4 Freestyle: minor optimization for space by using a pointer to a const char array instead of std::string. 2015-07-20 06:17:50 +09:00
e58d788340 Cleanup: style
Also 'com' as abbreviation for center-of-mass is a bit confusing, rename to 'center'.
2015-07-20 05:30:08 +10:00
23a4f547e7 Convert rigidbody conversion to looptri.
Patch D1417 by Martin Felke, with minor edits thanks!
2015-07-19 19:10:41 +02:00
a597a380bb Properly fix T45477
Code was actually skipping setting color selection indices and previous
commit actually broke mask selection in texture painting.
All should work now.
2015-07-19 18:35:09 +02:00
8f1c1ef3a9 Fix T45477 wrong edge selection.
Caused by own changes to framebuffer selection code, code was not
packing color ids correctly.
2015-07-19 18:04:21 +02:00
d712dc5a1d Fix T45495: Armatures using the iTaSC IK solver causes UI truncation in bone constraints panel.
Caused by rB404f9ddc37fc, cleanup is OK but please double-check changes before committing. :(
2015-07-19 16:25:48 +02:00
23c76039d9 CMake: correct generated location for buildinfo.h 2015-07-19 09:53:38 +10:00
1e10e4e2e3 Fix error when getting the commit time fails
While this should work, allow the build to succeed if for some reason the command fails.
2015-07-19 09:51:49 +10:00
4bca8a6bc5 Fix T45484: Regression OpenCL split: access violation
That was a primary school error caused by moving statements inside assert()
which effectivly disabled crucial code in release builds.
2015-07-18 23:30:19 +02:00
faeac63f68 Cycles: Fix compilation of OpenCL kernel after point density commit 2015-07-18 23:10:46 +02:00
003b56801c Point density: Workaround for possible race condition
There was possible race condition in the point density sampling caused
by access to the same data in particle system from sampling thread and
sampling initialization.

Could have happened when two different point density textures were using
same particle system
2015-07-18 22:57:02 +02:00
9b40616249 Cycles: Point density texture support
This commit implements point density texture for Cycles shading nodes.

It's done via creating voxel texture at shader compilation time, Not
totally memory efficient, but avoids adding sampling code to kernel
(which keeps render time as low as possible), In the future this will
be compensated by using OpenVDB for more efficient storage of sparse
volume data.

Sampling of the voxel texture is happening at blender side and the
same code is used as for Blender Internal's renderer.

This texture is controlled by only object, particle system and radius.
Linear falloff is used and there's no turbulence. This is because
falloff is expected to happen using Curve Mapping node. Turbulence
will be done as a distortion on the input coordinate. It's already
possible to fake it using nose textures and in the future we can add
more proper turbulence distortion node, which then could also be used
for 2D texture mapping.

Particle color support is done by Lukas, thanks!
2015-07-18 22:49:10 +02:00
7d10798af2 Cycles: Add voxel texture sampler shader node
The idea of this node is to sampling of 3D voxels at a given coordinate
supporting different mapping strategies (world space mapping, object
local space etc).

Currently not in use, it's a preparation step for supporting point density
textures.
2015-07-18 22:09:20 +02:00
2f15a1f66e Point density: Add utility function to sample density outside of render pipeline
Not currently used, it's a preparation for the further work.

Should not be functional changes.
2015-07-18 21:42:39 +02:00
92a37993a5 Cycles: Camera frustum space object culling scene simplification
The idea is to give artists a simplier way to control memory usage in such
scenes as grass fields by doing automatic object culling based on whether
object is visible in the frame or not.

This is controlled on per-object level. In order to use this option few steps
are required:

- Enable Simplify in scene settings

- Enable Camera Cull option in the Simplify panel

- Set camera cull margin (measured in relative value to the render resolution)
  This setting is used to avoid possible flickering caused by changes in shadow
  which are cast by objects outside of the frame.

- Enable Camera Cull for objects which are desired to be culled
  (object culling option could be found in Option panel in object buttons).

There is still room for improvements, but this worked quite well during
Gooseberry open movie project, so think it's useful feature even in it's current
non-ideal state.
2015-07-18 18:17:22 +02:00
2ccfbf2f81 Cycles: Commit file missing from conditionally compiling baking kernel 2015-07-18 16:26:41 +02:00
cf14437ac9 Cycles: Log requested device features
Useful to have this always logged because otherwise it's needed to remove cached
kernels and check build flags to see which features are enabled.
2015-07-18 16:02:09 +02:00
45b5bf034b Cycles; Make baking a feature-specific option
This means render devices now might skip building baking kernels in cases when
only actual render-related functionality is used.

For now it's only implemented for OpenCL split kernel device and mainly needed
to work around some compiler-specific bugs which crashes on building the kernel.

Using OpenCL for baking might still crash the driver, but at least there is now
higher probability of that GPU will be usable to render the scene.

Real fix should actually be done in the driver side.
2015-07-18 16:02:08 +02:00
36a952e3e4 Cycles: Use feature-selective base kernel compilation when using split kernel
The idea is to make all kernels as small as possible to work around possible
issues with buggy drivers which might fail building feature-complete kernels.

It's indeed just a workaround to make at last simple test scenes to render
on OpenCL. Real fix should happen from the driver side.
2015-07-18 16:02:08 +02:00
5e4a8c6a87 Cycles: Some cleanup if OpenCL base kernel load_kernel()
Hopefully makes it less clumzy, should be no functional changes still.
2015-07-18 16:02:08 +02:00
025eda57da Cycles: Make OpenCL cache follow out code style a bit closer 2015-07-18 16:02:08 +02:00
2ad3a1d41e Use gpu-buffers for UV-edge drawing 2015-07-18 23:51:44 +10:00
f5629b7265 Fix/enhance behavior of VES's 'alt-rmb' selection.
Main issue in previous code was that you could not shift-alt-rmb select several
contiguous strips, result was pretty much unusable.

Also, enhanced general behavior of this selection mode, now (similar to alt-rm clicking
on handles), when you alt-rmb click on a same strip several times, you alternate between:
* Strip is selected, neighbor handles are selected;
* Strip and its handles are selected, neighbor handles are selected.
…which allows you to either grab or slide the strip.

And refactored a bit code too, linked_handle has a complete different logic
than without this option, simpler and clearer to completely separate them in code.

Initial issue reported by Leon Cheung on IRC, thanks!
2015-07-18 14:45:11 +02:00
cdd1be44c5 Replace MFace w/ MLoopTri in imapaint_pick_uv
D1415 by @scorpion81, with minor edits
2015-07-18 22:10:58 +10:00
df4d25991e Fix (IRC reported) inverted behavior of select more/less in VSE.
Also, cleaned up a bit that code, and added releavnt entries in Select menu.

Reported on IRC by Leon Cheung, thanks!
2015-07-18 11:55:08 +02:00
bbed6af857 CMake: Disable Werror in extern/libmv for now
It gives issues with Glog compiled in release mode.

Need to revisit the directory layout here and compiler flag, because technically
libmv is now more an intern/ library and i'll actually prefer it to be covered
with strict flags as well. But it's a bit tricky because of libraries which we
don't maintain are in the libmv subfolder.
2015-07-18 11:16:25 +02:00
ecb3e0fe73 Cleanup: whitespace & break placement 2015-07-18 19:03:22 +10:00
2199a3e38b CMake: Add option to enable -Werror cflag in some areas
It is rather annoying attitude nowadays to use const qualifier all over the
place, including using it for multi-dimensional arrays. This isn't really
supported in GCC prior to version 5.0 because it considers such an arrays
to be a "pointer to a const pointer" which gives implicit casting errors.

It's not possible to disable this particular type of warnings treated as
errors in any GCC version prior to 5.0 as well, meaning currently usage of
-Werror globally in Blender code is not possible at all.

This commit makes it possible to use -Werror in areas which are complaint
with older GCC versions. New advanced CMake options are:

- WITH_COMPOSITOR_WERROR
- WITH_LIBMV_WERROR
- WITH_CYCLES_WERROR
2015-07-18 10:49:51 +02:00
086ae3ea04 Cleanup: whitespace, wrong indent level 2015-07-18 18:42:59 +10:00
752eb64d60 Cleanup: whitespace (CMake) 2015-07-18 18:42:35 +10:00
7c5dd14689 CMake: Fix indentation around LLVM detection code 2015-07-18 09:40:33 +02:00
3e83a0d92d Cleanup: ws 2015-07-18 06:01:38 +10:00
7b30e2386b Only use material callback when enabled
Vert/Face select in painting modes weren't drawing after recent changes.
2015-07-18 05:39:01 +10:00
b45749727c Add check for GPU materials enable state 2015-07-18 05:30:13 +10:00
32f7b4a358 Avoid getting the original index if its not needed 2015-07-18 04:57:58 +10:00
bdb12bf045 Merge branch 'master' into openvdb 2015-07-17 20:21:27 +02:00
1efa1d82e6 Rename C++ file extensions.
This is to be more consistent with what is used in the OpenVDB library.
Also my OCD sense was tingling.
2015-07-17 20:15:02 +02:00
8008daba75 Cleanup: reduce scopes of 'using namespace' declarations. 2015-07-17 19:59:49 +02:00
a950ae6090 Cleanup. 2015-07-17 19:53:46 +02:00
3ff45ef48f A simple utility class to time functions. 2015-07-17 19:24:25 +02:00
e6711119f2 Absent-mindedness...Remove testing code 2015-07-17 19:13:22 +02:00
712098b1c8 Fix GLSL code not working correctly for Macs without VBO, again report
by scorpion81 on irc
2015-07-17 19:12:24 +02:00
c1290e441e Fix T45469: Vertex Group weight = 0.0 in scene 2. 2015-07-17 18:49:58 +02:00
b32acadfd3 Export UI: forgot to remove those in a previous commit. 2015-07-17 18:44:34 +02:00
8a7d0559f5 Fix compile error (tm). 2015-07-17 18:41:23 +02:00
20de6f01ed Fix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior to what is intended.
Logic was just broken for the LEFT case here.

Also cleaned up and made behavior more consistant between strips and markers.
2015-07-17 18:32:59 +02:00
3a15ec337e Fix issue reported by scorpion81 on irc: material mode + flat shading
artifacts in cycles textured mode.
2015-07-17 18:30:40 +02:00
a788a91830 OpenVDBReader: small de-duplication. 2015-07-17 18:20:36 +02:00
85809e836e Avoid double index lookup mesh/selection drawing 2015-07-18 00:01:44 +10:00
d4c0617496 Avoid accessing MTFace drawing subsurf 2015-07-17 23:52:41 +10:00
955c13d614 Fix another index error, made multimaterial mapped meshes draw
incorrectly.
2015-07-17 15:15:53 +02:00
7c06167982 Change winding of looptris in subsurf so they point to the same
direction as the surface.
2015-07-17 14:56:10 +02:00
5f09348fe8 Fix crash texpainting on subsurfed meshes.
Unfortunately, loops and polys are generated, therefore we need to keep
copies. Still not painting after this commit but at least no crash now.
2015-07-17 14:46:05 +02:00
82e27f5093 Cleanup: ws & correct comment 2015-07-17 22:09:30 +10:00
416d164fec Projection Paint: move to looptri data 2015-07-17 21:59:07 +10:00
e1606e8c87 Don't create MFace's when calculating normals
Instead only create MFace layer when its requested
2015-07-17 21:59:07 +10:00
19614f4395 Add macro BKE_MESH_TESSTRI_VINDEX_ORDER
gives the index of a vertex in a looptri
2015-07-17 21:59:07 +10:00
c23d29c58e Fix T45465
Easy one, we don't draw quads anymore. Also normal
didn't use polygon index
2015-07-17 13:27:46 +02:00
1b8e0d03d4 Fix no longer being possible to display a suzanne with 8 levels of
subdivision.

Classic integet overflow/size_t substitution case. Machines are getting
powerful enough to easily expose these kinds of error now.
2015-07-17 12:25:44 +02:00
0b121d6a5d Cleanup image's poll funcs.
Checking space returned from CTX_wm_space_image() is SPACE_IMAGE type... tssst. :)
2015-07-17 12:19:57 +02:00
1255ac12a6 Fix T45462: Do not enale 'replace image' op with packed images. 2015-07-17 12:19:57 +02:00
37017d149e Let's use proper helpers for debug-only vars... 2015-07-17 12:19:57 +02:00
9bcf1bb266 Fix for nodeitems module using the NODE_MT_add menu types from bl_ui.
This is basically a bad-level call: ui scripts are registered *after*
the modules. It only works for addons because those are loaded even
later.

Now the nodeitems_utils module just defines a function which is then
called by the UI script, rather than the other way around.
2015-07-17 11:59:24 +02:00
4052384be3 Make strict flags happy in release builds 2015-07-17 09:54:21 +02:00
40936307dd Remove MTFace DM_paint_uvlayer_active_get func 2015-07-17 04:26:17 +10:00
67acde92bb Fix for error in looptri commit
Sculpting w/ subsurf crashed
2015-07-17 04:22:24 +10:00
9d090c4717 Split ray_face_intersection into quad/tri versions
Since many callers only need a single triangle
2015-07-17 04:15:24 +10:00
595a491e63 Add tessellation data to DerivedMesh (LoopTri)
This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.

This doesn't yet move all internal code from MFace to LoopTri just yet.

Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint

Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-17 03:55:14 +10:00
Dalai Felinto
c8f6313487 Fix T45428: Sometimes in a dupligroup linked actuators are not triggered
Revert "BGE: Cleanup : merge 3 loop in 1 in function DupliGroupRecurse."

This reverts commit 371e5f25a0.

The fix is basically to revert the cleanup commit 371e5f25 (and 3d658bf7)
Also 5dc22fbbf had to be adapted to the reverted code.

Conflicts:
	source/gameengine/Ketsji/KX_Scene.cpp
2015-07-16 12:53:20 -03:00
2fe9224375 Fix T45459: Edge Length with Separate Units Displayed As 1m 100cm.
Our 'unit epsilon' was too small, given the fact we only display up to four digits usually...
2015-07-16 17:45:51 +02:00
f2087b4830 Fix T45451: File Browser crash on 16bits PNG image previews.
Issue was that with those files, Blender generate a float image by default, not a byte one...

Now, we ensure in two places we only get a byte imbuf for our thumbnails!
2015-07-16 17:28:25 +02:00
4feef7d4f8 Fix for the previous commit: overallocation of an array 2015-07-16 17:26:20 +02:00
247d922ce5 Fix T45446: Crash when baking a certain object
Issue was caused by deform vert layer existing in the mesh.
Solved in quite simple way, but it still might be missing
some other layers.

Any custom data experts around to check if it's correct?
2015-07-16 17:25:13 +02:00
3e3e7ee41c Sculpt draw code:
Remove legacy code completely, now dyntopo, multires et al even work on
GL 1.1 for really hardcore users :p

Real purpose here though is to be able to have fast multires drawing
even with VBO off, since it requires using indices for vertex buffers.

Also made own code elf puke an eaten normal update function which
made multires not update normals in solid mode...sorry.
2015-07-16 17:12:03 +02:00
6568b6d1cd Fix T45456: Error's in splash don't restore cursor 2015-07-16 17:28:20 +10:00
01a8216a4b Disable check for recent-files.txt existing
slows startup on remote, network fs... etc.
2015-07-16 17:15:00 +10:00
Stefan Werner
51385f6fe8 Fix T45447: Area light importance sampling improvement
Turning on importance sampling on area lights increases noise on diffuse
surfaces. This was caused by PDF calculated for an intersected point on
light instead of original light position.

Patch by Stefan with some own modifications.
2015-07-16 08:33:13 +02:00
b00c49838a Optimize Vertex Color update
Avoid recalculating the material color when its the same as the last.
2015-07-16 15:49:15 +10:00
eae5f5b7d7 Merge branch 'master' into openvdb 2015-07-16 05:00:23 +02:00
e6364c64f2 Icons: Add new 'library_data_broken' one. 2015-07-15 20:28:09 +02:00
13c39e90b3 VBO offscreen selection drawing, cdderivedmesh
Get rid of legacy drawing, it's only used for selection,
    in which case we can prepare a temporary color buffer and draw
    at once. Code is not complete here because we still redundantly
    set the draw color in the draw function and don't ommit hidden
    faces automatically. Still it works 100% without immediate mode
    now.
2015-07-15 18:50:02 +02:00
2daa4db8a0 Fix own stupid error in yesterday's refactor of recursive dir creation.
Missed adding return value in one place.

Thanks a lot to Thomas Szepe for reporting the issue and finding the solution!

Question remains: how could MSVC allow such a code to compile in some cases
(own win64 + scons buildbot win32 were OK with that it seems!).
Crappy compiler, not comming to the rescue of stupid dev...
2015-07-15 17:43:04 +02:00
548e650252 Cycles: Merging of patch from OSX went wrong in the previous change
That's what happens when you can't commit from a system you're making
changes at and someone is behind your back...

Sorry for the noise.
2015-07-15 15:12:19 +02:00
2b97ad348c Cycles: Missed this in the previous commit 2015-07-15 15:11:02 +02:00
32c6d92cb0 Fix T45439 crash with subsurf when many materials present.
Silly oversight on the viewport patch
2015-07-15 14:58:10 +02:00
56bf25d219 Cycles: Enable OpenCL rendering on Apple OSX
Requires having latest El Capitan beta 3 OSX due to ome crucial fixes made in the
compiler. Supports same features as NVidia OpenCL apart from CMJ (there's no
experimental feature set support in megakernel yet).

Uses megakernel internally, which works much better than the split kernel. Split
kernel is not supported on OSX still, needs to be investigated still.

Some more details can be found there:

  http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/OpenCL#AMD_on_OSX
2015-07-15 14:20:59 +02:00
4143b8a6c7 Fix autosmooth with recent DM optimizations
Also avoid multiple float->short conversions for the same normal.
2015-07-15 14:34:56 +10:00
72c7e12a5d DerivedMesh: minor changes to callback use
- use void instead of float for array arg (cast in the switch statement)
- remove unused args
- use const for poly-mapping and user_data args
2015-07-15 12:42:41 +10:00
7407ed7637 Cleanup: ws 2015-07-15 12:08:32 +10:00
52fa5b12e1 Cleanup: ws 2015-07-15 11:43:23 +10:00
Nikolaus Leopold
f2620c9df1 Minor English grammar typo fixes.
This fixes T45433.

Reviewers: Severin, kevindietrich

Reviewed By: kevindietrich

Projects: #bf_blender, #user_interface

Differential Revision: https://developer.blender.org/D1408
2015-07-15 03:33:10 +02:00
dfd383ca00 Fix overdrawing and errors with textured and mapped drawing 2015-07-14 23:49:03 +02:00
9cc1953210 Usual i18n messages fixes... 2015-07-14 21:41:24 +02:00
8a17918555 Fix T45424: Blender able to create folders with invalid characters at the end of the name.
In fact, filebrowser was not making any checks for invalid file/dir names here!

Added checks in the three places that should be protected:
* Renaming.
* Creating dirs.
* Typing in filename field.
2015-07-14 18:57:38 +02:00
d7b9202567 BLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().
BLI_filename_make_safe had several issues:
* Would replace all dots ('.'), not a great idea since it would break extensions.
* Was not checking for 'control' ASCII chars (though unlikely, better to be safe here).
* Win32 only: was not checking for forbidden names (con, aux, ltp0, com0, etc.).

New BLI_path_make_safe() simply checks each path's item with BLI_filename_make_safe().
2015-07-14 18:57:38 +02:00
d0c5eac4b7 BLI_fileops: Make BLI_dir_create_recursive() return success/error status.
Handy to know directly whether a file creation succeeded or not.

Also, made a few more changes in this func, and harmonized a bit win32/*nix versions.
2015-07-14 18:57:38 +02:00
38940662e5 Particle Info node support for GLSL mode and the internal render.
With this patch "Particle Info" node from Cycles works in GLSL and BI

Alexander (Blend4Web Team)

Reviewers: psy-fi
Note: moved particle info to object render instance instead of
shadeinput during review - Antony.

Differential Revision: https://developer.blender.org/D1313
2015-07-14 18:52:29 +02:00
107e34407d Display optimizations part 1.
This patch changes the way we draw meshes by introducing
indexed drawing. This makes it possible to easily
upload and rearrange faces ad lib according to any criteria.

Currently we use material sorting but textured sorting and
hiding will be added to optimize textured drawing and skip
per face testing.

It also adds support for vertex buffers for subsurf
modifiers (Except from GLSL drawing), making drawing of
subsurf much faster without need for bogus modifiers.

Tests show that we gain approximately 20-25% performance
by that for solid mode drawing with up to 50% gains for
material drawing. Textured drawing should also have a
small performance gain, but more substantial optimizations
are possible there.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1406
2015-07-14 16:48:23 +02:00
1b8b9063f8 Correct last commit 2015-07-14 23:37:11 +10:00
0918461d61 Move from MTFace to MTexPoly w/ texture checks
Part of moving away from MFace.
2015-07-14 22:36:00 +10:00
2cffd6649b Match face tessellation order in edimode
add a negated version of axis_dominant_v3_to_m3
2015-07-14 22:29:31 +10:00
655f498ca7 Cleanup: headers (wm) 2015-07-14 22:29:31 +10:00
cba0858ccd Fix for recent optimization commit in endian switch
Pre-4.8 GCC had a bug which lead to non-exposed __builtin_bswap16() symbol.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for details.
2015-07-14 11:33:50 +02:00
82740cd282 Fix T45423: depsgraph: crash in IDDepsNode::tag_update
Two issues fixed in this commit:

- Clearing or adding animation via python should ensure relations are valid.
- Animation component animation data might be null caused by removing animation
  from python.
2015-07-14 11:21:04 +02:00
9c80e52a89 Make tooltip parsable by human compilers (thanks to Pablo for
suggestion)
2015-07-14 11:19:13 +02:00
6ba4a917a3 Data Transfer: very minor cleanup... 2015-07-14 11:13:56 +02:00
85004461ea Workaround for non-bleeding edge compilers and const cast of pointer arrays. 2015-07-14 09:56:00 +02:00
a79d47b14e Cycles: Add logging to detected OpenCL platforms and devices
Happens on verbosity level 2, should help looking into some of the
bug reports in the tracker.
2015-07-14 09:56:00 +02:00
7ad9ca72dd Cleanup: replace BLI_split_file_part w/ BLI_path_basename 2015-07-14 09:34:53 +10:00
b7c42ef93e Cleanup: use ascii as suffix (as with utf8) 2015-07-14 09:17:00 +10:00
2de497eee0 BKE_deform: assert on invalid args
Will phase these out eventually
2015-07-14 08:41:15 +10:00
8c0b5c02de Draw emboss when area is full but in quad-split 2015-07-14 07:31:46 +10:00
9f78aa4c36 Fix T45348: Collapse gives sel verts in face mode 2015-07-14 07:02:35 +10:00
55374426c6 EditMesh: show angles of adjacent selected verts
Useful since moving vertices will change angles on adjacent,
unselected face-corners too.
2015-07-14 06:30:02 +10:00
eee2d8e45c Fix T45247: Softbody ignores lattice weight
Now multiply the lattice wight by the goal weight too.
2015-07-14 06:20:31 +10:00
240646f506 Softbody goal weights cleanup
- avoid searching for vertex group for each vertex.
- add support for mass and spring weights to lattice.
- multiply the vertex group weight by the overall goal weight value.
2015-07-14 06:20:30 +10:00
6a982a080c Add some pedantic casts, since some guys around like to take all warnings from their compilers as errors, even the stupidest ones! 2015-07-13 22:00:49 +02:00
Dalai Felinto
4050b49f97 increase mathutils callback count (BGE devs, read the log)
This was causing the BGE to crash on Debug mode when built with "break on asserts", meaning the BGE was not debuggeable.
Please make sure to test patches in debug mode with the proper flags enabled before committing
2015-07-13 16:11:59 -03:00
Dalai Felinto
34a7156705 RNA assert: make object game state to comply with RNA_property_boolean_get_index() 1/0 requirement 2015-07-13 15:52:05 -03:00
406b9aa7b1 Fix T45402: Transform crash w/ project+align snap
Only euler rotations were checked for.
Also delta rotations caused random/unusable output.
2015-07-14 04:30:16 +10:00
6f7926c61c Fix T45394: Motion tracking constraints did not work with Cycles motion blur 2015-07-13 18:17:46 +02:00
dd44754c5f Data Transfer: Add an option to 'auto-transform' destination mesh so that it matches best the source one.
This allows to match and transfer data between two meshes with similar shape but complete arbitrary different transform.

Note that the result will be best if the meshes (more precisely, their vertices) are exact copies of each other.
Otherwise, method used can only perform an approximated best match, which means you'll likely get better
results if you 'visually' make them match in 3D space (and use 'Object Transform') instead.
2015-07-13 18:05:38 +02:00
e93b969ac9 Add BLI_math_statistics, where stats tool shall be!
For now, only contains some 3x3 matrix covariance computing.
2015-07-13 18:05:38 +02:00
0e9842dd04 Add BLI_math_solver, where non-linear solvers should be.
For now, only has an eigen solver for 3×3 (symmetric) matrix.
2015-07-13 18:05:38 +02:00
582e7a6347 Add a skeleton of C API for Eigen3.
Title says pretty much everything. For now, only thing available is a solver of eigen
values/vectors for self-adjoint matrices.

We can easily add more when needed.

Thanks to Sergey and Campbell for quick review.
2015-07-13 18:05:38 +02:00
0119539e4b Add icon scale argument for ui-template-previews 2015-07-14 01:46:25 +10:00
e7b3803317 Allow spin/screw to run outside 3D view
This lets scripts call them
2015-07-14 00:55:04 +10:00
b16bf6da80 Fix T45364: NEW DEPSGRAPH: New Torus created can't be transformed
Linking objects to a scene via python should ensure relations are properly
updated for that scene.
2015-07-13 16:00:39 +02:00
9f63cbf4a7 Fix T45333: Volume Scatter crash blender 2015-07-13 18:54:26 +05:00
a2f7997e05 Freestyle: Fix compilation error with strict compiler flags 2015-07-13 15:24:56 +02:00
686e8e452c Fix T45390: Cycles experimental displacement method ignores scaling when render
From artists perspective it makes sense to always apply displacement in a local
space.

TODO: Double-check that BVH is being packed properly. From quick tests seems it's
all fine, but might be missing some obvious failure still.
2015-07-13 15:24:56 +02:00
2d32b92d77 Cleanup: IMB prefix for ImBuf defines 2015-07-13 22:00:07 +10:00
e142ae77ca Imbuf types refactor.
ImBuf types were getting stored as bitflags in a 32bit integer which had
    already run out of space. Solved the problem by separating file type to
    an ftype enum, and file specific options to foptions.

    Reviewed by Campbell, thanks a lot!
2015-07-13 13:58:17 +02:00
107bbee4c7 Use regex for cmake config parsing 2015-07-13 20:05:26 +10:00
5201748f5f Fix T45397: Frameserver rendering no longer works in 2.75 or 2.75a
Issue was caused by a typo in original multiview commit.
2015-07-13 11:10:33 +02:00
1dd92f352b Fix T45385: Crash on render occurring when two hair modifiers are active that both use a UV mapped material for render
Not sure it's totally correct solution, but seems reasonable because it's
possible dmcache is set to ISCHILD.

Someone more familiar with the particles code might want to revisit this :)
2015-07-13 11:01:34 +02:00
f4f7348c41 Minor tweaking to Knife header text.
Confirm/cancel shall always be first, and also makes more sense to have
define cut/close cut/new cut together.
2015-07-12 21:52:59 +02:00
c1a5e6b2fd Shortcut-to-string converter: add 'dbl-' in front of key when expecting a double-click.
I think this is the only Keymap value we really need to handle here...
2015-07-12 21:39:59 +02:00
c2bcf2dc05 Add new modalkeymap usage in helper header message to Knife tool. 2015-07-12 21:32:16 +02:00
36c15f4194 Add new modalkeymap usage in helper header message to Fly mode. 2015-07-12 21:14:06 +02:00
1b297567c0 Cleanup: style 2015-07-13 03:48:08 +10:00
feffbe974b Remove redundant string copy 2015-07-13 03:43:41 +10:00
1893e5e4c2 Missed essential part in previous commit.
Or how to epic fail a fix when working on two different systems.
Or how to increase your commit rate.
2015-07-12 19:04:31 +02:00
7e9c347c8c Fix T45375: Cant clear temp fluid cache after closing Blender (Windows).
There was two different issues here actually:
* Own (very high) stupidity only gave 8 chars to file name (sic).
* list dir returns dirpaths without a trailing slahs, but expects them to have it it seems. :|
2015-07-12 18:49:02 +02:00
d54e77b66d Cycles: Expose "Max Bounces" for the world light.
When using MIS, the world is treated as regular light and in this case
we can now also limit the maximum amount of bounces, the background light
will contribute to the scene.

This can improve performance in some cases, where it's e.g. sufficient to
only have a contribution on first 1-2 bounces.
Examples can be found in the differential.

Differential revision: https://developer.blender.org/D1399
2015-07-12 17:56:54 +02:00
6ffc988ae3 BGE Clean-up: New EXP prefix for the BGE Expression module
The expression module now uses an EXP prefix and it follows a
distribution similar to blender.

Additionally the hash function in EXP_HashedPtr.h was simplified and the
files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused.

Reviewers: campbellbarton, moguri, sybren, hg1

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1221
2015-07-12 16:58:12 +02:00
5b0f674e09 Fix crash in redraw timer
Was modifying wrong regions flag, that could also be NULL.
2015-07-13 00:21:08 +10:00
8d48f8e0b0 Add ability for redraw timer to run for fixed time
Also avoid accessing context vars in timer loop.
2015-07-12 22:57:35 +10:00
2fd3b9ad84 PyAPI: Use separate writes for operator reports
This allows us to temp override the stdout and extract individual reports
2015-07-12 22:26:14 +10:00
532b735ee8 Docs; Py API gotcha's section
Minor corrections and cleanup
2015-07-12 20:50:44 +10:00
5c8fc8e505 Use const for direntry strings 2015-07-12 05:50:07 +10:00
Julian Eisel
8c67b8ffe9 File Browser: Fix possible bug and some minor tweaks
BLI_add_slash appended to a char *, a potential buffer overflow

Also partially removed an assert, which failed after changing file format of a saved image. We need a better way to handle such cases.
2015-07-11 21:44:42 +02:00
7b1489b93b Error in last commit 2015-07-12 05:35:44 +10:00
968351d916 Minor changes for more efficient endian switching 2015-07-12 05:33:04 +10:00
9351a3b650 Merge branch 'master' into openvdb 2015-07-11 20:26:53 +02:00
17ebbc06e2 Use const for sculpt vars
resolves building with gcc4.9
2015-07-12 03:50:39 +10:00
5a19d9d8f3 ImBuf: Fix compilation error with older libpng
Older libpng library does not use const pointer to a memory.

The exact version is a bit of a guess here, maybe needs tweaks to it tho.
2015-07-11 19:18:20 +02:00
3a810bfed6 remove redundant casts 2015-07-12 02:53:37 +10:00
eed7efa151 error in own last commit 2015-07-12 02:31:46 +10:00
b610ec50de Add Thai and Khmer charsets to our i18n font. 2015-07-11 18:03:18 +02:00
a6259d4290 Avoid static var for OpenEXR 2015-07-12 01:45:30 +10:00
e42e01875e Make Iris image loading thread-safe
Needed for thumbnails
2015-07-12 01:13:33 +10:00
2410797ab1 ImBuf: cleanup, use const for memory passed in 2015-07-12 01:07:59 +10:00
03d8907ca7 Add some basic report/timing/logging tool as util py module progress_report.
It supports any level of sub-steps, timing, messaging, and uses WindowManage.progress API
to report progress in UI, in addition to console printing.
2015-07-11 16:50:22 +02:00
114e7eaa09 Add WM_framebuffer_to_index_array
Convert buffer to index in one loop,
also minor cleanup to backbuf/selection functions.

- Use IMB_rectcpy instead of inline pixel copy.
- Redundant WM_framebuffer_to_index call.
2015-07-11 23:21:41 +10:00
Julian Eisel
02b3618873 File Browser: Keep file name after changing directory
Actually this was an intentional change in rBaeeb23efa28dc to prevent Blender from trying to open the old file from the new directory. Issue is that this is really bad for saving and basically breaks "Save As".

Some more tweaks were needed to make it work like before, so now it keeps the name of the last selected file, but clears it when selecting a folder.
2015-07-11 05:48:02 +02:00
909fa34c5f BLI_matrix space_transform: Add a 'local-invariant' setter.
`BLI_space_transform_from_matrices()` defines a 'global-invariant' transform
(same point in global space, two different coordinates in local and target spaces).

New `BLI_space_transform_global_from_matrices()` is kind of opposite, it defines
a 'local-invariant' transform (two different points in global space, same coordinates in local and target spaces).

Useful to 'match' meshes.
2015-07-11 00:04:27 +02:00
Julian Eisel
bf3fe67862 Fix T45405: Crash on opening a file (in filebrowser code)
Quoting Bastien from IRC: "Filebrowser is a nest of bad surprises" -- indeed :S
2015-07-10 22:09:14 +02:00
f3d5af4172 Cleanup: use const for mesh functions 2015-07-11 04:39:27 +10:00
26782fa350 Cleanup: redundant metadata value read/write. 2015-07-10 19:33:55 +02:00
0875cb07cc Cleanup: use const for gpu buffer 2015-07-11 03:25:28 +10:00
950abc655e Remove (test) code dealing with an OpenVDB primitive and drawing the VDB
tree and its values.
2015-07-10 19:23:44 +02:00
ae0ea8c937 Activate reading of exported files (+ cleanup). 2015-07-10 18:57:53 +02:00
78cae5bad9 Cleanup: remove redundant includes 2015-07-11 02:49:04 +10:00
3443686399 Sequencer: changes to text effect strip
- default alignment to lower center.
- placement is now relative,
  so changing output size keeps correct placement.
- instead of center override, add align option (left/right/center).

Also don't use pixel-size for setting the font size, on new strips.
Better not have UI prefs impact low level API's.
2015-07-11 02:30:26 +10:00
Julian Eisel
9a3dfa1f21 Fix crash when appending from File Browser
Again own mistake in rBaeeb23efa28dc1
2015-07-10 17:49:58 +02:00
387cd2eb4f Merge branch 'master' into openvdb 2015-07-10 17:46:57 +02:00
e7a48113a9 Freestyle: Missing __all__ symbols added in D963. 2015-07-10 23:15:59 +09:00
25638a9656 Code cleanup: White space and dead code. 2015-07-10 23:15:57 +09:00
Folkert de Vries
eeeb845d33 Freestyle: new stroke modifiers
This patch introduces a couple new stroke modifiers. The ones currently implemented are based on prototypes by @kjym3 and myself.

The new modifiers:
  - Tangent
  - Thickness noise
  - Crease Angle
  - Simplification
  - Curvature 3D

The documentation for these new modifier types can be found [[ http://www.blender.org/manual/render/freestyle/parameter_editor/index.html | in the manual ]]:

{F134441}
(left: AnisotropicThicknessShader, right: NoiseThicknessShader)

{F140499}
(left: Curvature 3D, right: Simplification)

Author: Folkert de Vries (flokkievids)

Reviewers: kjym3

Subscribers: #user_interface, plasmasolutions, kjym3

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D963
2015-07-10 23:15:56 +09:00
7837f0e833 BLI_math 'compare' cleanup & enhancements.
This commit:
* Adds a 'compare_ff' function for absolute 'almost equal' comparison of floats.
* Makes 'compare_vxvx' functions use that new 'compare_ff' one.
* Adds a 'compare_ff_relative' function for secured ulp-based relative comparison of floats.
* Adds matching 'compare_vxvx_relative' functions.
* Adds some basic tests for compare_ff_relative.

See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

Note that we could replace our python/mathutils' EXPP_FloatsAreEqual() by BLI's compare_ff_relative
(using a very small absolute max_diff), but these do not have exact same behavior...
Left a comment there for now, we can do it later if/when we are sure it won't break anything!
2015-07-10 15:02:43 +02:00
bbcbd2eed9 REmove stupid apple check on OMP in weightvg modifier.
This is handled in build files...
2015-07-10 09:56:10 +02:00
a8b8d60c50 CustomData: deprecate CD_ID_MCOL 2015-07-10 16:47:39 +10:00
a7ed374459 makesrna: use int64 for rounding check
Harmless but larger values would overflow
2015-07-10 16:42:36 +10:00
66f1c3b882 DNA: replace GCC poison with ifdef for enums 2015-07-10 15:58:50 +10:00
Julian Eisel
5513fdc629 Fix T45398: Saving file from File Browser doesn't work if no file is selected
Own mistake in rBaeeb23efa28dc16e20
2015-07-09 23:48:55 +02:00
Julian Eisel
f766a61626 File Browser: (Re-)Allow selecting '..' parent entry for file navigation
Selecting '..' entry was intentionally disabled in rB76b4fad6dbda1b10c, however, for file navigation this can be really useful. So this basically allows selecting '..' entry again, *if it is the only entry to select*. It won't be selected using box select, select all or when expanding selection.
2015-07-09 19:48:03 +02:00
Julian Eisel
aeeb23efa2 File Browser: Improve usage of Enter-key to open files/directories
From a user-POV this makes following changes:
* Adds support for using the Enter-key to open directories
* Updates the upper text-buttons for file and directory on selection
* Last selected file/directory is opened now (in sync with upper text-buttons)
* Changes text in open button to "Open Directory" if a directory is selected

D1349, Reviewed by @mont29
2015-07-09 18:40:34 +02:00
26bd1a766a Cleanup: warnings 2015-07-09 19:39:37 +10:00
a837797740 Cleanup: quiet warning 2015-07-09 19:33:02 +10:00
980ea4e54f Use it->second instead of (*it).second in KX_BlenderSceneConverter. 2015-07-09 09:45:21 +02:00
cdbb60b0a3 Select Shortest Path for edit-curve
D1391 by @pink.vertex with own fixes/edits
2015-07-09 17:03:00 +10:00
ee1b1b9e59 Curve: change rules wrt active bezier
Activate the vertex even if only a single handle is selected
2015-07-09 14:52:01 +10:00
bbc4a92318 Curve selection, de-duplicate & cleanup 2015-07-09 14:39:24 +10:00
ec64bf17e3 Select Similar for edit-curve
D1381 by @johnroper100 with edits
2015-07-09 03:03:19 +10:00
161bbfcd19 Add BKE_nurb_bpoint_calc_normal 2015-07-09 02:56:04 +10:00
4a328a7689 EditCurve: move selection into own file 2015-07-09 00:09:26 +10:00
de6b4dc7f7 Fix/Cleanup mesh remap dest transformation in tree/source space.
In org work, bvhtree helpers were modifying passed co/no in place according to given transform.

However, during review pass we decided this was bad, and made them modify copies. But this broke
some cases where we'd do extra tests after bvhtree query, expecting tmp_co to be in tree (aka source) space!

Further more, since in quite a few cases we were already doing that transform outside of bvhtree helpers,
decided to remove this alltogether from the helpers - makes things more clear and easy to follow,
avoids needless copy of vector, and ensures we are always using tmp_co in its transformed version!
2015-07-07 19:29:17 +02:00
30b7aafe33 Correct default enum values
Had assert creating cheat sheet
2015-07-07 23:10:08 +10:00
3dc86f586c Cycles: Add debug print about CLEW initialization status 2015-07-07 14:37:12 +02:00
37539962fe Cycles: Add an option to force disable all OpenCL devices
This way it's possible to disable OpenCL devices for AMD devices
which are considered whitelisted.
2015-07-07 14:18:45 +02:00
0c14a897dd BGE: Fix wrong current logic manager in collision callback. 2015-07-07 13:37:27 +02:00
1d021956f5 Remove redundant lists, link instead 2015-07-07 21:25:51 +10:00
86f09e58d4 Remove unnecessary constant info
Noting every constant as an int isnt helping,
this is only meant to be passed to only.
2015-07-07 21:17:33 +10:00
5af1daa2dc Fix for recent error, ngons now flipped correctly 2015-07-07 20:29:13 +10:00
23aa425cd9 Using proper subtype in game object velocity clamping properties.
The game.velocity_{min,max} and game.angular_velocity_{min,max} object
RNA properties did not use a subtype, and thus velocity was always
displayed as radians or blender units instead of the configured units.

Reviewed by: campbellbarton
2015-07-07 11:59:28 +02:00
afa25b1136 Minor simplification for uv edge drawing 2015-07-07 15:08:45 +10:00
Quentin Wenger
6ed1a1abe2 BGE: bge.texture API documentation enhancement
This patch attempts to improve and review the documentation of bge.texture, as requested in the [[ http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/GameEngine#Video_Texture | TODO list ]].

More specifically, it

  - fixes the rst syntax, including titles of the examples bge.texture.py and bge.texture.1.py;

  - adds, standardizes and reviews description of the API elements, particularly signatures, types, etc.

  - adds SOURCE_* constants to the doc

  - splits the doc into thematical parts (Video, Image, Texture, and Filter Classes, Functions, Constants).

Notes:

  - The parameter "mode" of ImageBuff.plot has to be described better. Actually, the whole set of IMB_BLEND_* constants (from IMB_imbuf.h) should be exposed to Python. I'll do that in a future diff, and complete the doc at the same moment (adding those IMB_BLEND_* constants to the Constants part of this doc).

  - The option of using webcams in VideoFFmpeg is still particularly not well documented. I am planning to make a proposal about fixing T18634 (and its corresponding TODO in the list) by integrating OpenCV in the BGE (and Blender?). The idea would then probably be to add a new class, f.ex. ImageWebcam, making this functionnality more specialized. So for now I don't think it is worth to document that part much.

This patch fixes T44284 too.

Reviewers: moguri, kupoman, campbellbarton, panzergame, lordloki

Reviewed By: panzergame, lordloki

Subscribers: hg1

Projects: #game_engine, #game_python, #documentation

Maniphest Tasks: T44284

Differential Revision: https://developer.blender.org/D1352
2015-07-06 21:48:25 +02:00
791b5fe9d0 Fix T45331, a bevel regression for 2.75.
Got bad results when two beveled edges form straight line
and there are two or more unbeveled edges attached to either
side of the connecting vertex.
2015-07-06 13:27:01 -04:00
Dalai Felinto
93608e4f3b Fix T45237: Dither does not work 2015-07-06 11:51:40 -03:00
Dalai Felinto
6a132aa65d Fix T45290: Selecting passes in image editor does no longer work
This issue was introduced with the wrong fix I committed for dither (rB56ca7f34)
Which also means T45237 has to be re-open
2015-07-06 11:15:16 -03:00
12583287e7 BGE: Fix T45341: Crash when camera is eliminated
A null check is added to avoid crashes when the camera is removed during
the game and no other is available
2015-07-06 15:40:50 +02:00
266459c7da Fix T45328: Crash upon finishing render with 'Cache Result' enabled 2015-07-06 12:35:11 +02:00
be07ab58c6 BGE Fix T45207: Camera actuator shakes with low height
The camera-aiming code was using a near-zero-length cross product, which
caused oscillations. Thresholding on the cross product length seems to
fix this.

Reviewers: lucky3, Matpi, lordloki

Reviewed By: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1387
2015-07-06 12:20:29 +02:00
28d712b238 Remove redundant face-flipping check 2015-07-06 19:21:19 +10:00
72565fbf30 Cleanup: style, spelling 2015-07-06 17:45:11 +10:00
499308d079 CMake: use cmake commands where possible 2015-07-06 13:34:32 +10:00
15c301f533 Change default for bevel to match previous behavior.
Have reconsidered and feel it best to try matching previous behavior
(doing "loop slides" where possible) as default. This will avoid the
need to change regression tests, among other things.
2015-07-05 13:31:26 -04:00
12aff8d783 Add 'loop slide' option to bevel. See T45260
Current behavior of bevel is to 'loop slide' along unbeveled edges
when possible, but this produces uneven bevel widths sometimes,
so this option lets user choose between having the loop slide effect
or having more even bevel widths. Trying it out with default being
'no loop slide', so different from current behavior. May reverse this
choice later, depending on user reactions.
2015-07-05 09:53:17 -04:00
51e9a814c9 Correct vert-slide helper-line scale
Was invalid in perspective view
2015-07-05 22:35:04 +10:00
6022bfbc05 Correct comment 2015-07-05 22:19:01 +10:00
2b63ec2894 Fix T45319: Set same precision for 3D cursor location as other locations (objects', vertices', etc.). 2015-07-05 10:55:59 +02:00
5c43695f4d Merge branch 'master' into openvdb 2015-07-05 09:44:42 +02:00
6de7f3c747 GPencil: use ctrl+x/del for dissolve
Move dissolve into own operator (as with mesh/armature)
2015-07-05 14:34:17 +10:00
68d72e2164 Add key toggle (V) to bevel tool to turn vertex-only on/off. 2015-07-04 10:14:47 -04:00
8d15cad449 Cleanup: Typo in comment. 2015-07-04 13:17:29 +02:00
631b53bad4 RNA: Match enum string to UI name
Having different terminology for enum's is confusing for scripters.
2015-07-04 13:02:59 +10:00
b997bda9f9 BGE: Fix T45259 collision sensor registration. 2015-07-03 23:48:26 +02:00
749f346ce0 BGE: Add alpha to coverage render mode.
This patch add a new option for transparency meshes : Alpha to coverage, in the game setting panel in material.
The alpha to coverage request a multisample, the best is 8x but 4x and 2x can also give nice render.

4x alpha clip : http://www.pasteall.org/pic/show.php?id=89464
4x alpha to coverage : http://www.pasteall.org/pic/show.php?id=89463

Reviewers: moguri, kupoman, campbellbarton, psy-fi

Reviewed By: psy-fi

Subscribers: lordloki, rdb

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1354
2015-07-03 19:03:29 +02:00
c503d17353 Fix T45281: IOR Value Slider with "Ctrl" modifier does not increment as intended.
Looks like a typo in rB1b8069bd?
2015-07-03 18:56:59 +02:00
e42609db49 Fix T45283: Blender crashes on some grayscale PNGs with alpha.
PNG_COLOR_TYPE_GRAY colortype can have some values for alpha, in the same way as
PNG_COLOR_TYPE_PALETTE colortype.

In this case, we need two channels (grayscale and alpha), not one.
2015-07-03 18:30:58 +02:00
97b431e42d BGE: Add integer uniforms for 2D Filter
Actually it is only possible to pass float properties to a 2D filter (GLSL fragment shader).
This patch allows also to use integer properties for the 2D filter.

Reviewers: sybren, agoose77, kupoman, moguri, lordloki, panzergame

Reviewed By: lordloki, panzergame

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1370
2015-07-03 17:07:31 +02:00
1ace3272aa Walk mode: Add modal shortcuts in UI (header help message). 2015-07-03 15:55:22 +02:00
9133f5a357 Cleanup: 'return' parameters to the end of functions, and use 'r_' prefix for them. 2015-07-03 15:55:22 +02:00
947cdb3acd UI: add ability to access/generate 'shortcuts strings' of modal keymaps.
We already had that for global keymaps (used e.g. to generate shortcuts for menu entries),
but this wasn’t possible for modal keymaps yet (e.g. help message in header during
transforms and other modal operation).

This commit only adds needing background code, it does not change anything from user PoV.
Modal operators will be updated to use it in comming weeks.

Thanks to Campbell for revisions & suggestions. :)

Differential Revision: https://developer.blender.org/D780
2015-07-03 15:55:22 +02:00
36426c3ee2 Cycles: Code cleanup, double semicolon 2015-07-03 15:44:57 +02:00
3129685f38 Sequencer: srt export support.
This commit adds a new operator that will compile the list of text
strips into an srt file. No positioning is supported yet but will
be added later.

The operator can be found in the effect panel in the strip properties.
2015-07-03 12:38:43 +02:00
c864f5d140 Cycles: Error enqueueing split kernels should no longer cause infinite loop 2015-07-03 12:13:38 +02:00
145ab8c49e BGE: Extend Python API for KX_BlenderMaterial (specular, diffuse…)
Add support for material diffuse, specular… in KX_BlenderMaterial python proxy. And use mathutils in KX_BlenderMaterial for the specular and diffuse color in KX_BlenderMaterial.

Reviewers: sybren, brita_, kupoman, agoose77, dfelinto, moguri, campbellbarton, hg1

Reviewed By: moguri, campbellbarton, hg1

Subscribers: dfelinto

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1298
2015-07-03 11:47:48 +02:00
659e5234af Cycles: Use explicit indices for split kernel queues 2015-07-03 11:05:28 +02:00
b9f89b1647 Cycles: Code cleanup in split kernel, whitespaces 2015-07-03 11:03:56 +02:00
Dalai Felinto
80f344fd95 Multi-View UI: convergence is only useless for the parallel camera (toe-in still uses it) 2015-07-03 01:11:35 -03:00
c702dabc3d Fix vertex slide regression w/ rotated objects
This could only be done with certain rotations.
2015-07-03 10:57:38 +10:00
2b5e150db0 BLI_GHash: add BLI_gset_str_new helpers. 2015-07-02 20:35:05 +02:00
626a287c89 Support debug contexts on win32 2015-07-02 20:06:02 +02:00
00808eb39a Make OpenGL debug contexts a flag --debug-gpu instead of a compile time
option.

This makes sense, since contexts get created at runtime, there is little
reason to require recompilation for this.

Only works on linux currently, will be doing more OSs later
2015-07-02 19:30:17 +02:00
Dalai Felinto
a5b2841aa0 RNA Doc: Camera shift affects all cameras (perspective, orthographic and even panoramic) 2015-07-02 13:53:36 -03:00
Dalai Felinto
fdb474fc8a Game Engine: Camera Lens Shift: support to change it during game 2015-07-02 13:51:30 -03:00
145d3540b3 Text effect strip for sequencer.
Is pretty much what it says :)
Easy subtitles for everyone!

Supports size, positioning,
a cheap shadow effect (probably will need more work),
and autocentering on x axis.

Now you can go wild with long spanish names
in your soap opera videos.

Will probably be refined as days go by,
but at least it's now ready for testing.
2015-07-02 18:46:46 +02:00
2723d10704 Render: Solve wrong vertex parent in linked objects with Locked UI
The cleanup function was a bit too much aggressive here, made it much more
conservative. It means memory usage will not be so low anymore, and to
address this we'll need to make this function depsgraph aware.
2015-07-02 16:12:08 +02:00
84b8ce32a4 Fix crash in background mode after the NDof deadzone commit 2015-07-02 15:59:12 +02:00
d96842bf19 Fix: Keyframe indicators for NLA Strip properties fails if the AnimData has an active action 2015-07-02 23:39:34 +12:00
fabc4fc720 BGE: remove check for area in start-game operator
This prevented the BGE from being started from the command-line,
the exec() function checked already.

Also use API calls to find area, region.
2015-07-02 21:31:39 +10:00
802f40c499 Remove anything which deals with transforming a grid.
This needs to be done in a more sensible way.
2015-07-02 12:59:28 +02:00
fe354606a2 Remove dead code. 2015-07-02 12:42:28 +02:00
e61ead7d4c BGE: Fix T45267 Lib load without material caching. 2015-07-02 12:27:14 +02:00
1fcfb0b9e7 Revert "Cycles: add support for transforming the grid (pos, rot, scale)."
This reverts commit 9514191b0c.
2015-07-02 12:18:43 +02:00
db8ccc18f7 Fix T45269: Blender 2.75 crashes when I run my the game
Velocity clamping on static objects caused a crash.
2015-07-02 12:05:49 +02:00
dde162d760 Cycles: take radius of the sampling kernel into account for ray
intersection.

As the samplers are hidden in a single class, the radius is set to the
largest.
2015-07-02 12:01:39 +02:00
e80e4c937b BGE: Fix T45196 armature action on libloading. 2015-07-02 11:56:49 +02:00
1393695145 Linux desktop spec: Add a 'Keyword' field. 2015-07-02 08:53:45 +02:00
1844160a22 DerivedMesh: cleanup & minor edirs
- place return args last position
- move crazyspace function out of DerivedMesh header
- use bool for args
- flow control on own lines to ease debugging
2015-07-02 16:20:22 +10:00
10c1f208b7 Minor edits to --help 2015-07-02 13:17:06 +10:00
Julian Eisel
b05cf040cb Cleanup: Use bool instead of int 2015-07-01 21:48:42 +02:00
5edff01920 Transform: use snap-to-grid behavior from D910
Excuse the trashing here, but seems users prefer this most (though both can be useful).

Note that the UI remains the same,
so this is an option for 'Incremental' snapping instead of a new snapping mode.
2015-07-02 02:20:54 +10:00
19da2d4124 Linux XDesktop spec: add '%f' file specifier to 'Exec' field.
Also reorder alphabetically generic names & comments, and add french comment.
2015-07-01 17:40:34 +02:00
12a8d7e6c4 Cleanup: Make select grouped effect code a bit more readable 2015-07-01 17:37:14 +02:00
6781cf0049 Refactoring:
Make sure SEQ_TYPE_EFFECT is only used as a flag, not as number
comparison.
This should allow us to add new non-effect types in between
effect types (every 8 indices).

Dirty, but alternative of separating type/subtype means we lose
forward compatibility.
2015-07-01 17:33:10 +02:00
607dca0705 BGE: Fix T44069 playing action during libfree. 2015-07-01 16:51:48 +02:00
d3709f4e79 Correct --help message 2015-07-02 00:24:10 +10:00
1a44237d82 Removing gaps will now also move the scene markers, unless markers are
locked
2015-07-01 16:25:28 +02:00
f525483d83 Sequencer metadata:
Add option to render strip metadata to final result, bypassing current
scene metadata.
2015-07-01 15:23:21 +02:00
0e084f93d9 BGE: Remove KX_PolygonMaterial reference in documentation. 2015-07-01 14:56:02 +02:00
d3109a1937 BPlayer compile fix © 2015-07-01 12:34:04 +02:00
53d12bbe04 atomic_ops: Fix MSVC versions of add/sub returning original value instead of result of operation.
Thanks to Brecht for tip about how to fix this!
2015-07-01 12:25:32 +02:00
174d5cf627 atomic_ops: fix typo in func names (uint32 instead of uint64). 2015-07-01 12:25:31 +02:00
78de47ca24 Cycles: Fix zero-size buffer allocation with OpenCL devices
This is not really supported by OpenCL but might happen in certain
configurations. There might be some remained cases when this happens
but so far can not find any,
2015-07-01 11:56:48 +02:00
9b64ebc605 Fix T45253: Particle emitter volume mode and grid mode broken in 2.75.x
This is a regression since dced56f and root of the issue comes to the fact
that grid distribution sets UNEXIST flag during distribution, which is then
being reset in initialize_all_particles().

This commit solves the issue, but it's not really nice and some smart guy
might want to revisit it.
2015-07-01 10:32:30 +02:00
95a1e99909 Particles: Code cleanup, whitespace 2015-07-01 09:33:52 +02:00
a77edab320 Cleanup: use bools 2015-07-01 16:57:18 +10:00
58d65dd976 Cleanup: use cross_v2v2 function 2015-07-01 16:37:05 +10:00
d9046ccbd4 Cleanup: doxygen comments 2015-07-01 16:30:26 +10:00
1779452eb4 Cleanup: use swap math funcs 2015-07-01 16:02:30 +10:00
45b2218341 User Prefs for NDOF dead-zone
D1344 with edits
2015-07-01 13:45:19 +10:00
b71c27a446 Use macro for user-prefs version checks 2015-07-01 12:48:53 +10:00
e3bafa8f50 Merge branch 'master' into openvdb 2015-07-01 02:28:49 +02:00
cf1bac3f69 Cycles: Solve some harmless NULL pointer magic
Was harmless but confused some sanity checks, also kinda makes sense
to be more verbose about what's going on there.
2015-06-30 23:41:19 +02:00
Julian Eisel
5e9b43cc61 Fix 1px gap in regions drawn with region overlap 2015-06-30 21:04:25 +02:00
6510e40500 Fix T45240: New depsgraph ignores animation applied on the curve data 2015-06-30 18:11:21 +02:00
21db9fff12 Fix T45238: New depsgraph flickers with the lattice modifier 2015-06-30 18:00:24 +02:00
00bfca2178 Fix T45241: New depsgraph was lacking update of python drivers on time change
It's quite tricky to see if the driver actually depends on time or not,
so currently used approach when we'll be doing some extra updates.

This seems to correspond to how old depsgraph was dealing with this.
2015-06-30 17:34:57 +02:00
c1d6a26842 Fix T45239: New depsgraph does not work with IK pole target 2015-06-30 16:48:43 +02:00
7039808899 Fix T45251 custom directory not taken into account for image proxies. 2015-06-30 16:31:30 +02:00
72d21fbd34 Fix for mistake in grid-snap patch 2015-06-30 23:55:14 +10:00
6de17c60bf Select flush deleting edgeloop in edge mode too 2015-06-30 22:50:32 +10:00
df19da3a8b CMake: remove helper text
Its out of date, better use the wiki building docs.
2015-06-30 22:46:55 +10:00
3bb698646a CMake: minor edits 2015-06-30 22:44:27 +10:00
c07bba1b05 Transform: add back absolute snapping option
This ensures that vertices are grid-aligned while transforming,
instead of just snapping the input values for translate.
2015-06-30 19:14:46 +10:00
5d3ba4fb80 Cleanup: transform grid snap round, not floor 2015-06-30 18:26:37 +10:00
cec0138bcc Note that closest_point_on_mesh is in object space 2015-06-30 15:47:44 +10:00
cfd36476a1 Cleanup: use const for screen functions 2015-06-30 15:31:55 +10:00
d59721e47a Cleanup: move BLI_char_switch into BLI_string 2015-06-30 15:18:03 +10:00
d17cb3f75f Cleanup: use BLI_str prefix for BLI_replacestrN 2015-06-30 14:50:34 +10:00
8bef305b6d Cleanup: move BLI_timestr to BLI_timecode 2015-06-30 14:47:31 +10:00
Dalai Felinto
56ca7f34dd Fix T45237: Dither dosn't work in Blender Internal Renderer after Multi-View 2015-06-29 18:10:15 -03:00
Julian Eisel
40d19b519d Node Editor: Use Smaller Factor for Grid Snapping
An attempt to treat @sebastian_k's blood pressure a bit.
2015-06-29 22:05:13 +02:00
079b41dd37 Remove WITH_TESTS_PERFORMANCE option.
Performance tests now have their own CMake macro, which ensures they do not get
added to ctest list, so we do not have to bother about them anymore, and can always
build them (when GTests are enabled, of course).
2015-06-29 20:26:58 +02:00
117bcfe039 GTests: do not add 'performance' tests to auto-ran tests (with ctest or 'make test')... 2015-06-29 18:15:02 +02:00
a8bc5f0cdb Fix .obj testing. 2015-06-29 18:14:27 +02:00
Dalai Felinto
f12b1790a0 Fix 73841 : Game Engine - Camera Lens Shift
This is essential for video projection, and the alternative until now was to manually change the projection matrix via Python.
( http://www.blender.org/manual/game_engine/camera/introduction.html#camera-lens-shift
- this page will be removed as soon as I commit this)

Also this is working for perspective and orto cameras BUT if the sensor is not AUTO it will only look correct in blenderplayer (this is an unrelated bug, but just in case someone runs into it while testing this, now you know why you got the issue).

Kudos for the BlenderVR project for supporting this feature development.

Differential Revision: https://developer.blender.org/D1379
2015-06-29 10:45:27 -03:00
Dalai Felinto
3d12d4b94f Fix T45234: Stereo Parallel vs. Off-Axis
Parallel rendering was not working.

The idea of having parallel convergence mode to render as parallel but
visualize as off-axis was good, but it was leading to some complications
in the code.

I think it's more clear to the user if parallel looks and render as
parallel, and if she wants to pre-visualize the converged planes, simply
temporarily set the camera to off-axis.
2015-06-29 10:24:25 -03:00
295d0c52a2 Fix T45022: Update missing when linking objects with new depsgraph 2015-06-29 12:59:21 +02:00
e35a26fbef Fix T45156: scaling region crash 2015-06-29 20:48:00 +10:00
6654ec7de7 Fix T45154: Translation binary file(blender.mo) for Japanese is too small
The issue was caused by some changes made to msgfmt which were needed to make
modified (cleaned-up, stripped-comments messages) working.

Unfortunately that fix was merged into the release branch, so this fix is to
be ported there as well and verified against rc1 translations.
2015-06-29 12:27:59 +02:00
827ccc343f Partial fix T45156: scaling region crash
'ar->winy' may not be initialized, making regions zoom in (past limits)
and attempt to draw very large text (~10x10k size characters), often crashing.

Fix isn't complete since it only corrects factory startup.
2015-06-29 16:49:23 +10:00
e6f7f36e40 Cleanup: Style in for loops header. 2015-06-29 00:56:04 +02:00
e245a57640 Fix T45227: Light optimization commit broke world MIS 2015-06-28 20:47:35 +02:00
68478aea01 Cycles: Avoid having duplication of BVH arrays during build
Previous idea behind having vector during building and array for actual storage
was needed in order to minimize amount of re-allocations happening during the
build, but it lead to double memory overhead used by those arrays at the vector
to array conversion stage.

Issue with such approach was that for BVH without spatial split size of arrays
is known in advance and it never changes, which made vector to array conversion
totally redundant.

Also after testing with several rather complex from spatial split scenes (such
as trees) it seems even conservative approach of reallocation (when we perform
re-allocation when leaf does not fit into the memory) doesn't give measurable
difference in time.

This makes it so we can switch to array, which will avoid unneeded memory
re-allocations when spatial split is disabled without harming other cases.

it's a bit difficult to measure exact benefit of this change on our production
files here, but depending on the scene it might give quite reasonable memory
save.
2015-06-28 18:15:25 +02:00
b506f3d328 Cycles: Add assert to an array at() function to be sure we don't have bad memory access 2015-06-28 18:15:25 +02:00
d9ef528d05 Cycles: Minor code style cleanup, whitesaces 2015-06-28 18:15:25 +02:00
9f48aa45ad BGE: added clamping of angular velocity.
Angular velocity clamping was missing from the BGE. It is implemented
similarly to the linear velocity clamping. It is needed to be able to
drive physical simulations of systems that have a limited rotational
speed.

Reviewed by: campbellbarton, panzergame, ton

Differential Revision: https://developer.blender.org/D1365
2015-06-28 12:54:53 +02:00
c5c2883ce0 BGE Fix: apply velocity clamping on every physics subtick
This patch uses the Bullet "internal tick callback" functionality to
ensure that velocity clamping is performed after every physics update.
This makes a difference when physics subticks > 1, as in that case the
too-high velocity could have impacted the simulation.

This patch follows the examples at [1] and [2]; the latter example
also explains that the way we limit velocity in the BGE (before this
patch) is wrong.

[1] http://bulletphysics.org/mediawiki-1.5.8/index.php/Simulation_Tick_Callbacks
[2] http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Code_Snippets#I_want_to_cap_the_speed_of_my_spaceship;

Reviewed by: panzergame

Differential Revision: https://developer.blender.org/D1364
2015-06-28 12:54:53 +02:00
32319dd106 Cleanup: remove BLI prefix from BKE funcs 2015-06-28 19:09:52 +10:00
2ef3c43c5d Fix T45214: BI render: maximum saturation bug in shadow pass with non-shadow lighting.
In case scene lighting would only have non-shadow light source, shadow intensity
would remain to 'pitch black'...
2015-06-28 10:53:07 +02:00
3d616ccba8 Temporarily disable absolute snapping
This really should have been finalized as a design task first,
there are too many open topics on how it should work.
2015-06-28 10:13:11 +10:00
aac5485fca Fix T45216: File Browser shows negative sizes for large files.
Simply backport small part of work from asset-experiments here (using double and
adding tera-bytes unit), looks like off_t is not always 64bits even on a 64bit OS...
2015-06-27 23:39:48 +02:00
008da0ff5e Cycles: Use aligned blender allocator when using guarded allocation
This way we solve possible issues caused by regular allocator not being aware of
some classes preferring 16 bytes alignment needed for SSE to work properly. This
caused random crashes during rendering.

Now we always use aligned allocation in GuardedAllocator which shouldn't be any
measurable performance impact and the code is only used by developers after
defining special symbol, so there is no impact on release builds at all.
2015-06-27 21:07:43 +02:00
3d7329950e OpenGL debug contexts:
Enable debug output in debug contexts for gl 4.3+
2015-06-27 17:20:30 +02:00
4d74180b9f Cycles: Fix for wrong device enumeration in CUDA
it is the same issue as described in the previous commit, original changes
in this area were wrong and only worked on a bugger optimus driver which
simply appeared to work by co-incident and in fact used wrong device..
2015-06-27 15:13:08 +02:00
09dc470982 Cycles: Rework the way how OpenCL devices are created
It was annoying copy-paste happened across OpenCL device constructor, device
enumeration and split kernel checks. Now those areas are using an utility
function which returns pairs of platform and device IDs for devices which are
supported by Cycles and enumeration is happening inside that list.

This makes it so filtering is happening in a single place, so there's no need
to keep 3 different functions in sync.

This commit also fixes a bug with wrong enumeration of devices caused by recent
fixes. Those fixes were in fact wrong and only happened to appear to be working
on laptop with optimus card on Linux. Root of those issues is in fact in bad
Linux driver for optimus cards.
2015-06-27 15:13:08 +02:00
17f12fc71a Cycles: Allow using custom allocators for vector class 2015-06-27 15:13:08 +02:00
9260c0c2ba Cycles: Ignore light which has no contribution to the scene
This commit makes it so light which has zero energy or doesn't has
emission shader at all is being ignored by the path tracing.
2015-06-27 15:13:08 +02:00
48ef0501b7 Transform: absolute grid snapping
D910 by @donfabio with edits

New icon for menu is still TODO
2015-06-27 20:03:28 +10:00
e2d3e36ca7 Cycles standalone: add support for reading UV coordinates to the XML scene reader 2015-06-27 12:05:05 +02:00
c68322c7e5 Cleanup: int/uint mismatch in printf... 2015-06-27 11:02:58 +02:00
e170d6be7f Cleanup: all params of BLI_str partition funcs can be const... 2015-06-27 11:00:47 +02:00
ecb6a6df52 OpenEXR cleanup: get rid of public IMB_exr_split_token, use BLI str helpers instead of own cooking. 2015-06-27 10:24:54 +02:00
ff7a46cfad GTests for new 'end' option of BLI_str_partition_ex(). 2015-06-27 10:24:54 +02:00
4d043c99dc Extend BLI_str_partition_ex: add possibility to define a right limit to the string.
Now you can define `end` pointer as right limit of the string (allows to easily search
in substring, especially useful when searching from right).
2015-06-27 10:24:54 +02:00
e78b03f9e9 Fix part of code in load_image_single() wrongly disabled when WITH_OPENEXR was disabled. 2015-06-27 10:24:54 +02:00
ab85c5f980 Fix crasher when loading multiview OpenEXR image.
With multiview/multilayer OpenEXR file, `load_image_single()` will return NULL ibuf,
since it has already populated ima (with `image_create_multiview()` or
`image_create_multilayer()` calls).

Also, added some more checks before doing `IMB_ImBufFromStereo3d()`, to be sure
we do have enough slots in ibuf_arr, and we do not overwrite second ibuf either.
2015-06-27 10:24:54 +02:00
851d7535d9 Fix T45204: String Splitting Function Bug: Using OpenEXR function even if compiled without OpenEXR.
Seriously!!!

Also, fix a potential buffer overrun here.

This should be backported to final release.
2015-06-27 10:24:54 +02:00
ddeb8c595f Cleanup: Fix a typo in world MIS.
Found by Lukas Stockner, thanks!
2015-06-26 21:36:28 +02:00
c58b5acefd Fix crash on undoing after 8690ea6
Forgot to clear the mutex when reloading the scene.
2015-06-26 17:50:08 +02:00
79c106705a Make code compile with GPU_DEBUG 2015-06-26 17:40:54 +02:00
8690ea611e Fix T45199 crash when editing material nodes.
Issue is data race between preview job and GPU nodetree evaluation when
localizing the nodetree. Data race happens due to localizations doing
overrides on original nodes' new_node variable.

Solution here could probably be to use a hash for mapping of old to new
nodes but will prefer simple brute force lock for now.
2015-06-26 14:47:53 +02:00
09e89f01a6 Cleanup: transform center
store global center in transform struct,
some code was calculating all the time, this is useful to keep available.
2015-06-26 16:21:04 +10:00
c74255181e Cleanup: transform aspect
Transform code had duplicate aspect checking,
now store aspect in TransInfo.aspect for reuse.
2015-06-26 15:45:09 +10:00
2cdcb1c171 Revert "Fix off by one error in display of start/end frame in sequencer."
This reverts commit 0e02ad8b64.

Initial commit was done so visual result fits with animation cursor
in timeline but this makes it so it looks like one extra frame is
rendered. Other idea would be to render one less frame for sequencer
but this is not so nice either. Generally here's no way to be
fully consistent here, but at least let's be workflow-consistent
2015-06-25 20:10:30 +02:00
0e83b0854f Fix T45191 Speed strip behaviour not easy to predict.
Code here calculated speed based on underlying strip start position,
which was not really visible, making prediction of the result really
difficult. Things here are simple: As long as the strip exists,
manipulate the current frame by the provided factor.
2015-06-25 19:49:08 +02:00
284d294f2c Fix T45190 effect muting does not restore original sequencer display. 2015-06-25 18:21:58 +02:00
c0ea3099c5 Correct error in recent refactor
Closed loops missed last line
2015-06-25 22:11:25 +10:00
ef57051e9c Select flush was missing in delete edge-loop 2015-06-25 21:06:47 +10:00
8e95303414 splash fix, previous had color conversion error 2015-06-25 18:44:45 +10:00
c40205738b Weight Paint: replace Blend with Smooth tool
Improved behavior

- can smooth # iterations
- option to expand/contract weights
- optionally mix with all/selected/unselected
2015-06-25 16:17:24 +10:00
ba98e6148b API calls for converting weights to float array 2015-06-25 16:17:24 +10:00
42314b32f2 Cleanup: generalize weight paint poll function 2015-06-25 08:32:09 +10:00
Quentin Wenger
6f17fb8630 BGE: Missing dot in 2d filter actuator documentation. 2015-06-24 22:34:55 +02:00
Quentin Wenger
fc668df245 BGE: Fix 2dfilter actuator mode constants. 2015-06-24 15:31:55 +02:00
Quentin Wenger
49aa7b1261 BGE: Fix color used as background in VideoTexture.
Now we use color converted (if we do a color management) by the setter for background color in VideoTexture (ImageRender & ImageMirror).

Reviewers:panzergame
2015-06-24 13:03:23 +02:00
1676fcded0 WeightPaint Blend: don't stack mem for dverts
Bad assumption since this could be a large list
2015-06-24 20:42:02 +10:00
c40759e678 Cleanup: warnings 2015-06-24 18:42:16 +10:00
a09af2dc7b Fix edge/vert slide UV-correct, small face error
Decrease epsilon to prevent flickering with small faces.
2015-06-24 11:21:54 +10:00
9ce738e0f6 Fix edge/vert slide UV-correct & non-planar faces
non-flat ngons would give instability (bad UV's).
2015-06-24 11:21:54 +10:00
a33b1ce500 Correct recent error 2015-06-24 11:21:54 +10:00
Dalai Felinto
227aefc18b RNA: exposing image_user settings for ImageTextureNodes
This is required in order to access image sequence frame_duration and
frame_offset among other settings.
2015-06-23 21:19:58 -03:00
0d4cca6593 Fix edge/vert slide UV-correct & zero length edges
When calculating loop angle weighting, skip overlapping vertices.
2015-06-24 09:54:23 +10:00
f1bad1d16b Improve dist_***_to_corner_v3v3v3 precision
Remove offset before calculating distance.

Define 'plane3' to BLI_math, since we often don't need the 4th component.
2015-06-24 07:21:11 +10:00
40a345a9c7 Cleanup: style 2015-06-24 05:13:43 +10:00
04e9a707f4 Subsurf: Make color layer aquisition order for textured draw match
cdderivedmesh
2015-06-23 17:48:46 +02:00
b318795c3b Fix T45051: Curve parent bug.
PARCURVE is deprecated parting type, should never have been exposed to user!

Not a regression, but safe enough for final 2.75 imho.
2015-06-23 17:35:55 +02:00
90b4131d16 BGE: Fix 57065a, missing dots. 2015-06-23 14:57:38 +02:00
57065a6df5 Minor tweaks to bge.constraints docs 2015-06-23 21:58:08 +10:00
1c251d7cb6 Update bge.constraints API doc
D1357 by @Matpi with edits.
2015-06-23 21:37:28 +10:00
72e812de7c Fix T45123: 2D line intersection fails
Co-linear lines could detect as intersecting even if they weren't overlapping.
2015-06-23 21:01:12 +10:00
ec8e0336a9 Cleanup: use 2d math funcs for line intersection 2015-06-23 21:01:11 +10:00
7ecb199d86 Fix stupid mistake 2015-06-23 12:58:33 +02:00
cb5aecdae9 Code cleanup: Use enums for redraw timer operator, makes things more
readable
2015-06-23 12:53:33 +02:00
91fde2891c Fix edge drawing, total loose edges can only be determined -after- the
edge buffer has been setup (this is where they are counted)
2015-06-23 12:06:36 +02:00
39d66bf1a4 Merge branch 'master' into openvdb 2015-06-23 11:30:39 +02:00
2719f51a70 Cleanup: colors and gl calls 2015-06-23 11:29:33 +02:00
cd7853be22 CMake: quiet warnings in GTest 2015-06-23 14:34:52 +10:00
4e8092e2e4 CMake: support multiple args to remove_cc_flag 2015-06-23 14:30:08 +10:00
f1917a2188 Allow editing the text editor line directly
Alternate solution for T44855
2015-06-23 10:17:00 +10:00
0cd4b39f58 Cleanup: reorder operations in the loop over the vdb tree nodes. 2015-06-23 00:13:39 +02:00
d6e180e75a Fix T45117: Dark dupli-face objects (regression) 2015-06-23 08:02:00 +10:00
74f7ef1240 Missed changing default arg in addon_utils.disable 2015-06-23 07:25:10 +10:00
e2fa6663d3 Fix T44320: UV island overlap considered linked 2015-06-23 07:07:52 +10:00
45c287d009 Visualization: compute normals for voxel box drawing. 2015-06-22 21:49:17 +02:00
c571e5989d Visualization: draw full boxes for voxels.
Also avoid creating several instances of the same vertex.
2015-06-22 21:15:58 +02:00
80192b5391 Fixed compilation error in editor/animation/anim_markers 2015-06-22 20:38:25 +02:00
Julian Eisel
f0c5ed39ee Fix T45149: Normal Node shows a hole in its sphere with heigh scale facs 2015-06-22 20:35:49 +02:00
211a95b538 Fix T45034: MirrorBall rendering on wrong camera axis
This was a mistake in the original code from D1079.

With the current way how direction ot mirror ball works camera should look
into negative Y direction. Corrected it in the camera matrix synchronization,
so no extra calculations are needed at the render time.

That's a bit annoying, but we'd better port it to the release branch, or
otherwise we'll end up with files created with wrong camera mapping after
2.75 release.
2015-06-22 20:09:52 +02:00
a1609791ca Fix T45148, stupid own mistake, the two functions are not the same,
shouldn't have collapsed them
2015-06-22 19:40:07 +02:00
4faccf0a78 Revert "Lock markers now also disallows selection of markers"
This reverts commit 37fd262805.
2015-06-22 19:40:07 +02:00
d979ac4cc9 BGE: Fix T45110, T44174, armature animations update and mirror render.
Reveiwers:Moguri, Matpi, youle
2015-06-22 18:16:31 +02:00
7bd3b34e02 Exporter: option to write grids as 16-bit half floats.
This is just for storing on disk, the grids are converted back to full
float format upon reading. Also this affects all grids to be written for
now.
2015-06-22 18:09:41 +02:00
5e241e3028 Fix T45145, multiview selection fix not working for scaled matrices.
Multiview code already accounts for scale, do not scale frame before
multiplying with matrix.
2015-06-22 15:55:36 +02:00
7119a0f67d Fix T45136, only draw edges if there's something to draw. 2015-06-22 15:18:04 +02:00
3044e9fd31 Cycles: Respect duplicator's object motion blur settings
The idea is to make it possible to control linked duplicated objects motion
blur from the scene file without need to do overrides on the linked object
settings. Currently only supported for dupligroup duplication and all now
if duplicator object has motion blur disabled then it'll be inherited into
all the duplicated objects.

There should be no regressions/changes in look of existing files because
objects do have motion blur enabled by default.
2015-06-22 13:53:04 +02:00
b5b8599342 Fix T45144: Multi-value-edit ignored range 2015-06-22 19:36:30 +10:00
63c9f51133 Fix camera stereo logic use /w regular select 2015-06-22 18:23:59 +10:00
c119187be0 Fix T45133: Crash drawing material buttons 2015-06-22 16:51:22 +10:00
63f62cd757 Fix memory leak /w multi-drag over a single button 2015-06-22 08:27:56 +10:00
857c9e14f7 Cleanup: Get rid of some ugly magic numbers... 2015-06-21 22:37:39 +02:00
43f6ed908f Fix T45135: More cleanup of extreme max values in operator properties.
INT_/FLOAT_MAX are sometimes valid choices, but most of the time more
sensible values should be used here!
2015-06-21 21:56:35 +02:00
6057548058 Fix/Cleanup possibility to type insane values in 'add' operators options.
Our 'hard limit' values was too often max_int/float here, mis-typing could
lead to crash (or infinite hanging) of Blender, see e.g.
http://blender.stackexchange.com/questions/32790/blender-forces-computer-to-reboot-after-mistyping-extreme-value-for-resolution-i
2015-06-21 16:06:44 +02:00
8be4d76204 Change defaults for planar-face tool 2015-06-21 12:52:37 +10:00
9ddb624a88 Cleanup: quiet warning 2015-06-21 12:33:55 +10:00
8d752141ce Support for platforms /wo malloc_usable_size
Was only used for stats, netbsd doesn't define this function.
2015-06-21 12:33:55 +10:00
e3d6269ec4 BMesh: replace BLI_array -> BLI_stack 2015-06-21 09:46:12 +10:00
cdb0cf3ec7 BMesh: replace BLI_array -> BLI_stack
Also use more direct custom-data access.
2015-06-21 09:19:12 +10:00
aeda4dca77 Threads: Cache result of syscall when querying number of system threads
Number of system threads is quite difficult to change without need of blender
restart, so we can cache result of the systcalls (which are not really cheap)
in order to be able to call BLI_system_thread_count() without worrying of
performance issues in that function.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1342
2015-06-20 22:10:30 +02:00
a95b0e0e9d Cycles: Another fix for OSX, sm_50 experimental actually also fails to compile
Didn't notice it originally because compilation was threaded.
2015-06-20 19:40:23 +02:00
5e2835037a Cycles: Tweak to previous commit, experimental sm_52 works on Linux but not OSX 2015-06-20 19:01:24 +02:00
34d665a4a4 Cycles: Un-inline triangle_intersect_precalc() on Apple OpenCL
This gives quite the same problems as experimental CUDA kernels
and for until it's found a root cause of the problem we'd just
explicitly uninline the function.
2015-06-20 18:00:30 +02:00
63dd554ff1 Cycles: Don't show pre-sm_20 CUDA cards in the device list 2015-06-20 17:34:12 +02:00
5a4b51992e SCons: Enable sm_52 CUDA kernel on all platforms 2015-06-20 17:01:21 +02:00
845854959f Cycles: Cleanup, make it more obvious which platform requires workaround for triangle intersection
Should be no functional changes.
2015-06-20 17:01:21 +02:00
2a305580b2 BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy
Fix T38030.
In c++ source we use one list for triangles and an other for quads, but KX_PolyProxy doesn't care about that and return the vertex offset in its list. So we just have to compute the offset of each RAS_DisplayArray to its previous to have an absolute vertex index.

Reviewers: moguri, campbellbarton, kupoman, agoose77, brita_, hg1

Reviewed By: agoose77, hg1

Projects: #game_engine

Maniphest Tasks: T38030

Differential Revision: https://developer.blender.org/D1324
2015-06-20 14:21:31 +02:00
6b3a43ccb4 BGE: dissallow calling reverse on internal clists 2015-06-20 20:02:16 +10:00
b6820c9522 missed last commit 2015-06-20 19:47:34 +10:00
e019d8fb8c Transform: UV islands were split by winding
This meant front/back faces from a projection would be seen as separate islands.
2015-06-20 19:28:51 +10:00
e3fe56d9d1 Minor edit to transform-uv-island center calc
Only count each UV to influence the center once.
2015-06-20 19:13:49 +10:00
72a2d22f03 support ninja for netbeans projects 2015-06-20 18:24:06 +10:00
5a69b93f57 Sculpt lasso (used shorts for no good reason) 2015-06-20 17:58:52 +10:00
973afa0172 Cleanup: use listbase clear 2015-06-20 17:09:05 +10:00
f6c661a38f BMesh: simplify join-tri's 2015-06-20 16:48:59 +10:00
e807520a1e BMesh: minor optimization for UV island walker 2015-06-20 16:40:39 +10:00
74b32a23f7 Cleanup: checks for unsupported MSVC versions 2015-06-20 15:17:32 +10:00
4addabaed8 Cleanup: unused vars 2015-06-20 15:17:21 +10:00
2de34ba31d Fix T45109: multi-view regression /w screen-cast 2015-06-20 14:54:02 +10:00
51188ecbf1 BGE Cleanup: Translation of several comments in Dutch 2015-06-20 01:19:32 +02:00
8e1ba0b805 BGE Cleanup: remove dead code at SetCenterOfMassTransform
Basically, at this line body is always NULL and the code is never
executed

Reviewers: moguri, hg1, panzergame, agoose77

Reviewed By: hg1, panzergame, agoose77

Subscribers: blueprintrandom

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1331
2015-06-20 01:00:22 +02:00
1d6c025c42 SCons: Fix missing file in kernel when building on OSX 2015-06-19 21:26:47 +02:00
037181cf1c SCons: Another attempt to fix bundling on OSX 2015-06-19 19:52:47 +02:00
27eb2b1017 SCons: Fix wrong bunding of Cycles kernel on OSX platform 2015-06-19 19:38:51 +02:00
e9406256d0 BGE: Simplify collision callback registration.
Remove list m_triggerController and just use getter CcdPhysicsController->Registered().

Reviewers: sybren, agoose77
2015-06-19 16:40:42 +02:00
ae0ed5e9d5 RNA: Don't fill in color grid array when built without smoke
Array length is set to 0 in that case, so filling in first element is
likely to cause memory corruptions.
2015-06-19 13:55:31 +02:00
Johannes Meng
9affa8450a Expose smoke simulation velocities in Python API
This patch exposes smoke simulation velocities in the Python API,
similar to how density and flame grids are exposed.

This is useful to export velocities to an external renderer using Python.

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Subscribers: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1366
2015-06-19 13:50:34 +02:00
9d796df4f6 Support half float file format storage for Multilayer EXR
Quite straightforward implementation -- all the conversion magic is
happening in IMB_exr_write_channels() and remained changes are only
needed to pass information whether channels is to be converted to
half float or not.

Regular file output will use full-float for Z pass, which matches
behavior of the single layer EXR files. But when saving happens
with File Output node then all the passes are respecting half float
settings because it's not possible to distinguish whether we're
saving Z pass or not.

Reviewers: juicyfruit, campbellbarton

Reviewed By: campbellbarton

Subscribers: maxon, effstops, fsiddi

Differential Revision: https://developer.blender.org/D1353
2015-06-19 13:34:11 +02:00
0d3555fe2e Transform: Add individual origins for UV islands
Useful for scaling all UV islands
2015-06-19 21:17:03 +10:00
0f171d4a25 BLI_threads Queue: add BLI_thread_queue_is_empty().
Avoids counting the whole queue when we only want to check whether it is empty or not!
2015-06-19 12:31:26 +02:00
1cf1f48893 Cleanup: fix mismatch in printf formating (int/unsigned int).
Noisy and annoying with new gcc5...
2015-06-19 12:31:25 +02:00
52e95ad3d3 BLI_stack: BLI_stack_pop_n_reverse
Useful to fill an array in the order its added.
2015-06-19 20:19:37 +10:00
d4aeec9204 BLI_stack: function comments 2015-06-19 15:54:42 +10:00
9b3722b414 avoid assert with bmesh inset 2015-06-19 09:41:39 +10:00
d8cef42a14 Fix leak in edge-offset 2015-06-19 06:03:47 +10:00
Dalai Felinto
a1e01fda24 Fix T45104: RGBA PNG Stereo 3d Anaglyph renders turn all shades of black into alpha in 2.75 RC1 2015-06-18 13:56:11 -03:00
e1fd7b9ca9 Cycles: Report currently sampling tile when CPU is working on the last tile
This is mainly useful for the render farms output when logging might stop at
the "Path Tracing Tile N/N" string, which makes it a bit difficult to follow
what exactly is happening (node going crazy, hardware issues or just last tile
is too much heavy).

This is more like an experiment, might be changed in the future.
2015-06-18 16:15:37 +02:00
7e529c2a64 Return non-zero exit code when running blender from the command line and reading file has failed
This way automated scripts can actually see if some issue happened.
2015-06-18 14:07:39 +02:00
4ed6605d65 Cycles: Don't show devices which does not support OpenCL 1.1 in the menu
They'll be checked for the version later and that check will fail anyway,
so better to not allow user to see unsupported device in the list.

Also corrected one more issue with the device enumeration.
2015-06-18 11:26:22 +02:00
1428324717 Merge branch 'master' into openvdb 2015-06-18 07:00:34 +02:00
28c34d332f Assert when relative paths are passed to IO ops
This is typically an error (& hangs a few seconds on win32), best catch early.
2015-06-18 12:49:10 +10:00
03efc37a6e Transform: Improve UV creation efficiency
- was doing 2x spin-locks, multi-view check and hash-lookup per face-corner.
- avoid doing customdata layer lookup per face.
2015-06-18 12:27:48 +10:00
7165d979ae Fix crash transforming UV /w PET-connected mode 2015-06-18 12:23:55 +10:00
3468038ed5 Fix transform connected UVs memory leak 2015-06-18 12:23:54 +10:00
7fbf264c67 Update netbeans project file generator 2015-06-18 12:23:54 +10:00
530034511c Freestyle: Fix for wrong assertion failure upon inverted face normals.
The assertion code was not taking quad faces into account.

Problem report by Folkert de Vries (flokkievids) through personal
communications, thanks!
2015-06-18 08:28:35 +09:00
18f228d593 update hand written rst docs
- minor corrections
- link to new manual
- wrap lines at 120
2015-06-18 08:00:46 +10:00
Quentin Wenger
a62392dea7 BGE: remove outdated doc of KX_PolygonMaterial, update doc of KX_BlenderMaterial
This patch suppresses the outdated KX_PolygonMaterial.rst documentation file and moves the example contained in it into KX_BlenderMaterial.rst.
The file KX_BlenderMaterial.rst receives some extra formatting changes (lists are not supported in methods arguments types).

Reviewers: kupoman, campbellbarton, lordloki, panzergame, moguri

Reviewed By: panzergame, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1355
2015-06-17 22:43:29 +02:00
3ce4a58aa9 Cleanup: duplicate includes 2015-06-18 06:32:01 +10:00
937ecaf77e BMesh: Add edge-offset option: cap-endpoint
Creating triangles at endpoints is often not so good, disable by default.
2015-06-18 03:17:20 +10:00
8f6e7e5565 Add a function to allocate and set default values for the drawing
properties.
2015-06-17 18:33:22 +02:00
b91aecc017 One more de-duplication. 2015-06-17 18:16:23 +02:00
ee5b2d3765 Rework the UI for displaying the OpenVDB data. 2015-06-17 18:13:16 +02:00
f750a48cda Cleanup: de-duplicate drawing code. 2015-06-17 18:12:25 +02:00
da61c36f2a Revert "Fix/Workaround T44662: Freestyle gives no visual output when the Save Buffers option is enabled"
This reverts commit ab417f31f4.

This workaround caused serious memory corruption issues which is not really acceptable
for the release. We'll be likely sticking to a more limited release when using freestyle
with saved buffers for until proper solution is implemented.

Conflicts:
	source/blender/render/intern/source/pipeline.c
2015-06-17 18:02:02 +02:00
fc35b758ad Fix T44682: Save Buffers canceled renders show nothing in Image Editor
The issue was caused by render pipeline freeing render parts prior to finishing
exr file writing which resulted in unfinished parts not being written into the
file by save_empty_result_tiles().

As a temporary solution we do explicitly write unfinished parts as empty tiles
to the exr file prior to freeing parts.

Not ideal solution, but should work for the release.
2015-06-17 17:50:50 +02:00
6a91edb8e0 Add a level of detail scheme to reduce the number of voxels to be drawn. 2015-06-17 17:50:39 +02:00
e96d1c7965 CMake: use parent scope setting cflags in funcion 2015-06-18 00:59:07 +10:00
0dcda51836 Revert "Correct recent commit replacing macro's /w MSVC"
This reverts commit 810f8928d6.

Worked by accident with MSVC, real fix next...
2015-06-18 00:58:58 +10:00
37fd262805 Lock markers now also disallows selection of markers 2015-06-17 16:59:17 +02:00
198fa023c1 Add possibility to draw voxels as boxes.
The colors are set to be the same as the VDB paper, just like for the
tree. They are drawn perfectly, but that'll for the moment.
2015-06-17 16:49:30 +02:00
bd5ea70a75 Compositor: Fix stupid type in incrementing number of finished tiles 2015-06-17 16:32:07 +02:00
01f21f8026 Report proper frame and time to the console when doing compositing 2015-06-17 16:30:27 +02:00
42d5df448c Cleanup, use define instead of magic number 2015-06-17 16:29:31 +02:00
0119c63405 Print elapsed time when rendering from the command line 2015-06-17 16:06:33 +02:00
f2e1284f05 Move draw settings to its own struct and add some more options.
For now the options control the tolerance for drawing voxels and their
size in the viewport.
2015-06-17 15:56:55 +02:00
bcc4957877 Flush stdout prior of calling render stats callback
Without this extra flush order of stat prints is undefined in the
output. which makes it rather tricky to write custom output in a
reliable way.
2015-06-17 15:49:09 +02:00
0b79c5ed29 Cycles: Report total and render time to the log
This includes total render time spent on rendering since render() was
invoked and also prints time of actual rendering (without synchronization
step).
2015-06-17 14:07:51 +02:00
e1ce9220d6 Fix me being stupid commit.
Copy modifiers operator would copy modifier to all strips, even
unselected ones.
2015-06-17 13:54:36 +02:00
35476f588f Use vertex arrays to draw the VDB tree and its values. 2015-06-17 12:58:57 +02:00
3b57f075a8 Fix (unreported) redo of 'bone envelope distance resize' transform op not working
(it would behave like 'bone envelope resize' instead).

Issue comes from the fact this transform op shares some common points with both BoneResize
and BoneEnvelope operations. However, trying to re-use `TFM_BONE_ENVELOPE` itself in this case
is bad idea, since this mode gets stored in transform op and is directly re-used for redo,
by-passing the whole init phase that shall be done in `TFM_BONESIZE` mode... So now,
we add a real new mode, `TFM_BONE_ENVELOPE_DIST`, while keeping most of existing code
and all existing behavior.

This is slightly hackish - but was already anyway, and avoids creating a full new set of
function for pretty much the same thing. As a side note, also makes it possible to
resize envelope distance outside of envelope viewing mode (from py or by adding a custom
shortcut).
2015-06-17 12:30:30 +02:00
e0ae59f5d8 Cleanup: use floorf instead of floor when dealing with floats. 2015-06-17 12:02:53 +02:00
aee4527101 Cleanup/Fix unreported: many 'transform' apply was not updating t->values with final values.
This means redo panel of matching operators would not get correct values set in case
those were entered with numinput, or some snapping was used...
2015-06-17 12:02:53 +02:00
ae3e37b899 Cycles: Fix wrong numbering of OpenCL devices when some of them are skipped
Skipped devices did not reflect in the device number, which might result in bad
array indices.

This might also resolve T45037, and need to be ported to a release branch.
2015-06-17 11:35:39 +02:00
364d934951 Fix T45059: Image open /w relative paths & anim
- would hang on win32 (checking network share?)
- made the path absolute on all systems
2015-06-17 16:05:35 +10:00
a1c6b73de7 Fix leak getting image frame-range from filesel 2015-06-17 16:05:01 +10:00
5b833de521 ImBuf: Assert when read/write gets relative paths
We _never_ want this, so better not fail silently.
2015-06-17 15:53:35 +10:00
c03dcc5421 CMake: set advanced var 2015-06-17 14:25:05 +10:00
810f8928d6 Correct recent commit replacing macro's /w MSVC 2015-06-17 13:16:21 +10:00
81b37f5e92 CMake: use functions instead of macros
Reduces issues with vars leaking into the parent scope.
2015-06-17 09:38:24 +10:00
ecdbe3cc63 Cleanup: style 2015-06-17 07:06:59 +10:00
2689247f98 Correct last commit
avoid sqrt
2015-06-17 06:54:35 +10:00
770dfead86 Fix T45096: Bad UVs /w EdgeSlide & zero-area faces 2015-06-17 05:51:09 +10:00
aab2da9e65 Optimize drawing of outlines as well 2015-06-16 21:44:40 +02:00
fbff0e68a4 Drawing speedup:
We really don't need to iterate all edges of the mesh every frame to
search for loose edges, this calculation can be cached when filling the
edge index buffer.
2015-06-16 20:55:37 +02:00
5ca3f3d811 Partial Fix T44997: Propagate pose on selected keyframes only included those after the current frame
This behaviour was confusing, since "selected keyframes" suggests that it covers
all selected keyframes (instead of trying to do this based on frame ranges).
2015-06-17 01:49:29 +12:00
c55cf743cd Fix T45088: Wrong tooltip for 'Object Transform' option of transfer data. 2015-06-16 14:17:26 +02:00
94eb2647d5 BGE: correct case for createConstraint keyword 2015-06-16 21:22:41 +10:00
b986f955e9 Disable assert for polyfill
Would fail on some zero-area ngons.
2015-06-16 21:13:22 +10:00
173c1133a8 Fix own mistake selecting linked 2015-06-16 20:33:36 +10:00
fa823dc828 Cleanup: style 2015-06-16 10:32:41 +10:00
b1a92f2b3a Fix T44701: Buffer overrun reading directories 2015-06-16 10:04:28 +10:00
532e29cd76 Win32: make DIR struct opaque 2015-06-16 10:03:12 +10:00
291152e127 Add back ray bounces debug code, can be useful nevertheless.
Just need to keep in mind that these are not indirect bounces in the pass then.
2015-06-16 00:39:11 +02:00
6d63446710 BGE: Fix for precision lost in setBackground/getBackground at Video Texture
Now internally the variables are processed as floats avoiding int->float->char conversions that are causing precision lost.

A check for int numbers is maintained to keep compatibility with old behaviour.

Reviewers: ben2610, campbellbarton, moguri, hg1

Reviewed By: moguri, hg1

Subscribers: campbellbarton

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1301
2015-06-16 00:05:25 +02:00
53e3e46332 Cycles / Branched Path: Some simplifications for main loop.
The main loop only handles transparent intersections from the camera ray.
Therefore we can simplify some things.

* Avoid PATH_RAY_CAMERA check, this is always true.
* Avoid path_state_next() call, we can just set transparent flag and increase transparent bounces. This way we avoid the function call and some branching.

Also remove debug num_ray_bounces++, this is incorrect here as no indirect bounce happens here.

Should be no functional changes.
2015-06-15 23:50:29 +02:00
888ed6b7f1 Cleanup comment and remove now redundant define. 2015-06-15 23:35:38 +02:00
099aaea447 Cycles: Move branched path tracking into own file
Code there started becoming a bit too big, by splitting it up it'll make it
easier to do improvements or extending the features in there.

The layout is not totally final yet, would need to try de-duplicating parts
of code from split kernel with non-split integrators,
2015-06-15 23:02:42 +02:00
6c23497185 Fix T45086: Crash showing scopes
Was a rounding issue, which was previously solved by quite simple check.
Well, let's do the same check again :)
2015-06-15 22:17:16 +02:00
1c707a2392 BGE: Fix T43918: adding submodule bge.app including attribute version.
This patch adds the submodule app to bge. apps contains constants similar to bpy.app, particularly version (tuple of three ints like 2.75.1).

It was requested in T43918 and set as TODO.

The patch also adds rst doc for the module.

Reviewers: moguri, kupoman, lordloki, panzergame, campbellbarton

Reviewed By: lordloki, panzergame, campbellbarton

Subscribers: marcino15

Projects: #game_logic, #game_python, #game_engine

Differential Revision: https://developer.blender.org/D1348
2015-06-15 21:46:56 +02:00
124b25cf9d Usual minor i18n/UI messages fixes. 2015-06-15 21:38:36 +02:00
a44a0cf443 Copy strip modifier operator for sequencer
Copies from active strip to selected strips, found in modifier panel
2015-06-15 21:23:24 +02:00
b633c2857f Fix integer division error with image scopes 2015-06-16 04:16:27 +10:00
3f7ea7489e Cleanup: quiet assert for zero-length axis 2015-06-16 04:16:27 +10:00
bf57c91ead Depsgrtaph: Adding shapekey should update relations
This is needed for the new granular depsgraph, otherwise graph is not
containing all the operations needed for proper update.

And the same is actually needed onwhen removing shape key.
2015-06-15 18:55:26 +02:00
473d46263b Fix T44980: Shapekeys with driver not working with new depsgraph in 2.75 test build
Was just a few missing dependencies.
2015-06-15 18:50:43 +02:00
05b2ab1109 Fix typo in previous commit 2015-06-15 15:40:40 +02:00
9090d64544 Fix T45060: Brush size snaps back to default max 2015-06-15 22:27:52 +10:00
d7cd8ff891 Fix T45052: Compositing-Masks are not editable with new DepsGraph
This commit fixes missing updates of masks with the new dependency graph
in a way which is safe for backport into master branch.

Compositor nodes will not receive needed update callback yet, this will
be solved after mask and compositor are becoming a proper node in the
graph, it is considered a TODO now.
2015-06-15 13:41:32 +02:00
435def9bdc Merge branch 'master' into openvdb 2015-06-15 13:35:00 +02:00
e11aead9e6 Several fixes and cleanups to the compile process:
- disable exceptions in tbb for cycles due to typeid usage
- cleanup SConscript in intern/openvdb, and make others align with
CMakeLists
- import fixes from gooseberry branch by sergey
- fix compilation error when cycles logging is disabled
- avoid unnecessary includes if building without openvdb
2015-06-15 13:31:05 +02:00
5b8af1d1f1 Fix T44704: BGE regression importing bpy.types 2015-06-15 21:11:45 +10:00
edfe2d6691 BGE: fix use after free 2015-06-15 20:56:44 +10:00
fd629d2fb8 Cleanup: quiet warning 2015-06-15 19:56:43 +10:00
644e2250ce Add missing file 2015-06-15 18:14:24 +10:00
d8e994b35f BMesh: edge-offset feature (Ctrl+Shift+R)
Ability to quickly add 2x edge loops  on either side of selected loops.
2015-06-15 11:03:13 +10:00
3efc0aca54 Revert "Revert "Disable key accelerators for splash screen""
This reverts commit 7f3dcbe17f.

Please check with authors first, this bug was already fixed since RC1.
2015-06-15 10:59:53 +10:00
7f3dcbe17f Revert "Disable key accelerators for splash screen"
This reverts commit 7b0c327b94.
The problem with this commit is that the "move to layer" functionality by hitting M,1 f.e. didn't work anymore...

Campbell, would be great if you could look into this again, as I'm not experienced in this specific region..
2015-06-15 00:54:28 +02:00
e464cbae3b Edge Slide: refactor direction calc into function 2015-06-15 04:56:07 +10:00
9cefd5612d GHost: Attempt to fix compilation error on older OSX systems
The issue was caused by using NotificationCenter which is only available
since 10.9 so trying to build blender on OSX with 10.7 SDK would fail.

Now it should be possible to build blender with SDK 10.7 and at the same
time official builds should still be doing proper weak-linking to a
notification center.
2015-06-14 14:36:05 +02:00
eb0310950c Fix error enabling an already enabled addon
Would run register() twice causing warning with `register_module()`
which expects new classes to be defined.

Now run unregister() before re-registering.
2015-06-14 22:26:42 +10:00
1862991862 Fix '--addons' argument
- only enable addons which aren't already enabled
- use 'persistent' load option (new file wont reset)
2015-06-14 22:18:44 +10:00
b9fe261255 Fix addon_utils.check
Second return value could be None instead of False.
2015-06-14 21:47:02 +10:00
91b23992ce Fix T41870: Cycles OSL - Changing rotation value in anisotropic shader crashes Blender
Older OSX has major issues with sincos() function, it's likely a big in OSL
or LLVM. For until we've updated to new versions of this libraries we'll use
a workaround to prevent possible crashes on all the platforms.

Shouldn't be that bad because it's mainly used for anisotropic shader where
angle is usually constant.

This fix is safe for inclusion into final Blender 2.75 release.
2015-06-14 13:14:11 +02:00
bc802ead98 A simple UI for the VDB tree visualization. 2015-06-14 03:49:43 +02:00
208a917b73 CMake: note env var 2015-06-14 10:05:03 +10:00
52997272aa CMake: disable OSL if cycles is disabled 2015-06-14 09:50:33 +10:00
1e9348efdc CMake: minor edits to lite config 2015-06-14 09:34:42 +10:00
424e5be046 Makefile support for using NPROCS as an env var 2015-06-14 08:27:29 +10:00
a2d4c26aa2 BMesh: use define for string 2015-06-14 08:27:29 +10:00
b1ed12bfec Compilation error fixes for older GCC/CLang compilers
Avoid data type re-declaration, it's not really working on current FreeBSD's 9
system and CLang-3.0 from OSX.

This is not a good idea to do such sort of copy-paste anyway.

If someone knows better way of dealing with this please go ahead and correct
the code :)
2015-06-13 22:19:50 +02:00
1c81bcffde addon_utils default mismatch /w enable/disable
default_set argument is now False for both.
2015-06-14 05:14:43 +10:00
75a86d6a8e Fix for building without Python 2015-06-14 04:53:10 +10:00
a1ac42f5eb Fix (d4e5df) blenderplayer compiling.
dfelinto is the second time that you forgot to modify bad_level_call_stubs/stubs.c. Please compile with the blenderplayer to see the error.
2015-06-13 20:23:48 +02:00
4835fe06f1 Fix T45062: Make it clear in tooltip that 'double sided' mesh option only affects
OpenGL (viewport), and not render engines.
2015-06-13 19:45:45 +02:00
Dalai Felinto
9326820a1b Multi-View: Show multiview image properties only in the places where
they are supported

aka, remove multiview properties from the texture panel, the textures
node (image), and any other parts.

The multiview options are now to be explicitly set in the image template
in order to have them available in the respective panel
2015-06-13 14:09:22 -03:00
Dalai Felinto
e944af67f7 Multi-View: Fix - stereo 3d background image in viewport not working
The functionality was there, but the UI was missing, since I introduced
the use_mutliview option in the Image datablocks.

Note: when opening the image via the background image UI it has its
views data mangled. I'll look at that. Meanwhile the fix is to toggle
Use Multi-View manually in the UI.
2015-06-13 14:09:22 -03:00
41d5ff6fe9 Cycles: Avoid compilation warnings when building without passes support 2015-06-13 19:07:48 +02:00
d3e16df4f1 Cycles: Solve possible buffer overrun when using too much closures
Glass BSDF was doing some magic with copying weigths from initial closure
onto refraction one and the code was not checking properly for the number
of closures.
2015-06-13 18:51:48 +02:00
1cbf748e0c Cycles: Add assert check to shader closure merge function 2015-06-13 18:17:16 +02:00
0f42b8aee0 Cycles: Fix compilation error with motion blur disabled on CPU 2015-06-13 18:16:32 +02:00
097aa852cf Cycles: Silent paranoid uninitialized GCC warnings in release kernels 2015-06-13 16:29:54 +02:00
Dalai Felinto
54b824106b Multi-View: Some Stereo 3D modes require a special drawing all the time
some 3d methods change the window arrangment, thus they shouldn't
toggle on/off just because there is no 3d elements being drawn

The optimized solution would be to draw only the left eye in those
cases, but there is some issue going on with that, so this commit will
do for now.
2015-06-13 11:29:05 -03:00
0bf0aa6625 Fix: Don't show "Clear Keyframes" option in RMB menu for NLA Strip properties
Since these FCurves for these properties cannot be deleted, this operator is useless
in this case.
2015-06-14 01:21:48 +12:00
0b51e7d991 Fix: "Delete Keyframes" RMB-menu option didn't work on NLA Strip properties 2015-06-14 01:21:47 +12:00
38a60418f7 Msgfmt: Fix for generating .mo files from .po without comments 2015-06-13 14:04:47 +02:00
60ddaf045a Python API: use cached translation tables
bpy.path.clean_name() and AddPresetBase.as_filename() were doing
inefficient search-replace of individual characters.

Use cached replacement table instead.
2015-06-13 19:47:32 +10:00
02a496c61c Translations utils: add needed bits to update git repo together with svn trunk. 2015-06-13 11:42:54 +02:00
7bac8348bf Fix scons compilation 2015-06-13 17:40:50 +12:00
8a11c45a09 Merge branch 'master' into openvdb 2015-06-13 03:45:44 +02:00
10d6ad0798 Add extra metadatas to the grids:
- set vector type for scalar grids as well
- set vector grids class to GRID_STAGGERED, this might become an option/
function parameter at some point.
2015-06-13 03:20:31 +02:00
6364ceea30 Cycles: add support for sampling staggered vector grids. 2015-06-13 03:07:05 +02:00
fc05d9603f Cycles: rename openvdb.* files to volume.* 2015-06-13 02:38:24 +02:00
28f88d2076 Cycles: style cleanup. 2015-06-13 02:15:53 +02:00
c2196395d6 Cycles: do not consider level set grids. 2015-06-13 01:51:48 +02:00
ef264e1bb0 Cleanup: deduplicate check to see if a given grid exists in the file. 2015-06-13 01:16:55 +02:00
d9b70e40df Support for drawing the grid values in the viewport. 2015-06-13 00:27:15 +02:00
04af059f57 Cleanup: warning. 2015-06-13 00:27:15 +02:00
9fa6a753c8 Cleanup: magic number. 2015-06-13 00:27:15 +02:00
Julian Eisel
7182677620 Cleanup: Correct comment
Own mistake from rBf9972fa53eaab4
2015-06-12 19:38:46 +02:00
1b8a785d83 Armature: add armature dissolve
Works like mesh dissolve (access from delete or Ctrl+X)
2015-06-13 03:24:07 +10:00
07562a4afb Edge slide (minor change, use existing vertex) 2015-06-13 03:24:07 +10:00
9e91313a97 CMake: remove comment 2015-06-13 03:23:58 +10:00
6f36e1f872 Fix compilation error on Windows
The issue was caused by conflicting declaration of HKEY
happening in our WM code and somewhere deeper in atomic
operations headers hierarchy.
2015-06-12 17:32:09 +05:00
efe4af8fcb Fix T45018 camera not easily selectable in multiview.
Generally for scene choosing a view to use for selection is not
straightforward, but camera should at least be easily selectable.
2015-06-12 17:21:07 +02:00
a9d3f663d3 UI: Use numselect for redo-popup (for move layers) 2015-06-13 00:39:19 +10:00
e2e414218b UI: Vertex Mark/Clear Sharp menu, match edge menu 2015-06-13 00:34:36 +10:00
0d95b41f9e Revert "UI: move sharp/smooth out of vertex menu"
This reverts commit d6b57436ef.
2015-06-13 00:34:36 +10:00
7823ca06da Support metadata display in clip editor 2015-06-12 15:26:23 +02:00
4fae3620d0 De-duplicate stamp callback 2015-06-12 15:29:56 +02:00
850bb80aef Fix for building without audiospace 2015-06-12 15:29:56 +02:00
69e96509a6 Fix for building without ffmpeg 2015-06-12 23:01:23 +10:00
f2bd6d73e6 Fix T45048: wrong tooltips in Video Sequence Editor's "Strip" Menu (mute/unmute). 2015-06-12 14:04:31 +02:00
6c44265bc9 Merge all changes to blenderplayer from gooseberry branch:
* Allows sound playback for movies
* Allow play-pause with space button
* Allow displaying a position indicator with the I button
2015-06-12 12:12:24 +02:00
600a7cd2bf Fix for own commit: cycles volume slots are not the same as the index
in the openvdb grids array.
2015-06-12 12:04:19 +02:00
a9158140f7 Fix for undefined density slot when using OpenVDB nodes without
connecting the density socket.

The density grid is used for the primary intersection tests, so it needs
to be identified among others. The slot index used before was not
initialized when the density node socket is not connected. Further and
invalid index (-1) is not recognized and leads to buffer underrun.
2015-06-12 11:27:05 +02:00
aaa43e2b84 Fix for missing boost dependency when OpenVDB is disabled. 2015-06-12 10:25:32 +02:00
34c3beb339 Cycles: Fix missing node distance update when only two child intersected in QBVH 2015-06-12 10:06:46 +02:00
520fb5c8cd Fix T45041: (2.75RC) blender crashes when I choose 'Refresh DataBlock Previews'.
Not sure where this sneaked in, but we for sure need a valid context (otherwise
we'd need to pass a Main alog too).

This is to be backported to final 2.75.
2015-06-12 09:55:04 +02:00
4ab47a7670 BLI_linklist, avoid full list search for append
For areas that require append, store the last node,
Previous behavior would too easily hide poorly performing code.

Also avoid (prepend, reverse) where possible.
2015-06-12 17:13:34 +10:00
5893a3445e Use prepend instead of append (avoids list search) 2015-06-12 17:08:10 +10:00
37b8153afe Cleanup: unused var 2015-06-12 17:08:10 +10:00
Julian Eisel
7ca40c1061 File Browser: Two more minor fixes for arrow keys selection
* Unset active file on opening/resetting file list
* Accidentally placed NULL check in the middle of the function - not a
big deal as it's highly unlikely that it fails (removed it but added
assert)
2015-06-12 06:25:43 +02:00
Julian Eisel
2205950274 File Browser: Ensure active file is unset if no file is selected
Otherwise arrow keys navigation might start from this file instead of
the last/first file in the list.
2015-06-12 04:46:49 +02:00
6a33d13ae7 Expose Background AO and Transparent flag to XML API 2015-06-12 00:32:00 +02:00
596eadf0e1 Cycles: Add debug pass which shows number of instance pushes during camera ray intersection
TODO: We might want to refactor debug passes into PASS_DEBUG and some
debug_type (similar to Blender's side passes) to avoid issue of running
out of bits.
2015-06-12 00:12:03 +02:00
b3cc602adc Cycles: Remove meaningless debug traversal steps increment from QBVH volume code 2015-06-11 23:54:57 +02:00
f6748183a2 Cycles: Enable transparent shadows for experimental AMD kernel
They're working just fine on AMD Tonga GPU and probably other architectures,
lets enable it under the experimental feature set and see what exact system
configuration gives issues.
2015-06-11 23:49:21 +02:00
7dae8e54cc Fix wrong proxy pointer hanging around after making all local
The issue was caused because of the following circumstances:

- Making All Local will just iterate all IDs and clear linked flags
- It will not do anything with objects which are already local (and
  since proxy rig is local nothing will be changing it).

This commit makes it so id_clear_lib_data() takes care of clearing
all related proxy pointers, avoiding situations when proxy rig will
point to a local armature.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1276
2015-06-11 23:47:00 +02:00
774e034d40 Make scopes update multi-threaded
This commits makes scopes evaluation multithreaded by using OpenMP
for the outer loop of pixel processor. it also makes all the changes
needed for keeping performance as high as possible by keeping data
local to thread for as long as it's possible.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1334
2015-06-11 23:37:49 +02:00
9c5995c062 Image scopes: Make sample line saving check local
Previously it was using accumulative counter of saved lines and so on in order
to detect cases when new sample is to be saved. This is not quite possible to
do with threaded scopes update.

Change it now with non-accumulative approach which saves a bit different lines
due to slightly different rounding, but this things are not strictly defined
anyway and results are close enough to each other.
2015-06-11 23:29:03 +02:00
b496819fcc Image scopes: Make all variables local, prepare to threaded evaluate
Doing this as a separate commit so it's easier to troubleshoot in the future
if some regression happens.
2015-06-11 23:29:03 +02:00
b666593775 Cycles: Remove Bump Node from the graph, if Height input is not connected.
This way we can avoid building the split kernel with NODE_FEATURE_BUMP enabled, in case we don't need it.
2015-06-11 23:09:38 +02:00
96d9801423 Masking: Numpad-. now centers view to selected control points
Currently feather points are being ignored, it could be improved in the future.
2015-06-11 22:46:42 +02:00
b4446b505f Cleanup some style in new 'keyboard select' code.
Really hate onliner checks (if/else)...
2015-06-11 20:03:55 +02:00
5114637967 Fix T45016, mask animation data lost after layer rename
We need to fix up animation data.
2015-06-11 19:34:21 +02:00
8c2619a11a Fix T45032 allow float rotational values for numpad rotation 2015-06-11 18:13:22 +02:00
Julian Eisel
939948c233 File Browser Arrow Keys Navigation
Adds support for selecting/deselecting files in File Browser using the
arrow keys. All directions (up, down, left, right) are possible.

When to Select, When to Deselect?
Standard behaviour is selecting, however if we move into a block of
already selected files (meaning 2+ files are selected) we start
deselecting

Possible Selection Methods
Simple selection (arrow-key): All other files are deselected
Expand selection (Shift+arrow key): Add to/remove from existing
selection
ill-Expand selection (Ctrl+Shift+arrow key): Add to/remove from existing
selection and fill everything in-between

From which file do we start navigating?
From each available selection method (Mouse-, Walk-, All-, Border
Select), we use the last selected file. If there's no selection at all
we use the first (down/right arrow) or last (up/left arrow) file.
(Ideally, the view would automatically be set to the new selection, but
this behaviour overlaps with an other patch I've been working on, so
prefer to do that separately)

(Also tweaks color for highlighted file for better feedback)

D1297, Review done by @campbellbarton, thx a lot :)
2015-06-11 17:20:29 +02:00
c5d0084606 Fix compilation error when WITH_OPENVDB is off (again). 2015-06-11 16:36:37 +02:00
1aeb676c2b OpenVDB has a dependency on boost-iostreams lib.
Blender needs to link this for static OpenVDB libraries.
2015-06-11 16:07:19 +02:00
356afe0085 Fix possible NULL pointer use 2015-06-11 23:58:53 +10:00
6a0a205cb4 Cycles: Simplify volume_phase_eval().
This simplification is safe, as the call to volume_phase_eval() is guarded behind a CLOSURE_IS_PHASE check, which is equal to
CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID. I don't think we will add more phase functions anytime soon, if at all.
2015-06-11 15:18:33 +02:00
af4d10703b Release cycle: Blender 2.76 BCon 1, alpha 2015-06-11 15:11:07 +02:00
102e18d05c Expose debug type into the interface
This way it is now possible to select which exact debug pass is to be used
by the render engine. Accessible from the Passes panel.

Currently it could only be one debug pass, in the future we can make menus
and image users smarter and support multiple passes of the same type.
2015-06-11 14:53:15 +02:00
2bd6de5bbb Cycles: Add debug pass showing average number of ray bounces per pixel
Quite straightforward implementation, but still needs some work for the split
kernel. Includes both regular and split kernel implementation for that.

The pass is not exposed to the interface yet because it's currently not really
easy to have same pass listed in the menu multiple times.
2015-06-11 14:53:15 +02:00
3438130a94 Use more proper flag for psys reconstruction after memory optimization 2015-06-11 14:53:15 +02:00
abc9c26ec8 Fix for unwanted particle re-distribution happening due to memory optimization
The issue was caused by memory optimization marking particle system to recalc,
and because of the way how particle flags works it was possible that it'll
cause particle's re-distribution. Now this memory optimization will act the
same as loading the file.

This commit appears to be safe according to our render farm and is safe to
be included into final release.
2015-06-11 14:53:15 +02:00
a6803bf564 Compositor: Use atomics to update finished tiles progress
Integer is not safe for incremental by multiple threads and if one is unlucky
enough that could cause progress re[reports to go totally nuts.
2015-06-11 14:53:15 +02:00
bb5e46f105 Fix T44871: Blender hangs when using masking, dilate-erode and soften node
The issue was caused by wrong order of locks acquisition in the compositor image node.
2015-06-11 14:53:15 +02:00
41564a402e BMesh: flatten faces operator 2015-06-11 21:54:06 +10:00
ee37de75e6 BMesh: add BMO_ITER_INDEX macro 2015-06-11 21:54:06 +10:00
867cd2048e Replace linked-list insert-sort with merge-sort
Original code from eglib, modified for reuse with multiple linked-list implementations.

Adds sort functions: BLI_linklist_sort, BLI_linklist_sort_r
2015-06-11 21:54:06 +10:00
b8b57d2da9 BLI_listbase: match arg order with BLI_qsort_r 2015-06-11 21:54:06 +10:00
958c20872a Add argument --python-expr to pass Python directly
This works like Python's -c argument, handy to be able to avoid writing small scripts to disk.
2015-06-11 21:54:06 +10:00
24e3db2302 Fix for bad level function implementation.
Was declared in BKE, but implemented in editors, giving undefined
references in the player.
2015-06-11 12:40:40 +02:00
e4126ec9c1 Gooseberry: Fix compilation error with OpenVDB disabled 2015-06-11 12:22:06 +02:00
5086decb80 Initial support for drawing the VDB tree in the viewport.
To make it possible an OpenVDBPrimitive onject is introduced which hides
a shared pointer to an openvdb::GridBase so it's a bit generic, but by
far not final.

The drawing code is a bit hackish on the side, but at least it works and
here's an example: http://www.pasteall.org/pic/show.php?id=89278

NOTE: This only works when the simulation is imported back in.
2015-06-11 12:19:19 +02:00
fbf4aebfda Move exported flag from SmokeDomainSettings to OpenVDBCache 2015-06-11 12:19:19 +02:00
6ecafc57f1 Merge branch 'master' into openvdb 2015-06-11 10:47:33 +02:00
Dalai Felinto
087c82e392 Error message fix - In the manual (thus for the user) we are referring to this as "Multi-View", not "Multiview" 2015-06-10 16:23:19 -03:00
f167f434d9 Support alternate python command 2015-06-11 04:14:43 +10:00
8e0ab3d42f Picky edits to previous commit. 2015-06-10 17:29:46 +02:00
825892ae7a Fix T45017: Crash when running 'track markers' operator with no clip loaded.
CLIP_OT_track_markers was missing a poll callback.
2015-06-10 17:24:08 +02:00
a9e9e9cbc9 OpenVDB: Disable it for blenderplayer buildbot target 2015-06-10 16:55:03 +02:00
706a0e2139 OpenVDB: Tweaksfor scons and buildbot 2015-06-10 16:52:34 +02:00
3560e36ee9 CMake: Fix typo in OIIO module 2015-06-10 16:51:52 +02:00
ec3c2d3be9 Fix T45009: Bad 'tri area computation' code in knife tool.
Was causing wrong selection of 'outside' face.
2015-06-10 16:35:52 +02:00
91e767c99c 2.75 splash
by Gooseberry team
2015-06-11 00:01:13 +10:00
ab417f31f4 Fix/Workaround T44662: Freestyle gives no visual output when the Save Buffers option is enabled
For now we solve this for non-multiview renders by merging exr file back into
full render result prior to rendering freestyle strokes. Multiview case is
still to be supported tho.
2015-06-10 13:41:37 +02:00
73a104b8e8 Fix T44968: Python executable crashes due to missing .DLL
For now we work this around by copying python DLL to the
bin folder. Ideally the DLL should be shared between blender
and python, but that's a bit tricky to do on windows.
2015-06-10 13:41:06 +05:00
9f911f62dc Fix T45013 negative curve falloff not working.
Was doing clamping as fix for T42984. Seems we can ommit clamping for
sculpting if we make sure overlap is not zero with negative values.

Control for clamping is moved to the "Use Clipping" function of curves
(which is on by default), so both bugs remain squashed and advanced
users can now properly utilize curves in sculpting, though not all
brushes work well with negative curves.
2015-06-10 13:32:28 +02:00
6e844da9da GTest: add test for listbase sorting
Check for correct sort and stable order for matching values.
2015-06-10 20:26:56 +10:00
0446c73c4a WM: toggling expanded could raise exception
Missing module case wasn't checked for.
2015-06-10 19:33:38 +10:00
bc69eafa98 UI: option to pass "icon_value" to menus
D1336 by @lichtwerk

Also remove verbose description, UI docs can explain use-case in more detail.
2015-06-10 17:39:18 +10:00
08687ee380 Correct typos
D1337 by @lichtwerk
2015-06-10 17:28:43 +10:00
45d4fadebd Tooltip cleanup: show_metadata should be same between image editor/ 2015-06-09 18:25:25 +02:00
7b0c327b94 Disable key accelerators for splash screen 2015-06-09 23:34:24 +10:00
9a83e112be Fix T45002: sculpt show brush toggle no longer working. 2015-06-09 15:13:52 +02:00
3092e1031d Fix T45003: some UI/i18n issues.
* Do not translate renderlayers' names, those are data, not UI (defined by user).
* Translate passes' names, even in button itself (menu items were already translated).
* Translate 'ID type' in ID eyedropper helper message.

Also, added i18n context to IDType private struct, and `BKE_idcode_to_translation_context()`
helper, much more generic and easy to maintain than the private util in interface_template.c.
2015-06-09 15:00:56 +02:00
90dc21ce27 Fix typo in writefile.c resulting in undefined nodes. 2015-06-09 14:53:43 +02:00
af980a20a4 Fix T37746: Presets in splash failed to redraw 2015-06-09 21:55:35 +10:00
6ec3656e97 Generalized node function for mapping existing inputs/outputs on a
dynamically changing socket layout.

This is used for a couple of nodes which create a custom set of inputs
or outputs based on internal data (e.g. image or cache files with
arbitrary data layers). The task is to take existing connections to the
node and relink them to the new socket layout, usually based on socket
names. This keeps node trees working as much as possible even when the
user changes the node.

Multilayer image nodes were already doing this, now OpenVDB shader nodes
can share the same function. If it can be represented in the RNA, the
OSL script node might use the same method (currently not feasible due
to callbacks).
2015-06-09 12:03:52 +02:00
77246e2b93 More flexible feedback function for reading header and metadata from
OpenVDB files.

Instead of fixed-size arrays (risking overrun) the function now uses a
callback, which allows callers to store the info in their own data
structures as needed. Nodes use this to create a list of grid info
structs and adding node sockets accordingly.
2015-06-09 12:03:51 +02:00
99f79338d8 Handle grid name lookups from cycles nodes as weak references and
prevent exceptions.

The shader output names are not guaranteed to match the VDB grid names.
The grid info in nodes can get outdated, files can be manipulated
externally etc., so a failure of grid lookup from Cycles should be
handled gracefully.
2015-06-09 11:59:11 +02:00
6c8f2049f6 Fix wrong name displayed for the debug passes 2015-06-09 10:53:54 +02:00
cb9bd23d0c Fix T44930: File-select in redo panel, disables UI 2015-06-09 17:17:22 +10:00
0a689d3cae Fix compile error. 2015-06-09 07:36:23 +02:00
2560e49c4e Merge branch 'master' into openvdb 2015-06-09 02:02:41 +02:00
c2cdb38376 Cycles: use vdb ray intersectors for shadow rays as well. 2015-06-09 01:54:55 +02:00
Dalai Felinto
e1b8ed8dd4 Multiview: fix Time Sequential crash when screen is fullscreen T44688
ED_screen_duplicate() was never written to support non-fullscreen modes.
This is prior to the hidden ui fullscreen commit, and it's quite ancient
in Blender's code (since Jan/08 - 1363134d)

That's why duplicate window, and new screen operators are disabled when
screen is full.
2015-06-08 18:48:52 -03:00
442748dfcd Fix for crash on NULL pointer if using the high density grid for
rendering.
2015-06-08 22:22:10 +02:00
3c69a62f22 Store grids' informations in the node.
Patch by @lukastoenne, with minor edits.
2015-06-08 22:09:28 +02:00
1c580e3a73 Exporter: decrease tolerance yet again. 2015-06-08 22:08:40 +02:00
962f764d58 WM: refactor window code for stereo3d
Window copy code made it hard to test fixes.
2015-06-09 01:27:40 +10:00
f8385de5ed Remove redundant NULL check 2015-06-09 01:27:40 +10:00
Julian Eisel
ffdeba49e6 Fix yet another fullscreen glitch
Steps to reproduce were: Toggle fullscreen->F12->F3->ESC 2x->3D View
changed to Image Editor and didn't change back.

Actually it doesn't work 100% as wanted since it exits the fullscreen
when pressing ESC to exit Image Editor but it's hard to support all
cases with such a weird spaghetti code.
2015-06-08 17:20:21 +02:00
Julian Eisel
4f94947157 Fix T44976: 3D View turns into an Image Editor after saving render
result

Was a case of two stacked temporary fullscreens, so a quite extreme
situation.
2015-06-08 16:04:00 +02:00
bcfe38aa03 Fix T44964: Bisect tool /w nonuniform scale 2015-06-08 22:30:45 +10:00
303c912093 Fix crash introduced by recent node tree localization
It should not add temporary datablocks to the bmain.
2015-06-08 14:10:43 +02:00
ec0ba4095f Fix T44979: Crash when rendering with more threads than the system ones
Revert "Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threads"

This reverts commit fdc653e8ce.

The threads override is not affected by the scene, and hence the limit of the
threads was not giving correct result. Need to re-consider some things here.
2015-06-08 13:53:54 +02:00
d63615272c Use context manager for reading addon headers 2015-06-08 21:21:54 +10:00
07d51141ae Fix: a broken symlink to an addon resulted in a blank addon tab
The addons tab in the User Settings window would be empty, due to
a FileNotFound error. This error can be caused by a broken symlink,
which is now treated the same was as a file that misses its bl_info
dictionary.
2015-06-08 12:08:43 +02:00
87629b2a74 RNA: Object.shape_key_remove method
Python had no ability to remove shape keys
Original D1169 from @lichtwerk, with edits
2015-06-08 19:52:04 +10:00
546a0e2d96 Fix T44989: Crash on linking external OSL material
Issue was caused by passing NULL bmain to the path remap function when
localizing the node tree.

Paths are to be remapped, otherwise mapping of paths to OSL scripts
might happen in a wrong way.
2015-06-08 11:15:40 +02:00
0589a814ba Cycles: Fix crash doing render preview of external OSL script 2015-06-08 11:15:40 +02:00
2ebaa69676 Cycles: Move requested feature conversion to an own function
This way it could be used for the shader/baking kernels easily n the future.
making those kernels more optimal.
2015-06-08 11:15:40 +02:00
8c2750bc82 Cycles: Remove round-up trickery for max closure in split OpenCL kernel
Round-up was only enabled for viewport render, which was for a long time hardcoded to
use 64 closures. This was done in order to avoid unnecessary kernel re-compilations
when tweaking the shader tree.

We could enable selective closure compilation in the viewport later if it'll give
measurable speed improvements, but even then round-up is to happen outside of the
device level,

This commit also removes early output which happened in cases when max closure did
not change. It was wrong because other requested kernel features might have been
changed.
2015-06-08 11:15:39 +02:00
c6c06285a7 Cycles: Remove requirement of using experimental kernel for hair and blur on AMD
Those features are not selectively compiled, so there's no real benefit of hiding
them under the experimental feature set.
2015-06-08 11:15:39 +02:00
27ed75271c Cycles: Make hair, object and motion blur selective compiled into OpenCL
This features are now based on the scene settings, so scenes without those features
used are rendered even faster.

This gives about 30% speedup on the AMD A10 APU here, but at the same time it does
not mean such an improvement will happen on all the hardware. That being said, the
Tonga device here seems to have no measurable difference.

In any case it seems handy to have for the future, when we'll want to support SSS
in the kernel or to port selective compilation/split kernel to CUDA devices.
2015-06-08 11:15:39 +02:00
267c7b098d Fix "View All" operation in image space not available with locked interface 2015-06-08 11:15:39 +02:00
7c5944137e Fix T44995: Crash loading packed image 2015-06-08 18:21:54 +10:00
b54e95a5c8 Alternative fix copying windows from popup dialogs
It could still crash if the window was freed and another was activated. see T44688.
2015-06-08 16:02:57 +10:00
22a4fcb146 Fix T44991: Apply transform skips poly-radius 2015-06-08 12:58:50 +10:00
99fba34b8d rename wiki -> manual 2015-06-08 11:34:07 +10:00
3dcb158f05 Cycles: disable -Wfloat-conversion and -Wdouble-promotion for OpenVDB
for now, and quiet warning.
2015-06-07 20:14:59 +02:00
5cb2c01ca5 Cycles: de-duplicate ray march loops.
The main logic was split up in a separate function which has quite a
number of arguments, could be worth looking into that matter at some
point. Also it seems like dense volume are slower to render now.
2015-06-07 19:50:02 +02:00
9927849708 Fix T44984: wrong texture clamping when applying saturation > 1.0
Applying saturation > 1.0 in HSV space easily leads to negative values in RGB space,
so we have to clamp again...
2015-06-07 16:56:58 +02:00
b79a33e2d4 Allow compilation of cycles network with WITH_CYCLES_LOGGING is ON 2015-06-07 15:24:31 +02:00
de953bf7b8 Don't show smoke domain when render-only enabled
D1339 from @scorpion81
2015-06-07 21:52:11 +10:00
86bb0d1a35 MakeDupliFace: select new objects 2015-06-07 17:44:25 +10:00
404f9ddc37 Cleanup: use staticmethods 2015-06-07 17:40:39 +10:00
bf010c4a15 Cleanup: pep8 2015-06-07 17:28:02 +10:00
3f941ab8f5 Somewhat improve behaviour of the vdb file reader:
- it now stores a pointer to an io::File to avoid deleting and
reallocating the reader itself for each frame when importing.
- if a file is inder 10 Mb a private copy of it should be made by VDB to
ensure it is not modified while reading. This could become a user
setting at some point.
2015-06-07 04:29:50 +02:00
0f6959d797 Correct UI names and tooltips. 2015-06-07 03:10:12 +02:00
c064bc2202 Add a dedicated poll function for the cache operators. 2015-06-07 02:40:01 +02:00
0267ae96a2 Cleanups:
- automatically add an underscore to the filename before the frame
number in the filename instead.
- rename "string" -> "r_filename" argument
- removed useless NULL check
2015-06-07 02:29:40 +02:00
a80ff6214e Ask user to overwrite files if they already exist.
Only checks for the frame though.
2015-06-07 02:02:51 +02:00
2214eae4d7 Fix for recent clip change: ensure fluid matrices are computed for the
export.
2015-06-07 01:33:24 +02:00
4e4e2940eb Ensure cache directory exists. 2015-06-07 01:27:22 +02:00
2d3d984be4 Clip some low res grids based on the high res density.
Rationale is that in some cases the high resolution density is larger
than the low resolution one, so here we ensure there's enough data for
lookup during rendering for instance.
2015-06-07 00:57:28 +02:00
13e49e487e Decrease tolerance for vector grids due to possible loss of data. 2015-06-07 00:52:18 +02:00
5aade17bdf Revert "BGE : KX_VertexProxy support for more than 2 UV channel."
This reverts commit fb0dd596e9.

This commit reintroduced a deprecated API that we'd rather not see in a
release. A better solution is being worked on.
2015-06-06 13:12:27 -07:00
c5748f3cc7 View3D: avoid jumping placing cursor /w lock on
The view would jump each time, now compensate by adjusting the cursor panning.
Less jarring and helps avoid problems when the cursor gets outside the view, see: T40353
2015-06-07 02:50:50 +10:00
60621940d0 Use threshold for selecting side-of-axis 2015-06-07 02:09:41 +10:00
Julian Eisel
4ee2ae97c3 Cleanup: Typos 2015-06-06 15:32:59 +02:00
5406dfef8e Increase tolerance value used for copying a dense array to a sparse
grid.

This doesn't affect low resolution grids much but makes a real
difference for high res grids, as it only considers values real close to
the actual smoke or fire.

Although it might be a bit high of a value, it gives some nice file
sizes going from 106.6 Mb down to 37.7 Mb (pointcache: 264.3 Mb) in a
simple simulation with a base res of 128 and a high res of 2.
2015-06-06 14:59:47 +02:00
50a1ad5bb3 Cleanup 2015-06-06 21:02:16 +10:00
feb8e91665 Merge branch 'master' into openvdb 2015-06-05 22:24:55 +02:00
ba9800d1e3 Fix grid clipping resulting in empty trees.
Issue was that the grids didn't have a transform set when clipping was
happening. As the clip operator copies the transform (here an invalid
one) from the grid to the mask if their tranforms mismatch, the
operation resulted in an invalid/empty tree.

(Best explanation I can give so far.)

Also for some reason exporting the obstacles field doesn't work anymore,
so it is disabled for now, and so is clipping for it as it doesn't make
sense to clip the obstacles based on the density field.
2015-06-05 22:24:07 +02:00
bb62246eb7 Draw a voxel in the viewport along with the smoke domain.
This helps a bit choosing a good resolution. Might be for development/
debug only, but it wouldn't hurt leaving it to help users.
2015-06-05 22:24:07 +02:00
af2ae46fbb Use multithreading when doing an export. 2015-06-05 22:24:07 +02:00
75eea19d02 Cycles: first pass at using VDB ray intersectors for ray marching.
The idea behind them is to avoid unnecessary ray marching by frog
leaping empty space. The only requirement for it to work is to have a
grid whose voxels are uniform, otherwise Cycles' default ray marching is
used.

For now the code has a some issues and dark sides to it:
- it only works if there is a single object containing vdb volumes in
the scene
- for a given file, only the grid named "density" (case insensitive) is
used for intersection, it's not clear how to handle multiple grids in
this case (maybe we coiuld let the user set which one to use?)
- the ray march loop is a total duplicate of the default one, this will
be addressed later on
- some leaf nodes are missing when using large volumes, the issue might
be the early exit due to the check to see if light was totally absorbed
or not

Here's some render tests:
Dense volume: http://www.pasteall.org/pic/89090
VDB with intersection: http://www.pasteall.org/pic/89092
2015-06-05 22:24:07 +02:00
94e7ac5b97 Fix wrong usage of THB_NORMAL size when generating .blend file thumbnail at save time.
We do not use that size of preview anymore, only THB_LARGE...
2015-06-05 19:42:59 +02:00
68cdd2b361 Fix T44961, bevel spikes out when certain angles near 180.
Made the test for whether one can "see" an adjacent edge less
knife-close to 180. This means it will chose to slide along
such an edge less often, and avoid some spikes.
2015-06-05 13:00:41 -04:00
e708042aa0 Cleanup:
Get rid of static functions that pass the exact same arguments in the
same order to other function.
2015-06-05 16:13:15 +02:00
83752e2b40 Fixed incorrect macro for testing build settings. 2015-06-05 14:50:03 +02:00
28f798f86e Cycles: Initial support for OpenCL capabilities reports
For now it's just generic information, still need to expose memory, workgorup
sizes and so on.
2015-06-05 14:17:30 +02:00
fbc95426b9 Small cleanup.
- Remove unnecessary forward declarations
- Use MEM_callocN to initialize memory for new caches, would assert due
to OpenVDBCache.filename not being initialized.
2015-06-05 13:52:24 +02:00
623b8bcc9b Exporter: clip grids based on the density field to save on file size.
Patch by @lukastoenne.
2015-06-05 13:47:59 +02:00
d5bca524d5 Fix T44960: Crash with 'Shape Cut' in edit hair mode.
This is only supported for mesh objects so far.
Also, abort in case there are no faces in dm (instead of crashing on NULL BVH tree...).
2015-06-05 13:06:01 +02:00
304ee9af8d Depsgraph: Report to the console when the new depsgraph is used 2015-06-05 15:37:41 +05:00
907f804ad8 Depsgraph: Fix typo in header guard comment 2015-06-05 15:37:41 +05:00
fb92c553f1 ImBuf: Fix compilation error with latest OIIO
Latest OIIO libraries are using Boost libraries from the public headers.
2015-06-05 15:37:40 +05:00
ffaf271ab9 BMesh: decimator, allow vgroup factor over 1
Can be useful to apply more extreme weighting
2015-06-05 15:26:37 +10:00
aca40295e8 Check ftell return values 2015-06-05 11:46:01 +10:00
b2e5c017a1 BGE: correct ftell use in LoadGlobalDict 2015-06-05 11:16:46 +10:00
f3434e5f82 BGE Cleanup: remove dead code for collide, visible and twoside variables
As material is not NULL at this stage there is no need to do a NULL
check. Also to remove dead code

Reviewers: dfelinto, panzergame, hg1, moguri

Reviewed By: panzergame, hg1, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1330
2015-06-05 02:24:23 +02:00
2cbe60b476 New "use placeholders" feature of the sequencer did not detect correct
filenames.

Added BLI_path utility functions to decompose a path name and
extract the frame number. It should be useful in autocollapse
feature as well
2015-06-04 20:40:44 +02:00
455ca1b28f BMesh decimate, improve behavior with weights
Add slider to adjust the influence of weights relative to geometry distortion.
This allows subtle influences to be applied - without drastic changes in behavior.
2015-06-05 02:56:11 +10:00
c64f491f9f Fix modifiers stack not recalculated when mapping requirements change
Reported by pixaal on irc, basically reproducable by inserting bevel
modifier on cube and entering/exiting texture paint mode.

Now object stores last needsMapping variable as well as customdata mask.

Also now texture painting only needs mapping when we are in texture
paint selection mode, so modifiers that don't support mapping can still
be used to paint now.
2015-06-04 17:40:10 +02:00
Julian Eisel
91d424b82a Fix tooltip colors not initialized correctly
Already committed similar fix (rBbeaed66f292dd) but saw it appearing on
other peoples screens a few times since them. Never was able to recreate
though.
This should make sure everything is initialized fine, so if we see it
appearing again, then it's likely because of manual tweaks or the
version saved in the .blend.
2015-06-04 17:07:05 +02:00
d0effe8683 Add an 'is_color' metadata to set an rgba socket for color grids 2015-06-04 16:34:36 +02:00
4a26f3b569 correct last commit 2015-06-04 23:47:03 +10:00
06f4bac104 BMesh: decimator minor edits 2015-06-04 23:42:10 +10:00
cf7a5e93f8 Fix buffer overrun searching program path on win32 2015-06-04 16:48:56 +10:00
3eb38a79d8 Loading raw targa now sets the filetype 2015-06-04 16:36:11 +10:00
061b59a1d4 Cleanup: redundant checks 2015-06-04 15:51:49 +10:00
81e3deadea Fix for leak creating stereo images 2015-06-04 15:41:28 +10:00
7a0f57cd01 Cleanup: clarify order of precedence: &/? 2015-06-04 15:41:27 +10:00
896f08bde8 Fix T41177. Bevel shouldn't try to slide along edge when can't see it. 2015-06-03 15:19:48 -04:00
5ca5009e15 Merge branch 'master' into openvdb_smoke 2015-06-03 20:57:50 +02:00
e6517c1fd7 Various cleanup. 2015-06-03 20:34:28 +02:00
eeb5b5411f Quick fix for data corruption happening when changing scene frame in
separate threads.

Patch by @lukastoenne.
2015-06-03 19:53:14 +02:00
db695688e9 Quick fix for openvdb::ArithmeticError being thrown on frame 1.
Issue is that the smoke simulator stores a zero'd object matrix on frame
1 which makes OpenVDB throw because the matrix is then non-affine.

Patch by @lukastoenne.
2015-06-03 19:43:18 +02:00
ac22acaec3 Quiet compile warning when WITH_OPENVDB is off. 2015-06-03 19:38:54 +02:00
451a077511 I18n extract: better handling of commandline args. 2015-06-03 17:15:00 +02:00
e4ab526ad1 Make reading previews from .blend file more robust.
Hit a case here where rect pointer was not NULL, when h & w were both zero...
Shall not happen, but better not crash on such cases!
2015-06-03 16:42:08 +02:00
b9c563061c Do not show brush cursor for fill brush (size not supported) 2015-06-03 12:04:47 +02:00
43913fe212 Fix inconsistencies in texture paint UI T44929, T44927:
* lock alpha only works in projective painting
* fill threshold only works in 2D painting
2015-06-03 11:33:40 +02:00
b07be730b2 Fix error calculating bmesh normals
edge vector stack was left un-cleared.
2015-06-03 18:10:43 +10:00
6fbb580e51 BLI_stack: gtest for clear 2015-06-03 18:09:12 +10:00
1dbcccf5f9 BLI_stack, add clear function. 2015-06-03 18:07:30 +10:00
ebebc4ded1 Correct own fix reference before assignment
3rd fix for silly exception conversion!
2015-06-03 17:11:01 +10:00
2517f5c97c Fix memory leak loading multi-layer OpenEXR 2015-06-03 16:24:07 +10:00
e695b34505 Fix memory leak loading single-layer OpenEXR
Internal EXR API specifically avoids freeing non-file streams.
2015-06-03 16:24:00 +10:00
52795932a7 Fix for RMB Menu title including shortcut 2015-06-03 15:03:28 +10:00
2c7cb8ce59 Fix UI string clip (reverse search separator char)
The string may have many '|' characters, only the last is clipped.
2015-06-03 15:03:28 +10:00
b3d2b035c4 Cleanup: check button flag for shortcut delimiter 2015-06-03 14:35:41 +10:00
23f1c6835f Fix multires update (reading char * as an int *) 2015-06-03 13:42:44 +10:00
c07a11b83b Fix object align crash (use-after-free) 2015-06-03 13:42:44 +10:00
4056253627 Cleanup: metaballs called memcpy with NULL source
Simplify logic and use realloc
2015-06-03 13:42:44 +10:00
c0ca70a3b2 Correct vert/edge slide poll functions
Would crash trying to access outside the 3D view.
2015-06-03 13:42:44 +10:00
2be3ebd15d Correct own recent error printing Python exception 2015-06-03 13:42:44 +10:00
fd8b6021c4 Fix race condition
Exposed when checking on T44871
2015-06-03 11:01:44 +10:00
469c0695ac ImBuf: Fix memory leak around EXR handle's multiView 2015-06-02 22:43:23 +05:00
fd1ea5e3db Fix T44742. Bevel now avoids vertex meshes when only two edges are beveled.
Also, changed the algorithm for generating the vertex meshes when not all
edges into a vertex are beveled. Now it tries to slide along edges that
form part of the silhouette when possible; when not possible, it tries
to snap to the best plane in between the beveled edges.
2015-06-02 09:25:05 -04:00
9454377c71 Fix T36994: Make link modifier fails (soft body) 2015-06-02 20:23:01 +10:00
7724b26ab2 Cleanup: use const for object copy funcs 2015-06-02 20:21:45 +10:00
95b9d6d9c2 Fix operator exec /w popups that close the window
Related to T44688, note supporting this case isn't so nice,
but seems it can be made to work.
2015-06-02 19:01:24 +10:00
5f5e05b3eb Fix compilation error after recent commit 2015-06-02 13:11:03 +05:00
89025958af Fix T44921: Node editor, nodes position not maintained after Material panel changes
Also improved a bit behavior of adding new nodes, now they will not overlap that
badly. Still not ideal, but further improvements better not to happen at bcon4.
2015-06-02 12:32:43 +05:00
23b068ce8a Fix T44922: Split kernel renders black when using Bump node
Was missing feature detection in the BumpNode in the previous selective nodes
compilation commit.
2015-06-02 11:53:10 +05:00
660234bfba Fix own mistake searching python binary 2015-06-02 15:42:03 +10:00
aa2bdcccfc Simplify Win32 extension check 2015-06-02 15:38:14 +10:00
c67abff7f0 Fix drawing text on >2gig buffers (stamp for eg) 2015-06-02 14:59:31 +10:00
abc4a3d455 Fix T44869: Crash rendering >2gb images 2015-06-02 13:28:24 +10:00
33a7b72678 Fix T44919: BGE marhutils attrs leak memory 2015-06-02 11:08:17 +10:00
b53836d2c9 UI: tweaks to ID and non ID preview templates
- label is shown on a UI_UNIT_Y heigh instead of 0.2 * total button size
- vertically centering non-ID previews labels
- making some constants dependent on ui units
2015-06-01 21:37:56 +02:00
9e850addae template id previews: changes for consistency with icon views template
- elongate the buttons to acomodate the icon without the label overlapping.
- removing the blue background
- adding a consistent margin all around the popup
2015-06-01 21:37:56 +02:00
32cf18d9a2 template ID previews: quick fix for buttons region overlapping the search button 2015-06-01 21:37:56 +02:00
27c1262e21 Fix T44908: Blender crashes when trying to use cycles experimental displacement
The issue was caused by the reshuffle needed to make objects flags have proper
object's bounding box to solve regressions in SSS objects intersecting volumes.

There's actually a feedback loop happening here, which is now solved in quite
naive way -- for the true displacement we consider all objects are capable of
intersecting volumes, synchronize object flags prior to displacement shader
tasks runs and then re-update object flags for proper bounding box.

Not sure what will be the proper solution here, we can't do preliminary check
of intersection for displacement shader, but on the other hand we don't really
need this flag for displacement shader anyway.
2015-06-02 00:04:30 +05:00
a73d4b859a Thumbnails: fix bad handling of invalid thumbnails, cleanup and deduplication.
Invalid thumbnails (missing mtime metadata) are to be re-generated, not ignored!
2015-06-01 19:42:56 +02:00
bec3131112 Font Preview: much better handling of i18n case.
We have to regenerate previews when we change language. But we also need to do it
when translation is changed or added for a language, etc.

Previously, we were storing one preview per language, which was also stuffing
preview dir with (potentially) tens of PNGs per font file, if user plays with translations.

Now we use a better system, which is storing an additional optional metadata in previews
(some hexdigest), that Blender can use in addition to datetime to decide when to regenerate
previews.

This is only used (and needed) by font previews so far, but can easily be reused for other
types of previews if needed.
2015-06-01 19:42:56 +02:00
2d8880643d Font Preview: fallback to default english strings in case translated ones have not enough chars in current font.
This avoids some ugly 'missing char' in previews - not all cases of course, but most common ones.

A complete solution would be much much more involved, and probably not worth it here.
Definitively not before a release, at least!
2015-06-01 19:42:56 +02:00
7173069cbe Fix T44915 vertex color lost when adding new layer in edit mode.
Was copying new layer colors to old layer colors.
2015-06-01 19:06:46 +02:00
893677a76a Disable writing a crash file completely on Windows.
We had some reports where users did not even read the "Not supported on
release builds" message, and arguably writing a file sort of indicates
that the file may include something useful.
2015-06-01 18:54:03 +02:00
a6101cde06 Cycles XML API: * Add Bump and Holdout Node * Add todo comments for various things. * SSS falloff now works. 2015-06-01 19:56:39 +05:00
b10bc3a6ec Cycles: Number keys 0-3 can be used in interactive mode now to set max bounces. 2015-06-01 19:56:36 +05:00
3127d47029 Cycles: Fix wrong max nodes group used for the viewport render 2015-06-01 19:49:53 +05:00
9d4d55e78b Cycles: Strip meaningless empty output form the MVidia OpenCL compiler 2015-06-01 19:49:53 +05:00
f0a0b1eaac Cycles: Assert in the cases when SVM node was not handled
This will help figuring out cases when node was not properly handled by the SVM
by aborting execution on CPU, where all the nodes are expected to be supported.
2015-06-01 19:49:52 +05:00
ecd4ee75af Cycles: Implement selective nodes compilation
This commits finishes initial selective nodes compilation into kernel, which
helps a lot performance-wise for AMD OpenCL kernels.

Split by node groups is based on statistics from simple scenes like BMW and
more complex scenes like mango and gooseberry production files. Further
tweaks are always possible, but it should be a good starting point.

TODO: Still need to ignore unused nodes when calculating requested shader
features.
2015-06-01 19:49:52 +05:00
c0235da53c Cycles: Fix some typos in the selective modes compilation 2015-06-01 19:49:52 +05:00
399a27b261 Cycles: Code cleanup, spaces around keyword and brace 2015-06-01 19:49:52 +05:00
f45f2ac687 Cycles: Fix missing features gathering from the bump graph 2015-06-01 19:49:52 +05:00
4d8cf1329d Cycles: Add bump feature for selective nodes compilation
For now it is unused in the kernel, actual usage will come with
the next commits.
2015-06-01 19:49:52 +05:00
36ef6d1532 Cycles: Report build flags used for the OpenCL kernel compilation
For now it's reported to the stdout, matching to the CUDA behavior.
In the future we can hide this into GLog logging once the kernels
are considered all stable and so.
2015-06-01 19:49:52 +05:00
14251e8b45 Cycles: Shader node features are to be inherited from the base class 2015-06-01 19:49:52 +05:00
68ec6efa76 Fix memory leak when creating new sockets. 2015-06-01 15:10:51 +02:00
b82b176f9b Move node socket creation to the C-code. 2015-06-01 15:05:14 +02:00
ac131ea551 Relink outputs when opening a file after one was already open in the
node.
2015-06-01 13:55:21 +02:00
4ce8a1bf25 Ensure filename is absolute in the vdb node. 2015-06-01 13:26:56 +02:00
1fc6563917 Fix T44894: Round two.
We cannot `direct_link_packedfile()` twice on a same address, because this tries to
map again pf->data address, which leads to nothing (NULL).

So now, since `ima->packedfile` and `ima->packedfiles` are mutually exclusive
in 'live' blender data anyway, we either read one or the other.

Tested from/to official 2.74 and current master, everything looks fine now.
2015-06-01 13:12:41 +02:00
c8711b6f6f Fix T40621: Tablet in walk mode fails
Add support for walk mode /w absolute pointing devices.
2015-06-01 20:07:57 +10:00
07a6d4ed75 WM: include tablet data in WM_event_print 2015-06-01 17:40:52 +10:00
cdbca9c018 Small fix for previous commit.
We might have MOD_SMOKE_VIEW_SHOWBIG flag on without high resolution on.
2015-06-01 09:04:51 +02:00
bfa7586ba3 Fix T44747: Drag toggle /w nodes (glitch)
It was possible to perform actions while performing a drag-toggle.
2015-06-01 16:40:43 +10:00
bd30d25e40 Only load the array in memory when needed.
It doesn't account for cases when we reach a frame where nothing was
simulated, this will be handled later on.
2015-06-01 08:26:33 +02:00
4e9d5d1727 Merge branch 'master' into openvdb_smoke 2015-06-01 07:04:12 +02:00
565faadd8e Cleanup: doxygen comments 2015-06-01 14:56:07 +10:00
668f1f9554 Fix for leak in BM_uv_element_map_create
Also correct over alloc and redundant alloc.
2015-06-01 14:16:28 +10:00
b147473f02 Fix T44892: Cursor warp, invoked outside the area
If an operator starts outside an area, don't use warping.
(problematic for menu's).
2015-06-01 12:03:02 +10:00
4b4695223a Fix vertex slide regression /w rotated objects 2015-06-01 11:26:35 +10:00
a8d6c69d76 Fix T44894: Broken packed image import from older .blend file.
rBe5fbeba0b3a6e9eea not only restored forward compat, it also broke backward compat...
for no reason at all even, exising ima->packedfile is only used by read/versionning
code if .blend version is below 274.4 (i.e. no multi-image packing exists).
2015-05-31 18:28:28 +02:00
3ca0870023 Improvements to the Freestyle Python API (needed by the SVG Exporter)
This patch adds some new functionality to the Freestyle Python API, notably:

  - MaterialBP1D, checks whether the supplied arguments have the same material
  - Fixes a potential crash in CurvePoint.fedge (due to NULL pointer)
  - Makes (error handling in) boolean predicates more robust
  - Adds a BoundingBox type, to make working with bounding boxes easier
  - Adds several new functions (get_object_name, get_strokes, is_poly_clockwise, material_from_fedge)
  - Adds a StrokeCollector StrokeShader, that collects all the strokes from a specific call to Operators.create()
  - Adds hashing and rich comparison to the FrsMaterial type

These new features (most of them, anyway) are needed for making a more robust SVG exporter that supports holes in fills.

Reviewers: kjym3, campbellbarton

Subscribers: campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1245
2015-05-31 23:16:45 +09:00
Julian Eisel
3100fbef5e Fix ugly drawing of closed panels in horizontal layout
Also minor cleanup
2015-05-31 14:34:55 +02:00
f5a471ef86 Python: avoid mutable default param values
D1328 by @yedpodtrzitko
2015-05-31 15:58:58 +10:00
67bebc42f4 UI: comments (doxygen tweaks) 2015-05-31 14:20:03 +10:00
28ef76d0f0 BGE Cleanup: Removing flen variable where it is not used 2015-05-30 18:30:34 +02:00
71dcaa7744 BGE Cleanup: Identical code for both if/else branches 2015-05-30 18:15:11 +02:00
a5a1d4aa3a fix T44884: corrected a wrong usage of the CustomLayer API (due to a misunderstanding) 2015-05-30 14:19:01 +02:00
0a4bf5317f Correct own error with recent commit
Caused entering an invalid number to leak.
2015-05-30 20:26:26 +10:00
0187356613 python tar.gz changed structure due to python.exe being added. remove /lib/ from cmake as lib and bin are both in the tar.gz 2015-05-30 09:44:44 +02:00
1d34d3ee06 python tar.gz changed structure due to python.exe being added.
remove /lib/ from cmake as lib and bin are both in the tar.gz
2015-05-30 09:27:13 +02:00
36d47ce203 Fix leak in BMesh convex hull operator 2015-05-30 16:17:04 +10:00
8b494e03be Fix reading uninitialized buffer 2015-05-30 14:48:42 +10:00
Julian Eisel
1a0c961746 Cleanup: Use true/false for bool, naming 2015-05-29 21:35:13 +02:00
9755986637 BGE: Fix memory leak when unable to add wheel 2015-05-29 17:03:54 +02:00
51bec8e22e fix T44884: Index counter for active UV Map used wrong offset 2015-05-29 16:20:33 +02:00
9876d1f299 Yet another attempt to fix T44869
Fix some integer overflow cases in colormanagement code
2015-05-29 15:43:21 +02:00
dea3f7f5ff GHOST get rid of unused warnings 2015-05-29 15:13:47 +02:00
2f2f7c0e87 Fix T44882, color picker in texpainting doing linear interpolation even
when mipmap is off.

We used to always have nearest interpolation for texpaint but at least
make this work with mipmap off correctly.

Also added conversion casts to avoid integer overflow in filtering code
2015-05-29 13:38:20 +02:00
1bede8644a Fix T44880: transparency filter is only valid with raytransp, not ztransp. 2015-05-29 12:26:58 +02:00
52cfd0eef8 Fix T44879, data transfer modifier was missing a copy function 2015-05-29 11:38:57 +02:00
7b743defd4 Fix wrong 'check context' handling in addon i18n messages generator.
Reported (with patch) by yedpodtrzitko (yed podtrzitko), thanks a bunch!

Differential Revision: https://developer.blender.org/D1327
2015-05-29 11:08:26 +02:00
166408cfe2 UI cleanup: removing if, condition was already tested 2015-05-29 09:27:23 +01:00
af434fea71 BMesh: select linked /w delimiters & wire edges
Add support for using edge delimiters mixed with wire edges.

Code isn't so elegant but users will expect this.
2015-05-29 14:41:39 +10:00
ca2f5cc466 Merge branch 'master' into openvdb_smoke 2015-05-29 05:06:15 +02:00
2beb654d69 Fix compile issue when WITH_OPENVDB 2015-05-29 05:02:39 +02:00
0d51aadbfe Cleanup: use madd_v3_v3fl to avoid unnecessary steps and local variable. 2015-05-28 23:38:39 +02:00
3511e2d6ae Cycles: Enable Object Motion on AMD OpenCL.
Like Camera Motion, only available in the Experimental kernel.
This should be it for the upcoming release, we now support almost everything, apart from Transparent Shadows, SSS and Volume.
2015-05-28 22:10:53 +02:00
Julian Eisel
d3556268d5 Aaaaand another fullscreen glitch
Steps to reproduce were: Set a *Properties Editor* to fullscreen-
>render->Info Editor is set to Image Editor instead of Properties Editor
2015-05-28 20:08:03 +02:00
Julian Eisel
23c7d14afd Fix another fullscreen toggle glitch
Steps to reproduce were: Set 3DView to fullscreen->render->toggle out of
fullscreen->escape->Area doesn't change back to 3DView
2015-05-28 19:48:28 +02:00
18208c8ad9 Fix T44872
All musgrave tupes use intensity, never hide it.
2015-05-28 18:05:50 +02:00
bdf242fa21 BGE Cleanup: Remove old commented Sumo physics code 2015-05-28 17:50:39 +02:00
3b158d2e05 BGE Cleanup: The value of ikconstraint cannot be NULL at this stage and
therefore it is not necessary the NULL check.
2015-05-28 17:18:50 +02:00
8dc6fabc34 Optimize render part commiting to render queue to mitigate delay in
T44869.

There are a couple of issues here:

* Code repeatedly calculated center of ready rendered parts even though
they would not change while the operation was done.

* Code would calculate distance of tiles from center multiple times

* Code would traverse all items, even the ones already sorted
* Traversal used linked lists which is quite slow.

Mitigated these by doing one pass for the center, a second to calculate
distances and a qsort at the end.

Should result in O (n * (log n + 2)) instead of O (n * (n * 2))
complexity, plus the number of repeated operations is much less as well.
2015-05-28 17:01:09 +02:00
f456cc75f2 Fix grid not being in the proper place (transform).
Basically the smoke simulator uses the MAC grid approach meaning that
the fields (like density, heat...) are cell centered. On the other hand
VDB uses a node center storage; this implies that we have to offset the
position of the grid by half a voxel in each direction.
2015-05-28 15:40:43 +02:00
543ee7961b Cycles: fix typos (crashers) in vector grid allocation and sampling
code.
2015-05-28 15:37:17 +02:00
7135e17df9 Cleanup: unnecessary includes. 2015-05-28 14:42:22 +02:00
e669eefae0 Fix check to see if a frame is out of range.
Was doing AND instead of OR...
2015-05-28 14:41:21 +02:00
7e03c74c53 Add OPENVDB_USE_BLOSC definition.
Due to a bug in OpenVDB we have to set this. Though this is fixed in the
current development version, and once the next stable release is out
those defines will be removed.
2015-05-28 14:40:35 +02:00
edf73ab96b Simplify matrix computation. 2015-05-28 11:48:19 +02:00
eb476c2816 Depsgraph: Cleanup, multiple private functions are to be in anonymous namespace 2015-05-28 13:51:54 +05:00
f777983d5b Add missing particle system tagging on update to the new depsgraph
It's not ideal and mimics weak legacy code, but so close to bcon4 we'd better
not start re-considering the way how particle works..
2015-05-28 13:51:54 +05:00
d9b6768521 Fix T44688: Stereo3D time-sequential crashes 2015-05-28 18:46:15 +10:00
f3161c97a6 Ghost/X11: allow creating windows to fail
Would exit, problematic for setting stereo3d modes which aren't always supported.
2015-05-28 18:46:15 +10:00
4be7258f00 WM: remove windows if they fail to initialize 2015-05-28 18:46:15 +10:00
3dd346c2a1 Cleanup: warning 2015-05-28 18:46:14 +10:00
89c56f6e47 Install_deps: fix different 'libfreetype2' devel package name on fedora and suse... *sigh* 2015-05-28 10:38:48 +02:00
a2e3b7d48a Remove dead code. 2015-05-28 08:21:34 +02:00
56f6aa977a Multi-value, multi-button cancel keeps value set 2015-05-28 15:52:53 +10:00
2480bbff56 Multi-value cancel, keeps scale set 2015-05-28 15:50:51 +10:00
dc1586063b BMesh: correct flag check (own mistake) 2015-05-28 12:11:35 +10:00
3e0c6a8ca2 BMesh: util functions to get edge loops from verts 2015-05-28 11:46:58 +10:00
8c8b54b601 Import grids for playback now works.
It is still commented out due to the need of a good cache (reading)
system.
2015-05-28 02:41:10 +02:00
2a040825cb Fix typos in metadata reading. 2015-05-28 01:36:32 +02:00
46d8bcb617 Cleanup: Remove unused Noise Basis texture code.
Same as last commit, code is unused and this one actually would have required some fixes,
as these variants output values outside the 0-1 value range, which doesn't fit Cycles shader design.
2015-05-28 01:07:37 +02:00
20f6a0f2d7 Cleanup: Remove unused Voronoi texture code.
Let's finally delete this code, after 4 years of being unused,
there really is no excuse anymore.

If we decide to extend the procedural textures in SVM, we can do this anytime in the future.
2015-05-28 00:36:33 +02:00
e189fe46e1 Set vector type when converting a grid. 2015-05-27 22:22:20 +02:00
8d6e1f3139 Set caches' reader and writer to NULL when reading a file. 2015-05-27 22:21:56 +02:00
1fd5f9f004 Fix grids' names mismatch when reading a file. 2015-05-27 21:49:48 +02:00
930bf58478 Clamp min/max frame rate for player 2015-05-27 20:02:53 +02:00
07def553d2 Fix T44745 non manifold edges of mesh do not work when smoothing in
multires.

Code had special guards for such edges to stop this from happening. I
don't see why this is needed though since code above assigns smoothed
positions for all vertices in the grid.

After removing the guards I saw that this in fact was the only place
where grd adjacency was used, so I completely removed it.
2015-05-27 19:52:12 +02:00
9aea98d33c BGE: Add missing m_jumping initialization 2015-05-27 18:19:38 +02:00
c5a8a4e9d8 Fix mismatch in strings length compute in filebrowser, leading to annoying '...' in longest filename.
We must take kerning into account everywhere! Note this will disappear in upcomming filebrowser
refactor anyway.

Reported through IRC by Pablo (venomgfx), thanks.
2015-05-27 17:25:55 +02:00
Quentin Wenger
be4d34ca86 BGE Python API: Completing doc for bge.types.KX_FontObject
This adds description of the Font object and about its (only one)
attribute, as well as an example of use.

Reviewers: campbellbarton, fsiddi, dfelinto, moguri

Reviewed By: dfelinto

Subscribers: lordloki

Projects: #documentation, #game_engine

Differential Revision: https://developer.blender.org/D863
2015-05-27 17:18:43 +02:00
9fc1033429 Fix T44748: Particle is not displayed definitely when I use a new dependence graph 2015-05-27 19:22:52 +05:00
b52af946cd Forgot this in the last commit 2015-05-27 14:43:54 +02:00
c449d4e336 Fix jpeg preview for exr renders broken. 2015-05-27 14:41:51 +02:00
4bf64e841c Correct convex-hull for recent join-tri changes 2015-05-27 21:43:35 +10:00
0e00072ff0 fix:T44856 reverted triangluation back to bmesh ( apparently broken by commit rB51f33 ) 2015-05-27 13:19:40 +02:00
0e02ad8b64 Fix off by one error in display of start/end frame in sequencer. 2015-05-27 12:17:16 +02:00
4c1efcc829 Code cleanup, silence some warnings when building without legacy depsgraph 2015-05-27 13:10:26 +05:00
1fd2e6232a Fix compilation error with legacy depsgraph disabled 2015-05-27 13:09:57 +05:00
e665a60a85 Fix T44854: Creating hooks from curve to objects doesn't work
The issue was introduced in e529882 by doing wrong range checking.
2015-05-27 13:08:17 +05:00
92022218c2 Cycles: Code cleanup, split kernel 2015-05-27 13:08:17 +05:00
da192fb3a7 Missing NULL check getting selected obdata 2015-05-27 11:14:39 +10:00
77f0f3c54e Fix parent tips staying selected after separate 2015-05-27 10:35:14 +10:00
c3810c596e Use PKey for edit-armature separate
As used already for mesh & curves.

Add confirmation menu for curve & armature,
since this isn't such a common operation and undoing leaves object data
(long term bug/todo to fix).
2015-05-27 09:56:50 +10:00
84ad20acef Fix T44833: Can't use ccl_local space in non-kernel functions
This commit re-shuffles code in split kernel once again and makes it so common
parts which is in the headers is only responsible to making all the work needed
for specified ray index. Getting ray index, checking for it's validity and
enqueuing tasks are now happening in the device specified part of the kernel.

This actually makes sense because enqueuing is indeed device-specified and i.e.
with CUDA we'll want to enqueue kernels from kernel and avoid CPU roundtrip.

TODO:
- Kernel comments are still placed in the common header files, but since queue
  related stuff is not passed to those functions those comments might need to
  be split as well.

  Just currently read them considering that they're also covering the way how
  all devices are invoking the common code path.

- Arguments might need to be wrapped into KernelGlobals, so we don't ened to
  pass all them around as function arguments.
2015-05-26 22:54:02 +05:00
4ffcc6ff56 Fix T44497: Crash on deleting curve handle with hook modifier
It was possible race condition on empty curves -- it's possible that curve
object is fully updated and path is null in that cases, Proper way to deal
with this is to check curve_cache for non-NULL.
2015-05-26 22:36:18 +05:00
6245f4a39c Cycles: Enable advanced shading for NVidia OpenCL kernel
It was kept disabled due to render artifacts which weer in fact caused by bad
memory access, which is fixed in the previous commit.

We now also can make it enabled in regular AMD split kernel after someone tests
the updated code.
2015-05-26 21:29:21 +05:00
cf19012fb0 Fix T44831: Crash when using Intel OpenCL with split kernel
The issue was caused by underallocation of object motion related arrays,
which happened by accident.
2015-05-26 21:29:21 +05:00
b90c7dd730 Building without OpenEXR works again 2015-05-26 17:49:08 +02:00
d45c4af469 Cleanup: update comment 2015-05-27 00:00:31 +10:00
89b6c72f8d Cleanup: python 2015-05-26 23:53:47 +10:00
6973e26bf9 Fix T44036: Add option to bake into current action instead of creating a new one.
This is needed when you want to bake only part of an armature's bones, since they
all share a single action, otherwise you'd lose non-baked bones' animation...
2015-05-26 15:32:06 +02:00
a23fbc71a1 Cleanup, add comment for old code. 2015-05-26 14:38:24 +02:00
a64cb4185e Trying to pack image with invalid path crashes 2015-05-26 13:46:14 +02:00
8299284389 Correct own recent error, uninitialized var use 2015-05-26 21:36:49 +10:00
3c9da38e7e Style cleanup: space after keyword 2015-05-26 16:15:52 +05:00
7487a4d4ac Fix T44763: Surface Panel does not update correctly according to Node Output for Cycles UI 2015-05-26 16:15:34 +05:00
d20fd2da72 Revert "Cleanup: set var twice"
This reverts commit eb799dc350.

I recommend reading code before doing cleanup, next time...
2015-05-26 13:01:29 +02:00
bfe0ea4069 Fix own sillyness 2015-05-26 12:58:32 +02:00
ded0004f8b Don't crash with pie menus with more than 8 items.
This will print a warning and users will get overlap of pie buttons, but
it should be quick paper over the cracks and at least should keep
blender working until a more complete fix is coded.
2015-05-26 12:09:51 +02:00
718bc078a8 Fix T44740: Tweak events stuck (ignored release)
Tweak event was being added to the end of the event queue (out of order),
meaning any mouse releases already in the queue wouldn't be used to exit the gesture.
Gestures could get stuck (mostly when the system wasn't able to handle events fast enough).

Now tweak events are now added in order.
2015-05-26 20:07:58 +10:00
de68066c1c Fix multilayer OpenEXR not supporting metadata.
This will fix exporting of metadata and importing for imbufs, but image
editor will not display these metadata since multilayer gets converted
to renderresult, which does not support metadata display yet.
This commit is more meant for external image editors/viewers.
2015-05-26 12:02:30 +02:00
e5fbeba0b3 Images: Solve broken forward compatibility with packed images
Use first packed image as legacy image->packedfile, so saving .blend file with
latest builds makes it so packed images are not lost when opening with previous
releases.

This will only work reliably if mutliview is not used, otherwise it'll be only
first view in the .blend file, which is rather expected since previous releases
are not aware of views.
2015-05-26 14:46:05 +05:00
569a2035c7 GHOST: flush event printer output 2015-05-26 18:51:51 +10:00
de0c269c28 Fix T44821: Making warp shortcut fails
Using OBJECT prefix for editmode operators causes
shortcuts to go into the wrong keymap.
2015-05-26 17:55:34 +10:00
2c3c477223 Cleanup: warning, spelling 2015-05-26 16:46:33 +10:00
9b1ca19396 Fix RMB menu in popup, included 'Header' submenu 2015-05-26 16:45:01 +10:00
e4dc44d7ab Depsgraph: Fix for uninitialized variable in root depsnode 2015-05-26 11:34:18 +05:00
abf7378e44 Fix T44697: Multi-value edit /w layers fails
Not such a nice solution, but good to have this working.
2015-05-26 15:20:46 +10:00
8715fd0925 BMesh: join tris, split angle limit in two
Use a separate limit for face-angle and shape comparisons.

There was no way to join non-rectangular, co-planer tries.
2015-05-26 14:27:38 +10:00
9ce20d3341 BMesh: join tris now delimits all UV/Color layers
Previously was only checking active layers

Also add delimit by edge seam
2015-05-26 13:42:59 +10:00
17fe79b228 Cleanup/fix: put 'using namespace' inside ifdef block. 2015-05-26 03:47:43 +02:00
d5551729bf Wrap volume sampling call in a macro. 2015-05-26 03:38:44 +02:00
eb799dc350 Cleanup: set var twice 2015-05-26 10:25:01 +10:00
de21604cf4 Minor cleanup... 2015-05-25 22:24:46 +02:00
1ac0fef345 Fix widget_draw_preview() not taking into account given alpha.
Needed to get correct 'inactive' effect on buttons with big previews.
2015-05-25 22:06:25 +02:00
e092a58fb5 I18n message extractor script: py code: do not consider strings inside 'Compare' AST nodes.
Otherwise, we'd get 'MOVIE' from `text="Build Proxy / Timecode" if clip.source == 'MOVIE' else "Build Proxy")`...
2015-05-25 21:17:49 +02:00
5e66827029 Fix T44842: Modal Timer (template) should return {'CANCELLED'} when cancelled! 2015-05-25 17:43:28 +02:00
6b5f3f5fef preview buttons: tiny optimization 2015-05-25 15:38:12 +01:00
Dalai Felinto
3a7691b73f Fix T44836: crash when multi-view is enabled and switching to BI rendered viewport display 2015-05-25 10:15:18 -03:00
2464395b6d Depsgraph: Avoid unnecessary char*/string conversion when creating RNAPathKey 2015-05-25 18:05:19 +05:00
0b9a65b2ae Fix T44709: New Depsgraph not evaluating driver interactively
Issue was caused by drivers which uses component of an array as a target,
this was not handled properly in the RNA path key.
2015-05-25 18:03:06 +05:00
a80c1e50bc Fix T44822: python enums' itemf callback did not handle 'NULL' context case.
Enum's itemf callback can be called without context in some cases (UI, doc generation...).
Python's enum properties did not handle this at all - it's kind of odd this did not cause
more trouble and wasn't notice earlier... Probably dynamic enums using context are not
much used in py code.

Note about nodes: those are heavy users of dynamic enum with context. Now,
we expect `NodeCategory.poll()` and `NodeItem.poll()` to always be called with
a valid context (since when there is no context available, we can assume `poll()`
is always True). `NodeCategory.items()`, however, must accept NULL context, so if
you use custom `items` callable for your custom node categories, you may need
to update it (as was done here for builtin `node_group_items()`).
2015-05-25 14:24:49 +02:00
39b85e452f Fix T44815: Sound bake doesn't check filepath 2015-05-25 22:13:18 +10:00
62f2d9b566 Cycles: Fix compilation error of split kernel
The code was failing to compile on runtime because of some path differences,
and it seems we don't need to specify full path to the file which originally
seemed to be needed to make include directives expansion working correct.
2015-05-25 14:18:01 +05:00
153cebd95b BGE: Fix bug with default material and MTFace.
It set default material even if there are a MTface but no blender material.
Tested in GLSL and Multitexture.

Reviewers: HG1
2015-05-25 10:33:04 +02:00
a5a648c7c6 Fix error redoing shrink fatten
Use a property to store even-offset option.
2015-05-25 15:45:56 +10:00
fdc051b3ac Merge branch 'master' into openvdb_smoke 2015-05-25 04:03:48 +02:00
7fd93dc8dc Fix bend in object mode (wasn't rotating objects) 2015-05-25 10:37:09 +10:00
fe9ce6603c Fix memory leak /w bend tool 2015-05-25 10:37:09 +10:00
7b60a0f64b Cleanup: const char for operator ID's 2015-05-25 10:37:09 +10:00
a3ef51bba5 Fix T44833, OpenCL compile error on AMD.
This was broken after the kernel file restructure.
Variables allocated in the __local address space can only be defined
inside a __kernel function.

We probably need to solve this a bit differently once we do the CUDA
kernel split, but this fix shoud be good enough until then.
2015-05-25 01:02:06 +02:00
c3ab5b3089 Fix T44830, wrong sample progress number when using split device.
Value was not set, moved it out of the constructor into
device_opencl_create() now.
2015-05-25 00:37:01 +02:00
025a646114 Fix T44823: No menu entry for Circle Select in UV/Image editor. 2015-05-24 19:27:59 +02:00
78918e761f Fix T44814: 'preview' icons would not greyout.
Since they are premultiplied, we need separated handling of colors and alpha blending
if we want additional alpha factor to work OK.
2015-05-24 18:35:14 +02:00
a28adf1b35 Some more minor cleanup in new icon preview code. 2015-05-24 16:50:15 +02:00
febf8cb01d Cleanup: style 2015-05-25 00:19:39 +10:00
7f89bc8e85 Fix rare crash duplicating fluidsim 2015-05-25 00:19:39 +10:00
f9b6f5756c Fix crash clearing skin data on non mesh 2015-05-25 00:08:43 +10:00
0305e9604b Fix RNA type access 2015-05-25 00:08:43 +10:00
7456f06097 Fix unreported bug with recent enum icon preview changes, would show bad in case of mixing
items with and without label.
2015-05-24 15:49:04 +02:00
4737722968 Fix error joining tris -> quads
Incorrect flag check, would need to run multiple times.
2015-05-24 21:54:21 +10:00
2da9a39418 BGE : Fix black material on meshes without materials in blenderplayer.
Blenderplayer forgot to initialize the default material (defmaterail) with function init_def_material().
This reverts also the plumber commit 2fa4a48bce.

Reviewers: campbellbarton
2015-05-24 11:46:57 +02:00
78250f1d1d IconView template: adding optional labels to popup buttons 2015-05-23 16:21:05 +01:00
f01c6e185f Cleanup: typos 2015-05-23 22:38:47 +10:00
f340595dba Quadric: add common why doubles are used. 2015-05-23 22:37:46 +10:00
bc83076355 Math Lib: update API usage info 2015-05-23 22:37:37 +10:00
6a0854e04a Get rid of FluidDomainDescription struct. 2015-05-23 12:02:26 +02:00
29fa4b9138 Move some files and functions around. 2015-05-23 11:36:08 +02:00
ce2b57ea91 VolumeManager: put OpenVDB related routines in their own functions. 2015-05-23 08:25:29 +02:00
788ecf29a7 Don't construct default samplers, rather just store pointers to
accessors and transforms.
2015-05-23 08:23:47 +02:00
2016c92ef1 Fix segault when closing Blender.
The cache was freed after the smoke domain...
2015-05-23 05:58:11 +02:00
76b5f3d1f7 Avoid recalculating the object's data when a new cache is added. 2015-05-23 05:19:45 +02:00
f01afd7e2e Fix for cache not being set as current when deleting the first in the
list.
2015-05-23 05:18:25 +02:00
74ecf0432b Merge branch 'master' into openvdb_smoke 2015-05-23 04:28:57 +02:00
a11e61a3c7 Cleanup: indent 2015-05-23 03:59:31 +02:00
46d4cb86b6 Move source/blender/openvdb folder to intern/openvdb 2015-05-23 03:36:36 +02:00
3e4d053a16 Cycles: style cleanup. 2015-05-23 02:39:57 +02:00
dabc9d1ee9 Cycles: rename OpenVDBManager -> VolumeManager, et simili. 2015-05-23 02:28:47 +02:00
e656d07cbc Implementation of VDB ray intersectors.
They are not used yet though.
2015-05-23 02:17:48 +02:00
25f5d2b4d7 Fix (unreported) broken RNA Image pack handling since multiview merge.
Was breaking loading of embedded FBX images (among other things, most likely).
2015-05-22 23:28:41 +02:00
f6fe6759d0 Cycles: subclass the grid samplers and make them thread-safe.
Thread-safety wasn't a requirement before but as they are now thread-
safe, they use ValueAccessors for faster sampling.
2015-05-22 21:23:58 +02:00
344de9ca95 Fix typos in smoke exporter. 2015-05-22 21:20:01 +02:00
09da26d720 Expose file compression types.
By default files are compressed based on their active values, with zip
compression optionnaly added to it. We can as an option, enable blosc
compression, through a build flags. This flag is only to be enbaled if
OpenVDB was built with blosc. Otherwise -> crash.
2015-05-22 20:09:23 +02:00
e529882be0 Fix second crashing part of T44497, out of bounds access to hook
modifier data.

Unfortunately seems like we also lose the hook mapping by doing this,
but this can be fixed later and is probably a separate issue.
2015-05-22 16:59:22 +02:00
cd9dc3143c BGE: grey out Alpha and Specular sliders when Transparency panel is
unchecked
2015-05-22 16:03:38 +02:00
2c503d8303 Cycles: Restructure kernel files organization
Since the kernel split work we're now having quite a few of new files, majority
of which are related on the kernel entry points. Keeping those files in the
root kernel folder will eventually make it really hard to follow which files are
actual implementation of Cycles kernel.

Those files are now moved to kernel/kernels/<device_type>. This way adding extra
entry points will be less noisy. It is also nice to have all device-specific
files grouped together.

Another change is in the way how split kernel invokes logic. Previously all the
logic was implemented directly in the .cl files, which makes it a bit tricky to
re-use the logic across other devices. Since we'll likely be looking into doing
same split work for CUDA devices eventually it makes sense to move logic from
.cl files to header files. Those files are stored in kernel/split. This does not
mean the header files will not give error messages when tried to be included
from other devices and their arguments will likely be changed, but having such
separation is a good start anyway.

There should be no functional changes.

Reviewers: juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1314
2015-05-22 16:31:34 +05:00
7f4d5850fe SCons: Don't install SConscript into Cycles kernel folder 2015-05-22 16:00:26 +05:00
be6479c9ea Fix T44801: Blender crash in UV-editor.
Mistake in cleanup rB30b45d55... Odd compiler did not yell at that. :|
2015-05-22 11:01:22 +02:00
ed2cb8de2f Fix for join faces ignoring angle limit
Angle limit for join-faces was more advice then actual limit.
Now joining entire selection, gives assurance that no faces above the limit will be merged.

The purpose of this was to allow users to isolate 2 faces and always join them.
Instead, support this by bypassing limit only when its not set and 2 faces are selected.
2015-05-22 18:14:03 +10:00
6c2727e08e Initialize the VDB writer when creating a new cache. 2015-05-22 05:49:43 +02:00
cd301995cc A new function to split a vector grid into three scalar grids. 2015-05-22 05:27:16 +02:00
e0504bf9bb Move fluid matrices to SmokeDomainSettings. 2015-05-22 04:41:08 +02:00
41f4ea4454 A new function to create a sparse vector grid from three scalar dense
grids.
2015-05-22 04:01:31 +02:00
476feb622c BMesh: extrude region didnt copy edge flags
Newly created edges around regions wouldn't get the edge flags from surrounding geometry.
2015-05-22 11:00:14 +10:00
1b1566af98 Redesign the VDB API a bit. 2015-05-22 02:44:33 +02:00
a934730368 Cycles: Remove TM / R and whitespace from OpenCL device names.
Was already done for CPU devices, now we also do this for OpenCL.
2015-05-21 23:43:18 +02:00
53eab562b4 Cleanup: Remove some outdated comments related to split kernel. 2015-05-21 20:32:20 +02:00
8843a09df3 Fix T44744, tangents incorrect in edit mode.
Really bad code here, index of fetched data was basically totally off
and unrelated to what it should be.
2015-05-21 20:28:17 +02:00
e8014352c6 Yet another crappy Intel driver added for correct SSAO support. 2015-05-21 18:37:48 +02:00
f6062638c1 Fix crash in blenderplayer when scrubbing off screen.
Was cache referencing deleted or NULL items.

Reported by Kopias on irc
2015-05-21 17:37:11 +02:00
a39efae03d Fix T44778 missing specular transparency slider in game engine 2015-05-21 16:37:37 +02:00
d3c67bc81e Fix T44791 triangles when painting on a texpaint plane
Problem was float precision issues across tile boundaries. Since we are
comparing pixels, give a small tolerance when comparing clipped vertices
against triangle lines.
2015-05-21 16:06:42 +02:00
069adb8104 SCons: Fix for missing avx and avx2 cycles kernels
SCons was checking for a particular compiler version to see whether compiler
flags are available or not, but compiler ID was only set on OSX.

Now it should be set on Linux as well.
2015-05-21 18:46:57 +05:00
25bedeca9b GPencil Eraser Size-Saving Fix
On second thought, the eraser size should be saved even if the brush type is not
eraser, as we can toggle this now.
2015-05-22 01:21:29 +12:00
389564c711 Fix T44774: Grease Pencil eraser size reset after exiting session
Previously, it would only save the eraser size if the session ended properly,
instead of being cancelled. However, that wouldn't happen if exiting the session
using Esc.
2015-05-22 01:21:28 +12:00
03eee4dce7 BMesh: decrease decimate epsilon
Since using doubles to calculate cost,
using topology fallback cost isn't needed as much.
2015-05-21 22:46:33 +10:00
4b8dcfc0f5 Fix T44795: same menu item for different command in node editor.
We have too much of those cases in our UI, if we want to keep operators doing
several similar/related but yet different tasks, we should have a real way to
support it on label/icon/tip side too. Easier to say than to do though. :|
2015-05-21 13:20:54 +02:00
7938bd1877 Cycles: Remove OSL from split headers
Split kernel is mainly useful for GPUs which can not support OSL in visible
future anyway.
2015-05-21 16:12:50 +05:00
329f704601 Cycles: Move utility atomics function to util_atomic.h
No functional changes, just better to keep all atomic function in a single place,
they might become handy later.
2015-05-21 16:12:50 +05:00
e37c4e5819 Fix T44780: Decimate planar creates concave edges
Float precision was causing problems for decimate,
small faces that create a nearly flat surface were detected as having no 'cost' to collapse.
2015-05-21 21:06:30 +10:00
6ee653352b Math Lib: double versions of vector funcs
- add_vn_vn_d
- add_vn_vnvn_d
- mul_vn_db
2015-05-21 21:06:29 +10:00
6b40a4bcb1 Fix T44794: Blend From Shape tool X Icon UI Bug?
Note: maybe we could even make `RNA_property_is_unlink()` always return false
for enum properties? But well, guess being explicit here does not hurt...
2015-05-21 12:00:31 +02:00
d4c676e81b Cycles: CYCLES_OPRNCL_DEBUG now affects on split kernel as well 2015-05-21 14:30:33 +05:00
f18d77b874 Cycles: Restore some lost custom cflags passed to the kernel compilation
They were lost during simplification of kernel loading but might be rather
crucial for the performance.

Also made it so cflags are shared across kernels. Surely it might lead to
some unwanted kernel re-compilation but at the same time they might easily
run out of sync with the changes in kernel and so.
2015-05-21 14:05:53 +05:00
aa54d93a29 BMesh: decimate improvement for flat surfaces
Previously decimate on flat areas of a mesh would more or less randomly collapse edges.
(giving bad topology).

This commit includes a topology 'cost', so smaller edges on flat surfaces collapse first.
2015-05-21 16:41:08 +10:00
2c000cc9fc Fix mesh mirror failing on isolated verts 2015-05-21 13:01:44 +10:00
9bfea67751 UI: Use Ctrl+Wheel to cycle values
Conflicted with Alt for editing multiple values.
This could also conflict with global frame change at times.
2015-05-21 11:06:24 +10:00
1aa1a53115 UI: ignore mouse wheel while editing text
Mouse wheel was used as home/end.
Was annoying since it could happen by accident.
2015-05-21 10:46:22 +10:00
2b0613b948 Fix: GPU_shader_export fails /w some lamp attrs
first/last vars missed some values.

D1309 by @NHA
2015-05-21 08:48:21 +10:00
148ed4e05e Cycles: Cleanup, synchronize name across file name, program and kernel names 2015-05-20 23:10:07 +05:00
6f48df45ee Cycles: Simplify code around kernel loading 2015-05-20 23:10:07 +05:00
093d11df35 BGE: Some changes for the constraint document
* Change the constraint type alignment to vertical.
* Changed PHY_CONE_TWIST_CONSTRAINT to the correct value.
* Some minor changes.
2015-05-20 18:49:18 +02:00
1341109c70 Tackle some of the review points. 2015-05-20 18:40:26 +02:00
2c5d5a9feb BGE: Remove chapter in KX_WorldInfo python API 2015-05-20 18:36:02 +02:00
Martijn Berger
8dd9b7cc5f Cycles standalone, add device type in output listing 2015-05-20 17:11:09 +02:00
b5bf5b36f1 BMesh: decimate, test for face flip was too low
Created overlapping faces in T44780
2015-05-21 00:00:13 +10:00
24e1d7f4f4 BMesh: decimate wasn't using face/edge centers
When calculating quadrics, using the first-vertex isn't correct.
2015-05-21 00:00:13 +10:00
8edfcf653a Movie Clip: Invlaidate clip cache when changing timecode 2015-05-20 17:52:58 +05:00
44a6109ca9 Clip Editor: Make it more obvious that Rebuild Proxy also rebuilds Timecode 2015-05-20 17:52:57 +05:00
77ef3f9041 Fix T44717: use_negative_frames ignored /w graph-editor
D1303 by @barfot
2015-05-20 21:58:33 +10:00
eb6bab25ba Add dedicated command argument to switch depsgraph to a single-threaded evaluation
This way it is possible to have single threaded depsgraph but threaded other areas
which is handy for torubleshooting.

he argument is: --debug-depsgraph-no-threads
2015-05-20 15:48:29 +05:00
8c6a9b9edc Fix reserve frames in sequencer failing with big frame ranges.
Detect frame range automatically from number of digits.
2015-05-20 12:42:00 +02:00
f4d064a5b2 Send color managed signal if input spaces changes during image saving
We're currently only supporting save to a default format color space, which
makes it a bit tricky to prevent ImBuf from being changed.

For until when saving to a custom colorspace works we'll just reload image
if the space changes.
2015-05-20 15:33:30 +05:00
28b2977be9 Atomic operations: Add function declarations at the top of the header
No functional changes, just helps grasping what operations are actually
supported.
2015-05-20 11:57:17 +05:00
5d30c23c35 doxygen: corrections/updates
Also add depsgraph & physics
2015-05-20 14:12:22 +10:00
922d5ed939 doxygen: update config 2015-05-20 14:09:43 +10:00
f0c143ca72 doxygen: rename included files (they were ignored) 2015-05-20 13:06:42 +10:00
cc220c34ad Various cleanups. 2015-05-20 00:15:55 +02:00
a1e8547877 BGE: Use CameCase code style for KX_WorldInfo python API. 2015-05-19 23:13:30 +02:00
091ef60e48 Initial support for rendering vdb file sequences. 2015-05-19 20:41:41 +02:00
377822729c BGE: Fix T40555: LibLoad material caching issue
Previously we don't merge material cached list, it create dangling pointer and memory leak.
Now we merge material cache list during the scene merge, and remove material in this list during the library free.

Reviewers: agoose77, dfelinto, hg1, pgi, campbellbarton, moguri

Reviewed By: campbellbarton, moguri

Subscribers: campbellbarton, youle, kupoman

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1278
2015-05-19 19:24:14 +02:00
fccf253e36 Support string metadata loading for OpenEXR files. 2015-05-19 18:32:41 +02:00
150a4b23ba Fix part of T44768 Yet another Intel driver failing on viewport Ambient
occlusion

(Maybe we should add drivers that DO work instead, but in the future
those will be much more since Intel claims to have fixed the issue)
2015-05-19 16:25:42 +02:00
158c891520 Clear animation list to avoid referencing freed memory. 2015-05-19 16:15:55 +02:00
df0a1fa3c5 Fix T44766: Connect fails /w selected ngon edges 2015-05-19 23:51:57 +10:00
07e9fb8ec6 BMesh: calls to store selection at the list head 2015-05-19 23:51:57 +10:00
d3cc7419a3 BMesh: add BM_edge_pair_share_face_by_len 2015-05-19 23:51:57 +10:00
78411dc7d7 Fix T44755 set_value node output in node tree not properly converted to
color in GLSL

Issue here is that intermediate result was clipped as an optimization in
such nodes and thus not converted to the correct type properly. Now only
clip those values if types match.
This keeps both the optimization and the conversion. I looked at
converting uniform types always but it's more involved to compare types
at conversion time for such links because the type was getting
overridden during link duplication.
2015-05-19 15:37:08 +02:00
9514191b0c Cycles: add support for transforming the grid (pos, rot, scale).
This makes it easier to incorporate external VDB files in the Cycles
scene (at least in Blender).
2015-05-19 14:29:48 +02:00
dc3533030a Fix T44553.
Front face option did not get the correct normals to function - area
normal would always point to the direction of the stroke
2015-05-19 11:49:46 +02:00
e8561e966d Fix T44762: Materials flicker in edit-mode 2015-05-19 19:13:25 +10:00
ac636a3c97 Fix T44759: Blender has problems reading and writing 42k images to PNG 2015-05-19 13:02:52 +05:00
293df68ebd Object Drawing: avoid redundant material update 2015-05-19 18:00:20 +10:00
eb05e87e16 BMesh: editmode drawing set every faces material
Check for changes in material (as other drawing code already does)
2015-05-19 18:00:19 +10:00
da34136de1 Cycles: Check for validity of the tiles arrays in progressive refine
In certain configurations (for example when start resolution is set to small
value for background render and progressive refine enabled) number of tiles
might change in the tile manager. This situation will confuse progressive
refine feature and likely cause crash.

We might also add some settings verification in the session constructor, but
having an assert with brief explanation about what's wrong should already be
much better than nothing.
2015-05-19 12:42:07 +05:00
f868be6295 Cycles: Check for whether update/write callbacks are set prior to calling them
This changes the progressive refine part, regular update was already checking
for whether callbacks are set.
2015-05-19 12:42:07 +05:00
ddb1a068e9 SCons: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
e698299e4f CMake: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
d5a85f87b0 Python: search for 'python' and 'python#.#' 2015-05-19 16:44:19 +10:00
3d70a04a8a CMake: remove temp assignment, unused vars 2015-05-19 16:44:18 +10:00
183b643774 Building without Python works again 2015-05-19 11:38:07 +10:00
ddd36a24a9 Cleanup. 2015-05-18 22:17:00 +02:00
a1bb117dac Cycles, OpenVDBManager: split routines into separate functions. 2015-05-18 22:11:43 +02:00
65328fadc3 Final solution for Intel card Ambient Occlusion in T43987.
Forgot to account for offscreen case in addition to compositing
2015-05-18 22:10:54 +02:00
5e82b837d9 Cycles: add OpenVDBManager::delete_sampler convenience function. 2015-05-18 21:43:55 +02:00
8366d1de70 Cycles: move routine to find an exiting grid slot to its own function. 2015-05-18 21:34:02 +02:00
Julian Eisel
598c2dffe9 Fix T44708: UI label should use plural
Just to keep commit ratio up while being busy preparing for final exams
;)
2015-05-18 21:29:57 +02:00
c465f9f729 Cycles: add grid memory usage to logging. 2015-05-18 21:10:08 +02:00
9e892c6035 Cycles: use ccl_fetch to get the shading point position. 2015-05-18 20:34:19 +02:00
192fddb324 BGE: Fix blenderplayer bad call stubs not updated.
Please (dfelinto) compile the bge to avoid these kind of problems.
2015-05-18 18:54:13 +02:00
5fa0b8778b BGE: Set default envMap resolution to 512 pixels
I propose to change  the environment map render default resolution (600) to 512 (Thanks brecht for the correction... I don't know why I said dpi) (to make it compatible with this script: http://en.wikibooks.org/wiki/GLSL_Pr...cting_Surfaces ) to make cubeMap reflections easier and avoid this error:

invalid envmap size please render with CubeRes @ power of two
unable to initialize image(0) in MAMaterial, image will not be available

http://blenderartists.org/forum/showthread.php?371232-BGE-proposal-Set-default-envMap-resolution-to-512-dpi

http://blenderartists.org/forum/showthread.php?370026-Problem-with-cube-map-textures (post 11)

Author : youle (Ulysse MARTIN)

Reviewers: hg1, agoose77, lordloki, moguri, panzergame, dfelinto

Reviewed By: panzergame, dfelinto

Subscribers: brecht

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1306
2015-05-18 18:12:40 +02:00
2cf7efff36 WIP patch for OpenVDB integration in Blender and Cycles
As requested by a handfull, here's some code :)

(NOTE:) you'll need to disable compilation with OSL and install OpenVDB separately.

Reviewers: dingto, lukastoenne, sergey

Subscribers: levon, #cycles

Differential Revision: https://developer.blender.org/D1308
2015-05-18 17:23:47 +02:00
Dalai Felinto
947b756d5e Multi-View: small cleranup/refactor with RE_pass_find_by_type and RE_RenderLayerGetPass 2015-05-18 10:57:59 -03:00
997f2009c0 Export: take adaptive domain into account (still a bit off but seems to
work)
2015-05-18 14:06:27 +02:00
cecd1f98a4 Fix T44752: Clip Editor doesn't respect ColorSpace setting when playback after Prefetch 2015-05-18 16:40:52 +05:00
45afc02f11 Solve threading conflict related on proxy group's inverse matrix
It was possible that two threads will start calculating proxy group's inverted
matrix and store it in the object itself. This isn't good idea because it means
some threads might be using partially written matrix.
2015-05-18 16:40:52 +05:00
61f9f508a4 Make object material drivers evaluation thread safe
Previously it was very easy to run into situation when two objects are sharing
the same materials with drivers which will cause threading access issues.

This actually only needed for the old depsgraph, but since it's still the one
we're using by default we'd better solve this issue.
2015-05-18 16:40:52 +05:00
8540907d60 Attempt to make drivers more safe for threading
There were some reported data race conditions in the python interpreter which
seems to be rather valid.

Surely this is not very pretty solution, but it might solve some annoying bugs
related on threading.
2015-05-18 16:40:52 +05:00
40091ff83a Correction to early output in the parallel range implementation
The used heuristic of checking the value prior to lock is not totally safe
because assignment is not atomic and check might not give proper result.
2015-05-18 16:40:51 +05:00
b88597c218 Make switching to threaded malloc safe to be called from threads
For a long time this function was only intended to be used from the main thread,
but since out implementation of parallel range (which is currently only used by
mesh deform modifier) we might want to switch to threaded alloc from object
update thread.

Now we're using spinlock around the check, which makes the code safe to be used
from all over the place.

We might consider using a bit of atomics operations magic there, but it's not so
much important for now, this code is not used in the performance critical code
path.
2015-05-18 16:40:51 +05:00
17388794ce Filebrowser: Do not intent to draw empty strings, loss of time.
Fixes assert raised in `UI_text_clip_middle_ex()` when trying to draw (empty) 'size' string
for appended/linked blender datablocks.
2015-05-18 13:02:05 +02:00
bf93316c52 Fix assert in outliner regarding WM and SCR ID types... 2015-05-18 12:53:31 +02:00
5dfe88adba Fix T44553: Dyntopo ignores front-face option
When 'Front Faces' brush option was enabled, dyntop would still adjust detail on back-faces.
2015-05-18 18:22:31 +10:00
3dfce097e4 Cleanup: use const for Imbuf file types 2015-05-18 16:27:08 +10:00
924f31e54f Fix T44543: painted texture lost after first save
Fix for T36639 caused all path changes to reload (which could loose user content).

Change behavior:

- Only reload data when a flag is explicitly passed
  (currently only used by Find Files operator)
- Don't reload images which have been painted onto and not saved (dirty flag set).
2015-05-18 13:42:47 +10:00
662746fdd4 Fix multi-drag & multi-select, Alt press mid-drag
This would enable multi-value-editing in the middle of the drag action.
2015-05-18 11:52:59 +10:00
88acb3c599 Fix T44707: cycles border render regression 2015-05-18 11:37:19 +10:00
bd65b12398 Support compilation with SCons (only tested on Linux). 2015-05-18 02:18:06 +02:00
29aae4db38 UI: errors in buttons now show in info report
Mistakes in button expressions were previously only printed to the console.
2015-05-18 10:02:29 +10:00
96054b23ec Modification to the node's UI:
- avoid drawing properties' names
- give it a default size
- warn about OpenVDB not being available on the GPU
2015-05-17 23:50:57 +02:00
4634178396 Correction to some CMakeLists.txt (missed those in some previous commit) 2015-05-17 23:49:38 +02:00
3ed009af96 Change behavior of cycles xml to conform the spec: "Each XML document has exactly one single root element" 2015-05-17 23:41:38 +02:00
0b5bf9d419 BGE: Fix T42244 LibLoad crash with logic brick KX_TouchSensor
I remove duplicate and wrong code which treat the special case of KX_TouchSensor.
And Also the re-conversion of linked logic brick.
2015-05-17 22:19:09 +02:00
579d88551c Improvements to compilation with CMake: set flags to be able to build
with or without OpenVDB.

Scons support should follow.
2015-05-17 21:04:26 +02:00
Julian Eisel
d1230ca723 Fix Node Editor using wrong snap element menu when called from shortcut
Kudos to @kopias for notifying me :)
2015-05-17 19:47:03 +02:00
105b87a3f7 Cycles: Enable advanced shading on AMD / OpenCL.
That is needed for Motion Blur and Render Passes to work properly.
I hope there are no nasty side effects, but we need to test this.
2015-05-17 19:29:33 +02:00
9d1bdd9647 Add OpenVDB version to the system info file 2015-05-17 19:17:45 +02:00
d5c17b2c92 Properly set the fluid transformation matrix.
This time for real, though we need to account for adaptive domain, but
that's for another commit I guess.
Also add metadata to the grid to mark it as in local space.
2015-05-17 18:53:49 +02:00
dae566894a Cycles / OpenCL: Enable Camera Motion and Hair for AMD.
Only enabled for the Experimental kernel though, so the feature set must
be changed in the UI to use the features.
2015-05-17 18:46:25 +02:00
14c2bc53c0 Cleanup: Typos, typos everywhere. :D 2015-05-17 18:32:31 +02:00
4139686817 Fix T44713: GLSL and BI inconsistency converting color to float node socket. 2015-05-17 18:18:04 +02:00
3cff7768d5 Fix T44718: Cycles GLSL not working for NURBS objects. 2015-05-17 17:25:57 +02:00
43ee3f4040 Fix T44739: OS X RMB emulation giving wrong mouse button release event. 2015-05-17 16:55:18 +02:00
48ed2b6309 UV editor: make Ctrl+E menu with mark/clear seam, instead of always marking. 2015-05-17 16:54:14 +02:00
a622cdaad8 Buildbot: Make sure files are readable by www group 2015-05-17 19:28:12 +05:00
2b9d806432 Fix T44084 - Cursor gets reset after MMB scrolling in another area while in GPencil Continous Draw Mode 2015-05-18 02:25:32 +12:00
206f29c12c Fix T44685 - In grease pencil stroke editing, selecting points is offset by a few pixels
The problem was that it was aborting too early after stumbling across a point which
might fit within the bounds required. This commit improves the logic here to solve
this and a few other little bugs like that.

Disclaimer: There are still a few cases where it randomly ends up picking something
way off. However, this only seems to occur very sporadically, so it's hard to say
how bad the problem may be.
2015-05-18 02:03:39 +12:00
7b6deb2a46 Make OpenVDB cache properties its own struct/linked list, including some
operators to add caches to, move caches around and remove caches from
the list.
2015-05-17 15:33:18 +02:00
3b9b59a9db Quiet warning. 2015-05-17 15:17:22 +02:00
30b45d5591 BMesh: don't check winding for uv-vert-map
Made link-select separate front/back with projected UV's
2015-05-17 23:06:41 +10:00
b68fa820d6 Fix T44715: crash compositing with undefined node due to re-save in older version 2015-05-17 13:44:22 +02:00
3b359f1fea BGE: Fix T43761 No re-creation of display list after a mesh modification.
I also removed unused flags in RAS_ListRasterizer.cpp.
2015-05-17 12:53:57 +02:00
4d45f47920 Fix T44737: Missing 'Spin' op entry in surface (NURBS) tools/menu. 2015-05-17 12:45:07 +02:00
effb912061 Cycles Standalone: Expose various light settings. 2015-05-17 12:36:42 +02:00
dad2850cc5 Numeric Input for Pose Breakdowner/Slide/Push Tools 2015-05-17 22:28:25 +12:00
347843f6fe Cycles Standalone: Update help screen. 2015-05-17 12:10:30 +02:00
f51fef63aa Fix own error deleting previews 2015-05-17 17:26:01 +10:00
847ec075eb Cleanup: pep8 2015-05-17 17:26:01 +10:00
02cbc3c1e0 Cleanup: indentation 2015-05-17 17:25:57 +10:00
daeb3069cf Cleanup: typos 2015-05-17 16:09:32 +10:00
6ba128129d CMake: correct file listing 2015-05-17 16:09:15 +10:00
60f60ed496 CMake: fixes for own checking script
don't error if generated files are missing.
2015-05-17 16:05:38 +10:00
02f307baf6 Cleanup: unessecary use of Object in get_fluid_description, also make it
static.
2015-05-17 01:10:11 +02:00
4eb69ba90f Cycles: missing break in GridDescription loop. 2015-05-17 01:08:53 +02:00
6c15f3044b Yet another attempt to fix Intel case for T43987 2015-05-16 23:09:11 +02:00
fc49fc69d3 Correct update in RNA and send notifier. 2015-05-16 18:59:06 +02:00
bdaf887654 Cycles: remove grid name print. 2015-05-16 18:17:21 +02:00
2d5bd5638f Cycles: tag OpenVDBManager as needing an update when connecting node
sockets during preview rendering.
2015-05-16 18:12:55 +02:00
0cd3e5e72c Cycles: early exit add_volume if we already have a sampler allocated.
This is done by means of a vector of structs which stores the grids'
information, including the grid slot, which is returned if we have a
match.
2015-05-16 18:11:31 +02:00
fb71b93b43 Fix crash happening when exporting the simulation right after resetting
it (by enabling adaptive domain, high resolution or whatever).

The fluid description should be set after the simulation was
initialiazed as it contains information taken from fields which wouldn't
exist otherwise.
2015-05-16 17:10:27 +02:00
dcacc54e07 Freestyle: Fix for stroke rendering performed with multi-views enabled.
Per-view Freestyle stroke rendering needs to be done without multi-views.
2015-05-16 23:59:14 +09:00
4c0f0eb338 Fix T44691 Freestyle render crashes when Views is on (Blender Internal).
In pipeline.c the function add_freestyle() was supposed to be called once
per frame, but after the Multi-view merge the function are called as many
as the number of views.  There were however a few Freestyle parameters
that have to be initialized per frame, and initializing one of the
parameters for each view was causing double freeing of allocated memory
which was enough to result in a crash.
2015-05-16 23:59:11 +09:00
a49534ae48 setting some RNA defaults for nodes 2015-05-16 13:04:40 +01:00
e810dabf73 Fix compile issue. 2015-05-16 13:29:55 +02:00
dddb4f655c BMesh: link-select-pick now supports redo
Without this you can't change delimiter options without editing the keymap.
2015-05-16 20:53:35 +10:00
df9d4f4bff Add an operator to update the transformation matrices of the grids. 2015-05-16 11:20:29 +02:00
9a9b2f5b98 Cleanup: grid naming, use CFRA, quiet warning, unused include. 2015-05-16 11:15:55 +02:00
d758a73a74 Fluid transform cleanup (avoid reinventing the wheel). 2015-05-16 11:10:00 +02:00
3aa4a0e787 BMesh: add UV delimit for select-linked, dissolve 2015-05-16 12:21:31 +10:00
05c4c2409e BMesh: add sharp edge delimiter 2015-05-16 10:18:38 +10:00
5cc55486ee BMesh: select linked, support other delimiters
Use same options as limited dissolve (adds material & winding)
2015-05-16 10:17:46 +10:00
1bb3d0d485 Select linked seam limit, now works for picking
Second half of fix for also T42510
2015-05-16 09:35:35 +10:00
eeadd19eb5 Cleanup: use define for playback frame limiter 2015-05-16 08:35:25 +10:00
80c0097210 Only initialize icons in background mode.
Also enable this for headless builds too.

Calling UI_icons_init would initialize matcaps, brushes etc...
2015-05-16 06:21:26 +10:00
b931afe55e Fix new 'custom previews/icons' py feature crashing in background mode.
We want this even without UI, some scripts may use it in a background processing
mode to avoid too heavy process in actual 'user' blender...
2015-05-15 20:12:25 +02:00
08f30ef31c Fix T44724: missing menu entries for 'view fit' (F) in clip/image editors. 2015-05-15 19:49:00 +02:00
2d479421af Fix crasher in new lazy-rebuild outliner's treehash.
treehash must always been checked before used!

Reported on irc by sebastian_k and investigated by sergey, thanks!
2015-05-15 19:29:18 +02:00
5dc22fbbfb BGE: Fix T41299 Group API for child object in dupli instance group. 2015-05-15 19:17:15 +02:00
ce0d3112e4 Scene audio naming cleanup:
Remane sound_scene_handle to playback handle.
sound_scene_handle was a part of scene so we could see code like scene-
often in the same function.

If I understand things correctly, in audaspace lingo, the
playback_handle corresponds to a Reader while the scene_sound
corresponds to a Factory.

More cleanups will be done here later, but changing this now because my
brain hurts trying to remember which is which...
2015-05-15 16:51:46 +02:00
3d658bf7a7 BGE: Fix stupid typo error in DupliGroupRecurse 2015-05-15 16:25:45 +02:00
371e5f25a0 BGE: Cleanup : merge 3 loop in 1 in function DupliGroupRecurse. 2015-05-15 16:20:06 +02:00
f4e8e70b5d Add really simple memory reduction scheme for internal animation player.
Holds 30 frames in memory. Could make it check memory instead but that
should suffice for now to make sure blender does not crash on me with
movie files.

Previously the system would load eveything in memory so something like
playing caminandes in player would swap after 30 seconds in local
computer.
2015-05-15 16:01:01 +02:00
31e96cbf96 Cleanup: style, spelling 2015-05-15 23:38:53 +10:00
2fa4a48bce BGE: Fix T44700 mesh without material in blenderplayer.
If a mesh doesn't have a material we don't initialize the mSavedData in KX_BlenderMaterial to avoid crash.
2015-05-15 14:54:38 +02:00
7c06190882 Cycles: Make animated seed a builtin feature.
For animations, you often want an animated render seed (noise pattern).

This could be done by e.g. setting a driver on the seed value.
Now it's a little checkbox, that can be enabled.

The animated seed is based on the current Blender frame and
the seed value itself. Simply enabling it, will already result in an animated
seed (different on each Blender frame), but it can be randomized further
by setting a different seed value.

Disabled per default, so no backward compatibility break.

Differential Revision: https://developer.blender.org/D1285
2015-05-15 13:54:59 +02:00
e4c93dc7db Zoom to frame options, requested by the Hwoozeberry (dutch translation)
team.

There are 3 options here:

1) Keep range (previous behaviour)
2) Seconds - allows a specified offset in seconds around current frame
3) keyframes - zoom to include a number of keyframes around the cursor

Options 2 and 3 have their own properties to tweak the behaviour and all
options can be found in User Preferences->Interface under the 2D
viewports section.

Number 3 will probably need some refinement so commiting here for the
hwoozeberry team to test first.
2015-05-15 13:39:30 +02:00
c86a6f3efb Cycles: Enable CMJ for Intel/NVidia experimental split kernels
It is still disabled for AMD devices since can't test if it works fine
on this hardware.
2015-05-15 13:22:47 +05:00
c2b9f78415 Cycles: Pass __KERNEL_EXPERIMENTAL__ to OpenCL split kernels
Experimental feature set id currently unavailable for megakernel, it'll
require some changes to the cache system to distinguish cached regular
kernels from cached experimental kernels.

Currently unused, but some features will be enabled soon.
2015-05-15 13:22:47 +05:00
2ab909a88c Cycles: Make experimental kernel build option more generic
Previously it was explicitly mentioning it's NVidia kernel related option,
but in fact it's also handy for the OpenCL kernel.
2015-05-15 13:22:47 +05:00
c9e8888f87 Cycles: Disable bake OpenCL kernel for NVidia devices prior to sm_30
Driver fails to compile kernel in reasonable time for those devices here,
so for easier testing of the OpenCL split kernel work disabling bake kernel
for now.
2015-05-15 13:22:47 +05:00
960d7df56f Cycles: Pass device compute capabilities to kernel via build options
This way it's possible to do device-selective feature disabling/enabling.
Currently only supported for NVidia devices via OpenCL extension.
2015-05-15 13:22:47 +05:00
650fbd09f7 OpenCL wrangler: Add some of the extension defines 2015-05-15 13:22:47 +05:00
03f9d5a4cf Cycles: Cleanup, move build options string calculation into the device class
This way it's easier to access platform name, device ID and other stuff which
might be needed to define build options.
2015-05-15 13:22:47 +05:00
ba9dbaae64 Fix T42510: Limit by seams fails in edge/vert mode 2015-05-15 17:14:02 +10:00
547b676181 BMesh: add loop-shell walker 2015-05-15 17:07:57 +10:00
cfe54245a8 Correct recent cleanup
Removed call which was still needed
2015-05-15 11:29:34 +10:00
bc371030a7 BMesh: rename loop walker -> edgeloop 2015-05-15 10:55:56 +10:00
Julian Eisel
a92d8a34a8 Add material reorder buttons for Cycles as well 2015-05-15 01:25:03 +02:00
Julian Eisel
7549ec7301 Fix some issues found by Coverity Scan
Some of them are just brain dead code, some are potential bugs.
2015-05-15 01:08:41 +02:00
3c10ec96b5 Cycles: Enable object motion blur on Intel OpenCL platform
This required allocating some memory related on object transform needed
by ShaderData and currently it is done for all the platforms. Since we're
targeting full feature-complete platforms this is rather acceptable at
this point and in the future we'll do selective NO_HAIR/NO_SSS/NO_BLUR
kernels.

This is experimental still and in fact there're some major issues on
NVidia platform and it's not really clear if it's a bug in compiler,
some uninitizlied variable or other kind of issue.
2015-05-15 00:48:12 +05:00
03565218d5 Cycles: Various fixes
Some stupid fixes like spaces around operator and missing semicolon,
plus fix for wrong detecting of ShaderData SOA size. Thar was harmless
since there's only one closure array, but still better to fix this.
2015-05-15 00:42:05 +05:00
f6c6dd44de Cycles: Remove meaningless ifdef checks for features in device_opencl
This file was actually checking for features enabled on CPU and surely all
of them were enabled, so removing them does not cause any difference.

ideally we'll need to do runtime feature detection and just pass some stuff
as NULL to the kernel, or maybe also have variadic kernel entry points which
is also possible quite easily.
2015-05-14 23:44:19 +05:00
5c34266383 Cycles: Enable camera motion blur in split kernel for Intel/NVidia
It's good for testing and seems to work quite reliably here.

This probably not totally cheap in terms of performance, but this we
could solve quite easily by selective kernel compilation once other
things are tested/proved to be reliable.
2015-05-14 23:35:19 +05:00
51dceb32a8 Cycles: add some quick logging. 2015-05-14 19:45:24 +02:00
d6d7297b74 Fix missing object drawing update when done exporting. 2015-05-14 19:42:20 +02:00
b464dd4862 Fix fluid transformation matrix.
There's a little bit of float precision issue, but I'll call it a day
for now...
2015-05-14 17:09:29 +02:00
0a60c7d8ee Cycles: Fix missing camera-in-volume update when using certain render layers configurations 2015-05-14 19:08:13 +05:00
3d3d805b64 Cycles: Prepare code for OpenCL camera/motion blur
The kernels are now compiling just fine, but there're some issues
during rendering. This is still to be investigated.
2015-05-14 18:48:56 +05:00
5a63edb929 Cycles: Use special _auto versions of transform function in motion blur code
Doing this as a separate commit so it's easier to revert in the future, once
OpenCL 2.0 is becoming our requirement.
2015-05-14 18:48:56 +05:00
33439626f1 Cycles: Add transformation functions with specified addrspace
This is required for OpenCL prior to 2.0 and those functions will become
handy when working on camera/motion blur support in split kernel.
2015-05-14 18:48:56 +05:00
79aa50dc53 Cycles: Enable hair for split kernels when using Intel or NVidia drivers
Apart from simply enabling this features needed changes to the code were done.
Technical change, replacing SD access from "simple" structure to SOA.
2015-05-14 18:48:56 +05:00
e7f2aec81b BGE: Add 'Lock Translation' for dynamic objects
The XYZ translation lock was missing for dynamic object.

Reviewed By: panzergame
2015-05-14 15:23:42 +02:00
1ccc417477 Invert value calculation for percentages it makes more sense that way 2015-05-14 14:22:57 +02:00
7aa74dfe5e Radial operator:
Percentage properties use interaction like factors with number feedback
and easier way to go predict lower percentages.
2015-05-14 14:01:33 +02:00
057a8c6250 Add clear seams to uv editor 2015-05-14 12:48:47 +02:00
8bf9e1412f BGE: Fix: Double jumps are not working with character motion actuator
The actual character motion actuator triggers every frame the jump method.
Adding an edge detection to trigger the jump method.

Reviewers: lordloki, sybren, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D1220
2015-05-14 09:45:51 +02:00
687f6a9752 BGE: Code Cleanup: LOD hysteresis calculation
* Cleanup duplicated code.
* Remove unnecessary "this->"

Reviewers: kupoman, lordloki

Reviewed By: kupoman, lordloki

Differential Revision: https://developer.blender.org/D1293
2015-05-14 09:40:03 +02:00
9d1652e843 Merge branch 'master' into openvdb_smoke 2015-05-14 08:01:14 +02:00
434086dc53 install_deps.sh: correct typo 2015-05-14 13:13:13 +10:00
9207c8d669 Fix project paint worldspace coord calc from seam
Surprising this worked at all, would show errors with non-flat-quads.
2015-05-14 13:06:19 +10:00
0e80eb82e0 Cycles: Resize light_data after possible light removal. 2015-05-14 01:13:40 +02:00
67eb2c7897 Cycles: Remove Emission shaders from the graph if color or strength is 0. 2015-05-14 01:13:40 +02:00
da1038c768 UI: Copy to selected nodes now filtered by type
Was needed because sockets are very generic type which would match on unrelated values.
2015-05-14 06:27:51 +10:00
fc31bae66f Cleanup: Avoid temp variable in portal sampling code. 2015-05-13 19:54:52 +02:00
93867ae549 Cycles: Cleanup: use generic utility function to set kernel arguments 2015-05-13 19:56:24 +05:00
51a6bc8faa Cycles: Inline sizeof of elements needed for the split kernel
No need to store them in the class, they're unlikely to be changed
and if they do change we're in big trouble anyway.

More appropriate approach would be then to typedef this things in
kernel_types.h, but still use inlined sizeof(),
2015-05-13 19:56:24 +05:00
0a6e32173e Cleanup / Cycles: De-Duplicate Portal data fetch and side check. 2015-05-13 16:05:30 +02:00
730e61b446 Clip editor: Selecting curves in graph view always extends tracks selection
Was actually an old TODO, hopefully solved now in a way so everyone is happy.
2015-05-13 16:11:26 +05:00
0d64e26740 Clip editor: Deselecting with shift-LMB does not work in graph view 2015-05-13 15:55:32 +05:00
38eab96f9b Fix T44683: Unable to mute movie clip when using stabilized display 2015-05-13 14:28:24 +05:00
ae9e38c5ad Fix T44689: New Depsgraph crash
Simple highschool rated issue -- uninitialized variable :)
2015-05-13 14:07:37 +05:00
1a0fb7e9ae Project Paint: enable old bleed UV calculation
Was disabled because other values weren't quite right.
2015-05-13 18:26:56 +10:00
a050d6063c Project Paint: resolve ugly bleed artifacts
Use the bilinear reverse to find the pixel to bleed from.
Was using pixel space which didn't work well.
2015-05-13 18:04:46 +10:00
3e782756e3 Project Paint: simplify uv bleed factor calc 2015-05-13 17:48:54 +10:00
7969b238db Fix T39775: Skin modifier crash 2015-05-13 16:08:19 +10:00
7742a8f09c Cleanup: reduce scope for win32, Linux vars 2015-05-13 16:08:19 +10:00
Dalai Felinto
c78df8f9ee Duplicate Render->RenderData.views for thread safety (as we do for layers)
This fixes nothing at the moment, but better safe than sorry since there
are still a few strange multiview issues around.
2015-05-13 01:03:19 -03:00
abb80abf8a UI: check visible layers when reading context
This resolves a problem where selected items edited for multi-value-editig
could include objects not in any visible views (unlocked layers, local view... etc).
2015-05-13 11:00:23 +10:00
08bbea9362 UI: multi-value-edit, distable alt+lmb on sliders 2015-05-13 10:32:30 +10:00
898b6491ed UI: multi-value-edit, tint button while editing
Currently re-uses node-flag (which is only used to tint color too)
2015-05-13 10:01:13 +10:00
91ec8d8d1e UI: multi-value-editing, copy value when typed in 2015-05-13 09:50:08 +10:00
bbadc3aecd UI: nodes support for multi-value-editing 2015-05-13 09:48:41 +10:00
Dalai Felinto
274b0838c7 Multi-View: return correct number of views when rendering only one of the stereo pairs
Without this fix ViewerNode would continously trash the views/buffer
when disabling either stereo eye.
2015-05-12 18:46:09 -03:00
b3334d936f Edit last commit, redundant 'data' in RNA path 2015-05-13 07:40:21 +10:00
ee3dde2d49 UI: ObData support for copy-to-selected
Now multi-object editing works for obdata too.
2015-05-13 07:25:04 +10:00
Dalai Felinto
3e519860e5 Fix T44684 Compositor backdrop isn't updating correctly 2015-05-12 18:20:05 -03:00
e4cd4c383f Cleanup: style 2015-05-13 06:10:49 +10:00
3160740421 Fix T40762: Python can't access macro values 2015-05-13 05:26:29 +10:00
b01dd748b6 Dyntopo PBVH build optimization:
Optimize the full rebuild case for now (though same code can be adapted to
partial redraws)

Main changes here:

* Calculate bounding centroid for faces only once (instead of every intermediate node)
* Faces do not get added to GSets immediately, instead we track a face
array which has faces that belong in a node in consecutive order.
Nodes just keep accounting of start and length in the array.
* Due to faces not being added to GSets, we can skip doing cleanup of GSets
and readdition for each intermediate node and instead only
add the faces to the final leafs node GSets when those nodes are created.

Results:
For a 1.9 million face test model, PBVH generation time (roughly measured by undoing) is
dropped from 6 seconds to about 4 seconds. Still too high, but still a nice improvement.

TODO:
Thread some parts. Unfortunately threading the GSet assignment part might not help much since
we'd need a lot of locking to avoid collisions with node assignments, especially for unique vertices.
2015-05-12 21:03:16 +02:00
f097453006 Fix missing define in blenloader
It caused blender versions compiled with scons not having proper
build date/hash stored in the .blend file.
2015-05-12 19:53:31 +05:00
Dalai Felinto
15016e1497 small cleanup on render_result_new()
(making the duplicate code more like the original one)
2015-05-12 11:38:24 -03:00
f0f481031c Fix T44616: Cycles crashes loading 42k by 21k textures
Simple integer overflow issue.

TODO(sergey): Check on CPU cubic sampling, it might also need size_t.
2015-05-12 18:48:55 +05:00
7c2905b8ec Fix T44398: Compositing displace node makes image fuzzy with zero displacement
EWA filtering with zero derivatives is introducing some fuzzyness into the
image. Currently solved by using regular sampling for cases when derivatives
are zero, which should also make compo faster in that areas.

Still need to look into checking if EWA filter can be tweaked in a way so
no fuzzyness is introduced.
2015-05-12 17:24:07 +05:00
8697c19e91 Depsgraph: Don't use C++11 function binding with MSVC
It has some weird incompatibility with the way how Boost and GCC C++11
function bindings works, resulting in compilation errors.
2015-05-12 16:41:23 +05:00
909d3228b1 BGE : Fix Bullet shape margin for triangle mesh static objects 2015-05-12 13:38:46 +02:00
615a7aea55 Depsgraph: Attempt to fix alignment issue on 32bit platforms 2015-05-12 16:36:34 +05:00
29529d2ac3 ImBuf: Update stubs so strict compiler is happy about unused arguments
Also use C++-style unused arguments tagging instead of legacy c-style.
It's less annoying this way because does not require adding argument to
two places of the function.
2015-05-12 16:25:39 +05:00
bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
a09341469e Depsgraph: Add evaluation callbacks for granular nodes update
This commit only adds callbacks which then later be used with major dependency
graph commit, keeping the upcoming commit more clean to follow.

Should be no functional changes so far still.
2015-05-12 16:06:37 +05:00
051688b34c Depsgraph: Make ob_get_parent_matrix() more public and reusable
Currently still only used from object.c, but in the next commit it'll be also
used from granular object update callbacks.
2015-05-12 16:06:36 +05:00
08d87514d3 Depsgraph: Add utility function to check whether modifier depends on time
Currently unused, based on the code from old depsgraph.c. The purpose is to
re-sue the code over old and new depsgraph in an easy way.
2015-05-12 16:06:36 +05:00
31f0c27ae7 Depsgraph: Add additional relations/id update tags
This calls are not strictly speaking needed for the old dependency graph, but
due to more granular nature of upcoming depsgraph more actions requires update
of relations of IDs.

On the one hand this extra tags could be wrapped with if() statements, but on
the other hand it makes sense to keep tag in sync so it's clear if some issue
is caused by missing/extra tag or by depsgraph itself.
2015-05-12 16:06:36 +05:00
87fd166654 Depsgraph: Add utility function to tag pose for recalc
Currently this function only tags pose itself, totally matching previous
behavior. But this will be needed in the future once new dependency graph
is landed, because of it's granular nature which relies on the fact that
pose channels are all up to date when building the graph.

Should be no functional changes so far.
2015-05-12 16:06:36 +05:00
dbbe721c2a Depsgraph: Move update-related functions into own files
Currently it is just moving existing functions into a new file,
but in the future those new files will be grown much more due
to upcoming more granular scene updates.

Should be no functional changes.
2015-05-12 16:06:36 +05:00
ae00e42bc2 Fix T44677: Normal Edit Modifier Radial Mode broken with target object.
Very stupid mistake, odd nobody hit this earlier... :/
2015-05-12 10:57:39 +02:00
20e561dd6a PyAPI: Remove release method, just use delitem 2015-05-12 18:43:30 +10:00
f6dc0e918b Minor tweaks to preview templates 2015-05-12 18:29:06 +10:00
34c78a659b Doc: add bpy.utils.previews
Updated sphinx_doc_gen.py to better handle pure py-classes.
2015-05-12 18:24:32 +10:00
f727df6076 Doc: correct rst syntax
also remove some API docs from example
2015-05-12 18:23:29 +10:00
311f6cac92 Doc: replace addons -> scripts in docstring
Theres nothing add-on specific here.
2015-05-12 18:23:29 +10:00
8a231185aa Doc: minor fixes
- check for class/static methods assumed nonzero args.
- subclass references and set-flag items are now sorted.
- use 'order' for Py operator mix-ins,
  so operator settings don't show in random order.
2015-05-12 18:23:24 +10:00
8478c71a7b BGE: Adding material IPO support to GLSL materials
Most of this patch was created by Daniel Stokes, I'm mostly just cleaning
it up and testing it. Still todo: hardness. I need to figure out how to
handle the integer -> float conversion on a dynamic uniform.

Reviewers: psy-fi, brecht

Reviewed By: psy-fi

Subscribers: psy-fi

Differential Revision: https://developer.blender.org/D511
2015-05-11 23:05:04 -07:00
ce504cffad Freestyle: Fix for assertion failure in viewport preview.
An assertion to check if `re->clipsta` < 0 (added as part of addressing
T36009 in rBrB795034c17d76bef2a15e576ac9c70ae2268a823b) was failing when
Freestyle viewport preview rendering takes place in the camera view with
an orthographic camera (in this case, the user-defined clipping range is
used without changes, so that `re->clipsta` is positive).  The
`re->clipsta` property has a negative value only when the 3D viewport is
in an orthographic view but not in the camera view.  It seems that this
viewport setting cannot be identified from rendering settings accessible
from Freestyle.  Now a negative `re->clipsta` value is directly checked
instead, without relying on other render flags.
2015-05-12 02:18:24 +09:00
c7bccb30bf Cycles: check for F16C support with __cpuid, as we do for BMI and BMI2 2015-05-11 15:49:36 +00:00
1bf685488c Collada Exporter: sanitize a bit lnor export.
In case `BKE_mesh_calc_normals_split()` would fail, exporter would read
uninitialized random mem... Should not happen, but better be safe than sorry.
2015-05-11 17:22:18 +02:00
2c4736e6db Clearing preview image shall also unset 'user edited' flag! 2015-05-11 17:12:31 +02:00
4fc3188112 Cycles: Get rid of one more OpenGL matrix manipulation/push/pop. 2015-05-11 16:41:18 +02:00
d30f664c04 Expose PreviewImage & custom icons to py API.
This commit mainly:

* Exposes PreviewImage struct in RNA, including ways for user to set images data.
* Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image.
* Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system.
* Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons.

Note that loading image from files' thumbnails is done when needed (deferred loading), not
when defining the custom preview/icon.

WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level.
We do not want our UI to explode under hundreds of different flashy icons!

For more info, see also the release notes of Blender 2.75 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons)
and the example/templates featured with Blender.

Patch by Campbell (ideasman42), Inês (brita) and Bastien (mont29).

Differential Revision: https://developer.blender.org/D1255
2015-05-11 16:37:15 +02:00
e38f914421 Cycles: use vertex buffers when possible to draw tiles on the screen.
Not terribly necessary in this case, since we are just drawing a quad,
but makes blender overall more GL 3.x core ready.
2015-05-11 16:28:41 +02:00
9fe8f6e291 Dynamically add sockets to the node based on the grids available in the
file.
2015-05-11 14:28:13 +02:00
cc1883468d Keep valgrind happy by using tight vec3 packing instead of lax vec4 with
an unused coordinate missing.
2015-05-11 14:14:06 +02:00
5588a51c9c Cycles OpenGL: Don't use full matrix transform when we can just use
simple addition.
2015-05-11 13:10:19 +02:00
Kévin Dietrich
abaa8617d7 Move openvdb utilities into their own files/directory. 2015-05-11 08:19:21 +02:00
dfbb876d46 UI: initial support for UI editing selected items
Add basic support (holding Alt) to edit all selected objects/bones/sequences.
2015-05-11 15:32:43 +10:00
097862cb26 GHash: avoid redundant casts 2015-05-11 12:39:39 +10:00
18cf235893 GHash: use const keys when only used for lookups 2015-05-11 12:39:08 +10:00
3141870c96 Outliner: postpone rebuilding the tree
On existing Blender could rebuild tree many times (on freeing each ID).
Use a flag instead of immediately rebuilding.
2015-05-11 11:09:21 +10:00
f4bae1f6d6 Outliner: cleanup flag was never cleared
Was running cleanup on every draw.
2015-05-11 10:58:53 +10:00
Kévin Dietrich
8066346267 Cycles: only store a single float for scalar outputs. 2015-05-11 01:31:53 +02:00
9e2e85a367 GHash: Add BLI_ghash_ensure_p_ex to copy the key
Needed in cases where the memory from each key is owned by the GHash.
2015-05-11 09:27:05 +10:00
Kévin Dietrich
a75a5d3987 Cycles OpenVDB node: add output sockets based on Blender's node outputs.
In a later commit, the Blender ones will be dynamically added based on
the grids contained in the file so any grid can be accessible for
shading purposes.
2015-05-11 01:24:37 +02:00
d55868c3b2 Cycles: And yet another compilation fix after half-float commit for clang.
Suggested by Brecht, tested with gcc > 4.4 and Clang
2015-05-10 19:32:32 +00:00
3ec168465d Cycles: fix compilation on 32-bit Windows for half-floats
Reported by IRC user HG1.
2015-05-10 19:06:43 +00:00
c20c07f27a Fix T44633: image cache broken for movies and sequences.
After multiview, it was continuously unloading/loading image buffers from
the cache due to mismatch in cache insert and lookup keys.
2015-05-10 20:51:18 +02:00
8db2a9a352 Cycles: Add -mf16c for previous commit for Scons
Thanks to Dingto for noticing!
2015-05-10 17:51:04 +00:00
4d8f7eddda BGE : Fix crash during physics mesh update.
Currently we can't update the physics mesh of an added rigid body.
The cause is that that we need to update all shapes to say that the mesh was changed, for static object we don't do that previously because we use a odd way to reallocate memory at the same place.
So now when a mesh is changed we iterate all physics controllers which use the same shape info and recreate its shape with the correct mesh.

example file : {F168100}

Reviewers: scorpion81, sergof, hg1, sybren, moguri, agoose77

Reviewed By: moguri, agoose77

Subscribers: sybren

Differential Revision: https://developer.blender.org/D1269
2015-05-10 19:21:21 +02:00
2ec221aa28 Cycles: Use native float->half conversion instructions for Haswell CPUs.
This makes OCIO viewport color correction a little bit faster (about -0.5s for 100 samples)
Also set max half float value to 65504.0 to conform with IEEE 754.
2015-05-10 16:35:51 +00:00
3a2c0ccdd0 Cycles: Correction to opencl whitelist check
Was using platform as a device id accidentally.
2015-05-10 20:02:06 +05:00
1c02a201ba BGE: Cleanup constraints documentation
* Fixing Python example. Behavior has changed with Blender 2.74
* Adding missing return type
* Fixing typo simbolic
* Fixing note for upper/lower limit
* Adding link to constraints constants
2015-05-10 15:58:17 +02:00
Kévin Dietrich
bd96249455 Apply patch in a new branch, to clean the history a bit 2015-05-10 15:53:34 +02:00
a47ade34c2 Cycles: Fix tiny greying out inconsistency for Volume settings. 2015-05-10 12:59:18 +02:00
e8be170e79 Cycles: Do not show Branched Path integrator for OpenCL.
Branched Path is not supported, neither in the Split nor Megakernel.
2015-05-10 12:59:18 +02:00
0525db39d1 fix T44648: Collada finding bone chains during import crashes when no bones are there 2015-05-10 11:04:37 +02:00
1fb97ffeed Fix T44644 Missing thread-protection (spinlock) of image in new multiview code.
Many thanks to Sergey, for practically giving the solution!

Note that it may also fix T44345, depends whether there are other missing
protections/locks or not...
2015-05-10 09:18:52 +02:00
45d9df853e UI: consistent naming for operator props 2015-05-10 15:23:41 +10:00
d6b57436ef UI: move sharp/smooth out of vertex menu
Was confusing to have shade smooth/soft in both edge & vertex menu named differently.

This is an edge-flag, so keep in the edge-menu, use vertex option when in vertex mode.
2015-05-10 15:06:44 +10:00
dc95ca92ca BGE: Fix T43822 Videotexture does not use sky color for off-screen
rendering

Make scene background color as default for render-to-texture instead of
current blue color (0, 0, 255).

It is very useful for mirrors setups.

Reviewers: moguri, ben2610, sybren, panzergame, hg1

Reviewed By: panzergame, hg1, moguri

Subscribers: mpan3

Differential Revision: https://developer.blender.org/D1287
2015-05-10 00:56:51 +02:00
583fd3af65 Cycles: Fix typo in global space version of normal transform
It was using direction transform, which is obviously wrong.
2015-05-10 00:53:32 +05:00
136d7a4f62 Cycles: Only whitelist AMD GPU devices in the OpenCL section
Only those ones are priority for now, all the rest are still testable
if CYCLES_OPENCL_TEST or CYCLES_OPENCL_SPLIT_KERNEL_TEST environment
variables are set.
2015-05-09 23:40:26 +05:00
8647c7d501 Fix T38335: incorrect triangle index in raycast with more than 2 quads
eb81153896 broke the fix for T38335, and this fix was incomplete, now we iterate by triangles and polys in the same while block.
2015-05-09 19:12:22 +02:00
2840a5de8f Cycles: Workaround for AMD compiler crashing building the split kernel
It's a but in compiler but it's nice to have working kernel for until
that bug is fixed.
2015-05-09 19:56:38 +05:00
7f4479da42 Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.

Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.

Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.

This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.

More feature will be enabled once they're ported to the split kernel and
tested.

Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.

Based on the research paper:

  https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf

Here's the documentation:

  https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit

Design discussion of the patch:

  https://developer.blender.org/T44197

Differential Revision: https://developer.blender.org/D1200
2015-05-09 19:52:40 +05:00
f680c1b54a Cycles: Communicate number of closures and nodes feature set to the device
This way device can actually make a decision of how it can optimize the kernel
in order to make it most efficient.
2015-05-09 19:28:00 +05:00
6fc1669679 Cycles: Initial work towards selective nodes support compilation
The goal is to be able to compile kernel with nodes which are actually needed
to render current scene, hence improving performance of the kernel,

The idea is:

- Have few node groups, starting with a group which contains nodes are used
  really often, and then couple of groups which will be extension of this one.

- Have feature-based nodes disabling, so it's possible to disable nodes related
  to features which are not used with the currently used nodes group.

This commit only lays down needed routines for this approach, actual split will
happen later after gathering statistics from bunch of production scenes.
2015-05-09 19:22:16 +05:00
17c95d0a96 Cycles: Add utility function to count maximum number of closures used by session
This will be used by split kernel in order to compile most optimal kernel.

Maximum number of closures is actually being cached in the session, so viewport
rendering will not trigger kernel re-loading when number of closures goes down.
2015-05-09 19:17:49 +05:00
5068f7dc01 Cycles: Add utility function to graph to query number of closures used in it
Currently unused but will be needed soon for the split kernel work.
2015-05-09 19:13:32 +05:00
b3299bace0 Cycles: Pass requested tile size to the device via device task
This is currently unused but crucial for things like calculating amount of
device memory required to deal with the tasks.

Maybe not really best place to store it, but consider it good enough for now.
2015-05-09 19:09:07 +05:00
0e4ddaadd4 Cycles: Change the way how we pass requested capabilities to the device
Previously we only had experimental flag passed to device's load_kernel() which
was all fine. But since we're gonna to have some extra parameters passed there
it makes sense to wrap them into a single struct, which will make it easier to
pass stuff around.
2015-05-09 19:05:49 +05:00
d69c80f717 Cycles: Presumably correct workaround for addrspace in camera motion blur 2015-05-09 19:04:19 +05:00
c9133778cf Cycles: Add CPU compat headers to some of the OSL implementation files
This header was already included into some of the implementation files already,
and this change is needed for some upcoming changes in the way how kernel_types.h
works.
2015-05-09 19:04:16 +05:00
7eac672e4f Cycles: Set default closure values to some of the nodes
Previously it was only set at compilation time which is all fine but does
not let us to check which closure the node corresponds to prior to the
compilation.
2015-05-09 19:04:09 +05:00
8c1b805f87 Freestyle: Partial fix for a crash with Save Buffers option enabled.
Prevents null pointer references in the case of the Save Buffers option
enabled.  This is a regression likely due to rBd5f1b9c22233.
2015-05-09 13:20:40 +09:00
eb81153896 Cleanup: warning (sequence-point) 2015-05-09 11:00:50 +10:00
Julian Eisel
54ac84f2b8 Fix 3D View Properties scrollbar being not set to top in startup.blend 2015-05-08 22:20:18 +02:00
6ee0327594 Fix T38335: incorrect triangle index in raycast result
Previously we forgot to do a special operation for indexes to convert a quad to two triangles.
2015-05-08 21:12:36 +02:00
a08d90f070 matcaps browser: changing emboss style and grid direction according to T44613 2015-05-08 19:22:41 +01:00
b65c77e664 Add Intel's 3000 driver to exceptions for df/dy calculations. Should fix
another case of SSAO effect reversal.
2015-05-08 19:25:51 +02:00
2e6634e4a8 BGE: Cleanup function UpdateMesh and SetMesh in CcdPhysicsController.cpp
"if (value == true)" -> "if(value)"
"if (ptr == NULL)" -> "if (!ptr)"
"vector<bool>" -> "std::vector<bool>"
And other blender typo.
2015-05-08 18:17:37 +02:00
4c79608b3b Revert "Motionpaths: Use scene range option, takes start/end frame and
preview"

Looks like this does not work for animators here after all, will use a
different code for this (probably not hardcoded)

This reverts commit 3bbb4020e7.
2015-05-08 17:16:59 +02:00
3bbb4020e7 Motionpaths: Use scene range option, takes start/end frame and preview
settings into account.
2015-05-08 12:35:52 +02:00
900fc43bb4 Cleanup: Remove unused ray type flags.
They were added for completeness, but it seems we don't need them.
2015-05-08 12:10:26 +02:00
945e302409 Cleanup: #define -> enum, and get rid of useless braces in case's. 2015-05-08 10:44:18 +02:00
9190d18b74 Fix T44634: Slide edge not responding to ALT + WHEEL to change reference edge in "even mode".
Modal events (TFM_MODAL_EDGESLIDE_UP/_DOWN) were eaten by NOP generic transform event handling...
2015-05-08 10:29:59 +02:00
a8da11c014 Add missing TEXTEDIT_UPDATE option 2015-05-08 08:58:29 +10:00
a077be3658 Cleanup: use r_* prefix for return args 2015-05-08 07:25:39 +10:00
e010960431 DNA; document how to ignore a struct 2015-05-08 06:54:13 +10:00
0a82c3cfef Minor cleanup 2015-05-07 18:32:35 +02:00
a5dead2e8c Fix T44604 bad quality of rake with bezier curves.
We can calculate tangents analytically for bezier curves, so just make
them awesome. New code uses forward differencing calculation for
efficiency just like curve calculation.

Picture before/after:

http://www.pasteall.org/pic/87843
2015-05-07 18:10:48 +02:00
a2eb94b470 Fix T44631: Custom Normal Data Transfer crash.
Own stupid mistake in rBcdabf7e3...
2015-05-07 15:32:37 +02:00
aa3fc89257 Fix T44611: 'make_links_data' modifiers would fail and crash with multires modifier.
Since it was not ensuring dest has valid mdisp data matching new multires modifier subdiv level...

Also, fixed a bug in `multires_subdivide()`, which would crash when trying to
increase from level 0 (aka no subdiv) to > 1 (wrong check, trying to interpolate
when it should not). And added a few sanity checks.
2015-05-07 15:19:32 +02:00
15fd37fab2 Rake: store last position from mouse, don't store halfpoint between last
and current position.

patch by Bastien
2015-05-07 15:04:11 +02:00
e6a7fdd309 Fix T44627, black spots with lock alpha in projection paint:
Painting would revert alpha even on unpainted pixels, where values would
contain garbage.
2015-05-07 14:49:40 +02:00
e39ec27bba Fix crash when rendering opengl from sequencer. 2015-05-07 14:09:30 +02:00
e3b0d5e99b EdgeSlide: support for un-clamped sliding
Functionality matches vertex slide.
2015-05-07 21:31:24 +10:00
94b9b259e7 Cleanup: remove unneeded context arg 2015-05-07 21:31:24 +10:00
2ec808a4bc EdgeSlide: use pairs for TransDataEdgeSlideVert
no functional changes
2015-05-07 21:31:24 +10:00
cb7fdf45cd EdgeSlide: fix divide by zero 2015-05-07 21:31:24 +10:00
9ca2b76a9f Cycles: Cleanup, make it more clear what endif closes what ifdef 2015-05-07 15:02:43 +05:00
11cf1ebdd1 Fix first part of T44627, locking alpha should happen in straight space
for float images or we get inconsistent premultiplied values.
2015-05-07 11:42:37 +02:00
0e9b210595 Fix T44630: incorrect mirror modifier merge limit tooltip. 2015-05-07 10:57:37 +02:00
3ec8bcebf3 Fix T27642: Add version in .exe installer properties 2015-05-07 10:31:21 +02:00
165598e49e Correct typo: ifdef'd now, but obviously wrong 2015-05-07 10:12:12 +10:00
2d590670b4 Fix T44614: Maya keymap left mouse click to add cut not working. 2015-05-06 23:59:21 +02:00
236360c838 Change fix for T44530 which caused a "regression".
Looks like the previous commit here is really correct and fixes cases of
distortion that were in mirror-subsurf combination since blender 2.5.

This may cause some changed files in which case we will be adding an
option, but it is expected this will only happen with low res models,
and hand painted textures, and the better distortion here compensates
for that enough to consider not adding a compatibility option yet.

Leaving the facemap winding argument as is just in case we do consider
to add the option.
2015-05-06 23:30:15 +02:00
e73f1035d7 Fix T44598: blender internal not giving same result on repeated texture bakes. 2015-05-06 23:06:47 +02:00
fb0dd596e9 BGE : KX_VertexProxy support for more than 2 UV channel.
I have added an optional named "index" argument for methode get/setUV, I have also modified the and set to deprecated methodes setUV2 and getUV2 : the doc was wrong and the methode can't be called anyway because it declared as VARARG in the .h and convert directly the args value to a vector in the .cpp.

Reviewers: sybren, lordloki, hg1

Reviewed By: lordloki, hg1

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D1240
2015-05-06 22:55:46 +02:00
de180aba35 Feature request: Dyntopo detail expressed in percentage of brush radius.
Not sure how useful this will be but people have requested it so, here
it is...
2015-05-06 22:51:49 +02:00
7c3a714124 Fix T44624: world menu appears in node editor header with Blender internal. 2015-05-06 21:55:35 +02:00
4a5933bb74 Rip tool, support filling-edges with fill enabled 2015-05-07 05:34:07 +10:00
4d7b0e4fe3 Correct own error: is_manifold_region on wire vert 2015-05-07 05:23:07 +10:00
c740027e30 Fix T44381: Text Editor: Un-indent undo fails
D1284 by @mikidep
2015-05-07 05:04:05 +10:00
4487358da7 Fix T44618: Rip Fill on a single vert would only generate one of the two expected faces.
Was tagging (for filling) the wrong edge for one of the two involved loops...
2015-05-06 17:51:39 +02:00
51f33a2e55 collada:custom normals generated by normals modifier have not been exported correctly. Also triangulating during export did not work. 2015-05-06 17:03:38 +02:00
14d55ab7a3 Cleanup: use ntreeFromID 2015-05-07 00:18:11 +10:00
1d88bfce40 Shader node: support native render capabilities
D1188 by @a.romanov
2015-05-06 23:53:51 +10:00
5ffd10a6da OpenGL render: Update metadata as before, for every frame written to a
file, since we need the updated times and frames.

This was lost during stamp code refactoring. The refactoring moved the
stamp when render is initialized so we would be guaranteed to have
correct cameras even when saving render stills at a later time (and even
if cameras were changed). For regular render this would work since
render init takes care of stamp, but for openGL rendering we need to do
this manually.

Still not 100% correct, does not apply multiview cameras to metadata
2015-05-06 15:30:00 +02:00
aaa6b39bfe Quick patch-up for opengl render metadata.
Camera here is incorrect for multiview (as is in real multiview render)
but at least it works now.
2015-05-06 14:47:01 +02:00
15751238d5 BGE: Fix compound child shape added on instance game object 2015-05-06 14:23:22 +02:00
df422314c1 Only use render view name in render filenames if we are actually using
multiview.
2015-05-06 13:58:06 +02:00
d80ff8ce80 Image proxies now correctly support metadata (needs to regenerate
proxies though)
2015-05-06 13:05:59 +02:00
27c3886064 Cleanup: use functions we already use elsewhere for bone detection
instead of the ninja code that we use now.
2015-05-06 12:53:33 +02:00
Martijn Berger
3f04f64eea [cmake] move FindLLVM to its own file 2015-05-06 12:35:48 +02:00
69bf3a9e94 Updating node standard value won't work if node is hidden, patch by
Alexander Romanov with minor changes.
2015-05-06 11:59:39 +02:00
0abb6f3ef0 Patch D1283 by Alexander Romanov fixes reroute node type update not
correct when root reroute node is plugged in a different type of input
2015-05-06 11:46:47 +02:00
bc2f77e1da Add bpy.app.binary_path_python
Access to the python binary distributed with Blender,
fallback to system python executable (matching Blender's version).
2015-05-06 11:13:42 +10:00
c246e0c3b6 Prefer name 'program' over 'binary'
binary-search is confusing!
2015-05-06 06:34:19 +10:00
e00142bfa7 BLI_path: add PATH search utility functions 2015-05-06 06:21:16 +10:00
c641a5563f Fix T44612: add support for mouse button 6 and 7 on OS X. 2015-05-05 21:52:09 +02:00
1d0f1a1ec9 Fix T44593: particle volume distribution not working with large meshes. 2015-05-05 21:43:24 +02:00
b45ad4b214 Cycles: Fix for wrong clamp usage in fast math 2015-05-06 00:01:40 +05:00
4616a7a4d3 BGE: Fix collision callbacks for compound controllers
It fix some mistakes in b5e9653035 and made a more safety behavior for collision callbacks used in compound controllers during adding and removing.
2015-05-05 19:54:12 +02:00
962d53e144 Workaround ld.gold failing with msgfmt 2015-05-06 03:23:20 +10:00
35c67d6750 Fix reading uninitialized memory finding paths 2015-05-06 02:22:00 +10:00
b5e9653035 BGE: Remove function DisableCcdPhysicsController and EnableCcdPhysicsController in CcdPhysicsEnvironment
Replace EnableCcdPhysicsController by AddCcdPhysicsController and DisableCcdPhysicsController by RemoveCcdPhysicsController.
Tested with compound shapes and collision sensors.

Reviewers:agoose77, ideasman42
2015-05-05 15:18:29 +02:00
d01b226870 Cleanup: Remove leftover from Distorted Noise node in XML reader. 2015-05-05 10:38:45 +02:00
e5e73ccc90 Math Lib: rename fill_*, to copy_*
matching convention for fixed length api, eg: copy_v3_fl
2015-05-05 17:08:29 +10:00
ea5f9fee8d Cleanup: function arg wrapping 2015-05-05 16:34:38 +10:00
1648feec94 Cleanup: rip tool 2015-05-05 16:34:37 +10:00
7201f6d14c Cycles: Use curve approximation for blackbody instead of lookup table
Now we calculate color in range 800..12000 using an approximation a/x+bx+c for R and G and ((at + b)t + c)t + d) for B.
Max absolute error for RGB for non-lut function is less than 0.0001, which is enough to get the same 8 bit/channel color as for OSL with a noticeable performance difference.
However there is a slight visible difference between previous non-OSL implementation because of lookup table interpolation and offset-by-one mistake.
The previous implementation gave black color outside of soft range (t > 12000), now it gives the same color as for 12000.

Also blackbody node without input connected is being converted to value input at shader compile time.

Reviewers: dingto, sergey

Reviewed By: dingto

Subscribers: nutel, brecht, juicyfruit

Differential Revision: https://developer.blender.org/D1280
2015-05-05 06:11:54 +00:00
22bbd1c512 BMesh: improve rip tool /w mon-manifold verts
Can now rip from multiple fans (mixed single faces or larger regions)

Also add BM_vert_is_manifold_region which only checks if a vert has disconnected fans.
2015-05-05 07:22:35 +10:00
e59bd19fa7 Cleanup: style & const's 2015-05-05 05:19:49 +10:00
7478eb9bd0 Cleanup: wrapped function indentation 2015-05-05 05:19:48 +10:00
cc81b58277 Cleanup: deduplicate code.
FileBrowser had its own 'shorten_string' func, when we have a full fledge one in interface_widget code...
2015-05-04 21:13:35 +02:00
e10ecb6494 Revert "Different drawing for object centers."
This reverts commit 5a8629c0d7.

It does not really work that well since objects can draw in front of
selection circles now.
2015-05-04 18:00:29 +02:00
1b8069bdd9 UI: location/scale were snapping to 10s
In practice this isn't useful (for scale especially).

For float buttons with a very large range, don't attempt to match the snap to the range.
2015-05-05 01:20:40 +10:00
fd5090ab41 UI: button snap (ctrl) was rounding down 2015-05-05 01:06:09 +10:00
1227e5c3d1 Fix T44503 full sample does not display any preview any more.
The fix exposes another error not fixed in this commit, escaping the
render will not flush the full sample render result correctly.
2015-05-04 16:57:48 +02:00
68fe630735 Fix eyedropper with quad-view 2015-05-04 23:50:38 +10:00
52b9d83417 Fix T44592: Zero scale on an axis, zeros all 2015-05-04 22:39:33 +10:00
9ff91acadb Follow up to previous commit, remove depth of field from UI in
wireframe/boundbox mode.
2015-05-04 14:38:02 +02:00
73c090fe81 Fix T44594 disable depth of field in wireframe/bounding box modes. We
don't supply depth information in those modes so supporting the effects
does not really make sense
2015-05-04 14:34:57 +02:00
c19f3ea1b2 Fixed comment. 2015-05-04 14:31:44 +02:00
66f96e555c Cycles: Fix copy / paste mistake in XML reader. 2015-05-04 14:31:20 +02:00
e560bbe1d5 Fix possible crash with datatransfer operator when source object was hidden.
Mismatch in poll and exec funcs when getting active (source) object...
2015-05-04 14:30:00 +02:00
5a8629c0d7 Different drawing for object centers.
Code here did depth test always and depth range 0.0.

There is no real reason for object centers to write and get tested
against depth buffer in this case, just disable the depth test instead
;)

Helps with blurry object centers in depth of field mode too (centers
wrote depth 0 and were always blurry)
2015-05-04 13:53:23 +02:00
be30070d86 BGE: Cleanup KX_BlenderSceneConverter.cpp
This commit is a little cleanup for whitspaces, braces, spaces around operators and useless keywords struct/class.

Reviewers:sybren
2015-05-04 13:36:11 +02:00
b7d0ff0ad6 Separate scene simplification into viewport and render
This way it is possible to have viewport simplification bumped all the way up,
making viewport really responsive but still have final render to use highest
subdivision possible.

Reviewers: lukastoenne, campbellbarton, dingto

Reviewed By: campbellbarton, dingto

Subscribers: dingto, nutel, eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1273
2015-05-04 16:31:10 +05:00
7e3ee2d15d Skin Modifier: remove redundant edge-calculation 2015-05-04 20:59:34 +10:00
abd68c6e45 Fix T42893: Skin Modifier, changes randomly toggling editmode
Own regression, previously it would do a full mesh normal calculation for each isolated shape
(could hang on meshes with many loose parts).

However the normals are needed, instead of doing a full calculation,
just set normals on new faces.

Thanks to Brecht for finding cause!
2015-05-04 20:56:57 +10:00
8d5eeab473 Skin Modifier: Add missing operator stack pop 2015-05-04 20:56:57 +10:00
93055b1c22 Fix metadata display in sequencer lost after doing a preprocess
transform.

IMB_makeSingleUser makes a copy and destroys metadata. I am not sure if
this is the safest way to make a single user ImBuf (setting the refcount
to 0 is simpler and there's less, but no zero, risk of dangling
pointers) but I will leave this as is for now in case there is an actual
need for a copy here. The alternative approach should be tested at some
point.
2015-05-04 12:53:16 +02:00
046388830a Freestyle: Fix for line style ID datablocks not copied when fully copying a scene. 2015-05-04 19:52:03 +09:00
b07c2961fa Don't scale metadata font with zoom - makes strings not consistently
adhere to the string length
2015-05-04 12:30:26 +02:00
711e2f71a8 Support displaying metadata for images in sequencer preview windows (not
backdrop)
2015-05-04 12:18:19 +02:00
23a79c42b5 BGE Player: Fix compilation error after cleanup commit da8a62a 2015-05-04 14:39:12 +05:00
4e1c27f646 Fix T29029: Grease pencil fails in Quad View 2015-05-04 19:12:54 +10:00
c46f40e9e2 Freestyle: Compilation error fix after recent changes in BKE_object_add() 2015-05-04 13:52:44 +05:00
7a8170e9c1 CMake: Only consider it INFO is ld.gold is missing 2015-05-04 18:33:37 +10:00
4edc9d50fd Correct own error in recent quad-view ruler fix 2015-05-04 18:32:47 +10:00
74dc4e87a6 Fix Buttons context, invalid object data access
Another instance of T44376.
Crash where the Python context would access a stale pointer to the active object.
2015-05-04 18:06:31 +10:00
c9e5e81064 Button Space: clear pin flag when NULL'ing pointer 2015-05-04 16:12:12 +10:00
77e6a001a9 Fix T44376: Buttons context, invalid data access
Removing a scene from the buttons window would crash from a Python operator.
2015-05-04 16:01:20 +10:00
8d5e57748a Cleanup: WM_main_remove_notifier_reference
Assumed the `reference` pointer is an ID, currently true, but may not always be.
Add a callback specifically for this purpose since cleaning up notifiers and space-types are different operations.
2015-05-04 16:01:20 +10:00
da8a62adce Cleanup: naming for callback wrappers 2015-05-04 16:01:20 +10:00
8515be8a73 Remove redundant outliner lookup freeing objects 2015-05-04 16:01:20 +10:00
fdc5f9c0a8 Add name argument to data creation API calls
Was adding then renaming, unnecessarily.
2015-05-04 16:01:20 +10:00
4e7ef3f5cd BGE: Added 'ghost' arg to KX_GameObject.suspendDynamics() method
The implementation of this 'ghost' argument already existed in the C++
source, but wasn't exposed to Python yet.
2015-05-04 12:04:09 +08:00
62b13c6d07 BGE: Fix: Activate collision mask/group in UI. 2015-05-03 19:16:27 +02:00
dbee634572 Fix typos. 2015-05-04 01:53:34 +09:00
ee7538613a Rigidbody: Fix viewport update when changing collision shape in toolbar 2015-05-03 18:01:47 +02:00
d33b564f91 Fix T44591: Set PBone Group operator did not handled predifined group index in its invoke func. 2015-05-03 16:53:43 +02:00
dced56f02a Fix T44185, Fix T44090: hair texture density working unreliable.
"Unexisting" particles must be freed after the unexist flag has been set,
which was no longer the case after 78c491e62a.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1213
2015-05-03 16:21:58 +02:00
6159f9a55a Fix T41739: 3D view solid draw mode missing some material node updates. 2015-05-03 15:39:25 +02:00
2775eaf01a Fix T41893: inconsistent color management on sculpt texture nodes previews. 2015-05-03 15:25:43 +02:00
944e0bd7b5 Cleanup: rename clear_skin & clear_mask operators to skin_clear and mask_clear.
So that they match all other op names around - and sensible logic as well.
2015-05-03 15:18:27 +02:00
3a808270df Fix T44589: No way to add a skin data layer manualy.
There are several ways to end up with an object with skin modifier, but no
skin data on the geometry. So we need an operator to add it by hands.

Also tweaked a bit UI of this modifier.
2015-05-03 15:09:48 +02:00
472b3c5828 We do need to transform lnors in BKE_mesh_transform(), much handy for scripts. 2015-05-03 11:55:58 +02:00
9715d4c778 Added name attribute to instance_geometry nodes (request for Second Life) 2015-05-02 23:17:40 +02:00
6bc8a3f8d3 BMesh: rip-tool can now split off isolated fans
Useful since there wasn't a good way to do this previously.
2015-05-03 06:17:32 +10:00
dd48ddd605 BMesh: utility to split isolated loop regions 2015-05-03 06:16:59 +10:00
33cc5ed495 Cleanup: redundant vars 2015-05-03 06:16:59 +10:00
4fca12e0fa Fix rna default value in BGE UI. 2015-05-02 21:09:29 +02:00
bd5e578804 BMesh: rework BM_vert_is_manifold (simplify logic)
- simplify boundary handling (walk from boundary - no need to reset walking)
- early exit when the vert has >2 boundaries
- use BM_vert_step_fan_loop to walk the fan
2015-05-03 04:46:24 +10:00
de031b7c89 BMesh: replace radial count with simple checks 2015-05-03 04:41:39 +10:00
c826566ce3 Sound now returns even if file fails to load
With various codecs its hard to ensure a sound will load or not.
2015-05-03 04:41:39 +10:00
8e4ac2d229 Fix ghash assert during BGE libload.
The assert message was caused by the multi call of BLO_library_append_begin in KX_BlenderSceneConverter::LinkBlendFile.
2015-05-02 18:43:39 +02:00
2c72edc7f1 Fix T44586: Viet language problem for Blender Interface
We were missing many of the complex diacritics combinations in latin extended additional code block...

Alawyas a pleasure to edit this font... :|
2015-05-02 17:02:08 +02:00
ca15ffb8ad CMake: use ld.gold linker when available
Gives noticeable speedup linking blender
2015-05-02 22:14:12 +10:00
929c9de3dc Turn bpy.utils into a package, so that we can easily add submodules to it. 2015-05-02 10:38:51 +02:00
53d08ec506 BMesh: BM_mesh_edgesplit
Did quite a few checks not to tag bad splits (which wasn't working perfectly)

Instead rely on BM_vert_separate not to create invalid geometry.
2015-05-02 16:24:46 +10:00
f283b959e7 BMesh: BM_vert_separate double edge fix
Splitting edges could give duplicates.
2015-05-02 16:24:35 +10:00
c276cfb3c0 BMesh: return error on mesh validate 2015-05-02 15:52:27 +10:00
a5869945c6 Cleanup: bmesh src/dst order in API args 2015-05-02 15:46:03 +10:00
5e1c729882 Cleanup: use function attrs for BMesh inline funcs 2015-05-02 15:45:57 +10:00
b50c6e3f6f Object Align Operator: Make it use modifiers in high quality bounding box calculation 2015-05-01 16:17:23 -06:00
bd6e1e6ad7 Updated install_deps' Collada to 3335ac164e68b2512a40914b14c74db260e6ff7d. 2015-05-01 21:18:37 +02:00
23abcc0636 OSX: remove collada from fading out 32bit buildbot 2015-05-01 21:09:21 +02:00
86f80c481c Fix T44353, Fix T43981: random particle distribution overlaps if number is greater than 256. 2015-05-01 19:21:41 +02:00
b6caefdaa9 Fix T43711: dual quaternion deform bug with shearing in deform matrix.
This also increases the tolerances in is_orthogonal / is_orthonormal functions,
which were much too low for practical purposes.
2015-05-01 19:21:41 +02:00
bf7098a93f Auto pack: don't show "No new files have been packed" on every .blend file save. 2015-05-01 19:20:42 +02:00
4e40bdd02c Fix T44433: print "unknown" rather than "1970-01-01" when .blend date is unknown. 2015-05-01 19:18:26 +02:00
d3c4553552 Fix a couple of harmless compiler warnings. 2015-05-01 19:18:26 +02:00
74d31279cd Fix T44560: Merge Collapse tool - UVs operator panel option ignored with Collapse but not with other merge types.
Was missing parameter for collapse bmesh operator...
2015-05-01 17:10:39 +02:00
f84135ee65 Fix T44577: writing tessellated cddata when we should not...
Own mistake in rBf75c89b3f42ffac51603e6e53459f9d94a8782cc...
2015-05-01 16:11:55 +02:00
535e75ea90 Use mono font for metadata 2015-05-01 14:27:44 +02:00
28ea3f5b94 Fix T44565 World background artifacts when world shader is void (or
compilation fails).
2015-05-01 12:06:05 +02:00
94d80c8ca4 Left some debug prints in here... 2015-05-01 12:44:37 +12:00
be0dcd4e34 Fix T43867: Clicking outside the viewport exits now Grease Pencil "Continous Draw" mode
When working with a pen only, it was previously impossible to exit Grease Pencil
draw mode (when continous drawing was enabled). Now, clicking outside the drawing region
(e.g. in the timeline, properties editor, or the header/properties/toolshelf regions)
where you are drawing will exit this mode.

Some corner cases to be aware of:
* When Region Overlap is enabled, clicking on the overlapping panels still exits
  draw mode (even though you can see behind the buttons)
* In the Nodes Editor, clicking on a node (while in drawmode) will still draw a
  dot/stroke. But, you can still exit drawmode by clicking on any of the panels
  (properties/toolshelf/header) mentioned earlier
* To cope with cases where the operator is launched from the toolshelf, the
  code now sets a new "active region" when the first stroke is performed
  (based on what region is under the cursor at the time of that stroke),
  overwriting the setting that got stored when invoking the operator (i.e. the toolshelf).
  This change doesn't have any real user-visible effects, other than making it possible for
  this fix to actually work without breaking that use case.
2015-05-01 12:44:35 +12:00
f8bdd8e6a8 BMesh: correct bmesh_edge_vert_swap
Missed swapping out loops.
2015-05-01 06:51:16 +10:00
6111da3629 BMesh: add bmesh_disk_vert_replace 2015-05-01 06:18:04 +10:00
a822106062 Cleanup: typos 2015-05-01 05:53:33 +10:00
cdabf7e353 Data transfer - Loop Islands Hell Fixes.
This commit fixes several issues:
* island_store->items_to_islands_num was reset each time we added a new island, this is stupid! Harmless too, though, afaikt.
* partial verts bvhtree (with several islands) was hugely over-allocated...
* we would 'leak' in neighbor islands when geometry itself was contiguous.
* best_nor_dot was used incorrectly, leading to smaller weights for better matching normal!

All those fixes are related to T44522 (through personal communications with reporter).
2015-04-30 20:58:34 +02:00
4d6584ba6a UI: use enum for thumbnail size 2015-05-01 01:49:58 +10:00
5ced6cb2bc Correct warning 2015-05-01 01:36:36 +10:00
3a9726783f RNA defaults test
Alternative to T32894, simple test which creates new data and compares with RNA defaults.

Can be used to keep the values in sync without having to maintain a large set of defines.
2015-05-01 01:15:55 +10:00
Dalai Felinto
078e589263 Better fix for T44556: Crash on the World Properties > Preview 2015-04-30 12:12:22 -03:00
Dalai Felinto
179fff94e8 Revert "Fix T44556: Crash on the World Properties > Preview"
This reverts commit 4bcc7a2ec6.
2015-04-30 12:12:22 -03:00
69ef1a3a83 Py/RNA: support to load and remove sounds 2015-05-01 00:58:08 +10:00
5dd63a977f Fix opengl rendering always looking through camera
Actually check if we have a camera and looking through it before
rendering in multiview.
2015-04-30 15:06:28 +02:00
f271d85b86 Fix T44439: outliner's treestore could keep invalid ID pointers, could crash on undo due to invalid mem access.
We cannot nuke treestore in readfile's `blo_lib_link_screen_restore()`, because this will
destroy all UI-state data (like opened/closed items, etc.).

Since we cannot know for sure whether an ID pointer from tselem->id is valid here, we
have to ensure they are never invalid, i.e. to always set them to NULL when we delete them.

To do so, this commit uses a similar approach as what already exists for ID references
in WM notifiers - it extends `free_notifier_reference_cb()` to also nullify those IDs in
all outliners.

Note that some ID types are not used(shown) by outliner currently, so `TREESTORE_ID_TYPE` macro
was added, that checks whether an ID is possibly used by outliner. Avoids a few searches
in whole tree whene deleting some IDs.

Reviewers: campbellbarton, sergey

Maniphest Tasks: T44439

Differential Revision: https://developer.blender.org/D1272
2015-04-30 14:28:22 +02:00
d1c98520f7 Missed this last commit 2015-04-30 14:24:05 +02:00
2d491b8415 Minor tweaks to make fill and invert support gpixel operations 2015-04-30 13:52:44 +02:00
04b23af02d Code Cleanup: Simplified insert_keyframe_button and delete_keyframe_button
As a followup for the previous commit, do the same thing for the insert/delete
keyframe button operators as is done for the clear keyframes op. There really isn't
much need/reason for conducting the looping there, as those functions natively
handle this themselves already.
2015-04-30 22:59:41 +12:00
7369c4f4d5 Code Cleanup: Simplify Clear Keyframes operator's code
On second thought, the previous commit was just adding additional complexity which
wasn't needed, as the operator was wasting effort by doing this looping itself.
2015-04-30 22:59:40 +12:00
debcd6b217 Fix T44558 - "Clear Keyframes" complains when operating on an array property and it had deleted the action in the process 2015-04-30 22:59:39 +12:00
16794f908f Cycles: Fix possible uninitialized XML read state which might cause crashes 2015-04-30 15:46:09 +05:00
2909975385 Fix T44541 aka gigapixel image render support in blender.
Moral of the story: Make sure that size_t is used whenever pointer
arithmetic is involved. For images, that basically means whenever any
squared dimensions are involved. Casting an operand to size_t early in
the operation is usually sufficient to force the entire operation to
size_t.

There might still be places lurking where we don't support this
correctly. This has been tested with render pipeline, quite a few image
functions (meaning we can paint on such images now, albeit somewhat
slowly ;) ) and export to jpeg. Too many places in code to check so I
guess we'll be handling cases as they come.

Don't try this at home unless you have an immense ammount of RAM.
First GPixel render of suzanne in the multiverse can be found here:

http://download.blender.org/demo/test/suzanne-billion-pixel.jpg

Can be viewed from blender (takes about 3.3 GB after loading but may
take more during loading so 8GB might be more safe to try this).
2015-04-30 12:11:20 +02:00
4bcc7a2ec6 Fix T44556: Crash on the World Properties > Preview
Issue was caused by de-referencing NULL pointer, rres did not have any
views because nothing was rendered yet.

Needs more closer look about where else such a de-reference could happen.
2015-04-30 14:52:59 +05:00
41d817f15d Fix T44548: Cycles Tube Mapping off / not compatible with BI
Was a typo in original implementation, probably a result of some code reshuffle
happened for optimization reasons.
2015-04-30 14:27:16 +05:00
aa4c97faa3 View3D: expose size as a distance in units
also note that size/rotation doesn't work for camera views. see T44511
2015-04-30 18:59:35 +10:00
1721d47106 CMake: Solve compilation error from path with a space 2015-04-30 12:55:52 +05:00
f553aba69f Correct docstring 2015-04-30 09:55:54 +10:00
0ecce09288 Correct missing break 2015-04-30 08:18:32 +10:00
b640700597 Cleanup: style 2015-04-30 08:18:23 +10:00
4eab0e72b3 Cleanup: Update some comments and add ToDo. 2015-04-29 23:56:46 +02:00
b3def11f5b Cycles: Record all possible volume intersections for SSS and camera checks
This replaces sequential ray moving followed with scene intersection with
single BVH traversal, which gives us all possible intersections.

Only implemented for CPU, due to qsort and a bigger memory usage on GPU
which we rather avoid. GPU still uses the regular bvh volume intersection code, while CPU now uses the new code.

This improves render performance for scenes with:
a) Camera inside volume mesh
b) SSS mesh intersecting a volume mesh/domain

In simple volume files (not much geometry) performance is roughly the same
(slightly faster). In files with a lot of geometry, the performance
increase is larger. bmps.blend with a volume shader and camera inside the
mesh, it renders ~10% faster here.

Patch by Sergey and myself.

Differential Revision: https://developer.blender.org/D1264
2015-04-29 23:31:06 +02:00
e9dcb068c7 Fix T44484: Edge-split corrupts mesh
Splitting non-manifold edges could produce duplicate edges.
2015-04-30 07:22:18 +10:00
99811c283e BMesh: use BM_face_loop_separate_multi for rip
Resolves bug over-splitting non-manifold connected edges.
2015-04-30 06:24:33 +10:00
3ef27ec807 BMesh: add BM_face_loop_separate_multi
New utility function to handle splitting off multiple loops from a face at once.
2015-04-30 06:24:33 +10:00
53662bcaf1 BMesh: simplify/optimize loop splitting logic
To split off a single loop, was splitting all fans off the vertex, then merging back together (except for one).

Now simply splits off one loop.
2015-04-30 06:24:33 +10:00
26541b7488 BMesh: refactor edge-vert swapping into API call 2015-04-30 06:24:32 +10:00
67fcb04bbf BMesh: minor change to swap-vert api
- assert if the verts not in the edge (all callers assume success)
- rename to bmesh_disk_vert_swap
- swap src/dst arg order.
2015-04-30 06:24:32 +10:00
7aab5c6ca9 Cycles: Fix wrong termination criteria in SSS volume stack update
Another issue spotted with Thomas.
2015-04-30 01:20:17 +05:00
e5f3193df3 Cycles: Fix wrong order in object flags calculations
Object flags are depending on bounding box which is only available after
mesh synchronization.

This was broken since 7fd4c44 which happened quite close to the release
and oddly enough was not sopped by anyone. Render test is coming for this.

Was spotted by Thomas Dinges while working on another patch.
2015-04-30 01:09:48 +05:00
Dalai Felinto
3856d439db Fix filename has "new render view" suffix reported by Jason van Gumster (Fweeb)
Bug introduced in f8540d7fd5
2015-04-29 16:39:35 -03:00
054aa61f3c File browser - change thumbnails size with a slider
We can now scale from 32px up to 256px (default has been upgraded to 128px).
Thumbnails are now generated as 'large', i.e. 256px.

Previews are scaled up if necessary, unlike icons (for folders or files without preview images).

Note that .blend thumbnails themselves remain in 128px for now (they are embeded in .blend files,
not quite sure we want to make them four times bigger...).

Patch by DMS (Yaron Dames), with final edits by myself.

Reviewers: mont29

Subscribers: Severin, mont29

Differential Revision: https://developer.blender.org/D1260
2015-04-29 21:30:33 +02:00
3de45ee7fe Fix T44132: Crash after open EXR format
Was own mistake on adding Alpha socket for Combined pass.
2015-04-29 23:45:41 +05:00
ce32aae80c OSX: fix T44533, system_bookmarks not showing utf standard ( umlauts etc. ) 2015-04-29 20:07:53 +02:00
3878180a6f Fix typo using interp_v3_v3v3 over float[2] variables...
Found by asan! ;)
2015-04-29 19:44:06 +02:00
5782126d41 Make sure integer calculation uses large precision 2015-04-29 18:49:50 +02:00
d04ba6d562 Remove unused stubs
Noticed by TristanPorteries in IRC.
2015-04-29 21:47:30 +05:00
0dbc9060a6 Cleanup: make grumpy asan happy and do not use new [] to allocate data freed by free().
Probably nothing crucial, but asan build would crash on that stupid glitch... Annoying.
2015-04-29 17:46:03 +02:00
091832c955 fix for double call to update callback in uiTemplateIconView 2015-04-29 16:29:03 +01:00
611bbc696a cleanup for uiTemplateIconView 2015-04-29 16:29:03 +01:00
78956b6a83 Fix T44542: 'extend selection' editmode tool would select hidden elements. 2015-04-29 17:19:20 +02:00
Dalai Felinto
3e6a66b9de Multi-View cleanup: using RenderResult->rect* only for temporary RenderResults
Originally I wanted to get rid of RenderResult->rect* entirely, but it's
convenient to have for temporary structs.

This patch makes sure they are used only when really needed, which
should help clearing the code out.

(they are needed when using RE_AcquireResultImage() - which produces a
RenderResult with no RenderView)

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1270
2015-04-29 11:55:53 -03:00
18ba32df37 Don't check against scene notifier twice 2015-04-29 16:28:20 +02:00
Dalai Felinto
b033736eb7 Multi-View: new util functions RE_RenderViewGetById() and RE_RenderViewGetByName()
Both functions try to find a valid RenderView and if they can't they
fallback to the first RenderView of the RenderResult
2015-04-29 11:18:22 -03:00
3acc1ba49c Add macro BLI_SMALLSTACK_AS_TABLE
Use for edge-split (a little less overhead compare to popping each item).
2015-04-29 23:59:48 +10:00
d6b28bbb1d Cycles: Fix crashes when loading cache created with pre-leaf split builds 2015-04-29 15:48:49 +05:00
2e91bcfb9d Fix T44544: Cached BVH is broken since BVH leaf split
Still need to solve issues with reading old cache with new builds.
2015-04-29 15:38:07 +05:00
734fb30bda Use size_t to calculate size of tiles for rendering 2015-04-29 12:31:03 +02:00
7232157357 Correct comment 2015-04-29 20:16:40 +10:00
620cc762db Buildbot: Attempt to fix cudakernels target screwing up autotest cache 2015-04-29 14:51:50 +05:00
65a9592660 BMesh: optimize edge split
Avoid hashing edges when splitting into fans,
Instead, walk & split fans until they're all done, gives approx 40% speedup.
2015-04-29 19:43:32 +10:00
179ffefce5 BMesh: replace smallhash flag for checking doubles 2015-04-29 19:43:21 +10:00
e1ecd39f0e BMesh: avoid over-counting vert-edges 2015-04-29 19:42:06 +10:00
728d4f296f Cleanup: headers 2015-04-29 19:42:00 +10:00
615414fa36 SCons: Ignore .svn folder when installing site-packages 2015-04-29 14:30:37 +05:00
e37373d96e Revert commit with perspective depth offset, makes simple cases such as
loopcuts on cube have zfighting.
2015-04-29 11:19:23 +02:00
029bd44bbd SCons: Fix wrong flags usage after recent stdc89 changes
CCFLAGS are used for both C and C++ compilers and one is better not to pass
C-related flags to C++ compiler. C-compiler flags are to be passed via CFLAGS
variable.
2015-04-29 13:57:02 +05:00
f4d7f5216f Buildbot: Fix typo in error message 2015-04-29 13:47:47 +05:00
Dalai Felinto
f8540d7fd5 RenderResult should have a valid view whenever possible 2015-04-28 18:08:56 -03:00
f9d23b82fe Rewind fix for T44505 (leave in ifdef'd)
This makes selection fail in simple cases,
default cube subdiv 10x for eg.
2015-04-29 06:08:45 +10:00
cbb601346a Error in last commit 2015-04-29 05:36:39 +10:00
e0ae693924 Store bit-depth for reuse, replace loop with shift 2015-04-29 05:32:25 +10:00
d2ac3abbc2 Compilation error fixes for strict compiler flags 2015-04-29 00:23:52 +05:00
859ac8fbc6 Fix ortho part of T44505
In this case we can calculate an offset without worrying about
perspective correction. Unfortunately if looking from a camera we still
have depth issues here. There's no really general case that can fix this
so I'm leaving this as is.
2015-04-28 20:41:49 +02:00
85ae4b87af Fix T44404: freestyle crashes blender.
The reported crash case seems to be caused by freeing compiled Python
objects in a thread.  Now this issue is avoided by allocating a buffer to
store a Python script and using BPY_string_exec() to run the script.  This
makes it unnecessary to repeatedly create and destroy Text data blocks.

Many thanks to Campbell Barton for his help on the bug fix.
2015-04-29 00:57:56 +09:00
7851534541 disable ARRAY_SIZE fixed length check for Clang 2015-04-29 01:37:45 +10:00
7615498e6d Alleviate somewhat the issue of T44505
Issue is zfighting with wire of mesh when parts of the mesh are close
together. We can make this slightly better by reducing the offset,
however this offset is calculated pre-perspective division and can vary
greatly with distance. Correct approach would be using polygon offset,
however we draw mesh wireframes as lines, (not polygons with polygon
mode line) so this approach will not work.
Alternatively, we could set an offset in a shader, however we don't have
code for that either.
2015-04-28 17:18:32 +02:00
be228d33f1 Curves: don't use 'charidx' for regular curves
Code attempted to sync them with materials,
but its not needed (and wasn't reliable).
2015-04-29 00:29:32 +10:00
34abe82205 Fix T44522: loop remapping between meshes when using 'nearest vert, best matching normal' modes
would fail on coplanar faces (or smooth verts).

Loop remapping is really a tricky topic... For now, we enhance a bit more
our Frankenfunc by using distance between dest and source polygons as
fallback in case we have too much similar normals...

Probably not a perfect solution, but should be robust enough I hope.

One core question remains open though: do we want to stick to 'use only seams
to detect UV islands'? This makes things much simpler, but will obviously fail
in case of actual islands without matching seams. :/
2015-04-28 16:01:43 +02:00
57a107c7bc Minor cleanup in comments. 2015-04-28 16:01:43 +02:00
f8c383472a Fix T44516 grid lines obscuring selection outline.
Was changed to draw after meshes without depth mask to make grid not
contribute to compositing effects. Now only draw it like this when we do
compositing (unfortunately can't have both).
2015-04-28 15:42:01 +02:00
e2d60d180e Project Paint: Add symmetry support
- Access from symmetry panel (as with sculpt)
- Supports multiple axis at once.
- Supports all brush types including clone.
2015-04-28 23:34:40 +10:00
43616918f3 Cleanup: const correctness 2015-04-28 23:15:48 +10:00
1f9fe0626f BLI_utildefines: add MEMSET_STRUCT_OFS macro 2015-04-28 23:15:47 +10:00
5e423775da Cleanup: Move Cycles volume stack update for subsurface into kernel_volume.h. 2015-04-28 11:20:27 +02:00
d920b8e075 Fix T44530 UV islands fail on subsurf after mirror modifier.
Caused by own commit that changed island detection code. In the case of
modifiers we don't want to take winding information into account, but
left the code since there are use cases (like painting) which could use
this.
2015-04-28 11:18:02 +02:00
eee666583f Use gnu89 for GCC
GCC5 defaults to gnu11, which we may switch to later
but disable for now to prevent accidental use.
2015-04-28 18:59:52 +10:00
2edb342ffa Fix for Clang type check 2015-04-28 18:59:47 +10:00
5c6ec169cc Added missing update tag to recalculate data after permutating materials 2015-04-28 10:52:19 +02:00
7e36c280c2 Cleanup: redundant checks 2015-04-28 16:47:45 +10:00
4288ab16e5 Add material slot reorder buttons 2015-04-28 07:30:04 +10:00
58a2b10a65 Cycles: Initialize portal variable directly, so we can avoid the one NULL check. 2015-04-27 23:12:53 +02:00
a4965249ec Math Lib: add range_vn_u 2015-04-28 06:54:50 +10:00
f478c2cfbd Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.

The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.

The direction of portals is considered, they aren't used if the sampling point
is behind them.

Reviewers: sergey, dingto, #cycles

Reviewed By: dingto, #cycles

Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto

Differential Revision: https://developer.blender.org/D1133
2015-04-28 01:30:16 +05:00
84836e8952 Cleanup: use strict flags 2015-04-28 06:24:06 +10:00
ae7d84dbc1 Cycles: Use native saturate function for CUDA
This more a workaround for CUDA optimizer which can't optimize clamp(x, 0, 1)
into a single instruction and uses 4 instructions instead.

Original patch by @lockal with own modification:

  Don't make changes outside of the kernel. They don't make any difference
  anyway and term saturate() has a bit different meaning outside of kernel.

This gives around 2% of speedup in Barcelona file, but in more complex shader
setups with lots of math nodes with clamping speedup could be much nicer.

Subscribers: dingto

Projects: #cycles

Differential Revision: https://developer.blender.org/D1224
2015-04-28 00:38:32 +05:00
278ff15c7f BLI_array: add permute utility function 2015-04-28 04:12:48 +10:00
6ada7a1a0b Usual UI messages fixes... 2015-04-27 20:10:32 +02:00
920fa0f963 Fix double-free on copied Text compiled py-code 2015-04-28 01:18:50 +10:00
84db9fdf4d Fix T44464: Viewport mipmaps no longer toggle off 2015-04-28 01:18:50 +10:00
8d8d1939fa Cleanup: use bool for mipmap args 2015-04-28 01:18:50 +10:00
c760c0dbb3 Cleanup: use mul_v3_mat3_m4v3 2015-04-28 01:18:50 +10:00
Dalai Felinto
4a80c4fade Multi-View: Code cleanup
I finally put the time into understanding what was going on here.
Basically RE_AcquireResultImage() produces RenderResults without
RenderViews. That will be fine for now since I'm planning to refactor
RenderResult soon.
2015-04-27 12:10:35 -03:00
Dalai Felinto
f809eef968 Muti-View: viewport crashes when empty is active camera - reported over IRC by Campbell Barton 2015-04-27 10:41:40 -03:00
Dalai Felinto
b315fcb7ed Fix T44514 Crash under cycles rendering using F12, based on patch from Gaia Clary 2015-04-27 10:41:40 -03:00
e1ed47eb5b Fix T44512: Cycles fails normal bake /w scale flip 2015-04-27 22:46:15 +10:00
9dadc8f599 Math Lib: add mul_v3_mat3_m4v3 2015-04-27 21:52:42 +10:00
3f80accfb3 Fix T44011: Ruler/Knife/Loop-cut fail in quad-view
This is a kind of sloppy-focus,
resolving long standing bug with loop-cut/knife/ruler /w quad-view.

Where activating a tool would lock onto one of quad-views,
especially problematic when activating from the toolbar or menus.
2015-04-27 19:17:07 +10:00
5df939fd15 Py API: expose operator runtime flags
eg from operator invoke/execute:
    self.options.is_grab_cursor
2015-04-27 19:00:10 +10:00
5e1eb8cdcf Cleanup: rename GRAB_POINTER -> GRAB_CURSOR
Term pointer is overloaded already.
2015-04-27 18:58:53 +10:00
ddb5f96295 Sculpt: symmetrize was leaving edge-tags dirty
This is used for the edge-queue
2015-04-27 03:35:16 +10:00
24448e11fb Correct own error in recent sculpt changes
mixed up squared nonsquared length, also remove invalid verify check.
2015-04-27 03:34:13 +10:00
Julian Eisel
cf366c8b66 UI: 'View Online Manual' Shortcut
D1031, implement proposal T37478 to give easy access to the online manual.

Use Alt+F1 while hovering over a button/setting.
2015-04-27 01:35:24 +10:00
5efbd2a407 BGE : addObject in python without reference object.
Making the reference argument optional for the addObject function.
```
scene.addObject("Cube")
```

This allows to keep the rotation, scale and position of the original object.
To avoid layer problems with lights if the reference arguments is None, the new object have the same layer than the active layers in scene.

Reviewers: lordloki, moguri, hg1, sybren

Reviewed By: hg1, sybren

Subscribers: agoose77

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1222
2015-04-26 16:29:58 +02:00
3524676036 BMesh: increase subdiv smooth strength
Now 1.0 gives near spherical output
2015-04-26 21:26:45 +10:00
2069187a1b Cleanup: bmesh subdivide
var names were a bit cryptic, set return arg last.
2015-04-26 20:34:03 +10:00
2374cb380b BMesh: subdiv smooth, use simpler even calculation
Was checking all vertices adjacent faces,
now just compare the difference between normal angles.

Also default to inverse-square for loopcut-subdiv falloff.
2015-04-26 19:20:34 +10:00
e1ca127419 Cleanup: subdivide smooth vertex placement 2015-04-26 19:12:20 +10:00
6e02f1da74 BMesh: use inverse-square falloff /w smooth-subdiv
Resolves ugly artifacts with multi-cut.
2015-04-26 18:35:42 +10:00
c2f7cffd56 Add inverse-square falloff to bmesh, mask & compo. 2015-04-26 18:31:54 +10:00
d33314393e BMesh: use const for API calls 2015-04-26 17:19:51 +10:00
12e7c7f674 BMesh: BM_ELEM_CD_GET_VOID_P cast removed const 2015-04-26 17:19:51 +10:00
3917e9f1f2 Macro GENERIC_TYPE_ANY map many types to one value 2015-04-26 17:19:51 +10:00
bc160d8a85 Cleanup: Code style. 2015-04-26 00:42:26 +02:00
8dd055cd47 Cleanup: Update Lookup table comments. 2015-04-26 00:06:38 +02:00
60c5a2f2d2 Cycles: Add Mirror ball mapping to camera panorama options
The projection code was already in place, so this just exposes the option.

Differential Revision: https://developer.blender.org/D1079
2015-04-25 23:51:56 +02:00
01dda9a434 correct own error in recent ngon creation edit 2015-04-25 21:16:58 +10:00
9eb191083a Fix neg-scaled project-paint in perspective mode 2015-04-25 20:47:19 +10:00
89f5a09ab4 Cleanup: use 8 space indent for multi-line args 2015-04-25 20:15:20 +10:00
a7381cca34 BMesh: simplify BM_face_create_ngon
Was doing quite a lot of unnecessary steps.
Now construct the sorted verts, edges /w error checking, in a single loop.
2015-04-25 17:26:22 +10:00
Julian Eisel
a4203814d1 UI: Panel drag-collapse
D1233, Adds a way to quickly open/close multiple panels by holding LMB and dragging over the desired panels,
Suggested by @maxon

The decision if the panels are opened or closed is made based on the first Panel the user drags over.
If it is closed, all panels he drags over are opened
(including the first one) if it's opened, they get closed (matching existing drag-toggle logic).
2015-04-25 13:11:32 +10:00
0221a11c95 Project Paint: save 8 bytes per pixel (re-align) 2015-04-25 12:54:55 +10:00
86d3a1f683 Cleanup 2015-04-25 12:29:52 +10:00
Julian Eisel
3bffcc675b Fix T42495: Fullscreen area icon glitch
Tried a couple of things to trigger an update/redraw for the exact right
moment (sending azone update event, timer, delayed redraw, etc) but this
seems to work rock solid without being *that* ugly.
2015-04-25 01:29:53 +02:00
Julian Eisel
de8e89d4f5 Fix T44405: Importing keyconfig with changed shortcut in "Screen Global"
causes rapid fullscreen toggeling
2015-04-24 20:08:52 +02:00
Dalai Felinto
7e66f0e9d4 Multi-View: Set Stereo 3D operator support for EXEC calls 2015-04-24 13:07:33 -03:00
Dalai Felinto
27ac96dbae Multi-View: rolls back to a non quadbuffer friendly window if displaymode changes from pageflip to something else
In some cases the graphic card supports quadbuffer, but not the display.
In this case it is nice to go back to a window that does not have
quadbuffer if you change back to anaglyph, interlace, ...

Otherwise you may be stuck with a flickering window
2015-04-24 13:06:49 -03:00
Dalai Felinto
fb17a3fb76 Multi-View: Time Sequencial (aka pageflip, aka quadbuffer) stereo support
TODO: I would be nicer if we could set win at file opening to the
current open window, but I'll implement this later.
2015-04-24 12:00:16 -03:00
324751259e correcting typos in python api docs 2015-04-24 14:08:31 +01:00
80d75cb3e4 Add debug option --debug-gpumem to show GPU memory used in status bar.
Only used in ATIs and NVIDIAs. Used extensions are:

https://www.opengl.org/registry/specs/ATI/meminfo.txt
http://developer.download.nvidia.com/opengl/specs/

If you read the documentation, the numbers are not supposed to be exact
and also depend on the time when the call is made. The numbers can also
change quite quickly. It's only meant to give a rough measure of what is
going on.
2015-04-24 14:11:21 +02:00
c2f861453e Fix T44492: knife tool should cut across a split edge.
Added filter condition in visibility check that prevented
a "butting-up-against" face from obscuring an edge.
2015-04-24 07:29:45 -04:00
546031b694 BGE : fix bugs with physics collision mask/group
Currently there are bugs with physics objects in inactive layers,
character and softbody.
I added a function in CcdPhysicsEnvironement to know if a physics
controller is currently active and for soft body I added the correct function in UpdateCcdPhysicsController to re-add a softbody in the dynamics world.

The bug was introduced in D1243 commit 3d55859

Reviewers: hg1, scorpion81, lordloki, moguri, agoose77, sergof

Reviewed By: sergof

Subscribers: youle, moguri

Differential Revision: https://developer.blender.org/D1253
2015-04-24 11:57:38 +02:00
c884ac28a7 3D Textures:
If we fail allocating a proxy texture don't fail, instead create a
smaller nearest filtered image to display in its place.

This can make viewing slow (it's an extra O^3 operation), but this will
probably help us render the tornado in 3D viewport in gooseberry and
still actually see something - despite the rendering taking longer.
I've added a debug print so we can know when this happens.
2015-04-24 11:35:57 +02:00
9576d03f50 CMake: add -Wformat-signedness 2015-04-24 19:11:02 +10:00
bdf6393c98 Math Lib: pow_i for int power-of 2015-04-24 11:37:48 +10:00
f829f556b4 Fix project painting on a negative scaled object 2015-04-24 11:04:27 +10:00
Dalai Felinto
efe41ae7fd Multiview: Quadbuffer (time sequential) working [debug builds only]
I'll enable this mode in Release builds once I figure out how to best
handle opening files that are saved with the quadbuffer mode.

In fact I think no display mode should be saved/read from a file.

Tested in Linux with NVidia 3D Vision and NVidia 3D Vision Pro with
NVidia Quadro FX 580 and Quadro FX 4600.

(kudos for the Visgraf Lab at IMPA, for having me around with all those
gadgets ;)

Thanks for Cédric Paille (cedricp) for the code snippets and tests -
T44327
2015-04-23 19:50:52 -03:00
0217e6517f Cleanup: minor edits 2015-04-24 07:32:43 +10:00
Dalai Felinto
1076adb458 OpenEXR: RenderResult should always have a RenderView 2015-04-23 18:16:55 -03:00
dc734da46e Cleanup: casts, correct debug ifdefs 2015-04-24 07:08:07 +10:00
97b1f22bc3 Project Paint: minor optimization comparing angles 2015-04-24 06:41:39 +10:00
f75c89b3f4 Fix T44461: Crash and file corruption after calc_normals_split, calc_tessface execution.
This one was nasty, issue comes with temp/nofree CD layers that get 'removed on the fly'
from saved mesh CDData. Since mesh struct itself was written before that cleanup, it would
still have the old, invalid number of layers. That would lead to a buffer overflow when
loading data later (odd you had to do this twice (i.e. have 2 'ghost' layers) to get the crash).

New code prevents that by always making a copy of the mesh (we were already doing that mostly
anyway, since we were saving without tessfaces), copying (by ref of course) in it cddata,
and then writing mesh struct. Makes code a bit more verbose, but... it works!
2015-04-23 20:53:12 +02:00
18ee593729 Expose CD_PAINT_MASK to Python API
D782 by Stanislav Blinov
2015-04-24 04:10:51 +10:00
d2f35d6d50 3D textures: detect if we are pushing OpenGL too hard with the texture
size.
2015-04-23 19:02:37 +02:00
61ac5dd5ba Correct missing NULL check (own mistake) 2015-04-24 02:38:15 +10:00
372752c739 Math Lib: add count_bits_i utility function 2015-04-24 01:37:12 +10:00
27e03dcd21 Fix T44422: Zoom to mouse fails in camera view
Camera now supports all zoom styles too.
2015-04-24 00:18:42 +10:00
Dalai Felinto
22b564f93e Fix T44498 - Blender crashes in some files after render slots fix
This is a temporary fix until I get to investigate it more carefully.
It will help if the report could include the steps to reproduce it
besides the buggy file.

Note: RenderResult should *always* have at least a valid RenderView,
which is not what happens here.
2015-04-23 11:01:56 -03:00
bcac112dde Fix T44494 crop node changes values during execution.
We used the node data as a store for node execution,
bad idea, since the data itself is a template from which
execution data should be derived, never to be modified during execution.
2015-04-23 14:23:42 +02:00
Julian Eisel
2dfbf31a41 Display slot menu in Properties Region even if render slot is empty
For the records, this one is caused by 31f984bc3f, it wasn't
implemented at all ;)
2015-04-23 13:33:29 +02:00
Julian Eisel
85e455b245 Fix slot menu not displayed if render result slot is empty
Caused by own mistake in 31f984bc3f, reported by @sebastian_k in
IRC
2015-04-23 13:21:36 +02:00
8010672bbc BMesh: mesh-data picking, edge+vert improvement
When zoomed out vert bias over edges meant it wasn't possible to select edges.
Now pick the edge if the cursor is closer to its center.
2015-04-23 16:11:54 +10:00
87b3e62b3d Cleanup: warnings 2015-04-23 16:09:30 +10:00
0287b39468 Py API: Remove deprecated callback_add 2015-04-23 12:58:49 +10:00
Dalai Felinto
ecb3362a24 Fix T44396 - Compositing render slots don't work
Note 1: If you go to a render slot previously rendered and change
something in the compositing the buffer will still vanish.

This is an old bug, T44181, and not addressed here
(I'm basically just fixing the regression introduced with multiview)

Note 2: I have a work in progress patch to get rid of
RenderResult->rectf/rect32/rectz entirely. It still not working, and we
should have a working code base before doing refactoring anyways.
2015-04-22 18:48:31 -03:00
6a1c123df4 Fix broken uiTemplateIconView().
Was using enum **value** as **icon id**... tripple sigh!
Guess it was working for its only current use (matcaps), but still.
2015-04-22 22:48:40 +02:00
Julian Eisel
90b7652334 Fix T44472: Stereo 3D save options missing in File Browser 2015-04-22 21:50:49 +02:00
Dalai Felinto
4a8421faa4 Fix T44463 - crash on "Full Sample" 2015-04-22 16:40:21 -03:00
Julian Eisel
31f984bc3f Show buttons to change render layer/pass in UV Editor header
Previousely this was "hidden" in the Properties Region, this makes it
more visible/usable.

Requested by @sebastian_k
2015-04-22 20:43:43 +02:00
147d0cdf98 Tracking: Show plane track outline if image failed to load 2015-04-22 23:20:00 +05:00
f35489fa94 Tracking: Fix missing pointer array check when reading plane track
This could cause memory corruption when moving files from system with one
bitness to another.
2015-04-22 23:00:41 +05:00
3174cbe8f2 Double click selection on animation channels selects all keyframes of the range 2015-04-22 19:28:07 +02:00
3da7226844 Freestyle: Fixed a crash due to missing call of StrokeShader.__init__() in Python.
Many thanks to the problem report by flokkievids (Folkert de Vries)
through a comment in Patch D963.
2015-04-23 01:12:55 +09:00
Julian Eisel
798facbff3 Fix crashes when moving game property with invalid index (from py/redo
panel)

Also hides index option in redo panel to be consistent with similar
operators
2015-04-22 17:20:10 +02:00
d354eeab74 Placeholder image strips feedback session changes no.2:
Change paths operator can also have the same placeholder logic now
2015-04-22 14:11:51 +02:00
e7c2d244c3 Placeholder image strips feedback session changes no.1:
Autodetect range of strips.
2015-04-22 14:11:51 +02:00
62d10cd833 Placeholders for sequencer take one.
Placeholder images, means that the image sequence reserves a range for
images, displaying black while we wait for them to finish rendering.

This is meant as a feature to not break the layout of gooseberry
sequence edits while we wait for those frames to arrive.
2015-04-22 14:11:51 +02:00
Julian Eisel
dc36e1fe39 Fix T44476: Hiding Grease Pencil from Outliner RMB doesn't update 3D
View
2015-04-22 14:02:48 +02:00
Julian Eisel
18aaae101a Fix T44477: Overlapping tooltips in Outliner
Tooltips for buttons in the Outliner could overlap the Outliner's RMB
menu in some cases (and there's no way to get rid of the tooltip again).
This disables the button's tooltip before creating the menu (as we do it
for the normal RMB menu)
2015-04-22 13:41:43 +02:00
1044dfd965 Fix and simplify vertical positioning and calculation of metadata
display more.
2015-04-22 13:19:58 +02:00
a069b8d5d8 Rename stamp panel to metadata panel.
Rationale - this panel also enables metadata that get written on files.

Also moved draw_stamp property in the panel - to make it clearer it only
controls the drawing, not individual metadata.
2015-04-22 12:35:59 +02:00
818a0cdc76 Fix stamp missing after multiview merge.
Was not using acquired render result correctly, most likely a copy paste
error.
2015-04-22 12:03:06 +02:00
97587dc5d6 Stamp cannot be written to file.
Make sure stamp data is avaliable before writing stamp to image - this
still does not fix stamp, looks like issue is availability of the images
themselves for the view, investigating next.
2015-04-22 11:50:57 +02:00
414990b0f1 Tracking: Some more code de-duplication 2015-04-22 12:46:29 +05:00
18a47b67fd Tracking: Code cleanup, de-duplicate some code in tracking context finish 2015-04-22 12:34:01 +05:00
e6ceecdf97 Cleanup: pep8, spelling 2015-04-22 16:26:54 +10:00
4da050674e Fix T44470: File Selection sometimes surpresses last Character.
Tweak hack of `file_draw_string()` (there may be better solution, but not worth
spending time on this, the whole filebrowser drawing code is to be rewritten anyway).
2015-04-22 08:15:05 +02:00
e1a53b6d52 Fix T44475: Merge option of Mirror Modifier behavior reversed.
Glitch in rB57d9badc.
2015-04-22 07:54:14 +02:00
a8adeeb6fb Logic Editor: Buttons for moving game properties up/down
D1163 by @panzergame, with minor edits by me (@Severin)
2015-04-21 23:33:45 +02:00
b35743d39f Tracking: Add missing plane track remapping when joining two point tracks 2015-04-22 02:10:50 +05:00
260f75a2ca Tracking: Cleanup, move some plane tracks code to utility functions 2015-04-22 02:10:50 +05:00
Dalai Felinto
9425a8ff38 BGE: scene.pre_draw_setup[] callback
This callback allows the user to change the camera data right before the
rendering calculations.

scene.pre_draw[] is not enough here, because if you want to change the
camera matrices (projection/modelview) the culling test is done before
that (after pre_draw_setup[] though).

Reviewers: moguri, campbellbarton

Differential Revision: https://developer.blender.org/D1251

Python sample code using this. The sample scene would need a default
camera (not used for rendering), a dummy camera ('Camera.VR'), and two
cameras ('Camera.Left', 'Camera.Right') that will be used for the actual
rendering.

```
import bge

def callback():
    scene = bge.logic.getCurrentScene()
    objects = scene.objects

    vr_camera = objects.get('Camera.VR')

    if bge.render.getStereoEye() ==  bge.render.LEFT_EYE:
        camera = objects.get('Camera.Left')
    else:
        camera = objects.get('Camera.Right')

    vr_camera.worldOrientation = camera.worldOrientation
    vr_camera.worldPosition =  camera.worldPosition

def init():
    scene = bge.logic.getCurrentScene()
    main_camera = scene.active_camera
    main_camera.useViewport = True

   scene.pre_draw_setup.append(callback)

    objects = scene.objects
    vr_camera = objects.get('Camera.VR')
    vr_camera.useViewport = True
    vr_camera.setViewport(
            0,
            0,
            bge.render.getWindowWidth(),
            bge.render.getWindowHeight() )
```
2015-04-21 17:41:23 -03:00
f2956d5fc7 Tracking: Fix over-allocation in plane track's point tracks pointers when removing point track 2015-04-22 01:36:15 +05:00
Julian Eisel
6885d316b1 Fix T44474: Rotation manipulator not hidden completely with all axes
locked

Really doesn't look like a bug on a first glance but the line of code
that was there previously seemed to be there to prevent the manipulator
from drawing in this case.
2015-04-21 21:55:19 +02:00
bf69453ae7 BLI_string: add BLI_snprintf_rlen
use when the length of the destination string is needed.
2015-04-22 05:37:22 +10:00
c9f9e29538 Math Lib: handling bits handling into own file 2015-04-22 04:44:24 +10:00
b47892e9f5 Minor edits to metadata commit
No need to calculate height of each line, just use height of font.
2015-04-22 04:43:13 +10:00
e1ce83f762 Initialize and use the theme for metadata text 2015-04-21 19:01:09 +02:00
58c511fb01 Stamp refactoring:
Write those on render result during rendering, so we can cleanly write a
render result image after rendering.
2015-04-21 18:37:06 +02:00
3091ea49fe Metadata:
* Theme support for metadata display
* Increase text DPI with scaling.
2015-04-21 18:37:06 +02:00
50bfc4bfa0 Metadata display support - patch by Julian and me.
Basically, blender adds a few metadata fields to images when
we render an image. Those metadata can now be viewed in the
image editor.

Also, made sure metadata are available when we write imbufs
to disc with "Save As". There may be more cases here that need
fixing, but this means that loading an image with metadata
will now properly preserve them in blender.
2015-04-21 18:37:06 +02:00
Julian Eisel
f9972fa53e VSE: Allow GPencil drawing without having a strip loaded
Previously the GPencil strokes were just not drawn (even though they
were generated) until a strip was loaded.
2015-04-21 17:44:11 +02:00
84d117b3ad Minor edit to edit-mesh selection bias
only choose verts over edges (not faces)
2015-04-22 00:43:31 +10:00
3a3f80673c Cleanup: minor corrections 2015-04-22 00:16:26 +10:00
Julian Eisel
de687b6fa0 Fix T44465: Crash using VSE OGL render + Grease Pencil
Likely caused by rBd5f1b9c22233
2015-04-21 16:04:14 +02:00
e3a6440e7a BMesh: mesh-data picking, general improvements
Generalize logic for vert/edge/face selection:
- index cycling.
- selection bias with mixed modes.

Details:
- Edges now support index cycling (as verts/faces did already)
- Cycling over near elements is now only enabled when the mouse position remains the same.
- No longer do 2 selection passes to perform index cycling.

Fixes:
- Edges behind the view could be selected (surprising nobody reported!)
- Selection bias now only changes the element that gets picked without interning the return distance
  (was buggy with mixed modes).
2015-04-21 21:25:43 +10:00
907d4d310f Backdrop strictly shows image result only - it could get influenced by
scopes setting of space if one changed the space type back and forth.

Thanks to Sergey for reporting.
2015-04-21 12:13:02 +02:00
e0ae23b4d6 Allow editing of active strip proxy settings again in addition to the
set operator
2015-04-21 12:00:10 +02:00
b82d571c85 Cleanup: style 2015-04-21 15:53:32 +10:00
f36e91ad0a Correct crash in last commit (spacebar search) 2015-04-21 15:18:34 +10:00
Julian Eisel
56a93e9cb1 Add eyedropper for selecting object & obdata
In addition to the unlink icon to clear a value,
When cleared, show an eyedropper to select objects or object-data
(was already available via the EKey).
2015-04-21 14:25:03 +10:00
912397756a Fix T44432: Zoom to mouse fails /w FCurve editor 2015-04-21 13:10:32 +10:00
62e149881a Fixes for backbuf selection logic
- Fix ED_view3d_backbuf_sample_rect, r_dist was set completely wrong.
- Avoid duplicate calculations picking the nearest edge.
- Bias against picking selected edges is now optional.
- Remove unused callback reading the backbuf.
- Remove unused strict option picking vertices.
2015-04-21 04:50:39 +10:00
aa880bb815 Cleanup: use ED_view3d_backbuf_* prefix 2015-04-21 03:19:27 +10:00
d57a93a7cb Fix T44383: Select face fails in some positions
When mixing vert/edge/face with select-visible,
face selection could fail when not close enough to the center.

This also fixes a bug where the bias for verts over edges would
prefer faces over edges too, making edges harder to pick.

Mixing edge with other selection modes works more predictably now.
2015-04-21 03:10:32 +10:00
0626d27bf6 Editmesh select nearest fixes
- distance from edge check wasn't clamping 0-1
- vertex bias wasn't taking pixelsize into account.
- index & pass counter were floats

Also some improvements

- use BMesh lookup tables when available.
- use structs to avoid issues getting out of sync.
2015-04-21 01:50:21 +10:00
60e8e20132 Cleanup: use macro for common view3d zbuf check 2015-04-21 01:50:20 +10:00
57d9badc21 Cleanup: use bool /w flag checks 2015-04-21 01:50:20 +10:00
6298632bfa Guardedalloc: Don't use aligned blocks to calculate memory sloppyness
Aligned memory is allocated with memalign() and malloc_usable_size() can't be
used to measure this block.
2015-04-20 19:23:25 +05:00
42e427905c CMake: Move performance tests under the cmake option
This way running full sweep of regression tests does not require
waiting for the performance test to finish.
2015-04-20 18:30:26 +05:00
4d5446cea7 Usual UI messages fixes... 2015-04-20 14:46:09 +02:00
828abaf11c Cycles: Split BVH nodes storage into inner and leaf nodes
This way we can get rid of inefficient memory usage caused by BVH boundbox
part being unused by leaf nodes but still being allocated for them. Doing
such split allows to save 6 of float4 values for QBVH per leaf node and 3
of float4 values for regular BVH per leaf node.

This translates into following memory save using 01.01.01.G rendered
without hair:

                   Device memory size   Device memory peak   Global memory peak
Before the patch:  4957                 5051                 7668
With the patch:    4467                 4562                 7332

The measurements are done against current master. Still need to run speed tests
and it's hard to predict if it's faster or not: on the one hand leaf nodes are
now much more coherent in cache, on the other hand they're not so much coherent
with regular nodes anymore.

Reviewers: brecht, juicyfruit

Subscribers: venomgfx, eyecandy

Differential Revision: https://developer.blender.org/D1236
2015-04-20 17:29:51 +05:00
cd44449578 Cycles: Synchronize images after building mesh BVH
This way memory overhead caused by the BVH building is not so visible and peak
memory usage will be reduced.

Implementing this idea is not so straightforward actually, because we need to
synchronize images used for true displacement before meshes. Detecting whether
image is used for true displacement is not so striaghtforward, so for now all
all displacement types will synchronize images used for them.

Such change brings memory usage from 4.1G to 4.0G with the 01_01_01_D scene
from gooseberry. With 01_01_01_G scene it's 7.6G vs. 6.8G (before and after
the patch).

Reviewers: campbellbarton, juicyfruit, brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D1217
2015-04-20 17:29:51 +05:00
b07c630676 I18n: Add Vietnamese language. 2015-04-20 14:27:20 +02:00
6bc26540c2 Fix T44452: Inconsistent gpencil color in prefs 2015-04-20 21:20:39 +10:00
fa761dfe6d Fix T44419: extruding when using lasso deselect 2015-04-20 21:10:52 +10:00
437f69ab45 Allow Python overrides for materials. 2015-04-20 20:20:33 +10:00
9b4c8a2507 Fix T44458 strip modifier mask not copied correctly when doing scene
copy.

What happens is that the strip is copied, but it still refers to the old
scene. Here we need to fix this by referring to the copy of the strip
and also do it after copying to make it order independent.
2015-04-20 11:51:43 +02:00
0aa2eed0c2 Compilation error fix for MSVC: It does not support expressions in array
declarations
2015-04-20 14:07:26 +05:00
bf6bde232d Fix: BGE crashes when RunPythonCallBackList() is called with maxargcount != minargcount 2015-04-20 13:53:54 +08:00
dbb2b29bea Action Stashing: Newly stashed strips now get "sync length" option enabled by default 2015-04-20 17:27:59 +12:00
a0e1b6573a Action Editor "Browse" Fix: Stash active action if nothing else uses it
Following the initial action management commits for 2.74, blurrymind pointed out a
problematic workflow involving the "Browse Action" dropdown in the Action Editor
which would lead to actions being accidentally lost. Namely, it turns out that
game animators frequently flip between different actions from the Browse menu while
working.

While the new up/down operators and/or other NLA based tools are better suited to this
without the problems of actions getting lost, some additional precautions were needed
for the Browse menu as well. So now, if the active action will have no users as a result
of the switch (i.e. it was a new action, and the user is checking on a previous action
via the Browse menu), this action will now get stashed. This workflow is not perfect though,
as there is the problem of the stashed action strips not reflecting the actions they reference.
2015-04-20 17:27:58 +12:00
689241b6e5 Fix for potential null-pointer-dereference if the new action is NULL 2015-04-20 17:27:57 +12:00
e4fbc8fc8d Fix: Changing actions in the Action Editor using the Browse dropdown should happen in tweakmode
When a NLA strip is being tweaked, it should not be possible to use the Action Editor to change
the action that it uses. Instead of changing the action in tweakmode, it now exits tweakmode
first before doing so.
2015-04-20 17:27:56 +12:00
5f6b958e96 Fix: "show_points" setting for Grease Pencil drawing didn't work
As reported by zeffi, the "show_points" option was not working in master.
It probably broke recently, after some changes meant that the point sizes
weren't geting set prior to drawing these points anymore. Since this was
originally added as a debugging tool (though it is now somewhat redundant
due to the stroke editing functionality, which uses/exposes the same points),
this option wasn't really that important. I have decided to add back a toggle
for this to the UI though, since it can be used for some interesting effects...
2015-04-20 17:27:55 +12:00
79319b3fba Sculpt: remove workaround T25371
It's no longer needed,
and made calc_area_normal different to the normal from calc_area_normal_and_center.
2015-04-20 13:36:51 +10:00
436004b6b1 Sculpt: clay-strips was missing accumulate button
Correct & de-duplicate check for accumulate.
2015-04-20 13:23:47 +10:00
07a7d77ec1 Fix: solved BGE compiler error on Linux/gcc 2015-04-20 10:58:25 +08:00
5db143efbb Fix T44449, sm_52 kernel missing in CMake builds. 2015-04-19 22:04:23 +02:00
62f79856e9 BGE : Standardization of callbacks execution.
A new function (RunPythonCallBackList) to call all python functions
contained in a python list was developed.

This function has:
  - first argument is the python list of callbacks
  - second argument is a python list of arguments
  - third argument is the minimum quantity of arguments
  - forth argument is the maximum quantity of arguments

It improves flexibility and supports *args.

Reviewers: moguri, dfelinto, campbellbarton, sybren

Reviewed By: campbellbarton, sybren

Subscribers: sybren

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1102
2015-04-19 20:33:08 +02:00
6f0f1dc3be Cleanup: warnings 2015-04-19 22:03:42 +10:00
e5048dd4ca Dyntopo: non-topology tool origdata support
Brushes that don't change topology didn't have access to original data.
2015-04-19 19:56:46 +10:00
ac73fe5fe0 Cleanup: use meaningful names re: (fc, an, sn) 2015-04-19 18:38:58 +10:00
fb6a0d24e1 Dyntopo: support for original normal access
Rename calc_flatten_center to calc_area_center,
since theres no 'flatten' spesific logic there.

Also refactor calc_area_center, calc_area_normal, calc_area_normal_and_center
so they're next to eachother - they're almost the same,
having them scattered about isn't helpful.
2015-04-19 18:24:21 +10:00
fe39ebea12 Cleanup: move project code into util function 2015-04-19 17:52:35 +10:00
57b020528b Cleanup: calculating sculpt center & normal
also avoid sqrt calculating dyntopo center (only checks for flipping)
2015-04-19 17:03:51 +10:00
eb4fb4f4fe disable verify from last commit (too slow) 2015-04-19 16:06:40 +10:00
d09a9a9597 Dyntopo: USE_EDGEQUEUE_TAG broke even subdiv
While adding edges to the queue multiple times is redundant,
walking over them is still needed.
2015-04-19 16:03:12 +10:00
550c3c2c1e Dyntopo: avoid over-counting /w neighbor average 2015-04-19 14:46:32 +10:00
2448c21cb3 Sculpt: avoid CD lookup /w mask smooth 2015-04-19 14:46:32 +10:00
9ac618a90e Sculpt: smooth brush, exclude self from average
Was including the vertices own location when accumulating.
2015-04-19 14:46:32 +10:00
3d55859924 BGE: Support for collision group/mask from the api + activated on EndObject.
A Python API for the collision group / mask has been added:
```
KX_GameObject.collisionGroup
KX_GameObject.collisionMask
```
The maximum number of collision groups and masked has been increased from eight to sixteen.
This means that the max value of collisionGroup/Mask is (2 ** 16) - 1

EndObject will now activate objects that were sleeping and colliding with the removed object.
This means that, unlike now, if a rigid body starts sleeping on top of another object, when the latter is removed the rigid body will activate and fall, rather than float midair as before.

Collision groups that do not intersect used to collide on the first frame. Now this has been fixed so that they collide appropriately.

Thanks to agoose77 for his help.

Reviewers: scorpion81, hg1, agoose77, sergof

Reviewed By: agoose77, sergof

Subscribers: sergof, moguri

Projects: #game_physics, #game_engine

Differential Revision: https://developer.blender.org/D1243
2015-04-19 01:04:22 +02:00
a2f9a0cfd9 BGE: Fix T43536 logic.getCurrentScene() returning wrong scene in
pre_draw and post_draw calls

A simple insert of KX_SetActiveScene(scene) before pre_draw and
post_draw calls solves the issue.

Reviewers: dfelinto, sybren, brita_, campbellbarton, moguri, lordloki

Reviewed By: moguri, lordloki

Projects: #game_logic, #game_engine

Differential Revision: https://developer.blender.org/D1129
2015-04-18 21:37:59 +02:00
252b0cf5d2 Cleanup: API naming use BKE_undo_ prefix 2015-04-18 18:25:07 +02:00
38bea4e86c Cleanup: use BLO_memfile prefix 2015-04-18 18:11:01 +02:00
230712e6cb Autosave:
Flush edits only when saving global undo. This will stop freeing of PBVH
in sculpt mode, which introduces some pretty severe freezes, especially
in dyntopo. For global undo we flush the contents of the global undo
buffer which does not include localized edits of sculpt/edit mode, so
those data will not get saved anyway.
2015-04-18 15:50:29 +02:00
4f2657bf47 BGE: New Draw debug shadow box for sun lamp
New Check option "Show Shadow Box" in shadow panel of sun lamp to get
feedback about which objects project shadows.

Minor tweaks by Campbell Barton and Jorge Bernal

Reviewers: moguri, sybren, kupoman, dfelinto, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: sergey, lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1149
2015-04-18 12:30:02 +02:00
3a4a2a9427 Fix T44390: Clay brush weirdness part-2
Use the normal of the plane instead of the vertex normal,
since projecting using the vertex normal frequently causes artifacts.
2015-04-18 05:08:14 +10:00
05b6de545a Fix T44390: Clay brush weirdness part-1
Clay brush had a feedback loop with dyntopo,
getting the plane from the cursor center didn't support original data.
2015-04-18 05:08:03 +10:00
b0c2fdd927 Cleanup: simplify sculpt normal accumulation 2015-04-18 03:09:16 +10:00
28b9a0276f Cleanup: simplify sculpt plane accumulation 2015-04-18 02:54:49 +10:00
e0aeafdf0a BGE : Fix light layer check
The layers in Blender are using a bit field for the 20 layers. The light layer value was limited to 20, so the highest usable light layer was five.
The patch modify the range and add layer out of range error messages.

Reviewers: sybren, hg1, moguri

Reviewed By: hg1, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1238
2015-04-17 18:12:51 +02:00
Dalai Felinto
394c5318c6 Bake-API: reduce memory footprint when baking more than one object (Fix T41092)
Combine all the highpoly pixel arrays into a single array with a lookup
object_id for each of the highpoly objects.

Note: This changes the Bake API, external engines should refer to the
bake_api.c for the latest API.

Many thanks for Sergey Sharybin for the complete review, changes
suggestion and feedback. (you rock!)

Reviewers: sergey

Subscribers: pildanovak, marcclintdion, monio, metalliandy, brecht

Maniphest Tasks: T41092

Differential Revision: https://developer.blender.org/D772
2015-04-17 12:25:37 -03:00
45e929dc12 Cleanup: redundant casts 2015-04-18 00:16:05 +10:00
fa0f936a64 Fix BPlayer (c) 2015-04-17 16:03:14 +02:00
3a015bb76b Depsgraph: Report total time spent on scene update
Previously was only per-thread timing.
2015-04-17 18:57:13 +05:00
15d3d8560d Cleanup: remove unused face normals
also use const
2015-04-17 23:50:23 +10:00
Dalai Felinto
80b4b43727 Code cleanup (for previous commit) 2015-04-17 10:41:31 -03:00
Dalai Felinto
cd729e9a4e Image Editor: Fix passes increase/decrease buttons
This was half-broken even in 2.74 (if you were using compositor), multiview did us the favour of breaking this for all cases (you are welcome).
It is all working now.
2015-04-17 10:38:17 -03:00
Dalai Felinto
479b669693 Fix T44336: Unable to select cycles-specific passes in UV/image editor
This approach gets rid of iuser->pass for good.

Also, I'm commenting out the pass increase/decrease. This was broken
since multiview. I will fix it later (before 2.75), but I didn't want to
get this patch mangled with that fix.

Thanks Sergey Sharybin for the review and feedbacks.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1232
2015-04-17 09:48:31 -03:00
02fba106fa Dyntopo: save 4 bytes per BMLogVert 2015-04-17 18:07:08 +10:00
e05f719b8b Dyntopo: avoid redundant lookup on original data 2015-04-17 17:34:14 +10:00
50522cba92 Fix T44411: poll() function of MESH_OT_knife_project was not strict enough.
We need a 3DView region here, not only the 3DView...
2015-04-17 08:09:16 +02:00
09f2aa9382 Fix T44412: Crash when trying to paint on a GPencil frame when the frames are out of order 2015-04-17 13:32:57 +12:00
582fa5e36e Fix for Grease Pencil and negative frames
While investigating T44412, I noticed some weirdness going on when trying to
draw on frame 0 (i.e. strokes were getting added to frame 1 instead). Clearly,
this seemed like an off-by-one error related to clamping to prevent negative
frames which was also excluding frame 0.

This commit reverts the fixes made for T36831 in:
rBf18f2fbb33d90ecc91e6f3d063cb9f97f217e808

After thinking this over, I think these checks against drawing on negative
frames aren't needed. Even if the current userpref setting doesn't allow
navigating to negative frames, this may not be true for other users that
may work on the same file (in a team environment). Also, negative frame
values can get set via the dopesheet.
2015-04-17 13:02:45 +12:00
4cd37541b0 BGE: Fix for T44374 Crash when collision sensor deactivated
Don't allocate memory for sensor logic brick if it is deactivated
2015-04-17 02:12:57 +02:00
afc2f415ab Cleanup: use const for sculpt code 2015-04-17 03:11:26 +10:00
bbae0664a3 Added Support for Custom Vertex Normals to Collada exporter 2015-04-16 19:02:26 +02:00
a7cae2987d OpenGL does not like line thickness less than 1.0.
Check here is not completely correct either, we should check against
GL_ALIASED_LINE_WIDTH_RANGE and GL_SMOOTH_LINE_WIDTH_RANGE
2015-04-16 18:35:07 +02:00
6589d07c8f Action Editor: Preemptive fix for null-pointer dereference
A few weeks ago, I got a random crash while testing som edge cases
(IIRC, it was trying to assign an action with no active object),
which I haven't been able to reproduce since then. This commit though
adds some extra sanity checks here, as a user may try to assign an
action to an animdata block which did not have an action already.
2015-04-17 01:11:56 +12:00
0b691563ea Fix T44408: "Rest Length" property in the Stretch To constraint was getting clipped when using Metric Units
Increased the upper bound for the "Rest Length" property to cope with metric
units, especially when large (i.e. > 2 m) distances are involved. It may be
necessary to increase this again in the future, if even larger distances get
used (though it then starts getting a bit difficulty to justify such setups).
2015-04-17 01:11:55 +12:00
6603a10331 Cleanup: remove redundant initializers 2015-04-16 22:26:20 +10:00
69b33b6ed3 Draw smoke domain in transparent pass. Should composite smoke domains
correctly in scene - with known limitations of blending between
transparent objects.
2015-04-16 13:02:09 +02:00
eced87b2d6 Fix T44406: the Hebrew font causes trouble.
Looks like the droidsans hebrew font we used back in the days had some kerning bug or so...
Updated with latest version from Debian Testing repo, works nice now.
2015-04-16 12:37:03 +02:00
59db8d74b9 RNA: avoid past tense in property names 2015-04-16 16:41:12 +10:00
c5a126ee70 Docs: BLI_rand non-obvious behavior 2015-04-16 16:14:30 +10:00
8c98b1649d BGE: Fix for T42341 Sensor.frequency is badly named
"Frequency" parameter is renamed to "Skip" in the LogicBricks sensors as it represents skipped frames between pulses.

Naming something (frequency) the exact opposite of what it represents (period) was the worst choice.

Also, a new BGE python attribute 'skippedTicks' was introduced. 'frequency' attribute is maintained but deprecated.

Internally, freq variable is used yet at DNA_Sensor to maintain compability and to avoid do_versions.

Thanks to Sybren for the investigation.

{F162440}

Reviewers: campbellbarton, sybren, moguri, hg1

Reviewed By: sybren, hg1

Differential Revision: https://developer.blender.org/D1229
2015-04-16 06:39:33 +02:00
b466a82fa5 Partial fix for T44404: freestyle crashes blender.
Logical predicates AndUP1D and OrUP1D were instantiated even with an empty
list of unary 1D predicates, causing an exception in the constructors of
the logical predicate classes.

This is a regression made in b408d8af31.
2015-04-16 13:35:24 +09:00
b88421aa62 Dyntopo: avoid redundant loop collapsing edges 2015-04-16 12:24:59 +10:00
f57b904807 Dyntopo: blend vertex normals when collapsing 2015-04-16 11:59:48 +10:00
6675fd6b52 dyntopo: don't allocate tessfaces while sculpting
Tessellation data isn't used for drawing or sculpting.

This frees up some memory ~approx 10% in own tests.
Also slight spee-up since it avoids calculating it in the first place.
2015-04-16 04:32:16 +10:00
7f4b6a345e Fix crash loading file without scene in bg mode 2015-04-16 01:45:30 +10:00
99299da4b5 Cleanup: warnings, ws 2015-04-16 01:12:22 +10:00
34c1319d06 Cleanup: use const for event->tablet_data 2015-04-16 01:07:54 +10:00
f660085e2f Increase max brush size from 200 to 500 2015-04-16 00:59:43 +10:00
7730391d74 BGE: subclass with more than 1 argument, D1237
In the BGE you can't create a subclass with more than 1 argument like : "player = Player(owner, 10)"
I have modified the py_base_new to check only the first argument of args tuple.
Now we can do :

    class Player(types.KX_GameObject):
        def __init__(self, gameobj, life):
            print("create new player :", self, ", life :", life)

    player = Player(own, 50)
2015-04-15 22:02:16 +10:00
b9ea6fbb30 BMesh: dyntopo used lopsided normals
Normals from subdivided edges were only taken from the edges first vertex.

Interpolate between the two to give more even results.
2015-04-15 20:56:59 +10:00
240c5704e4 BMesh: Missed normal from example /w skip-cd flag
We may still want to use the normal as a reference but skip customdata.
2015-04-15 20:56:11 +10:00
255fb79ff3 Fix T44395: String untranslated in open file window. 2015-04-15 11:11:22 +02:00
730684f976 BMesh: avoid ghash lookups splitting the pbvh
This isn't a bottleneck but may as well avoid the extra ghash overhead.
2015-04-15 16:14:27 +10:00
9a711f98a7 typo in last commit 2015-04-15 15:34:06 +10:00
356ceded27 Sculpt: change behavior of crease brush
Pinch would give a flat result on either side of the stroke,
because points were dragged towards a single point.

Now pinch is projected on the sculpt plane, which gives a tighter crease.
The reverse is true too - blob brush which shares the code is also more curved.
2015-04-15 15:27:27 +10:00
b216f7abd6 RNA: use lock_ prefix for booleans 2015-04-15 14:51:17 +10:00
Julian Eisel
9b9978656d Fix T44389: Tooltips swapped in Logic Editor 2015-04-14 17:24:55 +02:00
Dalai Felinto
2d33057c75 Multiview: compositor openexr multiview images fully working
This is from my original missing-bits/TODO list.
Basically multiview openexr was only working when multiview was on.
2015-04-14 12:19:11 -03:00
Dalai Felinto
66e2fc39ce Fix T44343 Compositor image node cannot properly load multilayer EXRs 2015-04-14 11:21:01 -03:00
f1355d0b45 Second round of hair random rotation limited to 180 degrees
This time roll back to originally discussed in the code review page approach
with simply bumping UI range for the property.

It's still not totally free from forward compatibility breaking (which is
already broken comparing to previous release) but at least it'll keep files
working inbetween of git blender versions in cases random factor was not
set above 2.0.

Differential Revision: https://developer.blender.org/D1214
2015-04-14 19:04:12 +05:00
f1e1ec2d8d Action Editor: Make the warning on unlinking actions a bit less intrusive
venomgfx was complaining that having it do the popup everytime was too intrusive,
so demoting it to just showing the warning in the header.
2015-04-15 01:19:38 +12:00
04daaee0fd Fix T44385 SSAO inverted with new Intel drivers.
Intel has decided to fix this for newer devices and drivers only, so we
can't really avoid keeping a list of buggy drivers here.
2015-04-14 12:31:23 +02:00
ed40d5eaa7 Add flag that prevents editing of markers. Can be located in marker
menu.

When active, all editing operators for markers will not fire up.
2015-04-14 12:12:17 +02:00
68eeeea57e Dyntopo queue added the same edges multiple times
Use tagging to avoid re-evaluating the same edges while sculpting.

While gives only minor speedup,
it allows for changes to the queue without additional redundant checks.
2015-04-14 18:56:49 +10:00
7daa921359 BMesh: avoid customdata copy for new dyntopo verts 2015-04-14 18:41:01 +10:00
d36429b930 initialize members in-order 2015-04-14 18:41:01 +10:00
825b015e92 Fix T44348: Blender crashes when selecting bone from inactive scene in outliner
Pose is not guaranteed to be existing in object, so can't be used for selection
flag clear. Use bones themselves for that.
2015-04-14 13:25:25 +05:00
8486ee39bd PBVH: use realloc/recalloc 2015-04-14 17:58:07 +10:00
34d4ad326c Animation Editors: Name filter now updates as you type, making it a true "live search" 2015-04-14 18:50:15 +12:00
1e488802dc NLA: The "filter by name" functionality now works with NLA strips too 2015-04-14 18:39:09 +12:00
bb1bc7ecda NLA: Store track that the strip being tweaked comes from
There should be no functional changes visible from this change, but this commit
should make it easier to code tools which need to check on tweeakmode status,
by making it easier to figure out which NLA Track contains the strip which
owned the action being edited. (The strip is already saved, so this commit just
adds the track alongside it).

For now there is no version patch for this. The worst that happens is that an
extra refresh is needed in the NLA editor to get these to show up.
2015-04-14 18:39:07 +12:00
c95f38b92a Fix for another NLA drawing bug uncovered by the previous commit
With multiple strips in tweakmode, only the one tagged as being "active"
would get drawn in the correct colours, while all the others would just
get drawn as a selected strip instead.
2015-04-14 18:39:05 +12:00
5361339ba0 Temporary fix for NLA strips not getting drawn in tweakmode with multiple strips selected
When entering tweakmode on multiple strips (from different AnimData blocks)
simultaneously, only the track containing the last selected strip would be
shown. All the other tracks with strips being tweaked would not appear at
all.
2015-04-14 18:39:03 +12:00
097801e701 NLA: Shift-Tab toggles tweakmode AND makes that track solo
To help make it more convenient to edit stashed actions, Shift-Tab
(i.e. holding down the Shift key, which "tabbing" into tweakmode as
usual to edit the action referenced by the active NLA strip) now flags
the NLA Track that the strip occupies as being "solo" too.

This allows you to use the NLA to select a stashed action, then Shift-Tab
to start editing it without any other actions in the NLA stack interfering.
Like the "Next/Previous Layer" tools in the Action Editor, this is designed
to help with checking on stashed actions.
2015-04-14 18:39:02 +12:00
d841b75c5f BMesh: avoid redundant face-exists check (dyntopo) 2015-04-14 15:27:27 +10:00
6fb0563aee BMesh: optimize BM_face_exists
Avoid flagging/clearing flags,
just walk over the face until a mismatch is found.
2015-04-14 15:27:08 +10:00
c448196bb4 Cleanup: warnings 2015-04-14 10:34:32 +10:00
af2f4724d5 Cleanup: don't use single sets for comparisons 2015-04-14 10:34:32 +10:00
Dalai Felinto
2bceb3ae18 Fix for *harmless* T44342 Error when saving multilayer EXR
This was introduced with multiview, and it was an oversight on my end.
There is no error, we simply was never returning True
2015-04-13 19:56:56 -03:00
54c18d4849 Fix T44362 no easy way to repeatedly duplicate keyframes in action
editors.

Reporter used a hacky work-around by placing cursor at end of keyframe
range and doing ctrl-C ctrl-V repeatedly. This was working on 2.73 but
not anymore since the old selection is not kept.

Much better is to have duplication operator be repeatable. This commit
takes care of that.
2015-04-13 23:58:50 +02:00
27ded012d6 cleanup: style
to match my earlier commit in temp_viewport_fx_merge branch
https://developer.blender.org/rBc3f3b958dc0b

plus more

no functional changes
2015-04-13 16:56:43 -04:00
057c7c6fab Cleanup: do not use _reportf() when not doing any string formating!
Also usual minor i18n messages stuff...
2015-04-13 21:00:45 +02:00
Julian Eisel
86fe894f86 Moar precision for Color Stop position slider in Color Ramps
Normal dragging now uses a precision of 0.01 instead of 0.1, shift+dragging now uses 0.001. (0.1 steps can still be done using ctrl)

Requested by @venomgfx
2015-04-13 20:31:40 +02:00
aed97c9efb Fix bug with autonormalization and transform (after own range commit).
Transforming the center after transforming a handle would continuously
flush an extra offset to the handles.

Also use normalization range of -1.0 to 1.0 instead of -0.5 to 0.5 (not
really important, just for better comparisons)
2015-04-13 18:37:15 +02:00
cae23bab6b Fix for crash with non-camera as a camera 2015-04-14 01:00:07 +10:00
f27e0b7c5e After user feedback:
* Allow ctrl click to do negative stroke in line strokes
* Use alt for angle constraints.
2015-04-13 16:31:06 +02:00
4ce437fff0 Revert "Fix hair random rotation limited to 180 degrees"
This reverts commit 176ed5bfe2.
2015-04-13 19:16:54 +05:00
198ca57ae4 Graph editor:
Normalization feature now uses the full range of the data instead of
just one semiaxis for the maximum size.
2015-04-13 15:57:57 +02:00
8ad37b0d22 Fix T44359: mesh_normals_loop_custom_set() would not behave correctly with zero-normals.
Zero-normals here are used as a shortcut to say 'use auto-computed values'.
So we have to do so in pre-process steps!
2015-04-13 15:44:09 +02:00
17a9b05b9d Fix T44350: View3D layer out of sync /w scene 2015-04-13 23:10:43 +10:00
41350a91b5 Workaround T44351: Scopes make editmesh lag
Scopes are very heavy to calculate and editmesh uv's can cause the image view to redraw.

Best just disable scopes in this case.
2015-04-13 22:44:08 +10:00
364b6b29ff New operator for action and graph editor that centers around current
scene frame, bound to numberpad zero.
2015-04-13 14:30:24 +02:00
d1f9fcaabc Cleanup: style 2015-04-13 22:08:51 +10:00
d2da8aa27a BMesh: resolve skinny face artifacts /w dyntopo
Dyntopo can currently create skinny faces,
especially when the faces are much larger then the resolution.

To get the old behavior, set debug value to 1234
2015-04-13 21:25:39 +10:00
a50955ee0f Minor edits of python class documentation (regarding ID tagging) 2015-04-13 13:22:55 +02:00
8c616e86b5 Calculate auto normalization maximum from keyframes within range if
preview is on
2015-04-13 12:44:06 +02:00
fdc653e8ce Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threads
Use actual available number of threads now, which will make it easier
to increase max number of threads, without having some sloppy memory
usage and without doing some redundant checks on thread data which was
never used.
2015-04-13 15:40:44 +05:00
efe90384b7 Be a bit more specific in the message. 2015-04-13 12:28:12 +02:00
8a97d46296 Windows:
Only print backtrace on debug builds, since on release builds there is
only some useless output from a python library and fftw.
2015-04-13 12:21:32 +02:00
97ae0f22cd Depsgraph debug: Remove hardcoded array of BLENDER_MAX_THREADS elements
Allocate statistics array dynamically, so increasing max number of threads does
not increase sloppyness of the memory usage.

For the further cleanups: we can try alloca-ing this array, but it's also not
really safe because we can have quite huge number of threads in the future.
Plus statistics will allocate memory for each individual entry, so using alloca
is not going to give anything beneficial here.
2015-04-13 14:41:02 +05:00
890e533c76 Fix adding to paint-curves from the first point
- add_index now works when selecting the first point.
- sliding now selects the correct handle.
2015-04-13 19:30:43 +10:00
Mai Lavelle
176ed5bfe2 Fix hair random rotation limited to 180 degrees
The issue was caused by phase being limited from 0 to 1, which gave only
0..M_PI distribution which is not good enough for good randomness.

Now the phase is being randomized across full 0..2*M_PI range.
2015-04-13 14:17:00 +05:00
6fbf05f326 Make python gotchas more clear (regarding handling of stale data) 2015-04-13 11:00:22 +02:00
4fb33d82e2 Fix T44361: array modifier "fit curve" mode not working properly
'tot_length / step_length' gives the number of 'segments', not the number of
copies - we have to add 1 here.
2015-04-13 10:51:04 +02:00
f684dfc432 Fix T44364: Remove shape key crashes Blender 2015-04-13 15:54:37 +10:00
dd0cba0076 error in last commit 2015-04-13 15:46:27 +10:00
919de1e4c9 BMesh: diagram for dyntopo edge subdiv 2015-04-13 15:43:25 +10:00
9b359c1592 Py API: default arg for location_3d_to_region_2d
This function could return None for points behind the view,
note this in the doc-string and add an optional fallback argument.
2015-04-13 14:35:16 +10:00
e688ba0304 GHash: use unsigned int for ghash_size 2015-04-13 13:45:48 +10:00
55b7a8c027 ndof: fix Linux device detect regression 2015-04-12 19:58:17 -04:00
c950b8f289 making add>lamp its own menu so it can be extended by addons 2015-04-12 11:38:18 +01:00
542a0c41d2 Dyntopo: redundant length check subdividing edges 2015-04-12 19:14:28 +10:00
690b90f1e2 BMesh: minor optimization counting adjacent data
add BM_***_count_is_over(), _count_is_equal()

Useful if we only want to know if the count is a smaller value.
2015-04-12 17:38:14 +10:00
6d2c3a2456 BMesh: avoid ghash realloc's making log entry 2015-04-12 17:38:14 +10:00
Julian Eisel
f50fed6a6d Reset view after ctrl-clicking a Panel
Using ctrl+LMB to collapse all panels except of the clicked one resulted
in an empty area if done from a view that is scrolled down to some
degree. Resetting the view makes this much better, although it still
doesn't work that well if the area is really small, but I don't think
it's worth over-complicating things here.

"Feature-Request" by @maxon ;)
2015-04-12 08:07:34 +02:00
17b4f57bf0 Missed this last commit (dyntopo hashing) 2015-04-12 11:12:57 +10:00
87b6d3c796 BGE: Add keyword arguments to createConstraint API
Added keyword arguments to createConstraint.
Changed initial values for the pivod XYZ  form 1 to 0.0.
Changed initial values for the axis Z form 1 to 0.0.
Delete the parsing for 4 parameters, because parsing only the X pivot is not necessary, also it was not working correctly (int instead of  float).

Reviewers: brita_, sybren, lordloki, campbellbarton, moguri

Reviewed By: lordloki, campbellbarton

Subscribers: campbellbarton

Differential Revision: https://developer.blender.org/D705
2015-04-11 16:17:07 +02:00
b329016b29 BGE: FIX T43537: ImageMirror does not work in BlenderPlayer with quad buffer
In quad-buffer stereo mode, the GE render pass ends with the right eye on the right buffer, but we need to draw on the left buffer to capture the render.

Reviewed By: agoose77, HG1
2015-04-11 16:08:15 +02:00
a6421e1291 BMesh: intersect was using ptr hash for int keys 2015-04-11 23:41:10 +10:00
ccf44c400c BMesh: simplify hashing for dyntopo
Was using pointer hashing when the keys are in fact uint's.
Since they're well distributed from the rangetree,
no need to do bit-shifting tricks. just use int as hash.
Gives ~8% speedup in own tests.
2015-04-11 23:36:37 +10:00
7447a0173c Remove splash link to support gooseberry
Was included only for initial campaign.
2015-04-11 19:41:31 +10:00
465a5d29c0 BGE : Fix T43800: getScreenVect()/getScreenPosition()/modelview_matrix returns incorrect results
The getScreenVect(), getScreenPosition() and modelview_matrixmethod returns an incorrect results if called after the camera has been translated on the same frame.
The model view matrix will be update only once per frame with Cam->SetModelviewMatrix in KX_KetsjiEngine::RenderFrame.
Using GetWorldToCamera as model view matrix to get an actual view matrix even if the camera is moved.

Reviewers: sergey, dfelinto, brita_, sybren, hg1, campbellbarton

Reviewed By: hg1, campbellbarton

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1170
2015-04-10 20:20:52 +02:00
35812e65f4 Cycles: Fix compilation error on windows after recent logging changes 2015-04-10 22:35:10 +05:00
d850fd8244 Disable strict flags for msvc 2015-04-11 00:43:15 +10:00
Dalai Felinto
02a5cf75a2 Fix for debug-only crash when setting "Any" keymap input type
Another one of those assert crashes when passing values != than 1 and 0
(in this case the value is -1)

Notes from reviewer:
--------------------
These should really be enums. since valid values are KM_ANY,
KM_MOD_FIRST, KM_MOD_SECOND.

But can see at some point this was changed from an enum so... I guess
this is the only way.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1227
2015-04-10 11:10:10 -03:00
f75bbe27e2 Thumbnails: Add translations to font preview.
Not much to say, this is pretty straightforward.
We just have to add current locale to thumbnails 'signature', so that
previews get re-generated when we change locale...

Tested with Japanese and French.

Btw, I do not really understand why using BLF in ImBuf is badlevel... :/
2015-04-10 15:34:31 +02:00
8a99dc2324 BLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.
BLF_lang_get() shall return 'default' Blender locale (en_US) when translations
are completely disabled!

Also, add BLF_translate() and BLF_translate_do() to allow translating some strings
outside of label/tip context, but still only when i18n global flag is enabled.
2015-04-10 15:34:31 +02:00
a36c43fc8c Thumbnails: some reorganization, decouple actual path of file to preview from 'ref' one.
(Partial) backport from asset-experiments branch.

Reorganization: previously we could recompute name/path of thumb file two or three times,
now added lower-level internal functions that take those as parameters, so in most case
they are computed only once. Very minor optimization, but simple too.

Also, path of file to preview is now decoupled from path used to generate its URI
(and hence thumbnail path). In asset-experiments branch this is needed because
we also handle datablock previews in/as thumbnails (file_path is .blend path,
URI is .blend path + datablock 'path').

Here this will be needed for same kind of reason - once translated, font thumbnails
need to be re-generated when we change current language...
2015-04-10 15:34:31 +02:00
ec710775cf Use off_t for filesize (was int)
Resolves finding >2gig files.

Also enable strict flags.
2015-04-10 22:06:28 +10:00
b0906bcc5e Cleanup: remove win32 workaround 2015-04-10 22:06:28 +10:00
aac0df956f Cycles: Cleanup, make more clear what camera utility functions are private/public 2015-04-10 16:25:35 +05:00
085fa2e3d7 Fix T44329: Second part: prevent 'cachebuffer' and 'fullOSA' in preview renders. 2015-04-10 13:17:08 +02:00
711a5c79d8 Don't use vertex colors in textured mesh display during texpaint.
Wasn't that irritating?
2015-04-10 13:05:32 +02:00
e073562f80 Cycles: Make transform from viewplane a generic utility function 2015-04-10 15:53:14 +05:00
237c53fbf1 Only selected keys will get cleaned by the action and graph clean
operators
2015-04-10 12:45:13 +02:00
2f5dd83759 Cycles: Add some statistics logging
Covers number of entities in the scene (objects, meshes etc), also reports
sizes of textures being allocated.
2015-04-10 15:37:49 +05:00
1e71270f77 Fix T44329: Blender Crash when rendering in 3DView.
This commit fixes two different issues actually:
* When view name is unknown/irrelevant, you should pass a NULL str pointer to
  `RE_RenderLayerGetPass()`, not an empty string!
* `render_result_rescale()` would unconditionnaly free re->result (at the end),
  even if it did not replaced it at all, leading to freed memory access later.

This is only a partial fix though, "CacheBuffer" (i.e. saving tiles in EXR files)
shall not be used in 3DView rendering, and yet it is here...
2015-04-10 12:32:19 +02:00
253d15ea16 Move clean operator from action/ipo editors to the delete menu, now that
O key is bound to proportional editing.
2015-04-10 11:56:18 +02:00
11a48b7227 Python API docs, don't hard-code sphinx themes
also set the theme to classic (as it was for 2.73)
2015-04-10 15:49:07 +10:00
40334b4920 missed last commit 2015-04-10 13:44:26 +10:00
31d354dfa3 rename _ipo -> _fcurve 2015-04-10 13:41:57 +10:00
f2452bc9ab Test: blacklist loading addons /w known problems
The test now runs without warnings
2015-04-10 12:08:23 +10:00
Dalai Felinto
52f511269b Multiview: remove option to preview the selected stereo 3d mode and error when quadbuffer not supported
This was causing glitches when switching from/to fullscreen modes (e.g.,
side by side to anaglyph).

As for the quadbuffer errors this is part of a more complete solution to
be committed later.
2015-04-09 20:44:03 -03:00
Dalai Felinto
33028d17a0 Multiview: fix crashes with pageflip mode - by Cédric Paille (cedricp) 2015-04-09 15:22:53 -03:00
866532360c Fix T31546 fragment program gets created every frame
That was really crappy indeed. Now we have a separate API
for low level OpenGL programs, plus a nice interface for GPU, also
removes some GL calls from main code as a plus :)

The source for the programs is also moved to nice external .glsl files
(not sure which extension convention GPU assemply uses)
2015-04-09 20:20:50 +02:00
7ea4163e1e Cycles: Fix BVH counter on mesh updates 2015-04-09 22:23:59 +05:00
851ea206d0 Separate proportional editing options for graph and action editor. 2015-04-09 18:30:14 +02:00
cca4405437 Cycles: Fix wrong render result in certain configuration of render layer's surface/hair
There were some synchronization missing in cases when only one of those settings
was disabled.

Also added a render test for such configurations now.
2015-04-09 21:22:48 +05:00
ae5f2c2025 Fix regression after multiview, basically we appended the wrong frames
to movie file.

We have to resort to use crappy workarounds with preview arguments again
since preview range is only for OpenGL preview.
2015-04-09 18:02:43 +02:00
b30a2fe3f4 Fix T44322: Crash when trying to render spotlight halos.
Trying to access rl's from full samples in non-full-OSA context (with uninitialized
sample index even :P ).

Caused by rBd5f1b9c2, probably a copy/paste typo or so.
2015-04-09 16:32:45 +02:00
4cadbb03a8 Seriously... Fix building! 2015-04-09 16:17:51 +02:00
5197aa04c6 Fix part of T44320 selecting islands can fail.
Issue here is simple and has been fixed in other places such as
texpainting: Basically if face has different winding, do not calculate
it as adjucent to the other face, even if UV is identical.

This allows us to stack islands of symmetrical closed meshes on top of
one another and still be able to select the two identical island halfs
(provided the normals are correct of course).
2015-04-09 16:12:43 +02:00
d687428122 Error in own last commit 2015-04-09 21:23:21 +10:00
8a1c444c93 Disable proportional editing when duplicating keyframes 2015-04-09 12:49:06 +02:00
9749b2cb81 Fix partial image update during rendering
Was broken since 5d212fb.
2015-04-09 15:33:44 +05:00
d75bfdfafc Fix T44308 painting in 2D editor offset by one pixel.
Not sure why this was so in the first place but changing it seems OK.
2015-04-09 12:18:51 +02:00
8732c1a8b7 WM: allow 'save as' to path set by operator
Invoke assumed the filepath was never set.
Scripts couldn't invoke save-as at a custom location.
2015-04-09 19:49:05 +10:00
cc6e0b7394 UI: Extend preset menu
- allow for preset menu to change operator defaults.
- allow preset menu to select own kinds of file extensions.
2015-04-09 19:10:00 +10:00
bdad2c0595 Fix uninitialized var use reading view prefix 2015-04-09 17:30:26 +10:00
55ee436618 Fix missing NULL checks 2015-04-09 17:23:51 +10:00
089fc24c76 Fix for passing -1 to close() 2015-04-09 17:21:17 +10:00
5467260ce9 Cleanup: redundant NULL checks 2015-04-09 17:20:02 +10:00
0b59865115 Fix missing NULL check 2015-04-09 17:09:10 +10:00
1b72ad0c3d GHOST: don't instantiate assert arg
When debugging is disabled, function calls in an assert should never run.
2015-04-09 13:55:46 +10:00
12661de087 Remove invalid assert 2015-04-09 13:00:58 +10:00
aa24704749 Fix T44235: UNC Path Fails in open.
Here again, stat on '\\MYSERVER\foo\..' does not work...

Anyway, we can handle this in a much much simpler way using
BLI_access and BLI_parent_dir...
2015-04-08 21:59:05 +02:00
114d1b23d2 Fix T44113: Some System Folders do not contain go back arrow.
On windows empty dirs are completely empty - no par or current entries
are listed either, in those cases artificially add those.

Furthermore, stat on UNC paths do not support current/parent 'shortcuts'
(i.e. things like '\\SERVER\foo\bar\..' do not work), so we have to hack
around that mess...

This should ensure us we always do have valid parrent entry...
2015-04-08 21:59:05 +02:00
Dalai Felinto
5d212fb812 Fix T44310: Other render slots cleared after each render 2015-04-08 16:17:56 -03:00
0a304337e1 Freestyle: Fix for AndBP1D and OrBP1D not working due to typos.
Problem report by Folkert de Vries (flokkievids) through personal
communications.  Thanks!
2015-04-09 00:29:07 +09:00
c523e82e31 Particles: Fix for missing particles in render if they're disabled for viewport
The issue was introduced in rB4b685e1 and it appears some crazy area still
accesses particles for render after deleting it's render data, which broke
viewport/render behavior.

This commit restores previous G.is_rendering logic and adds corresponding
checks to cache construction, so counting is all consistent.

Goes to the TODO list to either replace G.is_rendering with eval_ctx or to
make it so psys->renderdata always exists during render sync.
2015-04-08 20:17:44 +05:00
2d05466700 Fix T44213: Bevel object from different scene won't update generated bezier curve geometry
The issue was caused by bevel object being automatically added to the scene graph
by dag_get_node() and had no incoming relations, even form the scene. This confused
scene update flush logic.

Now there'll be a scene relation added to such nodes, so they're always reachable
from the root node.
2015-04-08 20:06:42 +05:00
62f863b78a Fix memory leak in bump GLSL node 2015-04-08 16:48:15 +02:00
7fcb0bf71e Attempt GLSL compile fix in opensuse linux basically, we passed a vec3
as a float.
2015-04-08 16:30:45 +02:00
bf11e362c5 Fix T44046: Cycles speed regression in 2.74 (CPU only)
Issue was caused by MSVC not being able to optimize some code out in the same
way as GCC/Clang does, so now that parts of code are explicitly unfolded in
order to help compilers out.

This makes speed loss much less drastic on my laptop. That's probably as good
as we can do with MSVC without investing infinite amount of time looking trying
to workaround the optimizer.
2015-04-08 18:47:25 +05:00
2c91f9dc11 Transform: use relative motion for vertex slide
Vertex slide was using absolute mouse position unlike all other kinds of transform.

also remove need for allocated 2d projections.
2015-04-08 23:01:38 +10:00
01b1eb445c Math Lib: add project_plane_v3_v3v3
Useful for projecting one vector onto another (as a plane).

This is a rather common operation,
doing inline isn't always obvious whats happening.
2015-04-08 23:01:37 +10:00
d249db9755 Action editor proportional editing:
Fix crash when extending instead of translating
2015-04-08 14:36:25 +02:00
3b440dbf66 FileBrowser previews: Get rid of ugly, stupid and confusing 'FILE_TYPE_ICON_MOVIE' hack.
Was only handling failures in video thumbnails, was confusing (giving two different types
for video files, *sigh*), and... useless, since thumbnail code already handles smartly
failures in preview generation!
2015-04-08 14:31:49 +02:00
c5c60099c5 Proportional editing in action editor: display circle in center of
region.

It's -really- hard getting the center of selection here in the y axis, I
feel this is the best compromise.
2015-04-08 14:31:11 +02:00
40984f6c86 Fix annoying warning in GHOST when ASSERT_ABORT is off 2015-04-08 13:00:46 +02:00
235f1feaf4 Fix opengl render preview in image editor broken
During multiview, invalidation of the display imbuf of the preview image
was eaten by code eating elves.
2015-04-08 12:49:54 +02:00
7621ff7e55 Cycles: Code cleanup, indentation. Was wrong in the multiview commit 2015-04-08 15:35:01 +05:00
bb19c7c3f7 Forgot this last commit. 2015-04-08 12:02:23 +02:00
d6d4d5e094 Fix multiview issue: play animation crashes
We need to avoid passing a NULL string here, and also we need to pass
the correct suffix we used to pass view string directly which is
probably not what we want.
2015-04-08 11:53:14 +02:00
a18e5d6a67 warning: unused 2015-04-08 16:26:58 +10:00
ab2a8832dd Use IS_EQF for floats 2015-04-08 16:20:53 +10:00
Dalai Felinto
60ecc6b3b3 Multiview: Expose current drawn eye to API (viewport only) 2015-04-08 03:12:45 -03:00
45e2366148 Cleanup: remove unused defines 2015-04-08 15:09:20 +10:00
Dalai Felinto
796b17b843 Multiview: Fullscreen modes (sidebyside/topbottom) were not working
* WM_window_is_fullscreen() is not the correct test.
* Also, we no longer change window to fullscreen automatically.
2015-04-08 02:02:59 -03:00
f5648f6db9 BGE : Fix T36285 Wrong viewport scale.
Fix of T36285, I just invalidate projection matrix when a camera switch
to viewport mode, because we need to rewrite the projection matrix in
RenderFrame.
It worked with old blender version because when you use viewport render
one camera is added in the camera list and initialize its projection
matrix for the first time. But when we used several cameras + viewport
for splitscreen we had issues.

Reviewers: dfelinto, hg1, ben2610, lordloki, moguri

Reviewed By: moguri

Projects: #game_rendering, #game_engine

Differential Revision: https://developer.blender.org/D1202
2015-04-08 06:56:17 +02:00
441f68e2b0 Partial fix for T44219
Prevent crashes from out of bounds array access if an invalid rotation mode
is passed to the euler rotation blenlib calculations.
2015-04-08 14:34:07 +12:00
1492db09d1 Partial fixes for issues raised in T44219
* The breakdowner tool will no longer operate directly on properties
  of type "enum", as this doesn't make sense most of the time. This
  is still not much use though when custom properties (ints) are used
  to drive some underlying enum property though (as in blenrig)
* The breakdowner no longer tries to perform any blending if the
  start and end values are the same, to avoid float precision issues.
2015-04-08 14:34:06 +12:00
808ea6271a Cleanup: confusing if statements & alignment 2015-04-08 12:24:52 +10:00
ccfb9a96c3 CMake: resolve linking error on Linux
Since multiview, matrixGlyph failed to link
2015-04-08 11:50:57 +10:00
8c539b0ab5 Font preview for file browser
D1002 by @plasmasolutions, with own refactoring.

Note, needed to do a bad-level call here (IMB -> BLF)
Also can't use the BLF API directly because its not thread-safe.
So keep the function isolated (blf_thumbs.c).
2015-04-08 10:38:19 +10:00
c56c493cf4 BLF: use regular unsigned int's
So GL isnt needed to include BLF types.
2015-04-08 10:30:18 +10:00
a2ea4ce70d Cleanup: IMB/thumb naming 2015-04-08 09:55:02 +10:00
a57b898d17 BLF: Fix clamping drawing into byte buffer 2015-04-08 09:55:01 +10:00
Julian Eisel
7e52d810f3 Muliview: Minor UI-tweaks
* Don't grey multiview options in file browser and in Node Editor Properties out if multi-view is disabled, hide them completely (I think greying out single buttons is fine, but in case of entire blocks we should just hide to save space)
* Move multiview settings in Node Editor Properties above alpha settings to prevent the alpha buttons from appearing above multiview settings if multiview is enabled and Stereo 3D format is chosen (making them appear below is much nicer)
2015-04-08 00:41:37 +02:00
796c3c7748 Fix T44290: Clear users & fake-user conflict
The purpose of clearing users in this case is not to save the data,
so keeping fake-user doesn't make sense.
2015-04-08 06:50:38 +10:00
c89637be30 BGE: use tuple for returning display size 2015-04-08 06:28:05 +10:00
09a746b857 Cycles: Cleanup, typos 2015-04-08 01:15:38 +05:00
Dalai Felinto
cc9c049ff7 Multiview: compositor - avoid trashing image viewer views/buffers when multiview is off
I found this while investigating why the backdrop shows 'blank' while I
update a node influence factor. This problem still persist, but maybe it
was there before multiview. In release it is not noticeable, but in my
debug build is quite evident.
2015-04-07 16:56:31 -03:00
Dalai Felinto
4c2306d21a Multiview: compositor was not updating when multiview was off 2015-04-07 16:38:21 -03:00
c1e5d966c6 Proportional editing support for the action editor.
There are a few things here which are not so nice:

* Position of proportional edit circle is not centered on data
(difficult to predict positions here since those are completely custom,
 will probably be positioned at center of area later instead)

* Result is flushed to curve handles only at the end of the transform,
so if people have the graph editor open they will see handles lagging behind.
2015-04-07 20:49:47 +02:00
Dalai Felinto
662c2cd910 Multiview: update Set Stereo 3D menu when the selected stereo mode changes 2015-04-07 15:43:06 -03:00
858f54f16e Cycles: Cleanup, indentation 2015-04-07 22:41:08 +05:00
e36b0cb8f3 BGE: New API method getDisplayDimensions
This patch adds a new API function to get the actual display dimensions in pixels.

Reviewers: dfelinto, sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Differential Revision: https://developer.blender.org/D648
2015-04-07 18:32:25 +02:00
f9f3c29a3a Fix crash when changing proxy storage type for editing (was own
stupidity casting from Scene to Editing in RNA)

Move versioning for proxy storage to multiview version check (not really
correct but it was orphaned before and it doesn't hurt either).
2015-04-07 16:08:46 +02:00
Julian Eisel
cc78664d50 Revert Sticky Keys (and everything related to that)
Our current keymap doesn't give us enough room to make such changes in
the event system. To fix small issues caused by this, we would need to do
drastic changes in Blender's keymaps and internal handling. It was worth
a try, but it didn't work.

I can write down a more descriptive statement in a few days, but for now
I need a break of this stuff.
2015-04-07 14:13:20 +02:00
d60ff6c112 Fix for own last commit
resolved bug but wasn't correct
2015-04-07 20:27:08 +10:00
34818a44b2 Make image strips also follow the project directory storage options. 2015-04-07 12:15:18 +02:00
20a780e3e8 Fix T44258: Can't select similar regions 2015-04-07 19:56:24 +10:00
4b685e1b90 Fix T44268: Particles: too many virtual parents + non-100 display% = crash
Issue was caused by mismatched logic in counting child/parent particles in
job initialization and actual job execution. Confusion here came from mixed
usage of psys->renderdata and G.is_rendering.

We need to get rid of G.is_rendering and use eval_ctx if it's really needed,
but we also might just use psys->renderdata check since it's expected psys
to have this structure anyway.
2015-04-07 13:52:42 +05:00
98f4106694 Metaball tessellation optimization (Octree to BVH)
Speedup is non-linear, 2x-10x faster is quite normal.
Patch T43678.

- Switched from an Octree to BVH.
- Finding first points of surface no longer "wastes" density function evaluation: every result is cached.
- Use MemArena instead of using own memory management.
- Correct calculation of metaelem bounding box.
- Remove mball_count(): mballs are now counted "on the go".
2015-04-07 13:19:50 +10:00
9510137d12 Cleanup: brace placement /w structs 2015-04-07 11:25:42 +10:00
e2eeb46a1b Cleanup: rename treehash -> outliner_treehash
This is an API specifically for the outliner,
not some generic hierarchical hash structure.
2015-04-07 11:01:47 +10:00
5217d2bc0e Use BKE_edgehash_ensure_p where possible 2015-04-07 10:53:58 +10:00
808de65d91 EdgeHash: ensure function, avoids multiple lookups 2015-04-07 10:53:20 +10:00
1b9f1519bc Cleanup 2015-04-07 08:46:48 +10:00
Julian Eisel
3dcdacffca This commit doesn't deserve a title
Today just wasn't my day...
2015-04-06 23:23:13 +02:00
d3388f0c7a Fix compilation error in Win Debug. 2015-04-06 23:17:18 +02:00
Julian Eisel
bcc9a23548 Various Sticky fixes (tm)
* Revert 776bfa64a5 and c3dad7953a (some X11 systems are doing
stupid things forcing me to do an extra check that completely breaks the
click type handling on other systems using the slightly changed
implementation from those commits - see T44278)
* Fix sample lines in Compositor+VSE

(And yes, this time I tested on both of my systems to make sure
everything is fine)
2015-04-06 23:10:21 +02:00
33a9247334 UI i18n cleanup...
And some general style cleanup as well (line length...).
2015-04-06 22:06:06 +02:00
e2354e64d2 Cycles: Cleanup, spaces around assignment operator
Did some bad spacing in recent commits, better to get rid of those so
they does not confuse those who're working on sources.
2015-04-07 00:25:54 +05:00
c1d8ddacaf Cycles: Avoid doing paranoid checks in filepath of builtin images
Originally we thought it's needed in order to distinguish builtin file from
filename which starts with '@', but the filepath is actually full path there
and it's unlikely to have file system where '@' is a proper root character.

Surprisingly this does not give visible speed differences, but it's still
nice to get rid of redundant check.
2015-04-07 00:11:47 +05:00
7c19239bf9 Cycles: Support bultin 3d textures with OSL backend 2015-04-06 23:29:29 +05:00
2aa79679dc OSX: add also license for iomp5 using cmake and fix all textfiles wrong destination 2015-04-06 19:55:51 +02:00
28e9058e7a OSX: add a license file for libiomp5 ( intel omp ) when compiled with 2015-04-06 19:12:23 +02:00
593b4d84c4 BGE: followup of renaming parameter "other" to "reference"
See commit 3e5332bb95
2015-04-06 18:23:56 +02:00
3e5332bb95 BGE: fixed nomenclature of KX_Scene::addObject and KX_Scene::AddReplicaObject
KX_Scene::addObject: Changed the parameter "other" to "reference", as "other" doesn't mean anything.
KX_Scene::AddReplicaObject: Changed the parameter "parentobject" to "referenceobject", as the parameter did NOT contain a parent object in any way.

Now both functions use the same kind of name for the same thing.

Thanks to panzergame / Porteries Tristan.
2015-04-06 17:11:36 +02:00
d0aae79505 Cycles: More instant feedback on progressive rendering for first sample
Main purpose of this change is to make material preview appearing more
instant after the shader tweaks.
2015-04-06 19:28:25 +05:00
b5f58c1ad9 Cycles: Experiment with making previews more interactive
There were two major problems with the interactivity of material previews:

- Beckmann tables were re-generated on every material tweak.
  This is because preview scene is not set to be persistent, so re-triggering
  the render leads to the full scene re-sync.

- Images could take rather noticeable time to load with OIIO from the disk
  on every tweak.

This patch addressed this two issues in the following way:

- Beckmann tables are now static on CPU memory.

  They're couple of hundred kilobytes only, so wouldn't expect this to be
  an issue. And they're needed for almost every render anyway.

  This actually also makes blackbody table to be static, but it's even smaller
  than beckmann table.

  Not totally happy with this approach, but others seems to complicate things
  quite a bit with all this render engine life time and so..

- For preview rendering all images are considered to be built-in. This means
  instead of OIIO which re-loads images on every re-render they're coming
  from ImBuf cache which is fully manageable from blender side and unused
  images gets freed later.

  This would make it impossible to have mipmapping with OSL for now, but we'll
  be working on that later anyway and don't think mipmaps are really so crucial
  for the material preview.

  This seems to be a better alternative to making preview scene persistent,
  because of much optimal memory control from blender side.

Reviewers: brecht, juicyfruit, campbellbarton, dingto

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1132
2015-04-06 19:22:17 +05:00
Dalai Felinto
36f352a4e4 Fix doversion check - patch by Sergey Sharybin 2015-04-06 11:11:36 -03:00
Dalai Felinto
d5f1b9c222 Multi-View and Stereo 3D
Official Documentation:
http://www.blender.org/manual/render/workflows/multiview.html

Implemented Features
====================
Builtin Stereo Camera
* Convergence Mode
* Interocular Distance
* Convergence Distance
* Pivot Mode

Viewport
* Cameras
* Plane
* Volume

Compositor
* View Switch Node
* Image Node Multi-View OpenEXR support

Sequencer
* Image/Movie Strips 'Use Multiview'

UV/Image Editor
* Option to see Multi-View images in Stereo-3D or its individual images
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

I/O
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

Scene Render Views
* Ability to have an arbitrary number of views in the scene

Missing Bits
============
First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report.

Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report.

Everything else is likely small todos, and may wait until we are sure none of the above is happening.

Apart from that there are those known issues:
* Compositor Image Node poorly working for Multi-View OpenEXR
(this was working prefectly before the 'Use Multi-View' functionality)
* Selecting camera from Multi-View when looking from camera is problematic
* Animation Playback (ctrl+F11) doesn't support stereo formats
* Wrong filepath when trying to play back animated scene
* Viewport Rendering doesn't support Multi-View
* Overscan Rendering
* Fullscreen display modes need to warn the user
* Object copy should be aware of views suffix

Acknowledgments
===============
* Francesco Siddi for the help with the original feature specs and design
* Brecht Van Lommel for the original review of the code and design early on
* Blender Foundation for the Development Fund to support the project wrap up

Final patch reviewers:
* Antony Riakiotakis (psy-fi)
* Campbell Barton (ideasman42)
* Julian Eisel (Severin)
* Sergey Sharybin (nazgul)
* Thomas Dinged (dingto)

Code contributors of the original branch in github:
* Alexey Akishin
* Gabriel Caraballo
2015-04-06 10:40:12 -03:00
4679 changed files with 1128714 additions and 227210 deletions

6
.gitignore vendored
View File

@@ -21,7 +21,7 @@ Desktop.ini
# commonly used paths in blender
/blender.bin
/user-config.py
/BUILD_NOTES.txt
# local patches
/*.patch
@@ -32,3 +32,7 @@ Desktop.ini
/doc/python_api/sphinx-in-tmp/
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/
/doc/python_api/rst/bmesh.ops.rst
# in-source lib downloads
/build_files/build_environment/downloads

10
.gitmodules vendored
View File

@@ -2,15 +2,19 @@
path = release/scripts/addons
url = ../blender-addons.git
ignore = all
branch = master
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
ignore = all
branch = master
[submodule "release/datafiles/locale"]
path = release/datafiles/locale
url = ../blender-translations.git
ignore = all
[submodule "scons"]
path = scons
url = ../scons.git
branch = master
[submodule "source/tools"]
path = source/tools
url = ../blender-dev-tools.git
ignore = all
branch = master

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
# vim: tabstop=4
#
# ##### BEGIN GPL LICENSE BLOCK #####
@@ -43,6 +43,16 @@ ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
endif
# Dependencies DIR's
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@@ -76,18 +86,14 @@ endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
ifndef NPROCS
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -97,7 +103,7 @@ endif
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
-H"$(BLENDER_DIR)" \
-B"$(BUILD_DIR)" \
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
# -----------------------------------------------------------------------------
@@ -106,30 +112,30 @@ CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
# X11 spesific
ifdef DISPLAY
CMAKE_CONFIG_TOOL = cmake-gui
else
else
CMAKE_CONFIG_TOOL = ccmake
endif
# -----------------------------------------------------------------------------
# Build Blender
all: FORCE
all: .FORCE
@echo
@echo Configuring Blender ...
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
# if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# $(CMAKE_CONFIG); \
# fi
# do this always incase of failed initial build, could be smarter here...
$(CMAKE_CONFIG)
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# # $(CMAKE_CONFIG); \
# # fi
# # do this always incase of failed initial build, could be smarter here...
@$(CMAKE_CONFIG)
@echo
@echo Building Blender ...
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
@echo Blender successfully built, run from: "$(BUILD_DIR)/bin/blender"
@echo
debug: all
@@ -139,16 +145,37 @@ cycles: all
headless: all
bpy: all
# -----------------------------------------------------------------------------
# Build dependencies
DEPS_TARGET = install
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
DEPS_TARGET = clean
endif
deps: .FORCE
@echo
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
@cmake -H"$(DEPS_SOURCE_DIR)" \
-B"$(DEPS_BUILD_DIR)" \
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
@echo
@echo Building dependencies ...
$(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET)
@echo
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
@echo
# -----------------------------------------------------------------------------
# Configuration (save some cd'ing around)
config: FORCE
config: .FORCE
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# Help for build targets
help: FORCE
help: .FORCE
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@@ -157,6 +184,7 @@ help: FORCE
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo " * deps - build library dependencies (intended only for platform maintainers)"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@echo ""
@@ -175,14 +203,20 @@ help: FORCE
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
@echo " * test - run ctest, currently tests import/export,"
@echo " operator execution and that python modules load"
@echo " * test_cmake - runs our own cmake file checker"
@echo " which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8"
@echo " which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
@echo " * test_style_c - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not associated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@@ -201,6 +235,12 @@ help: FORCE
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Environment Variables"
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
@echo " * BUILD_DIR - override default build path."
@echo " * PYTHON - use this for the Python command (used for checking tools)."
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@@ -210,17 +250,18 @@ help: FORCE
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
# -----------------------------------------------------------------------------
# Packages
#
package_debian: FORCE
package_debian: .FORCE
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
package_pacman: FORCE
package_pacman: .FORCE
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
package_archive: FORCE
package_archive: .FORCE
make -C "$(BUILD_DIR)" -s package_archive
@echo archive in "$(BUILD_DIR)/release"
@@ -228,35 +269,35 @@ package_archive: FORCE
# -----------------------------------------------------------------------------
# Tests
#
test: FORCE
test: .FORCE
cd $(BUILD_DIR) ; ctest . --output-on-failure
# run pep8 check check on scripts we distribute.
test_pep8: FORCE
python3 tests/python/pep8.py > test_pep8.log 2>&1
test_pep8: .FORCE
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
test_cmake: FORCE
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
test_cmake: .FORCE
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
@echo "written: test_cmake_consistency.log"
# run deprecation tests, see if we have anything to remove.
test_deprecated: FORCE
python3 tests/check_deprecated.py
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c: FORCE
test_style_c: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc: FORCE
test_style_c_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
@@ -266,18 +307,18 @@ test_style_c_qtc: FORCE
@echo "written: test_style.tasks"
test_style_osl: FORCE
test_style_osl: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc: FORCE
test_style_osl_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
@@ -289,13 +330,13 @@ test_style_osl_qtc: FORCE
# Project Files
#
project_qtcreator: FORCE
python3 build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_qtcreator: .FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_netbeans: FORCE
python3 build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
project_netbeans: .FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
project_eclipse: FORCE
project_eclipse: .FORCE
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
@@ -303,51 +344,51 @@ project_eclipse: FORCE
# Static Checking
#
check_cppcheck: FORCE
check_cppcheck: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
check_clang_array: FORCE
check_clang_array: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
check_splint: FORCE
check_splint: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
check_sparse: FORCE
check_sparse: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
check_smatch: FORCE
check_smatch: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
check_spelling_py: FORCE
check_spelling_py: .FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/release/scripts"
check_spelling_c: FORCE
check_spelling_c: .FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc: FORCE
check_spelling_c_qtc: .FORCE
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
@@ -356,13 +397,13 @@ check_spelling_c_qtc: FORCE
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl: FORCE
check_spelling_osl: .FORCE
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: FORCE
check_descriptions: .FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
@@ -370,18 +411,24 @@ check_descriptions: FORCE
# Utilities
#
tgz: FORCE
tgz: .FORCE
./build_files/utils/build_tgz.sh
icons: FORCE
icons: .FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
update: FORCE
update: .FORCE
if [ "$(OS_NCASE)" == "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
fi
if [ -d "../lib" ]; then \
svn cleanup ../lib/* ; \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
@@ -390,24 +437,26 @@ update: FORCE
#
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
doc_py: .FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_doxy: FORCE
doc_doxy: .FORCE
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
doc_dna: .FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: FORCE
python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
doc_man: .FORCE
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
help_features: FORCE
@python3 -c \
help_features: .FORCE
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
@@ -417,9 +466,9 @@ help_features: FORCE
if w.startswith('WITH_')]))" | uniq
clean: FORCE
clean: .FORCE
$(MAKE) -C "$(BUILD_DIR)" clean
.PHONY: all
FORCE:
.FORCE:

1370
SConstruct

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,132 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows and macOS. There is some support for Linux as well, but not ready for releases.
#
# Windows and macOS users should download the precompiled libraries in lib/, Linux users
# should run install_deps.sh for building dependencies.
#
# WINDOWS USAGE:
# Don't call this cmake file your self, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake libtool yasm openssl xz
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler, cmake, autoconf, automake, libtool, yasm
# Run "make deps" from main Blender directory
#
####################################################################################################
project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/options.cmake)
include(cmake/versions.cmake)
include(cmake/zlib.cmake)
include(cmake/blendthumb.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/boost.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/ilmbase.cmake)
include(cmake/openexr.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
include(cmake/glew.cmake)
include(cmake/hdf5.cmake)
include(cmake/alembic.cmake)
include(cmake/glfw.cmake)
include(cmake/clew.cmake)
include(cmake/cuew.cmake)
include(cmake/opensubdiv.cmake)
include(cmake/sdl.cmake)
include(cmake/opencollada.cmake)
include(cmake/opencolorio.cmake)
include(cmake/llvm.cmake)
include(cmake/clang.cmake)
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
include(cmake/flexbison.cmake)
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/numpy.cmake)
if (WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WIN32)
include(cmake/hidapi.cmake)
endif()
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/orc.cmake)
include(cmake/schroedinger.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
include(cmake/lapack.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
include(cmake/xml2.cmake)
endif()
endif()
endif()
endif()
include(cmake/harvest.cmake)

View File

@@ -0,0 +1,75 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${LIBDIR}/ilmbase
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/ilmbase/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
)
add_dependencies(external_alembic external_boost external_zlib external_ilmbase)

View File

@@ -0,0 +1,61 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
if(WIN32)
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
ExternalProject_Add(external_zlib_32
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_32}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib32
)
ExternalProject_Add(external_zlib_64
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_64}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib64
)
ExternalProject_Add(external_blendthumb_32
CMAKE_GENERATOR ${GENERATOR_32}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb32
)
add_dependencies(external_blendthumb_32 external_zlib_32)
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb64
)
add_dependencies(external_blendthumb_64 external_zlib_64)
endif()
endif()

View File

@@ -0,0 +1,43 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
)
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
)
add_dependencies(external_blosc external_zlib)
if(WIN32)
add_dependencies(external_blosc external_pthreads)
endif()

View File

@@ -0,0 +1,107 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
endif()
if(MSVC12)
set(BOOST_TOOLSET toolset=msvc-12.0)
set(BOOST_COMPILER_STRING -vc120)
set(PYTHON_COMPILER_STRING v120)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
set(PYTHON_COMPILER_STRING v140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
type ${semi_path} >> "${JAM_FILE}"
)
set(BOOST_BUILD_COMMAND bjam)
#--user-config=user-config.jam
set(BOOST_BUILD_OPTIONS runtime-link=static )
#set(BOOST_WITH_PYTHON --with-python)
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_WITH_PYTHON}
${BOOST_TOOLSET}
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_MD5}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WIN32)
add_dependencies(external_boost Make_Python_Environment)
endif()

View File

@@ -0,0 +1,51 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
)
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PATCH_COMMAND ${PATCH_CMD} -p 2 -N -R -d ${BUILD_DIR}/clang/src/external_clang < ${PATCH_DIR}/clang.diff
PREFIX ${BUILD_DIR}/clang
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
if (MSVC)
if (BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/ )
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
add_dependencies(external_clang ll)

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
@@ -16,14 +14,15 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Nathan Letwory.
#
# ***** END GPL LICENSE BLOCK *****
SConscript(['common/SConscript',
'ghost/SConscript'])
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
)

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
@@ -16,20 +14,16 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Nathan Letwory.
#
# ***** END GPL LICENSE BLOCK *****
Import ('env')
set(CUEW_EXTRA_ARGS)
sources = env.Glob('src/cuew.c')
incs = 'include'
defs = []
env.BlenderLib ('extern_cuew', sources, Split(incs), defines=defs, libtype=['system'], priority = [0])
ExternalProject_Add(external_cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
)

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FAAD_EXTRA_ARGS)
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/faad/src/external_faad < ${PATCH_DIR}/libfaad.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,119 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/dirac/include/dirac -I${mingw_LIBDIR}/schroedinger/include/schroedinger-1.0 -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/dirac/lib -L${mingw_LIBDIR}/schroedinger/lib -L${mingw_LIBDIR}/orc/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/schroedinger/lib/pkgconfig:${mingw_LIBDIR}/orc/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg)
endif()
if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
endif()
ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libschroedinger
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--disable-x11grab
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl
--disable-gnutls
--disable-vda
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif(MSVC)
add_dependencies(external_ffmpeg external_zlib external_faad external_openjpeg external_xvidcore external_x264 external_schroedinger external_vpx external_theora external_vorbis external_ogg external_lame)
if(WIN32)
add_dependencies(external_ffmpeg external_zlib_mingw)
endif()

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
endif()
ExternalProject_Add(external_fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
endif(MSVC)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
)
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif(MSVC)

View File

@@ -0,0 +1,31 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
)

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
@@ -16,20 +14,22 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Nathan Letwory.
#
# ***** END GPL LICENSE BLOCK *****
Import ('env')
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
sources = env.Glob('src/clew.c')
incs = 'include'
defs = ['CL_USE_DEPRECATED_OPENCL_1_1_APIS']
env.BlenderLib ('extern_clew', sources, Split(incs), defines=defs, libtype=['system'], priority = [999])
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
endif()

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS -DCMAKE_RELEASE_POSTFIX:STRING=2ST -DCMAKE_DEBUG_POSTFIX:STRING=2ST_d -DWITH_BZip2=OFF -DWITH_HarfBuzz=OFF)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freetype
)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLEW_EXTRA_ARGS
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
)
ExternalProject_Add(external_glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
)

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
)

View File

@@ -0,0 +1,279 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
########################################################################
# Copy all generated files to the proper strucure as blender prefers
########################################################################
if(NOT DEFINED HARVEST_TARGET)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
# Zlib Rename the lib file and copy the include/bin folders
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic.lib ${HARVEST_TARGET}/zlib/lib/libz_st.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/bin/ ${HARVEST_TARGET}/zlib/bin/ &&
# jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# FreeType, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype &&
# pthreads, rename include dir
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib &&
# ffmpeg copy include+bin
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib &&
# sdl merge bin/lib folder, copy include
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib &&
# openal
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# openEXR
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# fftw3
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# iconv
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h &&
# opencolorIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenColorIO/ ${HARVEST_TARGET}/opencolorio &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenColorIO/lib/OpenColorIO.dll ${HARVEST_TARGET}/opencolorio/bin/OpenColorIO.dll &&
# Osl
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl &&
# OpenVDB
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openVDB/ ${HARVEST_TARGET}/openVDB &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/ &&
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ &&
# opencollada
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
# opensubdiv
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv ${HARVEST_TARGET}/opensubdiv &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5 ${HARVEST_TARGET}/hdf5 &&
# BlendThumb
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
DEPENDS
)
endif(BUILD_MODE STREQUAL Release)
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# ilmbase+openexr
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Half.lib ${HARVEST_TARGET}/openexr/lib/Half_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Iex-2_2.lib ${HARVEST_TARGET}/openexr/lib/Iex-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IexMath-2_2.lib ${HARVEST_TARGET}/openexr/lib/IexMath-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmThread-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Imath-2_2.lib ${HARVEST_TARGET}/openexr/lib/Imath-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImf-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImf-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImfUtil-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImfUtil-2_2_d.lib &&
# opencollada
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib &&
# osl
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib &&
# opensubdiv
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib &&
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib &&
# openvdb
${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
endif(BUILD_MODE STREQUAL Debug)
else(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "clang" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(blosc/lib openvdb/lib "*.a")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(ffmpeg/include ffmpeg/include "*.h")
harvest(ffmpeg/lib ffmpeg/lib "*.a")
harvest(fftw3/include fftw3/include "*.h")
harvest(fftw3/lib fftw3/lib "*.a")
harvest(flac/lib sndfile/lib "libFLAC.a")
harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(ilmbase openexr "*")
harvest(ilmbase/include openexr/include "*.h")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
harvest(opencolorio/include opencolorio/include "*.h")
harvest(opencolorio/lib opencolorio/lib "*.a")
harvest(openexr/include openexr/include "*.h")
harvest(openexr/lib openexr/lib "*.a")
harvest(openimageio/bin openimageio/bin "idiff")
harvest(openimageio/bin openimageio/bin "maketx")
harvest(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openjpeg/include/openjpeg-1.5 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(orc/lib/liborc-0.4.a ffmpeg/lib/liborc.a)
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(schroedinger/lib/libschroedinger-1.0.a ffmpeg/lib/libschroedinger.a)
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
harvest(sndfile/lib sndfile/lib "*.a")
harvest(spnav/include spnav/include "*.h")
harvest(spnav/lib spnav/lib "*.a")
harvest(tbb/include tbb/include "*.h")
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
endif(WIN32)

View File

@@ -0,0 +1,42 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
endif()
ExternalProject_Add(external_hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
)

View File

@@ -0,0 +1,29 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

View File

@@ -0,0 +1,34 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
)
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
endif()
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
)

View File

@@ -0,0 +1,65 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif(WIN32)

View File

@@ -0,0 +1,47 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--enable-export=full
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,43 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAPACK_EXTRA_ARGS)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw64/bin/gfortran.exe)
else()
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw32/bin/gfortran.exe)
endif()
endif()
ExternalProject_Add(external_lapack
URL ${LAPACK_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAPACK_HASH}
PREFIX ${BUILD_DIR}/lapack
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && ${CMAKE_COMMAND} ${LAPACK_EXTRA_ARGS} -DBUILD_TESTING=Off -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lapack .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make install
INSTALL_DIR ${LIBDIR}/lapack
)
if(MSVC)
set_target_properties(external_lapack PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,61 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
)
if(WIN32)
set(LLVM_GENERATOR "NMake Makefiles")
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm-alloca-fix.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if (MSVC)
if (BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -0,0 +1,57 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif(BUILD_MODE STREQUAL Debug)
endif()
set(NUMPY_POSTFIX)
if(WIN32)
set(NUMPY_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
endif()
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ${NUMPY_INSTALL}
)
add_dependencies(external_numpy Make_Python_Environment)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
)
if(MSVC)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,42 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=Off
-DALSOFT_NO_CONFIG_UTIL=On
-DALSOFT_EXAMPLES=Off
-DALSOFT_TESTS=Off
-DALSOFT_CONFIG=Off
-DALSOFT_HRTF_DEFS=Off
-DALSOFT_INSTALL=On
)
if(UNIX)
set(OPENAL_EXTRA_ARGS ${OPENAL_EXTRA_ARGS} -DLIBTYPE=STATIC)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
)
endif()

View File

@@ -0,0 +1,37 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX AND NOT APPLE)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX AND NOT APPLE)
add_dependencies(external_opencollada external_xml2)
endif()

View File

@@ -0,0 +1,70 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENCOLORIO_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_INCLUDEDIR=${LIBDIR}/boost/include/boost_1_60/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_DEBUG=ON
-DBoost_MAJOR_VERSION=1
-DBoost_MINOR_VERSION=60
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
)
if(WIN32)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_BOOST_PTR=ON
-DOCIO_BUILD_STATIC=OFF
-DOCIO_BUILD_SHARED=ON
)
else()
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
)
endif()
ExternalProject_Add(external_opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
if(NOT WIN32)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(external_opencolorio external_boost)

View File

@@ -0,0 +1,41 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
endif()
set(OPENEXR_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/openexr/src/external_openexr < ${PATCH_DIR}/openexr.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
add_dependencies(external_openexr external_zlib external_ilmbase)

View File

@@ -0,0 +1,132 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if (WITH_WEBP)
set(WEBP_ARGS -DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} )
set(WEBP_DEP external_webp)
endif()
if (MSVC)
set(OPENJPEG_FLAGS -DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
)
else()
set(OPENJPEG_FLAGS -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf-2_2${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(external_openimageio external_png external_zlib external_ilmbase external_openexr external_jpeg external_boost external_tiff external_opencolorio external_openjpeg${OPENJPEG_POSTFIX} ${WEBP_DEP})
if(NOT WIN32)
add_dependencies(external_openimageio external_opencolorio_extra)
endif()

View File

@@ -0,0 +1,57 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
# library itself does not depend on them, so should give no problems.
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles")
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
if (MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
endif()
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif(MSVC)

View File

@@ -0,0 +1,71 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
#no cuda support for vc15 yet
if(msvc15)
set(OPENSUBDIV_CUDA ON)
else()
set(OPENSUBDIV_CUDA ON)
endif()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=${OPENSUBDIV_CUDA}
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/cl
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
)
add_dependencies(external_opensubdiv external_glew external_glfw external_clew external_cuew)

View File

@@ -0,0 +1,71 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
set(OPENVDB_EXTRA_ARGS
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_CUSTOM=ON
-DILMBASE_CUSTOM_LIBRARIES=Half;Imath-2_2;IlmThread-2_2;Iex-2_2
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DILMBASE_HALF_LIBRARIES=${LIBDIR}/ilmbase/lib/Half${LIBEXT}
-DILMBASE_IMATH_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DILMBASE_ILMTHREAD_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DILMBASE_IEX_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DOPENEXR_USE_STATIC_LIBS=ON
-DOPENEXR_CUSTOM=ON
-DOPENEXR_CUSTOM_LIBRARY=IlmImf-2_2
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DTBB_ROOT_DIR=${LIBDIR}/tbb/
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARY=${LIBDIR}/tbb/lib/tbb_static${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DWITH_BLOSC=ON
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
)
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS})
# CMake script for OpenVDB based on https://raw.githubusercontent.com/diekev/openvdb-cmake/master/CMakeLists.txt
# can't be in external_openvdb because of how the includes are setup.
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ &&
${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
add_dependencies(openvdb external_tbb external_boost external_ilmbase external_openexr external_zlib external_blosc)

View File

@@ -0,0 +1,210 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
Message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
ELSE(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
ENDIF(BUILD_MODE STREQUAL "Debug")
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
message("LIBDIR = ${LIBDIR}")
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
# TODO FIXME highly MSVC specific
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
set(OSX_SDK_VERSION 10.12)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
endif()
set(DEFAULT_CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
else()
set(ZLIB_LIBRARY libz${LIBEXT})
endif()
if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_orc
URL ${ORC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${ORC_HASH}
PREFIX ${BUILD_DIR}/orc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/orc --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make install
INSTALL_DIR ${LIBDIR}/orc
)
if(MSVC)
set_target_properties(external_orc PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,87 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath-2_2.lib^^${LIBDIR}/ilmbase/lib/Half.lib^^${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib^^${LIBDIR}/ilmbase/lib/Iex-2_2.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DOSL_BUILD_CPP11=ON
-DUSE_LLVM_BITCODE=OFF
${OSL_SIMD_FLAGS}
)
ExternalProject_Add(external_osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(external_osl external_boost ll external_clang external_ilmbase external_openexr external_zlib external_flexbison external_openimageio)

View File

@@ -0,0 +1,41 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PNG_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
)
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(external_png external_zlib)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -0,0 +1,45 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(PTHREAD_XCFLAGS /MD)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XCFLAGS=${PTHREAD_XCFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA512=${PTHREADS_SHA512}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
INSTALL_DIR ${LIBDIR}/pthreads
)
endif()

View File

@@ -0,0 +1,138 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
endif()
if(WIN32)
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff &&
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE} -k ${PYTHON_COMPILER_STRING}
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
)
Message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
Message("POutput = ${PYTHON_OUTPUTDIR}")
else()
if(APPLE)
# we need to manually add homebrew headers to get ssl module building
set(PYTHON_CFLAGS "-I/usr/local/opt/openssl/include -I${OSX_SYSROOT}/usr/include ${PLATFORM_CFLAGS}")
set(PYTHON_LDFLAGS "-L/usr/local/opt/openssl/lib ${PLATFORM_LDFLAGS}")
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export CFLAGS=${PYTHON_CFLAGS} && export LDFLAGS=${PYTHON_LDFLAGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_apple.diff)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
endif()
if(MSVC)
add_custom_command(
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
if(MSVC12)
set(PYTHON_DISTUTIL_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/run/lib/distutils < ${PATCH_DIR}/python_runtime_vc2013.diff)
else()
set(PYTHON_DISTUTIL_PATCH echo "No patch needed")
endif()
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
COMMAND ${PYTHON_DISTUTIL_PATCH}
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
endif(MSVC)

View File

@@ -0,0 +1,38 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
)
else()
set(HARVEST_CMD echo .)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
)
add_dependencies(external_python_site_packages Make_Python_Environment)

View File

@@ -0,0 +1,45 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SCHROEDINGER_EXTRA_FLAGS "CFLAGS=-g -I./ -I${LIBDIR}/orc/include/orc-0.4" "LDFLAGS=-Wl,--as-needed -static-libgcc -L${LIBDIR}/orc/lib" ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a ORCC=${LIBDIR}/orc/bin/orcc.exe)
else()
set(SCHROEDINGER_CFLAGS "${PLATFORM_CFLAGS} -I./ -I${LIBDIR}/orc/include/orc-0.4")
set(SCHROEDINGER_LDFLAGS "${PLATFORM_LDFLAGS} -L${LIBDIR}/orc/lib")
set(SCHROEDINGER_EXTRA_FLAGS CFLAGS=${SCHROEDINGER_CFLAGS} LDFLAGS=${SCHROEDINGER_LDFLAGS} ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORCC=${LIBDIR}/orc/bin/orcc) # ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a
endif()
ExternalProject_Add(external_schroedinger
URL ${SCHROEDINGER_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SCHROEDINGER_HASH}
PREFIX ${BUILD_DIR}/schroedinger
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/schroedinger/src/external_schroedinger < ${PATCH_DIR}/schroedinger.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/schroedinger --disable-shared --enable-static ${SCHROEDINGER_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make install
INSTALL_DIR ${LIBDIR}/schroedinger
)
add_dependencies(external_schroedinger external_orc)
if(MSVC)
set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,39 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)

View File

@@ -0,0 +1,219 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw32 Builds
####################################################################################################################
# This installs mingw32+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z" "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/mingw32env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win32/nasm-2.12.01-win32.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -0,0 +1,219 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw64 Builds
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw64")
# download ming64
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z" "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw64
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/mingw64env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z"))
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
endif()
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
endif()
message("checking x86_64-w64-mingw32-strings.exe")
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
endif()
message("checking x86_64-w64-mingw32-ar.exe")
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
endif()
message("checking x86_64-w64-mingw32-strip.exe")
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
endif()
message("checking x86_64-w64-mingw32-ranlib.exe")
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -0,0 +1,55 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(APPLE)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(external_sndfile external_ogg external_vorbis)
if(UNIX)
add_dependencies(external_sndfile external_flac)
endif()

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
)

View File

@@ -0,0 +1,36 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=Off
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2010/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(external_theora external_vorbis external_ogg)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
)
ExternalProject_Add(external_tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(external_tiff external_zlib)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -0,0 +1,250 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ZLIB_VERSION 1.2.8)
set(ZLIB_URI https://netcologne.dl.sourceforge.net/project/libpng/zlib/${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 44d667c142d7cda120332623eab69f40)
set(OPENAL_VERSION 1.17.2)
set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 1764e0d8fec499589b47ebc724e0913d)
set(PNG_VERSION 1.6.21)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.gz)
set(PNG_HASH aca36ec8e0a3b406a5912243bc243717)
set(JPEG_VERSION 1.4.2)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH f9804884c1c41eb7f4febb9353a2cb27)
set(BOOST_VERSION 1.60.0)
set(BOOST_VERSION_NODOTS 1_60_0)
set(BOOST_URI http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_NODOTS}.tar.bz2/download)
set(BOOST_MD5 65a840e1a0b13a558ff19eeb2c4f0cbe)
set(BLOSC_VERSION 1.7.1)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.zip)
set(BLOSC_HASH ff5cc729a5a25934ef714217218eed26)
set(PTHREADS_VERSION 2-9-1)
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551)
set(ILMBASE_VERSION 2.2.0)
set(ILMBASE_URI http://download.savannah.nongnu.org/releases/openexr/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH b540db502c5fa42078249f43d18a4652)
set(OPENEXR_VERSION 2.2.0)
set(OPENEXR_URI http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz)
set(OPENEXR_HASH b64e931c82aa3790329c21418373db4e)
set(FREETYPE_VERSION 263)
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/ft${FREETYPE_VERSION}.zip)
set(FREETYPE_HASH 0db2a43301572e5c2b4a0864f237aeeb)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(HDF5_VERSION 1.8.17)
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
set(ALEMBIC_VERSION 1.7.1)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.zip)
set(ALEMBIC_MD5 cf7705055501d5ea0cb8256866496f79)
## hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
#latest uid in git as of 2016-04-01
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
#latest uid in git as of 2016-04-01
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_1_1)
set(OPENSUBDIV_Hash 25a9a6a94136b0eb85ce69e9c8cb6ab3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.zip)
set(SDL_VERSION 2.0.4)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 44fc4a023349933e7f5d7a582f7b886e)
set(OPENCOLLADA_VERSION v1.6.51)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH 23db5087faed4bc4cc1dfe456c0d4701)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c7f552300f669ed69ca0b6cf5a70843.zip)
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
set(LLVM_VERSION 3.4.2)
set(LLVM_URI http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
set(CLANG_URI http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
set(CLANG_HASH 87945973b7c73038871c5f849a818588)
set(OPENIMAGEIO_VERSION 1.7.15)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.zip)
set(OPENIMAGEIO_HASH_178 e156e3669af0e1373142ab5e8f13de66)
set(OPENIMAGEIO_HASH_179 4121cb0e0433bda6a7ef32c8628a149f)
set(OPENIMAGEIO_HASH_1713 42a662775b834161ba88c6abdb299360)
set(OPENIMAGEIO_HASH_1715 e2ece0f62c013d64c478f82265988b0b)
set(OPENIMAGEIO_HASH ${OPENIMAGEIO_HASH_1715})
set(TIFF_VERSION 4.0.6)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH d1d2e940dea0b5ad435f21f03d96dd72)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
set(OSL_VERSION 1.7.5)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.zip)
set(OSL_HASH 6924dd5d453159e7b6eb106a08c358cf)
set(PYTHON_VERSION 3.6.2)
set(PYTHON_SHORT_VERSION 3.6)
set(PYTHON_SHORT_VERSION_NO_DOTS 36)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 2c68846471994897278364fc18730dd9)
set(TBB_VERSION 44_20160128)
set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
set(OPENVDB_VERSION 3.1.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
set(IDNA_VERSION 2.6)
set(CHARDET_VERSION 3.0.2)
set(URLLIB3_VERSION 1.22)
set(CERTIFI_VERSION 2017.7.27.1)
set(REQUESTS_VERSION 2.18.4)
set(NUMPY_VERSION v1.13.1)
set(NUMPY_SHORT_VERSION 1.13)
set(NUMPY_URI https://pypi.python.org/packages/c0/3a/40967d9f5675fbb097ffec170f59c2ba19fc96373e73ad47c2cae9a30aed/numpy-1.13.1.zip)
set(NUMPY_HASH 2c3c0f4edf720c3a7b525dacc825b9ae)
set(LAME_VERSION 3.99.5)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.99/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 84835b313d4a8b68f5349816d33e07ce)
set(OGG_VERSION 1.3.2)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692)
set(VORBIS_VERSION 1.3.5)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.1)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c)
set(VPX_VERSION 1.5.0)
set(VPX_URI http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-${VPX_VERSION}.tar.bz2)
set(VPX_HASH 306d67908625675f8e188d37a81fbfafdf5068b09d9aa52702b6fbe601c76797)
set(ORC_VERSION 0.4.25)
set(ORC_URI https://gstreamer.freedesktop.org/src/orc/orc-${ORC_VERSION}.tar.xz)
set(ORC_HASH c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1)
set(SCHROEDINGER_VERSION 1.0.11)
set(SCHROEDINGER_URI https://download.videolan.org/contrib/schroedinger/schroedinger-${SCHROEDINGER_VERSION}.tar.gz)
set(SCHROEDINGER_HASH 1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20160401-2245-stable.tar.bz2)
set(X264_HASH 1e9a7b835e80313aade53a9b6ff353e099de3856bf5f30a4d8dfc91281f786f5)
set(XVIDCORE_VERSION 1.3.4)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f)
#this has to be in sync with the version in blenders /extern folder
set(OPENJPEG_VERSION 1.5.2)
set(OPENJPEG_SHORT_VERSION 1.5)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/version.${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d)
set(FAAD_VERSION 2-2.7)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.bz2)
set(FAAD_HASH 4c332fa23febc0e4648064685a3d4332)
set(FFMPEG_VERSION 3.2.1)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH cede174178e61f882844f5870c35ce72)
set(FFTW_VERSION 3.3.4)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 2edab8c06b24feeb3b82bbb3ebf3e7b3)
set(ICONV_VERSION 1.14)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH e34509b1623cec449dfeb73d7ce9c6c6)
set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
#set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
set(WEBP_VERSION 0.5.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH 3d7db92ebba5b4f679413d25c6040881)
set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
set(JEMALLOC_VERSION 5.0.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.4)
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)

View File

@@ -0,0 +1,38 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(external_vorbis external_ogg)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,60 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc)
endif()
else()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,50 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
set(WEBP_EXTRA_ARGS
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
else()
set(WEBP_BUILD_DIR)
endif()
ExternalProject_Add(external_webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp-build/${WEBP_BUILD_DIR}${LIBPREFIX}webp${LIBEXT} ${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/decode.h ${LIBDIR}/webp/include/webp/decode.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/encode.h ${LIBDIR}/webp/include/webp/encode.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/demux.h ${LIBDIR}/webp/include/webp/demux.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/extras.h ${LIBDIR}/webp/include/webp/extras.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/format_constants.h ${LIBDIR}/webp/include/webp/format_constants.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux.h ${LIBDIR}/webp/include/webp/mux.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux_types.h ${LIBDIR}/webp/include/webp/mux_types.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/types.h ${LIBDIR}/webp/include/webp/types.h
INSTALL_DIR ${LIBDIR}/webp
)

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,36 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
)

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,33 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
DEPENDEES install
)
endif()

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e09c57..26565ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,7 +116,7 @@ IF (NOT ${ALEMBIC_LIB_USES_TR1} AND NOT ${ALEMBIC_LIB_USES_BOOST})
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF (COMPILER_SUPPORTS_CXX1X)
+ IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSEIF (COMPILER_SUPPORTS_CXX0X)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
--- a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
+++ b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
@@ -47,7 +47,18 @@
#define COMPARE_EXCHANGE( V, COMP, EXCH ) V.compare_exchange_weak( COMP, EXCH, std::memory_order_seq_cst, std::memory_order_seq_cst )
// Windows
#elif defined( _MSC_VER )
-#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExhange64( &V, EXCH, COMP ) == COMP
+#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExchange64( &V, EXCH, COMP ) == COMP
+int ffsll(long long value)
+{
+ if (!value)
+ return 0;
+
+ for (int bit = 0; bit < 63; bit++)
+ {
+ if (value & (1 << bit))
+ return bit + 1;
+ }
+}
// gcc 4.8 and above not using C++11
#elif defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8
#define COMPARE_EXCHANGE( V, COMP, EXCH ) __atomic_compare_exchange_n( &V, &COMP, EXCH, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST )

View File

@@ -0,0 +1,33 @@
diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
--- src/blosc/CMakeLists.txt 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
@@ -61,6 +61,8 @@
set(SOURCES ${SOURCES} win32/pthread.c)
else(NOT Threads_FOUND)
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
+ set(LIBS ${LIBS} ${PTHREAD_LIBS})
+ include_directories( ${PTHREAD_INCLUDE_DIR} )
endif(NOT Threads_FOUND)
else(WIN32)
find_package(Threads REQUIRED)
diff -Naur src/blosc/blosc.c external_blosc/blosc/blosc.c
--- src/blosc/blosc.c 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/blosc.c 2017-03-03 09:01:50 -0700
@@ -49,12 +49,12 @@
#include <inttypes.h>
#endif /* _WIN32 */
-#if defined(_WIN32) && !defined(__GNUC__)
- #include "win32/pthread.h"
- #include "win32/pthread.c"
-#else
+//#if defined(_WIN32) && !defined(__GNUC__)
+// #include "win32/pthread.h"
+ //#include "win32/pthread.c"
+//#else
#include <pthread.h>
-#endif
+//#endif
/* If C11 is supported, use it's built-in aligned allocation. */
#if __STDC_VERSION__ >= 201112L

View File

@@ -0,0 +1,127 @@
--- cfe/trunk/lib/Serialization/ASTWriter.cpp
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp
@@ -56,14 +56,14 @@
using namespace clang::serialization;
template <typename T, typename Allocator>
-static StringRef bytes(const std::vector<T, Allocator> &v) {
+static StringRef data(const std::vector<T, Allocator> &v) {
if (v.empty()) return StringRef();
return StringRef(reinterpret_cast<const char*>(&v[0]),
sizeof(T) * v.size());
}
template <typename T>
-static StringRef bytes(const SmallVectorImpl<T> &v) {
+static StringRef data(const SmallVectorImpl<T> &v) {
return StringRef(reinterpret_cast<const char*>(v.data()),
sizeof(T) * v.size());
}
@@ -1385,7 +1385,7 @@
Record.push_back(INPUT_FILE_OFFSETS);
Record.push_back(InputFileOffsets.size());
Record.push_back(UserFilesNum);
- Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, bytes(InputFileOffsets));
+ Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, data(InputFileOffsets));
}
//===----------------------------------------------------------------------===//
@@ -1771,7 +1771,7 @@
Record.push_back(SOURCE_LOCATION_OFFSETS);
Record.push_back(SLocEntryOffsets.size());
Record.push_back(SourceMgr.getNextLocalOffset() - 1); // skip dummy
- Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, bytes(SLocEntryOffsets));
+ Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, data(SLocEntryOffsets));
// Write the source location entry preloads array, telling the AST
// reader which source locations entries it should load eagerly.
@@ -2087,7 +2087,7 @@
Record.push_back(MacroOffsets.size());
Record.push_back(FirstMacroID - NUM_PREDEF_MACRO_IDS);
Stream.EmitRecordWithBlob(MacroOffsetAbbrev, Record,
- bytes(MacroOffsets));
+ data(MacroOffsets));
}
void ASTWriter::WritePreprocessorDetail(PreprocessingRecord &PPRec) {
@@ -2185,7 +2185,7 @@
Record.push_back(PPD_ENTITIES_OFFSETS);
Record.push_back(FirstPreprocessorEntityID - NUM_PREDEF_PP_ENTITY_IDS);
Stream.EmitRecordWithBlob(PPEOffsetAbbrev, Record,
- bytes(PreprocessedEntityOffsets));
+ data(PreprocessedEntityOffsets));
}
}
@@ -2548,7 +2548,7 @@
Record.push_back(CXX_BASE_SPECIFIER_OFFSETS);
Record.push_back(CXXBaseSpecifiersOffsets.size());
Stream.EmitRecordWithBlob(BaseSpecifierOffsetAbbrev, Record,
- bytes(CXXBaseSpecifiersOffsets));
+ data(CXXBaseSpecifiersOffsets));
}
//===----------------------------------------------------------------------===//
@@ -2623,7 +2623,7 @@
Decls.push_back(std::make_pair((*D)->getKind(), GetDeclRef(*D)));
++NumLexicalDeclContexts;
- Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, bytes(Decls));
+ Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, data(Decls));
return Offset;
}
@@ -2642,7 +2642,7 @@
Record.push_back(TYPE_OFFSET);
Record.push_back(TypeOffsets.size());
Record.push_back(FirstTypeID - NUM_PREDEF_TYPE_IDS);
- Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, bytes(TypeOffsets));
+ Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, data(TypeOffsets));
// Write the declaration offsets array
Abbrev = new BitCodeAbbrev();
@@ -2655,7 +2655,7 @@
Record.push_back(DECL_OFFSET);
Record.push_back(DeclOffsets.size());
Record.push_back(FirstDeclID - NUM_PREDEF_DECL_IDS);
- Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, bytes(DeclOffsets));
+ Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, data(DeclOffsets));
}
void ASTWriter::WriteFileDeclIDsMap() {
@@ -2680,7 +2680,7 @@
unsigned AbbrevCode = Stream.EmitAbbrev(Abbrev);
Record.push_back(FILE_SORTED_DECLS);
Record.push_back(FileSortedIDs.size());
- Stream.EmitRecordWithBlob(AbbrevCode, Record, bytes(FileSortedIDs));
+ Stream.EmitRecordWithBlob(AbbrevCode, Record, data(FileSortedIDs));
}
void ASTWriter::WriteComments() {
@@ -2893,7 +2893,7 @@
Record.push_back(SelectorOffsets.size());
Record.push_back(FirstSelectorID - NUM_PREDEF_SELECTOR_IDS);
Stream.EmitRecordWithBlob(SelectorOffsetAbbrev, Record,
- bytes(SelectorOffsets));
+ data(SelectorOffsets));
}
}
@@ -3253,7 +3253,7 @@
Record.push_back(IdentifierOffsets.size());
Record.push_back(FirstIdentID - NUM_PREDEF_IDENT_IDS);
Stream.EmitRecordWithBlob(IdentifierOffsetAbbrev, Record,
- bytes(IdentifierOffsets));
+ data(IdentifierOffsets));
}
//===----------------------------------------------------------------------===//
@@ -4046,7 +4046,7 @@
Record.clear();
Record.push_back(TU_UPDATE_LEXICAL);
Stream.EmitRecordWithBlob(TuUpdateLexicalAbbrev, Record,
- bytes(NewGlobalDecls));
+ data(NewGlobalDecls));
// And a visible updates block for the translation unit.
Abv = new llvm::BitCodeAbbrev();

View File

@@ -0,0 +1,73 @@
# - Find BLOSC library
# Find the native BLOSC includes and library
# This module defines
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
# BLOSC is found.
# BLOSC_LIBRARIES, libraries to link against to use BLOSC.
# BLOSC_ROOT_DIR, The base directory to search for BLOSC.
# This can also be an environment variable.
# BLOSC_FOUND, If false, do not try to use BLOSC.
#
# also defined, but not for general use are
# BLOSC_LIBRARY, where to find the BLOSC library.
#=============================================================================
# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If BLOSC_ROOT_DIR was defined in the environment, use it.
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/blosc
)
FIND_PATH(BLOSC_INCLUDE_DIR
NAMES
blosc.h
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(BLOSC_LIBRARY
NAMES
blosc
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
IF(BLOSC_FOUND)
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
ELSE()
SET(BLOSC_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
BLOSC_INCLUDE_DIR
BLOSC_LIBRARY
)

View File

@@ -0,0 +1,73 @@
# - Find CPPUNIT library
# Find the native CPPUNIT includes and library
# This module defines
# CPPUNIT_INCLUDE_DIRS, where to find cppunit.h, Set when
# CPPUNIT is found.
# CPPUNIT_LIBRARIES, libraries to link against to use CPPUNIT.
# CPPUNIT_ROOT_DIR, The base directory to search for CPPUNIT.
# This can also be an environment variable.
# CPPUNIT_FOUND, If false, do not try to use CPPUNIT.
#
# also defined, but not for general use are
# CPPUNIT_LIBRARY, where to find the CPPUNIT library.
#=============================================================================
# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If CPPUNIT_ROOT_DIR was defined in the environment, use it.
IF(NOT CPPUNIT_ROOT_DIR AND NOT $ENV{CPPUNIT_ROOT_DIR} STREQUAL "")
SET(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR})
ENDIF()
SET(_cppunit_SEARCH_DIRS
${CPPUNIT_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/cppunit
)
FIND_PATH(CPPUNIT_INCLUDE_DIR
NAMES
cppunit/Test.h
HINTS
${_cppunit_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(CPPUNIT_LIBRARY
NAMES
cppunit
HINTS
${_cppunit_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG
CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR)
IF(CPPUNIT_FOUND)
SET(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY})
SET(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR})
ELSE()
SET(CPPUNIT_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
CPPUNIT_INCLUDE_DIR
CPPUNIT_LIBRARY
)

View File

@@ -0,0 +1,260 @@
# Module to find IlmBase
#
# This module will first look into the directories defined by the variables:
# - ILMBASE_HOME, ILMBASE_VERSION, ILMBASE_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom IlmBase:
# - Set the variable ILMBASE_CUSTOM to True
# - Set the variable ILMBASE_CUSTOM_LIBRARIES to a list of the libraries to
# use, e.g. "SpiImath SpiHalf SpiIlmThread SpiIex"
# - Optionally set the variable ILMBASE_CUSTOM_INCLUDE_DIR to any
# particularly weird place that the OpenEXR/*.h files may be found
# - Optionally set the variable ILMBASE_CUSTOM_LIB_DIR to any
# particularly weird place that the libraries files may be found
#
# This module defines the following variables:
#
# ILMBASE_INCLUDE_DIR - where to find half.h, IlmBaseConfig.h, etc.
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
# ILMBASE_FOUND - True if IlmBase was found.
# Other standarnd issue macros
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
include (SelectLibraryConfigurations)
if( ILMBASE_USE_STATIC_LIBS )
set( _ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments (tmp_ilmbaselibs)
set (tmp_lst
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
)
set (${varname} "${tmp_lst}")
unset (tmp_ilmbaselibs)
unset (tmp_lst)
endmacro ()
# To enforce that find_* functions do not use inadvertently existing versions
if (ILMBASE_CUSTOM)
set (ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
endif ()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${ILMBASE_FIND_OPTIONS}
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string (TOUPPER ${prefix}_${libname} tmp_prefix)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${ILMBASE_FIND_OPTIONS}
)
find_library(${tmp_prefix}_LIBRARY_DEBUG
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${ILMBASE_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations (${tmp_prefix})
list (APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list (APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced (
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset (tmp_prefix)
endmacro ()
# Encode the current state of the external variables into a string
SET_STATE_VAR (ILMBASE_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (ILMBASE_CACHED_STATE AND
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
foreach (libvar ${ILMBASE_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
# Generic search paths
set (IlmBase_generic_include_paths
${ILMBASE_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include)
set (IlmBase_generic_library_paths
${ILMBASE_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib)
# Search paths for the IlmBase files
if (ILMBASE_HOME)
if (ILMBASE_VERSION)
set (IlmBase_include_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION})
set (IlmBase_library_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION})
endif()
list (APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
set (IlmBase_library_paths
${ILMBASE_HOME}/lib
${ILMBASE_HOME}/lib64
${ILMBASE_LIB_AREA}
${IlmBase_library_paths})
endif ()
list (APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
list (APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (IlmBase
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
if (ILMBASE_INCLUDE_DIR)
# Get the version from config file, if not already set.
if (NOT ILMBASE_VERSION)
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(ILMBASE_BUILD_SPECIFICATION)
if (NOT IlmBase_FIND_QUIETLY)
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
endif ()
string(REGEX REPLACE ".*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()
endif()
endif ()
if (ILMBASE_CUSTOM)
if (NOT ILMBASE_CUSTOM_LIBRARIES)
message (FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
endif()
set (IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else ()
#elseif (${ILMBASE_VERSION} VERSION_LESS "2.1")
set (IlmBase_Libraries Half Iex Imath IlmThread)
#else ()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set (IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif ()
# Locate the IlmBase libraries
set (IlmBase_libvars "")
set (IlmBase_cachevars "")
foreach (ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB (IlmBase ${ilmbase_lib}
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
endforeach ()
# Create the list of variables that might need to be cleared
set (ILMBASE_CACHED_VARS
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
# Link with pthreads if required
if (NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
file (STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
ILMBASE_HAVE_PTHREAD
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
)
if (ILMBASE_HAVE_PTHREAD)
find_package (Threads)
if (CMAKE_USE_PTHREADS_INIT)
set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif ()
endif ()
endif ()
# Use the standard function to handle ILMBASE_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (IlmBase DEFAULT_MSG
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
if (ILMBASE_FOUND)
set (ILMBASE_LIBRARIES "")
foreach (tmplib ${IlmBase_libvars})
list (APPEND ILMBASE_LIBRARIES ${${tmplib}})
endforeach ()
list (APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
if (NOT IlmBase_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE (ILMBASE
"Found IlmBase: ${ILMBASE_LIBRARIES}"
"[${ILMBASE_INCLUDE_DIR}][${ILMBASE_LIBRARIES}][${ILMBASE_CURRENT_STATE}]"
)
endif ()
endif ()
# Restore the original find library ordering
if( ILMBASE_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
# Unset the helper variables to avoid pollution
unset (ILMBASE_CURRENT_STATE)
unset (IlmBase_include_paths)
unset (IlmBase_library_paths)
unset (IlmBase_generic_include_paths)
unset (IlmBase_generic_library_paths)
unset (IlmBase_libvars)
unset (IlmBase_cachevars)
unset (ILMBASE_PTHREADS)

View File

@@ -0,0 +1,73 @@
# - Find LOGC4PLUS library
# Find the native LOGC4PLUS includes and library
# This module defines
# LOGC4PLUS_INCLUDE_DIRS, where to find logc4plus.h, Set when
# LOGC4PLUS is found.
# LOGC4PLUS_LIBRARIES, libraries to link against to use LOGC4PLUS.
# LOGC4PLUS_ROOT_DIR, The base directory to search for LOGC4PLUS.
# This can also be an environment variable.
# LOGC4PLUS_FOUND, If false, do not try to use LOGC4PLUS.
#
# also defined, but not for general use are
# LOGC4PLUS_LIBRARY, where to find the LOGC4PLUS library.
#=============================================================================
# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If LOGC4PLUS_ROOT_DIR was defined in the environment, use it.
IF(NOT LOGC4PLUS_ROOT_DIR AND NOT $ENV{LOGC4PLUS_ROOT_DIR} STREQUAL "")
SET(LOGC4PLUS_ROOT_DIR $ENV{LOGC4PLUS_ROOT_DIR})
ENDIF()
SET(_logc4plus_SEARCH_DIRS
${LOGC4PLUS_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/logc4plus
)
FIND_PATH(LOGC4PLUS_INCLUDE_DIR
NAMES
logc4plus.h
HINTS
${_logc4plus_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(LOGC4PLUS_LIBRARY
NAMES
logc4plus
HINTS
${_logc4plus_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set LOGC4PLUS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LOGC4PLUS DEFAULT_MSG
LOGC4PLUS_LIBRARY LOGC4PLUS_INCLUDE_DIR)
IF(LOGC4PLUS_FOUND)
SET(LOGC4PLUS_LIBRARIES ${LOGC4PLUS_LIBRARY})
SET(LOGC4PLUS_INCLUDE_DIRS ${LOGC4PLUS_INCLUDE_DIR})
ELSE()
SET(LOGC4PLUS_LOGC4PLUS_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
LOGC4PLUS_INCLUDE_DIR
LOGC4PLUS_LIBRARY
)

View File

@@ -0,0 +1,244 @@
# Module to find OpenEXR.
#
# This module will first look into the directories defined by the variables:
# - OPENEXR_HOME, OPENEXR_VERSION, OPENEXR_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom OpenEXR
# - Set the variable OPENEXR_CUSTOM to True
# - Set the variable OPENEXR_CUSTOM_LIBRARY to the name of the library to
# use, e.g. "SpiIlmImf"
# - Optionally set the variable OPENEXR_CUSTOM_INCLUDE_DIR to any
# particularly weird place that the OpenEXR/*.h files may be found
# - Optionally set the variable OPENEXR_CUSTOM_LIB_DIR to any
# particularly weird place that the libraries files may be found
#
# This module defines the following variables:
#
# OPENEXR_INCLUDE_DIR - where to find ImfRgbaFile.h, OpenEXRConfig, etc.
# OPENEXR_LIBRARIES - list of libraries to link against when using OpenEXR.
# This list does NOT include the IlmBase libraries.
# These are defined by the FindIlmBase module.
# OPENEXR_FOUND - True if OpenEXR was found.
# Other standarnd issue macros
include (SelectLibraryConfigurations)
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
if( OPENEXR_USE_STATIC_LIBS )
set( _openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_lst
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
)
set (${varname} "${tmp_lst}")
unset (tmp_lst)
endmacro ()
# To enforce that find_* functions do not use inadvertently existing versions
if (OPENEXR_CUSTOM)
set (OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
endif ()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${OPENEXR_FIND_OPTIONS}
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string (TOUPPER ${prefix}_${libname} tmp_prefix)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${OPENEXR_FIND_OPTIONS}
)
find_library(${tmp_prefix}_LIBRARY_DEBUG
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${OPENEXR_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations (${tmp_prefix})
list (APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list (APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced (
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset (tmp_prefix)
endmacro ()
# Encode the current state of the external variables into a string
SET_STATE_VAR (OPENEXR_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (OPENEXR_CACHED_STATE AND
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
foreach (libvar ${OPENEXR_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
# Generic search paths
set (OpenEXR_generic_include_paths
${OPENEXR_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include)
set (OpenEXR_generic_library_paths
${OPENEXR_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib)
# Search paths for the OpenEXR files
if (OPENEXR_HOME)
set (OpenEXR_library_paths
${OPENEXR_HOME}/lib
${OPENEXR_HOME}/lib64)
if (OPENEXR_VERSION)
set (OpenEXR_include_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
list (APPEND OpenEXR_library_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib
${OPENEXR_HOME}/lib/openexr-${OPENEXR_VERSION})
endif()
list (APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
if (OPENEXR_LIB_AREA)
list (INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
endif ()
endif ()
if (ILMBASE_HOME AND OPENEXR_VERSION)
list (APPEND OpenEXR_include_paths
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
endif()
list (APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
list (APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (OpenEXR
OpenEXR/ImfArray.h OpenEXR_include_paths)
if (OPENEXR_INCLUDE_DIR)
# Get the version from config file, if not already set.
if (NOT OPENEXR_VERSION)
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(OPENEXR_BUILD_SPECIFICATION)
if (NOT OpenEXR_FIND_QUIETLY)
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
endif ()
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
endif()
endif ()
if (OPENEXR_CUSTOM)
if (NOT OPENEXR_CUSTOM_LIBRARY)
message (FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
endif()
set (OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else ()
#elseif (${OPENEXR_VERSION} VERSION_LESS "2.1")
set (OpenEXR_Library IlmImf)
#else ()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set (OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif ()
# Locate the OpenEXR library
set (OpenEXR_libvars "")
set (OpenEXR_cachevars "")
PREFIX_FIND_LIB (OpenEXR ${OpenEXR_Library}
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
# Create the list of variables that might need to be cleared
set (OPENEXR_CACHED_VARS
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
# Always link explicitly with zlib
set (OPENEXR_ZLIB ${ZLIB_LIBRARIES})
# Use the standard function to handle OPENEXR_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (OpenEXR DEFAULT_MSG
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
if (OPENEXR_FOUND)
set (OPENEXR_LIBRARIES "")
foreach (tmplib ${OpenEXR_libvars})
list (APPEND OPENEXR_LIBRARIES ${${tmplib}})
endforeach ()
list (APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
if (NOT OpenEXR_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE (OPENEXR
"Found OpenEXR: ${OPENEXR_LIBRARIES}"
"[${OPENEXR_INCLUDE_DIR}][${OPENEXR_LIBRARIES}][${OPENEXR_CURRENT_STATE}]"
)
endif ()
endif ()
# Restore the original find library ordering
if( OPENEXR_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
# Unset the helper variables to avoid pollution
unset (OPENEXR_CURRENT_STATE)
unset (OpenEXR_include_paths)
unset (OpenEXR_library_paths)
unset (OpenEXR_generic_include_paths)
unset (OpenEXR_generic_library_paths)
unset (OpenEXR_libvars)
unset (OpenEXR_cachevars)

View File

@@ -0,0 +1,73 @@
# - Find TBB library
# Find the native TBB includes and library
# This module defines
# TBB_INCLUDE_DIRS, where to find tbb.h, Set when
# TBB is found.
# TBB_LIBRARIES, libraries to link against to use TBB.
# TBB_ROOT_DIR, The base directory to search for TBB.
# This can also be an environment variable.
# TBB_FOUND, If false, do not try to use TBB.
#
# also defined, but not for general use are
# TBB_LIBRARY, where to find the TBB library.
#=============================================================================
# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If TBB_ROOT_DIR was defined in the environment, use it.
IF(NOT TBB_ROOT_DIR AND NOT $ENV{TBB_ROOT_DIR} STREQUAL "")
SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
ENDIF()
SET(_tbb_SEARCH_DIRS
${TBB_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/tbb
)
FIND_PATH(TBB_INCLUDE_DIR
NAMES
tbb/tbb.h
HINTS
${_tbb_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(TBB_LIBRARY
NAMES
tbb
HINTS
${_tbb_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set TBB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
TBB_LIBRARY TBB_INCLUDE_DIR)
IF(TBB_FOUND)
SET(TBB_LIBRARIES ${TBB_LIBRARY})
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
ELSE()
SET(TBB_TBB_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
TBB_INCLUDE_DIR
TBB_LIBRARY
)

View File

@@ -0,0 +1,82 @@
# select_library_configurations( basename )
#
# This macro takes a library base name as an argument, and will choose good
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
# basename_LIBRARY_RELEASE depending on what has been found and set. If only
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
# and basename_LIBRARY_RELEASE will be set to the release value. If only
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
#
# If the generator supports configuration types, then basename_LIBRARY and
# basename_LIBRARIES will be set with debug and optimized flags specifying the
# library to be used for the given configuration. If no build type has been set
# or the generator in use does not support configuration types, then
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
# Copyright 2005-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>.
# Utility macro to check if one variable exists while another doesn't, and set
# one that doesn't exist to the one that exists.
macro( _set_library_name basename GOOD BAD )
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
endif( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
endmacro( _set_library_name )
macro( select_library_configurations basename )
# if only the release version was found, set the debug to be the release
# version.
_set_library_name( ${basename} RELEASE DEBUG )
# if only the debug version was found, set the release value to be the
# debug value.
_set_library_name( ${basename} DEBUG RELEASE )
if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( ${basename}_LIBRARY
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
set( ${basename}_LIBRARIES
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
# If there are no configuration types or build type, just use
# the release version
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
"The ${basename} library" )
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif( ${basename}_LIBRARY )
mark_as_advanced( ${basename}_LIBRARY
${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro( select_library_configurations )

View File

@@ -0,0 +1,2 @@
cmake_minimum_required (VERSION 2.4)
add_subdirectory(build/cmake)

View File

@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.8)
project(hidapi)
set(SRC_FILES
windows/hid.c
)
set(HEADER_FILES
hidapi/hidapi.h
)
include_directories(hidapi)
add_definitions(-DHID_API_STATIC)
add_library(hidapi STATIC ${SRC_FILES} ${HEADER_FILES})
install(TARGETS hidapi DESTINATION lib)
INSTALL(FILES hidapi/hidapi.h
DESTINATION "include"
)

View File

@@ -0,0 +1,398 @@
# --------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
# --------------------------------------------------------------------------------
project(OpenVDB)
# --------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
# --------------------------------------------------------------------------------
set(CMAKE_BUILD_TYPE_INIT "Release")
# --------------------------------------------------------------------------------
# Options
option(WITH_BLOSC "Enable Blosc support for compression" OFF)
option(WITH_LOGC4PLUS "Enable logging" OFF)
option(WITH_OPENVDB_2_ABI "Enable building the library to be compability with the OpenVDB 2 ABI" OFF)
option(WITH_PRINTER "Enable building the OpenVDB print executable" OFF)
option(WITH_PYTHON "Enable building the OpenVDB python API" OFF)
option(WITH_RENDERER "Enable building the OpenVDB render executable" OFF)
option(WITH_UNITTEST "Enable building the unit tests" OFF)
option(WITH_VIEWER "Enable building the OpenVDB viewer executable" OFF)
# --------------------------------------------------------------------------------
# Find packages
#set(BOOST_LIBRARIES boost_iostreams boost_system boost_thread)
find_package(IlmBase)
find_package(OpenEXR)
find_package(TBB)
find_package(Boost)
if(WITH_BLOSC)
find_package(Blosc)
if(NOT BLOSC_FOUND)
set(WITH_BLOSC OFF)
endif()
endif()
# todo
if(WITH_VIEWER)
set(GLFW_INCLUDE_DIRS ${GLFW_INCLUDE_PATH})
set(GLFW_LIBRARY_DIRS ${GLFW_LIBRARY_PATH})
endif()
if(WITH_LOGC4PLUS)
find_package(LogC4Plus)
if(NOT LOGC4PLUS_FOUND)
set(WITH_LOGC4PLUS OFF)
endif()
endif()
# todo
if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
set(PYTHON_LIBRARY_DIRS ${PYTHON_LIBRARY_PATH})
endif()
if(WITH_UNITTEST)
find_package(CppUnit)
if(NOT CPPUNIT_FOUND)
set(WITH_UNITTEST OFF)
endif()
endif()
# --------------------------------------------------------------------------------
message (STATUS "BOOST_ROOT ${BOOST_ROOT}")
message (STATUS "Boost found ${Boost_FOUND} ")
message (STATUS "Boost version ${Boost_VERSION}")
message (STATUS "Boost include dirs ${Boost_INCLUDE_DIRS}")
message (STATUS "Boost library dirs ${Boost_LIBRARY_DIRS}")
message (STATUS "Boost libraries ${Boost_LIBRARIES}")
message (STATUS "ILMBase found ${ILMBASE_FOUND} ")
message (STATUS "ILMBase include dir ${ILMBASE_INCLUDE_DIR}")
message (STATUS "ILMBase libraries ${ILMBASE_LIBRARIES}")
message (STATUS "TBB found ${TBB_FOUND} ")
message (STATUS "TBB include dir ${TBB_INCLUDE_DIR}")
message (STATUS "TBB libraries ${TBB_LIBRARIES}")
if(MSVC)
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
endif()
set(OPENVDB_LIBRARIES ${BLOSC_LIBRARIES} ${BOOST_LIBRARIES} ${OPENEXR_LIBRARIES} ${ILMBASE_LIBRARIES} ${TBB_LIBRARIES} ${ZLIB_LIBRARY} )
include_directories(. ${CMAKE_CURRENT_SOURCE_DIR}/../ ${Boost_INCLUDE_DIRS} ${ILMBASE_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR} ${TBB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS} ${OPENEXR_LIBRARY_DIRS} ${TBB_INCLUDE_DIRS})
add_definitions(-DNOMINMAX -D__TBB_NO_IMPLICIT_LINKAGE -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB)
if(WITH_BLOSC)
add_definitions(-DOPENVDB_USE_BLOSC)
include_directories(${BLOSC_INCLUDE_DIRS})
link_directories(${BLOSC_LIBRARY_DIRS})
endif()
if(WITH_LOGC4PLUS)
add_definitions(-DOPENVDB_USE_LOG4CPLUS)
include_directories(${LOG4CPLUS_INCLUDE_DIRS})
link_directories(${LOG4CPLUS_LIBRARY_DIRS})
endif()
if(WITH_OPENVDB_2_ABI)
add_definitions(-DOPENVDB_2_ABI_COMPATIBLE)
endif()
# todo
if(WITH_OPENVDB_USE_GLFW_3)
add_definitions(-DOPENVDB_USE_GLFW_3)
endif()
if(WITH_UNITTEST)
include_directories(${CPPUNIT_INCLUDE_DIRS})
link_directories(${CPPUNIT_LIBRARY_DIRS})
endif()
# --------------------------------------------------------------------------------
set(SRC_FILES
openvdb/openvdb.cc
openvdb/io/Compression.cc
openvdb/io/File.cc
openvdb/io/Queue.cc
openvdb/io/Stream.cc
openvdb/io/TempFile.cc
openvdb/io/GridDescriptor.cc
openvdb/io/Archive.cc
openvdb/metadata/MetaMap.cc
openvdb/metadata/Metadata.cc
openvdb/math/Maps.cc
openvdb/math/Transform.cc
openvdb/math/QuantizedUnitVec.cc
openvdb/math/Proximity.cc
openvdb/Grid.cc
openvdb/util/Formats.cc
openvdb/util/Util.cc
)
set(HEADER_FILES
openvdb/openvdb.h
openvdb/version.h
openvdb/PlatformConfig.h
openvdb/Metadata.h
openvdb/Exceptions.h
openvdb/Grid.h
openvdb/Types.h
openvdb/Platform.h
openvdb/tree/ValueAccessor.h
openvdb/tree/NodeUnion.h
openvdb/tree/Tree.h
openvdb/tree/Iterator.h
openvdb/tree/LeafNodeBool.h
openvdb/tree/TreeIterator.h
openvdb/tree/LeafNode.h
openvdb/tree/NodeManager.h
openvdb/tree/LeafManager.h
openvdb/tree/InternalNode.h
openvdb/tree/RootNode.h
openvdb/tools/PointScatter.h
openvdb/tools/VolumeAdvect.h
openvdb/tools/LevelSetTracker.h
openvdb/tools/Composite.h
openvdb/tools/Morphology.h
openvdb/tools/ValueTransformer.h
openvdb/tools/ChangeBackground.h
openvdb/tools/GridTransformer.h
openvdb/tools/Prune.h
openvdb/tools/LevelSetUtil.h
openvdb/tools/VolumeToSpheres.h
openvdb/tools/LevelSetAdvect.h
openvdb/tools/Statistics.h
openvdb/tools/LevelSetMeasure.h
openvdb/tools/VectorTransformer.h
openvdb/tools/RayIntersector.h
openvdb/tools/PointPartitioner.h
openvdb/tools/Interpolation.h
openvdb/tools/VelocityFields.h
openvdb/tools/PointIndexGrid.h
openvdb/tools/LevelSetRebuild.h
openvdb/tools/Clip.h
openvdb/tools/SignedFloodFill.h
openvdb/tools/MeshToVolume.h
openvdb/tools/Dense.h
openvdb/tools/Filter.h
openvdb/tools/RayTracer.h
openvdb/tools/Diagnostics.h
openvdb/tools/VolumeToMesh.h
openvdb/tools/PoissonSolver.h
openvdb/tools/LevelSetFracture.h
openvdb/tools/GridOperators.h
openvdb/tools/DenseSparseTools.h
openvdb/tools/ParticlesToLevelSet.h
openvdb/tools/LevelSetSphere.h
openvdb/tools/LevelSetMorph.h
openvdb/tools/LevelSetFilter.h
openvdb/tools/PointAdvect.h
openvdb/io/Queue.h
openvdb/io/TempFile.h
openvdb/io/Stream.h
openvdb/io/GridDescriptor.h
openvdb/io/Archive.h
openvdb/io/io.h
openvdb/io/Compression.h
openvdb/io/File.h
openvdb/metadata/StringMetadata.h
openvdb/metadata/MetaMap.h
openvdb/metadata/Metadata.h
openvdb/math/DDA.h
openvdb/math/Vec2.h
openvdb/math/FiniteDifference.h
openvdb/math/Stencils.h
openvdb/math/BBox.h
openvdb/math/Mat3.h
openvdb/math/Mat.h
openvdb/math/Proximity.h
openvdb/math/Ray.h
openvdb/math/ConjGradient.h
openvdb/math/Quat.h
openvdb/math/Vec3.h
openvdb/math/Vec4.h
openvdb/math/QuantizedUnitVec.h
openvdb/math/Coord.h
openvdb/math/Operators.h
openvdb/math/Stats.h
openvdb/math/Math.h
openvdb/math/Tuple.h
openvdb/math/LegacyFrustum.h
openvdb/math/Mat4.h
openvdb/math/Maps.h
openvdb/math/Transform.h
openvdb/util/PagedArray.h
openvdb/util/CpuTimer.h
openvdb/util/Formats.h
openvdb/util/NullInterrupter.h
openvdb/util/Util.h
openvdb/util/Name.h
openvdb/util/MapsUtil.h
openvdb/util/NodeMasks.h
openvdb/util/logging.h
)
add_library(openvdb STATIC ${SRC_FILES} ${HEADER_FILES})
# --------------------------------------------------------------------------------
target_link_libraries(openvdb ${OPENVDB_LIBRARIES})
set(OPENVDB_VERSION_MAJOR 3)
set(OPENVDB_VERSION_MINOR 1)
set(OPENVDB_VERSION_PATCH 0)
set(OPENVDB_VERSION_STRING ${OPENVDB_VERSION_MAJOR}.${OPENVDB_VERSION_MINOR}.${OPENVDB_VERSION_PATCH})
set_target_properties(openvdb PROPERTIES VERSION ${OPENVDB_VERSION_STRING} SOVERSION ${OPENVDB_VERSION_MAJOR})
install(TARGETS openvdb DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include COMPONENT Development FILES_MATCHING PATTERN "*.h"
PATTERN ".git" EXCLUDE PATTERN "build" EXCLUDE PATTERN "cmake" EXCLUDE)
# --------------------------------------------------------------------------------
if(WITH_PRINTER)
set(PRINT_SRC
openvdb/cmd/openvdb_print/main.cc
)
add_executable(vdb_print ${PRINT_SRC})
target_link_libraries(vdb_print openvdb)
install(TARGETS vdb_print RUNTIME DESTINATION bin)
endif()
if(WITH_RENDER)
set(RENDER_SRC
openvdb/cmd/openvdb_render/main.cc
)
add_executable(vdb_render ${RENDER_SRC})
target_link_libraries(vdb_render openvdb)
install(TARGETS vdb_render RUNTIME DESTINATION bin)
endif()
# todo
if(WITH_VIEWER)
set(VIEWER_SRC
openvdb/viewer/Camera.cc
openvdb/viewer/ClipBox.cc
openvdb/viewer/Font.cc
openvdb/viewer/RenderModules.cc
openvdb/viewer/Viewer.cc
openvdb/viewer/Camera.h
openvdb/viewer/ClipBox.h
openvdb/viewer/Font.h
openvdb/viewer/RenderModules.h
openvdb/viewer/Viewer.h
openvdb/cmd/openvdb_viewer/main.cc
)
include_directories(${GLFW_INCLUDE_DIRS})
link_directories(${GLFW_LIBRARY_DIRS})
add_executable(vdb_viewer ${VIEWER_SRC})
target_link_libraries(vdb_viewer openvdb)
install(TARGETS vdb_viewer RUNTIME DESTINATION bin)
endif()
# todo
if(WITH_PYTHON)
# add_library(pyopenvdb SHARED )
endif()
set(UNITTEST_SRC
openvdb/unittest/main.cc
openvdb/unittest/TestBBox.cc
openvdb/unittest/TestConjGradient.cc
openvdb/unittest/TestCoord.cc
openvdb/unittest/TestCpt.cc
openvdb/unittest/TestCurl.cc
openvdb/unittest/TestDense.cc
openvdb/unittest/TestDenseSparseTools.cc
openvdb/unittest/TestDiagnostics.cc
openvdb/unittest/TestDivergence.cc
openvdb/unittest/TestDoubleMetadata.cc
openvdb/unittest/TestExceptions.cc
openvdb/unittest/TestFile.cc
openvdb/unittest/TestFloatMetadata.cc
openvdb/unittest/TestGradient.cc
openvdb/unittest/TestGrid.cc
openvdb/unittest/TestGridBbox.cc
openvdb/unittest/TestGridDescriptor.cc
openvdb/unittest/TestGridIO.cc
openvdb/unittest/TestGridTransformer.cc
openvdb/unittest/TestInit.cc
openvdb/unittest/TestInt32Metadata.cc
openvdb/unittest/TestInt64Metadata.cc
openvdb/unittest/TestInternalOrigin.cc
openvdb/unittest/TestLaplacian.cc
openvdb/unittest/TestLeaf.cc
openvdb/unittest/TestLeafBool.cc
openvdb/unittest/TestLeafIO.cc
openvdb/unittest/TestLeafOrigin.cc
openvdb/unittest/TestLevelSetRayIntersector.cc
openvdb/unittest/TestLevelSetUtil.cc
openvdb/unittest/TestLinearInterp.cc
openvdb/unittest/TestMaps.cc
openvdb/unittest/TestMat4Metadata.cc
openvdb/unittest/TestMath.cc
openvdb/unittest/TestMeanCurvature.cc
openvdb/unittest/TestMeshToVolume.cc
openvdb/unittest/TestMetadata.cc
openvdb/unittest/TestMetadataIO.cc
openvdb/unittest/TestMetaMap.cc
openvdb/unittest/TestName.cc
openvdb/unittest/TestNodeIterator.cc
openvdb/unittest/TestNodeMask.cc
openvdb/unittest/TestParticlesToLevelSet.cc
openvdb/unittest/TestPointIndexGrid.cc
openvdb/unittest/TestPointPartitioner.cc
openvdb/unittest/TestPoissonSolver.cc
openvdb/unittest/TestPrePostAPI.cc
openvdb/unittest/TestQuadraticInterp.cc
openvdb/unittest/TestQuantizedUnitVec.cc
openvdb/unittest/TestQuat.cc
openvdb/unittest/TestRay.cc
openvdb/unittest/TestStats.cc
openvdb/unittest/TestStream.cc
openvdb/unittest/TestStringMetadata.cc
openvdb/unittest/TestTools.cc
openvdb/unittest/TestTransform.cc
openvdb/unittest/TestTree.cc
openvdb/unittest/TestTreeCombine.cc
openvdb/unittest/TestTreeGetSetValues.cc
openvdb/unittest/TestTreeIterators.cc
openvdb/unittest/TestTreeVisitor.cc
openvdb/unittest/TestUtil.cc
openvdb/unittest/TestValueAccessor.cc
openvdb/unittest/TestVec2Metadata.cc
openvdb/unittest/TestVec3Metadata.cc
openvdb/unittest/TestVolumeRayIntersector.cc
openvdb/unittest/TestVolumeToMesh.cc
)
# todo
if(WITH_UNITTEST)
add_executable(test ${UNITTEST_SRC} ${HEADER_FILES})
target_link_libraries(test openvdb ${CPPUNIT_LIBRARIES})
endif()

View File

@@ -0,0 +1,196 @@
cmake_minimum_required (VERSION 2.8)
project(tbb CXX)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
include_directories(include src src/rml/include )
option(TBB_BUILD_SHARED "Build TBB shared library" ON)
option(TBB_BUILD_STATIC "Build TBB static library" ON)
option(TBB_BUILD_TBBMALLOC "Build TBB malloc library" ON)
option(TBB_BUILD_TBBMALLOC_PROXY "Build TBB malloc proxy library" ON)
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
file(GLOB tbb_src "${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/old/*.cpp")
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/rml/client/rml_tbb.cpp)
file(GLOB to_remove "${CMAKE_CURRENT_SOURCE_DIR}/src/old/test*.cpp")
list(REMOVE_ITEM tbb_src ${to_remove})
set(tbbmalloc_static_src
src/tbbmalloc/backend.cpp
src/tbbmalloc/large_objects.cpp
src/tbbmalloc/backref.cpp
src/tbbmalloc/tbbmalloc.cpp
src/tbbmalloc/frontend.cpp
src/tbb/itt_notify.cpp)
set(tbbmalloc_src ${tbbmalloc_static_src})
set(tbbmalloc_proxy_src
src/tbbmalloc/proxy.cpp
src/tbbmalloc/tbb_function_replacement.cpp)
if (NOT APPLE)
add_definitions(-DDO_ITT_NOTIFY)
else()
# Disable annoying "has no symbols" warnings
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
if (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DUSE_PTHREAD")
if(NOT CMAKE_CXX_FLAGS MATCHES "-mno-rtm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mrtm")
endif()
if (APPLE)
set(ARCH_PREFIX "mac")
else()
set(ARCH_PREFIX "lin")
endif()
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH_PREFIX "${ARCH_PREFIX}64")
else()
set(ARCH_PREFIX "${ARCH_PREFIX}32")
endif()
set(ENABLE_RTTI "-frtti -fexceptions ")
set(DISABLE_RTTI "-fno-rtti -fno-exceptions ")
elseif(WIN32)
cmake_minimum_required (VERSION 3.1)
enable_language(ASM_MASM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS- /Zc:wchar_t /Zc:forScope /DUSE_WINTHREAD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0600 /volatile:iso")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4800 /wd4146 /wd4244 /wd4018")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND tbb_src src/tbb/intel64-masm/atomic_support.asm
src/tbb/intel64-masm/itsx.asm src/tbb/intel64-masm/intel64_misc.asm)
list(APPEND tbbmalloc_src src/tbb/intel64-masm/atomic_support.asm)
set(CMAKE_ASM_MASM_FLAGS "/DEM64T=1")
set(ARCH_PREFIX "win64")
else()
list(APPEND tbb_src src/tbb/ia32-masm/atomic_support.asm
src/tbb/ia32-masm/itsx.asm src/tbb/ia32-masm/lock_byte.asm)
list(APPEND tbbmalloc_src src/tbb/ia32-masm/atomic_support.asm)
set(ARCH_PREFIX "win32")
endif()
set(ENABLE_RTTI "/EHsc /GR ")
set(DISABLE_RTTI "/EHs- /GR- ")
endif()
# Linker export definitions
if (WIN32)
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbb.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
COMMENT "Preprocessing tbb.def"
)
add_custom_command(OUTPUT tbbmalloc.def
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbbmalloc.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
COMMENT "Preprocessing tbb.def"
)
add_custom_command(OUTPUT tbbmalloc.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbbmalloc.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
endif()
add_custom_target(tbb_def_files DEPENDS tbb.def tbbmalloc.def)
# TBB library
if (TBB_BUILD_STATIC)
add_library(tbb_static STATIC ${tbb_src})
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_SOURCE_DIRECTLY_INCLUDED=1")
set_property(TARGET tbb_static APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
install(TARGETS tbb_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbb SHARED ${tbb_src})
set_property(TARGET tbb APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
add_dependencies(tbb tbb_def_files)
if (APPLE)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(UNIX)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
endif()
install(TARGETS tbb DESTINATION lib)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
# Quench a warning on GCC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/governor.cpp COMPILE_FLAGS "-Wno-missing-field-initializers ")
elseif(MSVC)
# Quench a warning on MSVC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/scheduler.cpp COMPILE_FLAGS "/wd4458 ")
endif()
if(TBB_BUILD_TBBMALLOC)
# TBB malloc library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_static STATIC ${tbbmalloc_static_src})
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
install(TARGETS tbbmalloc_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc SHARED ${tbbmalloc_src})
set_property(TARGET tbbmalloc APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
add_dependencies(tbbmalloc tbb_def_files)
if (APPLE)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
elseif(UNIX)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
elseif(WIN32)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
endif()
install(TARGETS tbbmalloc DESTINATION lib)
endif()
endif()
if(TBB_BUILD_TBBMALLOC_PROXY)
# TBB malloc proxy library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_proxy_static STATIC ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy_static tbbmalloc)
install(TARGETS tbbmalloc_proxy_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()
install(DIRECTORY include/tbb DESTINATION include)

View File

@@ -0,0 +1,26 @@
--- CmakeLists.txt.orig 2015-12-31 03:46:41 -0700
+++ CMakeLists.txt 2016-04-01 13:28:33 -0600
@@ -22,3 +22,10 @@
add_executable(testcuew cuewTest/cuewTest.c include/cuew.h)
target_link_libraries(testcuew cuew ${CMAKE_DL_LIBS})
+
+install(TARGETS cuew
+ LIBRARY DESTINATION lib COMPONENT libraries
+ ARCHIVE DESTINATION lib/static COMPONENT libraries)
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/cuew.h
+ DESTINATION include/)
\ No newline at end of file
--- src/cuew.c 2016-04-01 13:41:43 -0600
+++ src/cuew.c 2016-04-01 13:41:11 -0600
@@ -15,7 +15,9 @@
*/
#ifdef _MSC_VER
+#if _MSC_VER < 1900
# define snprintf _snprintf
+#endif
# define popen _popen
# define pclose _pclose
# define _CRT_SECURE_NO_WARNINGS

View File

@@ -0,0 +1,11 @@
--- _msvccompiler.py.orig 2017-01-17 00:57:48 -0700
+++ _msvccompiler.py 2017-05-20 09:47:26 -0600
@@ -237,7 +237,7 @@
ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
ldflags_debug = [
- '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
+ '/nologo', '/INCREMENTAL:NO', '/LTCG'
]
self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']

View File

@@ -0,0 +1,32 @@
--- libavutil/common.h 2016-02-14 19:29:42 -0700
+++ libavutil/common.h 2016-03-30 09:50:29 -0600
@@ -99,6 +99,11 @@
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
+//msvc helper
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
/* misc math functions */
#ifdef HAVE_AV_CONFIG_H
--- configure 2016-11-26 03:12:05.000000000 +0100
+++ configure 2017-04-05 03:24:35.000000000 +0200
@@ -1899,7 +1899,6 @@
access
aligned_malloc
arc4random
- clock_gettime
closesocket
CommandLineToArgvW
CoTaskMemFree
@@ -5494,7 +5493,6 @@
check_func access
check_func_headers stdlib.h arc4random
-check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func fcntl
check_func fork
check_func gethrtime

View File

@@ -0,0 +1,25 @@
--- config.h.in 2014-03-04 11:44:58 -0700
+++ config.h.in 2016-03-30 11:42:49 -0600
@@ -142,9 +142,6 @@
/* Define to 1 if you have the `gethrtime' function. */
#undef HAVE_GETHRTIME
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
/* Define to 1 if hrtime_t is defined in <sys/time.h> */
#undef HAVE_HRTIME_T
--- kernel/assert.c 2014-03-04 11:41:03 -0700
+++ kernel/assert.c 2016-04-01 09:41:05 -0600
@@ -24,8 +24,10 @@
void X(assertion_failed)(const char *s, int line, const char *file)
{
+#if 0
fflush(stdout);
fprintf(stderr, "fftw: %s:%d: assertion failed: %s\n", file, line, s);
+#endif
#ifdef HAVE_ABORT
abort();
#else

View File

@@ -0,0 +1,11 @@
--- UserMacros.cmake
+++ UserMacros.cmake
@@ -16,6 +16,8 @@
if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
endif (BUILD_USER_DEFINED_LIBS)
+
+include(Config/cmake/usermacros/windows_mt.cmake)
#-----------------------------------------------------------------------------
#------------------- E X A M P L E E N D -----------------------------------
#-----------------------------------------------------------------------------

View File

@@ -0,0 +1,15 @@
--- hidapi/hidapi.h 2011-10-25 20:58:16 -0600
+++ hidapi/hidapi.h 2016-11-01 12:05:58 -0600
@@ -30,7 +30,11 @@
#include <wchar.h>
#ifdef _WIN32
- #define HID_API_EXPORT __declspec(dllexport)
+ #ifdef HID_API_STATIC
+ #define HID_API_EXPORT
+ #else
+ #define HID_API_EXPORT __declspec(dllexport)
+ #endif
#define HID_API_CALL
#else
#define HID_API_EXPORT /**< API export macro */

View File

@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
set(LLVM_VERSION_MINOR 4)
if (NOT PACKAGE_VERSION)
- set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
endif()
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)

View File

@@ -0,0 +1,12 @@
--- a/src/shaders/CMakeLists.txt
+++ b/src/shaders/CMakeLists.txt
@@ -27,7 +27,7 @@ macro (osl_compile oslsrc objlist headers)
message (STATUS "cmd: ${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc ${oslsrc}")
endif ()
add_custom_command (OUTPUT ${osofile}
- COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" ${oslsrc}
+ COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" "-o" ${osofile} ${oslsrc}
MAIN_DEPENDENCY ${oslsrc}
DEPENDS ${${headers}} ${oslsrc} "${CMAKE_CURRENT_BINARY_DIR}/stdosl.h" "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

View File

@@ -0,0 +1,10 @@
--- frontend/main.c 2008-09-22 11:55:09 -0600
+++ frontend/main.c 2016-04-06 15:20:36 -0600
@@ -31,7 +31,6 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#define off_t __int64
#else
#include <time.h>
#endif

View File

@@ -0,0 +1,111 @@
Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp 2014-04-11 23:04:44.000000000 +0200
+++ lib/Target/X86/X86ISelLowering.cpp (working copy)
@@ -15493,12 +15493,36 @@
// non-trivial part is impdef of ESP.
if (Subtarget->isTargetWin64()) {
+ const char *StackProbeSymbol =
+ Subtarget->isTargetCygMing() ? "___chkstk" : "__chkstk";
+
+ MachineInstrBuilder MIB;
+
+ if (getTargetMachine().getCodeModel() == CodeModel::Large) {
+ // For large code model we need to do indirect call to __chkstk.
+
+ // R11 will be used to contain the address of __chkstk.
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
+ // so there is no need to save and restore it.
+ BuildMI(*BB, MI, DL, TII->get(X86::MOV64ri), X86::R11)
+ .addExternalSymbol(StackProbeSymbol);
+ // Create a call to __chkstk function which address contained in R11.
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::CALL64r))
+ .addReg(X86::R11, RegState::Kill);
+
+ } else {
+
+ // For non-large code model we can do direct call to __chkstk.
+
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
+ .addExternalSymbol(StackProbeSymbol);
+ }
+
if (Subtarget->isTargetCygMing()) {
// ___chkstk(Mingw64):
// Clobbers R10, R11, RAX and EFLAGS.
// Updates RSP.
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
- .addExternalSymbol("___chkstk")
+ MIB
.addReg(X86::RAX, RegState::Implicit)
.addReg(X86::RSP, RegState::Implicit)
.addReg(X86::RAX, RegState::Define | RegState::Implicit)
@@ -15507,8 +15531,7 @@
} else {
// __chkstk(MSVCRT): does not update stack pointer.
// Clobbers R10, R11 and EFLAGS.
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
- .addExternalSymbol("__chkstk")
+ MIB
.addReg(X86::RAX, RegState::Implicit)
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit);
// RAX has the offset to be subtracted from RSP.
Index: lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- lib/Target/X86/X86FrameLowering.cpp 2013-10-24 01:37:01.000000000 +0200
+++ lib/Target/X86/X86FrameLowering.cpp (working copy)
@@ -635,25 +635,49 @@
.addReg(X86::EAX, RegState::Kill)
.setMIFlag(MachineInstr::FrameSetup);
}
+
+ MachineInstrBuilder MIB;
if (Is64Bit) {
+
// Handle the 64-bit Windows ABI case where we need to call __chkstk.
// Function prologue is responsible for adjusting the stack pointer.
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::RAX)
.addImm(NumBytes)
.setMIFlag(MachineInstr::FrameSetup);
+
+ if (TM.getCodeModel() == CodeModel::Large) {
+ // For large code model we need to do indirect call to __chkstk.
+
+
+ // R11 will be used to contain the address of __chkstk.
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
+ // so there is no need to save and restore it.
+ BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::R11)
+ .addExternalSymbol(StackProbeSymbol);
+ // Create a call to __chkstk function which address contained in R11.
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALL64r))
+ .addReg(X86::R11, RegState::Kill);
+ } else {
+
+ // For non-large code model we can do direct call to __chkstk.
+
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::W64ALLOCA))
+ .addExternalSymbol(StackProbeSymbol);
+ }
} else {
// Allocate NumBytes-4 bytes on stack in case of isEAXAlive.
// We'll also use 4 already allocated bytes for EAX.
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
.addImm(isEAXAlive ? NumBytes - 4 : NumBytes)
.setMIFlag(MachineInstr::FrameSetup);
+
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALLpcrel32))
+ .addExternalSymbol(StackProbeSymbol);
}
- BuildMI(MBB, MBBI, DL,
- TII.get(Is64Bit ? X86::W64ALLOCA : X86::CALLpcrel32))
- .addExternalSymbol(StackProbeSymbol)
- .addReg(StackPtr, RegState::Define | RegState::Implicit)
+
+ MIB.addReg(StackPtr, RegState::Define | RegState::Implicit)
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit)
.setMIFlag(MachineInstr::FrameSetup);

View File

@@ -0,0 +1,7 @@
@title MinGW-w64 32-bit GCC build environment
@echo Setting up environment for MinGW-w64 GCC 32-bit...
@set PATH=%CD%\bin;%CD%\msys\1.0\bin;%cd%\..\..\perl32\site\bin;%cd%\..\..\perl32\bin;%cd%\..\..\c\bin;%PATH%

View File

@@ -0,0 +1,7 @@
@title MinGW-w64 64-bit GCC build environment
@echo Setting up environment for MinGW-w64 GCC 64-bit...
@set PATH=%CD%\bin;%CD%\msys\1.0\bin;%cd%\..\..\perl\site\bin;%cd%\..\..\perl\bin;%cd%\..\..\c\bin;%PATH%

View File

@@ -0,0 +1,23 @@
diff -Naur numpy-1.11.1/numpy/distutils/ccompiler.py numpy-1.11.1/numpy/distutils/ccompiler.py
--- numpy-1.11.1/numpy/distutils/ccompiler.py 2016-06-25 08:38:34 -0600
+++ numpy-1.11.1/numpy/distutils/ccompiler.py 2016-08-04 12:33:43 -0600
@@ -29,6 +29,7 @@
# Using customized CCompiler.spawn.
def CCompiler_spawn(self, cmd, display=None):
+ cmd = quote_args(cmd)
"""
Execute a command in a sub-process.
diff -Naur numpy-1.11.1/numpy/distutils/misc_util.py numpy-1.11.1/numpy/distutils/misc_util.py
--- numpy-1.11.1/numpy/distutils/misc_util.py 2016-06-25 08:38:34 -0600
+++ numpy-1.11.1/numpy/distutils/misc_util.py 2016-08-04 12:34:56 -0600
@@ -116,7 +116,7 @@
args = list(args)
for i in range(len(args)):
a = args[i]
- if ' ' in a and a[0] not in '"\'':
+ if ' ' in a and a[0] not in '"\'' and a[len(a)-1] not in '"\'':
args[i] = '"%s"' % (a)
return args

View File

@@ -0,0 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fc9be5..5112ce6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,11 +254,11 @@
endif()
#adding PCRE
-find_package(PCRE)
+#find_package(PCRE)
if (PCRE_FOUND)
message(STATUS "SUCCESSFUL: PCRE found")
else () # if pcre not found building its local copy from ./Externals
- if (WIN32 OR APPLE)
+ if (1)
message("WARNING: Native PCRE not found, taking PCRE from ./Externals")
add_definitions(-DPCRE_STATIC)
add_subdirectory(${EXTERNAL_LIBRARIES}/pcre)
diff --git a/DAEValidator/library/include/no_warning_begin.orig b/DAEValidator/library/include/no_warning_begin
index 3fc9be5..5112ce6 100644
--- a/DAEValidator/library/include/no_warning_begin.orig 2017-05-31 16:56:39 -0600
+++ b/DAEValidator/library/include/no_warning_begin 2017-06-07 10:18:45 -0600
@@ -2,6 +2,9 @@
#if defined(_WIN32)
# pragma warning(push)
# pragma warning(disable:4668)
+# if _MSC_VER >=1900
+# pragma warning(disable:5031)
+# endif
# if defined(_MSC_VER) && defined(_DEBUG)
# pragma warning(disable:4548)
# endif

View File

@@ -0,0 +1,21 @@
diff -ru ./CMakeLists.txt ./CMakeLists.txt
--- ./CMakeLists.txt 2014-09-11 21:08:18.000000000 +0200
+++ ./CMakeLists.txt 2016-05-15 17:17:01.000000000 +0200
@@ -186,7 +186,7 @@
PATCH_COMMAND patch -f -p1 < ${CMAKE_SOURCE_DIR}/ext/tinyxml_${TINYXML_VERSION}.patch
BINARY_DIR ext/build/tinyxml
INSTALL_DIR ext/dist
- CMAKE_ARGS ${TINYXML_CMAKE_ARGS}
+ CMAKE_ARGS ${TINYXML_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
if(WIN32)
set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib)
@@ -254,7 +254,7 @@
BINARY_DIR ext/build/yaml-cpp
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/yaml-cpp-${YAML_CPP_VERSION}.patch
INSTALL_DIR ext/dist
- CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS}
+ CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include)
set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)

View File

@@ -0,0 +1,33 @@
--- IlmImf/CMakeLists.txt 2014-08-10 06:23:56.000000000 +0200
+++ IlmImf/CMakeLists.txt 2017-01-08 04:06:04.931723800 +0100
@@ -8,8 +8,8 @@
TARGET_LINK_LIBRARIES ( b44ExpLogTable
Half
- Iex${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB}
)
@@ -25,8 +25,8 @@
TARGET_LINK_LIBRARIES ( dwaLookups
Half
- Iex${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB}
)
@@ -138,9 +138,9 @@
TARGET_LINK_LIBRARIES ( IlmImf
Half
- Iex${ILMBASE_LIBSUFFIX}
Imath${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB} ${ZLIB_LIBRARIES}
)

View File

@@ -0,0 +1,26 @@
Index: OpenImageIO/osdep.h
===================================================================
--- OpenImageIO/osdep.h (revision 61595)
+++ OpenImageIO/osdep.h (working copy)
@@ -34,6 +34,7 @@
# define WIN32_LEAN_AND_MEAN
# define VC_EXTRALEAN
# define NOMINMAX
+# define NOGDI
# include <windows.h>
#endif
Index: OpenImageIO/platform.h
===================================================================
--- OpenImageIO/platform.h (revision 61595)
+++ OpenImageIO/platform.h (working copy)
@@ -77,6 +77,9 @@
# ifndef NOMINMAX
# define NOMINMAX
# endif
+# ifndef NOGDI
+# define NOGDI
+# endif
# include <windows.h>
#endif

View File

@@ -0,0 +1,13 @@
--- idiff.cpp 2016-11-18 11:42:01 -0700
+++ idiff.cpp 2016-11-18 11:41:25 -0700
@@ -308,8 +308,10 @@
// printed with three digit exponent. We change this behaviour to fit
// Linux way
#ifdef _MSC_VER
+#if _MSC_VER < 1900
_set_output_format(_TWO_DIGIT_EXPONENT);
#endif
+#endif
std::streamsize precis = std::cout.precision();
std::cout << " " << cr.nwarn << " pixels ("
<< std::setprecision(3) << (100.0*cr.nwarn / npels)

Some files were not shown because too many files have changed in this diff Show More