Commit Graph

57811 Commits

Author SHA1 Message Date
Sergey Sharybin
bf4c44491a Cycles: Some more constants fixes for fast math 2015-02-06 15:40:07 +05:00
Sergey Sharybin
460681bd62 Cycles: Use proper constant name for 1/pi in fast math 2015-02-06 15:15:55 +05:00
Sergey Sharybin
40f237675f Some tweaks to support upcoming OSL-1.6
Doesn't mean we're 100% ready for the transition, but need to start somewhere
anyway. Changes:

- OSL is no longer supporting cpp and requires usage of Boost Wave.
  So now Wave component of Boost is optionally demanded when looking for the
  Boost libraries if OSL is enabled.

  Only did this for Linux, MSVC seems already using Wave. Not sure about OSX.

- Because of the same reason OSL should be moved prior Boost for linker.

- Whole archive trick makes it so linking fails with duplicated symbols, so
  removed it for the new OSL. Didn't see issues with this so far.

- Added some code to check OSL version on Linux. Would need to move all that
  to FindOpenShadingLanguage.cmake which we can get from Cycles standalone
  repository.

  So in theory no affect on current stup would be made at all.

- Added some tweaks to buildbot files. It now seems to be happy with the new
  OSL libraries, but again, those tweaks are not in action yet.

All this was tested on Linux only. Win/OSX might still need some tweaks to
support new OSL.

P.S. This doesn't mean we're pushing OSL update yet, just making some
preliminary tweaks to avoid entropy of PITA when we'll actually want to
switch.
2015-02-06 14:57:32 +05:00
Bastien Montagne
580bb26213 Fix some UI messages from own recent merge, and RNA code checking for final '.', was a bit too rough. 2015-02-06 09:52:31 +01:00
Campbell Barton
61c66a996c Outliner: DragDrop objects to groups
Support drag&drop objects to groups in the outliner.

D989 by @lichtwerk
2015-02-06 19:03:09 +11:00
Campbell Barton
b752597805 cleanup: use bool args & redundant casts 2015-02-06 18:19:29 +11:00
Campbell Barton
f9f04726e5 GHash: no need to malloc iterators 2015-02-06 15:34:36 +11:00
Campbell Barton
4cbf2ebdc9 Cleanup: style 2015-02-06 13:55:20 +11:00
Antony Riakiotakis
ced4c5fe22 Animation play: Follow feature. Enabled from playback menu in the
timeline.

When enabled, ipo, dopesheet, NLA, timeline, clip and sequence editors
will follow the current frame during animation. When the cursor reaches
the end of the screen, then the next range of frames of the same width
is displayed.
2015-02-05 22:14:38 +01:00
Antony Riakiotakis
d5b1dfa9c6 More fixes for high DPI:
* Radial operators were completely wrong
* Dynamic topology detail was also using unscaled number
2015-02-05 19:15:24 +01:00
Antony Riakiotakis
77698f6010 Fix T43556 clamp brush size before setting it after division by DPI,
avoids nasty zero size brushes.
2015-02-05 19:11:00 +01:00
Antony Riakiotakis
a1ec1b3974 Fix part of T43556 brush increase/decrease size operators do not update
the UI sliders.
2015-02-05 18:14:05 +01:00
Antony Riakiotakis
15ff730b9b Change movie cache to use vectors instead of lists.
Runtime costs were horrible. On gooseberry in some sequencer edits using
proxies of small size, a cache with about 2000 elements would slow to
about 6 fps once cache was full and system tried to find smallest
element available.

There are still improvements to be done here, like requesting a number
of good candidates to avoid rerunnung through the list, or even using
some heap or ring buffer scheme to sort data, but nothing suits all
needs so for now that should bring the cache back to usable state (25fps
here at the studio)
2015-02-05 15:06:25 +01:00
Bastien Montagne
f6e7989460 Custom Loop Normals: Add NormalEdit modifier
Nothing much to say here, basic tool to make normals point toward a target,
or to make them point 'outward' as if object was a spheroid (useful for game bushes etc.).

Also, forgot a big thank you to Campbell for the extensive review work he has done on this project!
2015-02-05 14:59:52 +01:00
Bastien Montagne
2c3e4fbd7e Add Custom Loop Normals to Data Transfer.
Titles says everything, just two notes:
* We have to actually transfer plain *normals*, not 'compressed' clnors,
  so had to add pre/post process to transfer to make the conversions.
* Also added interpolation and advanced copy/mixing to CD_NORMAL, for same reasons.
2015-02-05 14:38:59 +01:00
Bastien Montagne
138c9dba9b Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.

See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.

Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.

Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.

Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:32:57 +01:00
Bastien Montagne
7bae9ee6b6 Mesh validate: add an option to not clean temp/cache CDLayers.
This is mandatory for incoming custom normal imports from io scripts, because
often geometry here is corrupted, so we need to call mesh.validate() to clean it up.

Issue is, we cannot set custom normals before geometry is clean, so we need to store
temporary plain loop normals in a CD_NORMAL layer, validate, and then set custom normals.
So we need a way to prevent 'temp' lnors to be freed by validate.
2015-02-05 14:03:01 +01:00
Bastien Montagne
e442b9916e BLI_math vectors: add minmax_v3v3_v3_array to get min and max values on each components of an array of 3D vectors. 2015-02-05 14:00:58 +01:00
Sergey Sharybin
25f33e058a Fix T43562: Cycles gets stuck with camera in volume in certain setup
The issue was caused by the way how we shoot the ray to see which rays we're
inside which might start bouncing back-n-forth between two close to parallel
intersecting faces.

Real solution would be to record all the intersections when shooting the ray,
but it's kinda tricky on GPU because of needed sorting and uncertainty of
how huge intersection array should be.

For now we'll just limit number of steps in the check so in worst case we'll
have some samples not being correct which will be compensated with further
sampling. Shouldn't be an issue since probability of such a lock is quite
small actually.
2015-02-05 16:10:50 +05:00
Bastien Montagne
0527fc5fb8 Fix T43566: Missing update event for VSE
VSE was missing NC_ANIMATION | ND_KEYFRAME events.
Also need to invalidate cache on those, else keyframe editing do not get reflected in VSE preview!
2015-02-05 11:54:47 +01:00
Nicholas Bishop
e922903ae8 Use MAX_CUSTOMDATA_LAYER_NAME for size of GPUInput.attribname array
Before this was hardcoded to 32, which I think was incorrect because
this is used to store a customdata layer name.

Reviewers: psy-fi, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1040
2015-02-05 11:20:24 +01:00
Campbell Barton
bec7d62218 CMake: add PLATFORM_LINKFLAGS to CMAKE_(SHARED|MODULE)_LINKER_FLAGS
D750 by @leszekswirski

Need for compiling Blender as a Python module in Windows.
2015-02-05 19:49:46 +11:00
Campbell Barton
343ddc52dc UI: UVWarp-Modifier had duplicate names
D1047 by @lichtwerk
2015-02-05 19:30:02 +11:00
Sergey Sharybin
f8c650aa7a Fix T43561: Wrong include path to standard OSL headers
Issue was in fact only visible in certain circumstances:

- OSL was compiled with Boost Wave
- or system's cpp didn't handle space between -I and path

Now made it so both wave and cpp code paths are always happy.

Original patch from Shane Ambler with own modifications to
mimic what variable holds on more verbose.
2015-02-05 12:34:29 +05:00
Campbell Barton
57e1a5373f Fix T43531: Wrong object center-dot color
Write objects center point to the nearest depth.
2015-02-05 17:01:58 +11:00
Bastien Montagne
4e27f63828 Fix T43560: crash when loading old (2.45 here) file whith multires.
Was trying to free a NULL pointer...
2015-02-04 21:43:01 +01:00
Bastien Montagne
37ae32870e Fix T43567: Freestyle On/Off keyframe is being ignored.
That kind of stuff shall not be animated! :)
2015-02-04 21:21:45 +01:00
Kévin Dietrich
ac2f608fa3 Fix T43450: Texture node tree failed to clamp
Clamping routine was not implemented. This fixes T43450.

Reviewers: #nodes, #rendering, sergey

Reviewed By: sergey

Maniphest Tasks: T43450

Differential Revision: https://developer.blender.org/D1038
2015-02-05 01:20:35 +05:00
Antony Riakiotakis
363a044b4c Sequencer, scaling and audio synch
Don't scale proxies, same as we do in gooseberry, also for sound synch
give a small window around sound where frame is just pushed forward.
Avoids video jumping in the cases when video renders faster than sound
(yes, weirdly enough it happens sometimes). There might be a few jumps
but results looks smoother here.
2015-02-04 20:38:56 +01:00
Dalai Felinto
035d14c029 small typo in a code comment, fixing this before someone does it to prevent uneeded merge conflicts in branches 2015-02-04 17:19:40 -02:00
Gaia Clary
a78a17bad5 Fix T43366 export/import materials inconsistent 2015-02-04 19:07:28 +01:00
Antony Riakiotakis
f75d2fdd24 Port fix from gooseberry that doesn't load the full res file if a proxy
is requested.
2015-02-04 18:48:55 +01:00
Campbell Barton
4339caf7cb Cleanup: name flip x/y 2015-02-05 03:56:24 +11:00
Bastien Montagne
292444e3f5 RNA image.pack(): fix possible memleak, add possibility to pass raw bytes data.
Note passing data assumes user knows what he is doing, else segfault is guaranted
(there is no good ways to pass raw bytes data to RNA func currently, and using
int array is way too heavy in this case).

And image->packedfile was never freed...
2015-02-04 15:40:28 +01:00
Antony Riakiotakis
fe03bc2a02 Support rotation and flipping for background images, patch by Andre D.
(T34583) with minor changes. Thanks for the patch!
2015-02-04 15:05:36 +01:00
Sybren A. Stüvel
32482aadb8 BGE physics: allow higher values for maxlogicstep and maxphystep
Increasing those values beyond 5 is important for exact physics
simulation. Soft limit is increased to 50, hard limit to 10000.

To be able to set different values for hardlimit and softlimit,
RNA_def_property_range needs to precede RNA_def_property_range, hence
the swapped order.
2015-02-04 14:16:10 +01:00
Joshua Leung
31425f9225 Compiler warnings tweak for scons + mingw64
The warning flags in C_WARN were not actually getting included
(most notably, the one disabling the pointless + braindead one
about using chars to index into arrays - given that we only use
unsigned chars everywhere). Maybe this should get done for the
other scons platforms too?
2015-02-05 00:50:50 +13:00
Joshua Leung
810c7ee825 Fix T43552: Cannot jump between GP keyframes in dopesheet 2015-02-05 00:04:46 +13:00
Sergey Sharybin
66eacc2abb Fix for recent LANG locale workaround
Need to get a copy of the string since stored pointer is affected
by subsequent calls of setlocale().
2015-02-04 16:02:47 +05:00
Sergey Sharybin
3b0c4d888c GLSL: On some cards '>' can't operate on 'float' and 'int'
So make it so comparison doesn't imply type-cast.
2015-02-04 15:54:42 +05:00
Sergey Sharybin
da06dab4e5 Cycles: Use pre-aligned triangle vertex coordinates for subsurface intersection
This gives small speedup (around 2% in quick tests) for ray scattering.
2015-02-04 14:49:19 +05:00
Sergey Sharybin
d16ac1e152 Compositor: Code cleanup, trailing whitespace and wrapping 2015-02-04 13:04:09 +05:00
Sergey Sharybin
1dddcfbaff Compositor: Implement sampled motion blur for plane track deform node
Quite striaghtforward change, and in theory we can even try supporting motion
blur for the corner pin node (which is tricky because coordinates actually
coming from sockets, but with some black magic should be doable).
2015-02-04 01:17:59 +05:00
Campbell Barton
c69458985c Hook Modifier: add falloff & radius options
- Add falloff types & curves (matching warp-modifier)
- Add uniform scale option,
  important when adding hooks to non-uniform scaled objects,
  especially for use with lattice objects which can't avoid uneven scaling.

  This uses relative transformation set when the hook is assigned,
  when measuring the distances.
2015-02-04 07:16:20 +11:00
Campbell Barton
a66a54c06d New Hook's now use the objects center
When adding a hook to an existing selected object/bone,
Use the location for the hook (instead of the selected vertices).
2015-02-04 07:16:20 +11:00
Bastien Montagne
37a08ae5c5 UI messages: minor fixes... 2015-02-03 20:25:14 +01:00
Bastien Montagne
f4535c1a7a Install_deps: update to new exr/oiio versions, and (hopefully) fix ILMBase mess
Root of the issue is an (hidden!) parameter in ILMBase cmake options, that
is enabled by default, and force the generation of those ugly lib names
(Imf_2_2.so & co). Why why why enable such thing by default?

Anyway, it should be simpler to build again even on linuxes having the openexr -dev
package installed.

Also, cleaned up a bit things, now we can switch between repo and plain release archive
building from a single place for each lib, instead of commentting/uncommenting everything
each time (for libs where we have some git repo set up for some reason).
2015-02-03 19:59:07 +01:00
Campbell Barton
c2f6a07531 Fix possible (unlikely) buffer overrun
Translated strings didn't check fixed length for PET id's
2015-02-04 05:51:48 +11:00
Campbell Barton
02acfdab9e Add inverse-square blending for PET and warp
Similar to 'Root' but without noticeable spike/pinch in the center.
2015-02-04 05:45:30 +11:00
Ines Almeida
15cd222270 BGE: python API initialization cleanup
The goal of these changes is to Close T40132 and to get rid of the 'PyRun_SimpleString'

Hilighted changes are:
- consistent naming and initialization of BGE submodules
- initialization of the 'bge' module as a proper module
- using PyDoc_STRVAR instead of static char*
- generic cleanup (unused arguments, logica ordering, naming and whitespace)

Reviewers: campbellbarton

Maniphest Tasks: T40132

Differential Revision: https://developer.blender.org/D983
2015-02-03 15:32:55 +00:00