Commit Graph

60266 Commits

Author SHA1 Message Date
Sergey Sharybin
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
Campbell Barton
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
Thomas Dinges
e6f7f36e40 Cleanup: Style in for loops header. 2015-06-29 00:56:04 +02:00
Sergey Sharybin
e245a57640 Fix T45227: Light optimization commit broke world MIS 2015-06-28 20:47:35 +02:00
Sergey Sharybin
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
Sergey Sharybin
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
Sergey Sharybin
d9ef528d05 Cycles: Minor code style cleanup, whitesaces 2015-06-28 18:15:25 +02:00
Sybren A. Stüvel
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
Sybren A. Stüvel
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
Campbell Barton
32319dd106 Cleanup: remove BLI prefix from BKE funcs 2015-06-28 19:09:52 +10:00
Bastien Montagne
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
Campbell Barton
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
Bastien Montagne
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
Sergey Sharybin
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
Antony Riakiotakis
3d7329950e OpenGL debug contexts:
Enable debug output in debug contexts for gl 4.3+
2015-06-27 17:20:30 +02:00
Sergey Sharybin
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
Sergey Sharybin
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
Sergey Sharybin
17f12fc71a Cycles: Allow using custom allocators for vector class 2015-06-27 15:13:08 +02:00
Sergey Sharybin
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
Campbell Barton
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
Martijn Berger
e2d3e36ca7 Cycles standalone: add support for reading UV coordinates to the XML scene reader 2015-06-27 12:05:05 +02:00
Bastien Montagne
c68322c7e5 Cleanup: int/uint mismatch in printf... 2015-06-27 11:02:58 +02:00
Bastien Montagne
e170d6be7f Cleanup: all params of BLI_str partition funcs can be const... 2015-06-27 11:00:47 +02:00
Bastien Montagne
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
Bastien Montagne
ff7a46cfad GTests for new 'end' option of BLI_str_partition_ex(). 2015-06-27 10:24:54 +02:00
Bastien Montagne
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
Bastien Montagne
e78b03f9e9 Fix part of code in load_image_single() wrongly disabled when WITH_OPENEXR was disabled. 2015-06-27 10:24:54 +02:00
Bastien Montagne
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
Bastien Montagne
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
Thomas Dinges
ddeb8c595f Cleanup: Fix a typo in world MIS.
Found by Lukas Stockner, thanks!
2015-06-26 21:36:28 +02:00
Antony Riakiotakis
c58b5acefd Fix crash on undoing after 8690ea6
Forgot to clear the mutex when reloading the scene.
2015-06-26 17:50:08 +02:00
Antony Riakiotakis
79c106705a Make code compile with GPU_DEBUG 2015-06-26 17:40:54 +02:00
Antony Riakiotakis
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
Campbell Barton
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
Campbell Barton
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
Antony Riakiotakis
2cdcb1c171 Revert "Fix off by one error in display of start/end frame in sequencer."
This reverts commit 0e02ad8b6495b2755598a24b487041a3ed8e0116.

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
Antony Riakiotakis
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
Antony Riakiotakis
284d294f2c Fix T45190 effect muting does not restore original sequencer display. 2015-06-25 18:21:58 +02:00
Campbell Barton
c0ea3099c5 Correct error in recent refactor
Closed loops missed last line
2015-06-25 22:11:25 +10:00
Campbell Barton
ef57051e9c Select flush was missing in delete edge-loop 2015-06-25 21:06:47 +10:00
Campbell Barton
8e95303414 splash fix, previous had color conversion error 2015-06-25 18:44:45 +10:00
Campbell Barton
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
Campbell Barton
ba98e6148b API calls for converting weights to float array 2015-06-25 16:17:24 +10:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
c40759e678 Cleanup: warnings 2015-06-24 18:42:16 +10:00
Campbell Barton
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