Commit Graph

58097 Commits

Author SHA1 Message Date
Campbell Barton
1ec83f41c1 Fix possible (unlikely) memory leak 2015-02-20 17:09:40 +11:00
Sergey Sharybin
83220ab7fb Cycles: Use size_t for aligned allocator
Seems it got changes by accident to int during guarded allocation work,
causing bad memory allocations.
2015-02-19 22:19:29 +05:00
Antony Riakiotakis
2ddfd3a123 Skip flip check in cases where it's not needed. 2015-02-19 16:58:35 +01:00
Antony Riakiotakis
f56fd1c47a Remove flipping for colinear case/ In such cases it is doubtful whether
face orientation is really meaningful
2015-02-19 16:51:51 +01:00
Antony Riakiotakis
b1d02f3d57 Projective painting: Only dither if factor is more than zero 2015-02-19 16:48:51 +01:00
Antony Riakiotakis
efb20dacc6 Fix T43735 painting on perpendicular to the screen polygons is
problematic (still!)

It seems due to floating point precision issues we have to account for
even more cases.

Added colinear check for one more triangle edge-vertex and assumed that
if no collision test is found then triangle is completely inside box.

Such cases are mostly from float precision not catching triangle just
outside bucket. Now tests are much better for simple tests (paint/flood
fill cube from ortho view, paint sphere), however there are still some
rare cases of stray pixels.
2015-02-19 16:48:17 +01:00
Sergey Sharybin
7f406a53c7 Cycles: Cleanup for indentation in device_cpu.cpp
Perhaps became broken after rather recent change about which entry point
to kernel to use.
2015-02-19 19:05:04 +05:00
Sergey Sharybin
3bc9ac19f5 Cycles: Free memory used by intermediate BVH vectors earlier
Ideally we should get rid of those temporary vectors anyway, but
it's not so trivial because of the alignment. For untl then we'll
just have a bit worse solution. This part of code is not the root
of the issue of memory spikes for now anyway.

But since we're getting rid of temporary memory earlier actual spike
is a bit smaller as now. For example in franck_sheep file it's now
5489.69MB vs. previously 5599.90MB.
2015-02-19 18:58:21 +05:00
Sergey Sharybin
0f652501c7 Cycles: Reduce memory used by background light update
Simple change: just get rid of intermediate data a bit earlier, before
final pixels array is being allocated. This gives around 30% of memory
save during light update (this is about 60meg in the frank sheep file
i'm using here).

This isn't really visible by artists a lot, because actual spike happens
on BVH construction. But it doesn't mean we shouldn't be accurate with
memory usage in other areas.
2015-02-19 18:18:04 +05:00
Thomas Dinges
27d1446d24 Cleanup: Restructure curve settings code a bit.
This is a bit more logical, as it better represents the 3 primitive types we have.
2015-02-19 12:37:56 +01:00
Antony Riakiotakis
ebdc1cde3f Fix 2d paint issue with textured brushes: Multiply brush color with
texture in the right space
2015-02-19 12:37:47 +01:00
Ines Almeida
528514c393 bge physics: disallowing compound collisions for soft bodies
Closes D610, T40427, T30630

Cherrypicked from local squash
Conflicts:
	release/scripts/startup/bl_ui/properties_game.py
2015-02-19 11:20:18 +00:00
Ines Almeida
b7033e3d4e BGE physics: adding links to bullet documentation 2015-02-19 11:20:18 +00:00
Ines Almeida
d2c2b10aeb gameengine physics: removing triangle mesh collision option for character controllers 2015-02-19 11:20:17 +00:00
Ines Almeida
938fa934c8 gameengine physics: removing compound option for character controllers
Cherrypicking c31d921 onto 117edbb
Conflicts:
	release/scripts/startup/bl_ui/properties_game.py
2015-02-19 11:20:17 +00:00
Antony Riakiotakis
0049c22ad9 Animation ghosting: when tweaking start-end values don't clamp user
input, instead make sure the end-start values are sane instead
2015-02-19 12:10:44 +01:00
Sergey Sharybin
9fc2c37328 Guardedalloc: Reset peak memory should set peak to currently allocated memory
Otherwise statistics could be really funny looking.
2015-02-19 13:14:06 +05:00
Sergey Sharybin
3e534833e3 Cycles: Make sphere and tube image mapping friendly with OpenCL
OpenCL doesn't let you to get address of vector components, which
is kinda annoying. On the other hand, maybe now compiler will have
more chances to optimize something out.
2015-02-19 12:52:48 +05:00
Sergey Sharybin
5004b58262 Cycles: Make util_math_fast.h compatible with OpenCL 2015-02-19 12:29:06 +05:00
Campbell Barton
5721863805 RNA: pass only 0/1 to RNA_property_boolean_set 2015-02-19 12:33:14 +11:00
Campbell Barton
eee79641c3 RNA: poll functions restricting object types
D1100,D1105,D1106 by @lichtwerk
2015-02-19 11:59:24 +11:00
Thomas Dinges
a74bd1bec7 Generate correct Cycles node setup for quick smoke "fire" preset.
Patch by Gottfried Hofmann.
Differential Revision: https://developer.blender.org/D1103
2015-02-19 00:18:27 +01:00
Campbell Barton
5ed2cc8070 Fix T43652: X11 "_NET_WM_PID" not set by Ghost
D1107 by @kevindietrich
2015-02-19 09:54:11 +11:00
Campbell Barton
f0527d9631 Ghost/X11 cleanup (reduce variable scope) 2015-02-19 09:54:11 +11:00
Jorge Bernal
5d0696052a BGE: Fix T41502 Path following jumping
New Lock Z velocity parameter was added. This parameter avoid the micro-jumping.
By default it is actived except when you load an old file that it is deactived to keep former behaviour.

Additionally it was solved another issue related with the acceleration: That is the acceleration value was not taked into account and we had always the maximum linear velocity from the beginning of movement. Now the acceleration is taken into account until we reach the maximum velocity.
When you load an old file, the acceleration value is set to the maximum range (1000.f). This way we simulate a maximum velocity constant from the beginning of movement (former behaviour).

{F142195}

Reviewers: moguri, dfelinto, campbellbarton

Reviewed By: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D1074
2015-02-18 23:24:02 +01:00
Thomas Dinges
bd5154bb2c Fix Cycles OpenCL error with scons, util_math_fast.h was missing.ø 2015-02-18 22:44:17 +01:00
Antony Riakiotakis
f1a9dbb0d7 Fix minor mistake - only increase size of compositing when stencil -is-
set.
2015-02-18 22:16:20 +01:00
Sergey Sharybin
b5a14c381c Report total unfreed memory size on exit
Previously only number of unfreed blocks would have been printed,
which might not be totally enough during investigation process.
2015-02-19 02:08:09 +05:00
Sergey Sharybin
6c5f63b476 Guardedalloc: Add extra logging and checks in MEM_freeN()
We don't like when NULL is send to MEM_freeN(), but there was some
differences between lockfree and guarded allocators:

- Lockfree would have silently crash, in both release and debug modes
- Guarded allocator would have printed error message, abort in debug
  but keep working in release build.

This commit makes lockfree allocator behavior to match guarded one.
2015-02-19 01:58:49 +05:00
Sergey Sharybin
0f2adc0817 Cycles: Make aligned allocation to respect WITH_BLENDER_GUARDEDALLOC
Title pretty says it all actually. Can only briefly mention that we're
indeed entering that state when after applying some WIP patches having
much fuller statistics about memory usage would help giving exact memory
benefit.
2015-02-19 01:50:46 +05:00
Campbell Barton
ee9ac4e4fc CMake: remove expression in endif(...) 2015-02-19 07:45:59 +11:00
Campbell Barton
54994740bd CMake: indent & missing header 2015-02-19 07:15:55 +11:00
Campbell Barton
483fa4c387 CMake: picky style edit
'cmake_consistency_check.py' relies on this formattng.
2015-02-19 07:15:00 +11:00
Campbell Barton
bbc7dc169d RNA: assert when non 0/1 values used as bool
Prepare for using 'bool' type.
2015-02-19 07:08:10 +11:00
Campbell Barton
86e04c4ca9 RNA: assert on over-sized array index access 2015-02-19 07:01:49 +11:00
Campbell Barton
9d464a7538 RNA: use __func__ for alloc-id's 2015-02-19 06:57:45 +11:00
Jorge Bernal
4ed8b70870 BGE: Fix T42437: Physics/Compound bug
Null check to verify that parent has a character controller. Otherwise (i.e empty) it will crash.

Reviewers: moguri, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1115
2015-02-18 19:59:21 +01:00
Jorge Bernal
9bd2a7c0a8 BGE: Fix T41570: Blender crash when physics createConstraint
Move physicsid type to unsigned long long to avoid crashes on Windows 8.1 64bits.
Other systems also modified to put them inline with this solution.

Reviewers: dfelinto, brita_, moguri, juicyfruit, campbellbarton

Reviewed By: juicyfruit, campbellbarton

Subscribers: juicyfruit

Differential Revision: https://developer.blender.org/D1122
2015-02-18 19:52:54 +01:00
Antony Riakiotakis
839a6b22d6 Fix T43716 regression in mask modifier - edges could access out of
bounds indices of vertices.

Issue here is that if we copy edge customdata the MEdge data that were
previously written get overwritten, solution is to write indices and
flags last (probably writing flags is superfluous here).
2015-02-18 17:59:16 +01:00
Sergey Sharybin
c9fa37fbcd Cycles: Initialize "headless" flags on engine initialization
This flag is global for all the sessions and never changes. so it doesn't
really make sense to pass it around to all sessions and synchronization
routines.

Switched to a static member of BlenderSession now, but it's probably more
logical to introduce some sort of BlenderGlobals. Doesn't currently worth
a hassle for a single boolean flag tho.
2015-02-18 21:52:51 +05:00
Thomas Dinges
6f3500db05 Cleanup: Remove unused SD_PHASE_HAS_EVAL flag.
We only have a non-singular volume closure and therefore no need to distinguish it.
2015-02-18 16:33:31 +01:00
Thomas Dinges
a2366a3a2e Cleanup for Cycles hair shader ifdefs.
sc->T and sc->data2 were behind __HAIR__ ifdef, now they are not anymore, so we can always assign the correct value.
2015-02-18 15:57:39 +01:00
Thomas Dinges
bf0a001e61 Cleanup: Remove support for Boost filesystem 2.
This is deprecated since Boost 1.48.
2015-02-18 13:49:49 +01:00
Bastien Montagne
55fd389a70 New filebrowser bookmarks: Some minor fix/optimization from latest coverity report. 2015-02-18 13:18:04 +01:00
Bastien Montagne
2967253ae4 Fix Windows build.
Mighty M$VC never heard of 'strcasecmp' family of functions, it prefers its
own names, as usual...
2015-02-18 12:22:58 +01:00
Sybren A. Stüvel
6920735cff Include SDL information in system info text.
Adds bpy.app.sdl to expose SDL version information.

When SDL is not available on a Linux system, certain Blender features
are silently disabled (like joystick support in the BGE). This change
is the first step towards making it more obvious why something isn't
working.

SDL information is exposed to Python via bpy.app.sdl, in the same way
as OCIO and OIIO information is exposed.

Generated system-info.txt contains SDL loading method (linked or
dynamically loaded by Blender) and SDL version number.

Reviewed by: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1112
2015-02-18 12:08:20 +01:00
Thomas Dinges
7f7413bce2 Cleanup: Use bools in BVHParams class. 2015-02-18 12:05:59 +01:00
Antony Riakiotakis
6fe23b60dd Use clamp to border for brushes or textures can "leak" after rotating
texture coordinates of brushes (in rake mode).
2015-02-18 11:59:55 +01:00
Joshua Leung
fda119866d GPencil: RMB menu tools in Outliner works for GP Layers now
It would be even better if these used their own dedicated menu which could include
the protect values too, but this one at least works now
2015-02-18 14:49:42 +13:00
Joshua Leung
c7c711bb72 GPencil Fix: Added checks to ensure that copy/paste doesn't paste incompatible strokes
There was a problem with the copy/paste functionality, where it would be possible to
paste 3d strokes into 2D editors, or 2D strokes into the 3D view. The problem with
that though is that these will not show up, and because there's no feedback at the
time, users may end up doing this pasting several times.
2015-02-18 14:49:41 +13:00