Commit Graph

62582 Commits

Author SHA1 Message Date
Sergey Sharybin
2cdd4a5467 Cycles: Fix access uninitialized SVM stack caused by recent optimization 2016-01-04 17:11:52 +05:00
Bastien Montagne
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
Campbell Barton
e83b3e577e Remove unused datatoc script 2016-01-04 21:30:01 +11:00
Campbell Barton
982904fcc9 Fix T47109: Expose sound data-block selector 2016-01-04 21:08:14 +11:00
Campbell Barton
598180f98d Fix crash sequencer drawing with no sound 2016-01-04 20:42:44 +11:00
Campbell Barton
236fabcc41 Minor edits to sync make.bat & makefile 2016-01-04 20:42:00 +11:00
Sergey Sharybin
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
Sergey Sharybin
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
Mike Erwin
1eb5e0b660 minor cleanup 2016-01-04 01:38:49 -05:00
Mike Erwin
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
Mike Erwin
ed2daace76 minor cleanup: typos
no functional change
2016-01-04 01:25:52 -05:00
Mike Erwin
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
Campbell Barton
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
Bastien Montagne
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
Sergey Sharybin
da49ee30b0 Fix T47100: OpenCL compilation warnings due to missing space in the argument list 2016-01-03 23:13:49 +05:00
Campbell Barton
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
Sergey Sharybin
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
Campbell Barton
80a76030ae Improve system info tip 2016-01-03 23:24:00 +11:00
Antony Riakiotakis
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
Antony Riakiotakis
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
Antony Riakiotakis
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
Sergey Sharybin
66bea2d77e Fix compilation error on Windows 2016-01-02 13:17:39 +05:00
Lukas Stockner
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
Lukas Stockner
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
Bastien Montagne
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
Campbell Barton
dc20db1c6c make.bat: only configure once 2016-01-02 06:31:11 +11:00
Thomas Dinges
1ed610ed73 Fix OSL compilation, cannot assign vector to color. 2016-01-01 18:05:34 +01:00
Campbell Barton
fe5efe4196 make.bat: add 'clean' command 2016-01-02 02:30:02 +11:00
Campbell Barton
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
Campbell Barton
0d2b2cd378 make.bat: sanity checks w/ useful error messages 2016-01-01 21:26:27 +11:00
Campbell Barton
b92f997cad make.bat correct name for cycles target 2016-01-01 18:47:30 +11:00
Campbell Barton
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
Campbell Barton
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
Sergey Sharybin
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
Sergey Sharybin
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
Bastien Montagne
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
Sergey Sharybin
702372f6c5 Fix wrong format used in the recent python exit code commit 2015-12-31 18:02:54 +05:00
Sergey Sharybin
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
Sergey Sharybin
99da8e1ed8 Cycles: Fix viewport rendering with multiple GPU devices 2015-12-31 17:49:25 +05:00
Campbell Barton
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
Campbell Barton
3236f1ab54 Add parse_int_strict_range utility for command line input 2015-12-31 22:37:32 +11:00
Sergey Sharybin
8e1fae3e38 Libmv: Update to latest upstream version
Brings some extra fixes for MSVC-2015
2015-12-31 16:16:52 +05:00
Sergey Sharybin
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
Sergey Sharybin
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
Campbell Barton
0ffc603553 Cleanup: Py API naming
Use BPY_execute_* prefix for all Python execution commands
2015-12-31 21:20:41 +11:00
Sergey Sharybin
16e1bbf1db Fix T47076: Memory issues when closing Blendera after Cycles baking 2015-12-31 14:49:58 +05:00
Campbell Barton
8a9e20495c Fix T47089: View rotate fails w/ auto depth+perspective 2015-12-31 19:09:04 +11:00
Martijn Berger
b6697b4d2a MSVC 2015 fix: do not redefine snprintf, even MS is getting standards complient 2015-12-31 08:53:06 +01:00
Campbell Barton
88477fe2bf Fix T47094: Crash w/ sequencer white-balance 2015-12-31 18:15:45 +11:00
Campbell Barton
7a702ba1d5 Cleanup: warning 2015-12-31 18:15:45 +11:00