1
1

Compare commits

...

7497 Commits

Author SHA1 Message Date
JIANG Kairong
5829a04a17 fix a minor bug when compiling 2016-06-26 20:16:18 +08:00
JIANG Kairong
54f537f5e0 add support for transformed objects 2016-06-26 18:46:53 +08:00
JIANG Kairong
0b9a72a0dc first working version of silhouette brush tool 2016-06-26 11:53:57 +08:00
JIANG Kairong
1ea040281f first attempts to add silhouette brush 2016-06-19 04:39:49 +08: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
d57f416e47 Fix incorrect FLT_MIN use 2016-05-11 21:36:42 +10: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
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
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
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
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
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
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
d924998d3e Cleanup: pep8 2016-02-01 00:47:10 +11:00
0f3f117311 Docs: add preset menu example 2016-01-31 18:08:01 +11:00
24f95a1991 Point Cache: fix typo in smoke_openvdb_read. 2016-01-30 23:30:16 +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
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
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
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
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
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
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
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
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
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
a5c419f4cc paint_cursor: OMP -> BLI_task. 2016-01-17 17:17:28 +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
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
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
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
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
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
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
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
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
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
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
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
5452df7984 BMesh: minor optimization for intersect
Avoid double lookup on insertion ghash
2015-12-10 23:42:52 +11: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
0875cb07cc Cleanup: use const for gpu buffer 2015-07-11 03:25:28 +10: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
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
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
e61ead7d4c BGE: Fix T45267 Lib load without material caching. 2015-07-02 12:27:14 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
af980a20a4 Fix T37746: Presets in splash failed to redraw 2015-06-09 21:55:35 +10: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
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
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
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
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
50a1ad5bb3 Cleanup 2015-06-06 21:02:16 +10: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
a1e8547877 BGE: Use CameCase code style for KX_WorldInfo python API. 2015-05-19 23:13:30 +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
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
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
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
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
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
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
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
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
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
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
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
6c15f3044b Yet another attempt to fix Intel case for T43987 2015-05-16 23:09:11 +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
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
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
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
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
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
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
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
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
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
74df307ca4 Cycles: Free unused image buffers when rendering with locked interface
It is still possible to free a bit more memory by detecting buildin images
which are not used by shaders, but that's not going to improve memory usage
that much to bother about this now.

Such change brings peak memory usage from 4.1GB to 3.4GB when rendering
01_01_01_D layout scene from the Gooseberry project. Mainly because of
freeing memory used by rather huge environment map in the viewport.

Reviewers: campbellbarton, juicyfruit

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D1215
2015-04-06 17:47:08 +05:00
Julian Eisel
bb2300de94 Fix T44282: Image sampling line disappears after a while
Now even to master
2015-04-06 14:12:05 +02:00
Julian Eisel
883663a0ad Fix T44278: Tab, Z-Key and Spacebar not working
Seems like a fix that is needed for some X11 systems causes this bug on
others :| Not sure if the systems that needed this fix are now still
fine (since I did a slight change to the click type check procedure),
but I need to check that on my system in the institute in a bit.
2015-04-06 13:13:35 +02:00
26e50295ce Use BKE_ghash_ensure_p where possible 2015-04-06 20:41:37 +10:00
dd129125b6 GHash: ensure function, avoids multiple lookups 2015-04-06 20:33:02 +10:00
3639a70eae Fix T44222: Crash using pointiness attribute for volume shaders
This attribute is not really supported for volumes, so it get's converted to
constant 0 at shader compile time.

TODO: We should consider doing the same for tangent attribute in order to save
some annoying checks at tracing time.
2015-04-06 14:11:28 +05:00
a9bb8d8a73 Cycles: de-duplicate fast/approximate erf function calculation
Our own implementation is in fact the same performance as in fast_math from
OpenShadingLanguage, but implementation from fast_math is using explicit madd
function, which increases chance of compiler deciding to use intrinsics.
2015-04-06 12:49:44 +05:00
9f8ffd478e Only show image slot-name in render view 2015-04-06 17:06:37 +10:00
dd3aa1b372 Cleanup: replace confusing 'if' statements 2015-04-06 16:40:26 +10:00
8cc475c40b Fix T43696: Baking tearing normals
Patch D1207 by @chrisr
2015-04-06 15:56:33 +10:00
986972701e Fix T44249: Cursor depth offset 2015-04-06 15:00:07 +10:00
434087981a Fix minor glitch getting depth from mouse cursor 2015-04-06 15:00:07 +10:00
46b42dba14 Fix: Stroke Edit Mode warning for GPencil draws correctly with Region Overlap enabled 2015-04-06 13:21:18 +12:00
5574f4c59d Fix: It was difficult to select control points for NLA Control FCurves in the Graph Editor 2015-04-06 12:19:20 +12:00
7157f3dbce GHash: no reason to use GSetEntry in ghash API 2015-04-06 09:08:10 +10:00
Julian Eisel
c3dad7953a Stickies: Remove redundant fixes
Those fixes aren't needed anymore due to
776bfa64a5
2015-04-05 20:04:37 +02:00
Julian Eisel
776bfa64a5 Stickies: Don't send extra event on KM_CLICK
Just add KM_CLICK to the already sent KM_RELEASE, don't send a new one
for this.

This might help us to get rid of quite some glitches and workarounds \o/
(why didn't this come earlier to my mind? :S)
2015-04-05 19:32:57 +02:00
Julian Eisel
af23e8d44a Fix T44275: CTRL+LMB to extrude to mouse position conflicts with snapped
extruding

More practical description of the bug: extruding with ctrl to use
snapping and confirming the action added another extrusion to the mouse
position.
This was caused from the second event that is now sent if a key release
happens within the click timeout. It triggers the "Extrude to Cursor"
operator since it is called by CTRL+LMB wich is exactly the event that
is sent in this case.

I'm not totally happy with this workaround since it changes the Confirm/
Abort event for all transformation actions to key release which *might*
result in more conflicts (fingers crossed this isn't the case). If this
happens we might need to write some special transformation handling for
extrusion.

This is an example of the difficulties we get from loading too much
functions on the same keys - we need to be careful with that!
2015-04-05 18:52:36 +02:00
ab2d05d958 Fix T44269: Typo in volume_attribute_float:geom_volume.h
Was rather harmless typo since we either pass both dx,dy or pass both NULL.
2015-04-05 19:07:45 +05:00
b06962fcfe Cycles: Avoid using lookup table for Beckmann slopes on GPU
This patch is based on some work done in D788 and re-formulation from Beckmann
implementation in OpenShadingLanguage.

Skipping texture lookup helps a lot on GPUs where it's more expensive to access
texture memory than to do some extra calculation in threads.

CPU code still uses lookup-table based approach since this seems to be still
faster (at least on computers i've got access to).

This change gives about 2% speedup on BMW scene with GTX560TI.
2015-04-05 19:07:45 +05:00
252b36ce77 Cycles: Remove unused Beckmann slope sampling code
It did not preserve stratification too well and lookup-table approach was
working much better. There are now also some more interesting forumlation
from Wenzel and OpenShadingLanguage which should work better than old code.
2015-04-05 19:07:44 +05:00
Julian Eisel
92755da471 Fix T44251 (2nd try): Changing views using numpad broken 2015-04-05 15:41:20 +02:00
29e968a315 BGE: Fix T36703: Character motion actuator local movement not working correct.
The character motion actuator local movement does not taking account of the object rotation.
It is necessary to rotate the motion vector before adding the local movement.

Reviewers: sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Maniphest Tasks: T42709

Differential Revision: https://developer.blender.org/D1206
2015-04-05 10:13:04 +02:00
1a117ad40c Fix T44263: Invalid parameters to fill_vn_fl in deform.c.
Own fault, thanks a bunch to LazyDodo for finding that - and odd
GCC did not warn about it...
2015-04-05 09:50:16 +02:00
a1c2b1a8a8 Fix T44265: Win32 error checking GL version 2015-04-05 09:57:10 +10:00
59bfc5c76e Fix T44270: Similar face region crash /w wire edge 2015-04-05 09:44:30 +10:00
00f732f268 Fix T44266: win32 delete's malloc'd memory 2015-04-05 06:54:34 +10:00
2f42be6995 Cleanup: remove MSVC2008 workaround 2015-04-05 06:54:34 +10:00
26979d45b1 Cleanup: use float math funcs 2015-04-05 06:54:34 +10:00
cedd7cde44 WM: prefer define over zero wmEvent.val 2015-04-05 06:54:34 +10:00
8eac4085be Fix T44264 copy paste error, checking same condition twice. 2015-04-04 22:39:25 +02:00
Julian Eisel
1604a26fe6 Fix T44251: Changing views using numpad broken
For KM_ANY I've filtered out every event that has a click type, although
that was only needed for the additional event sent on KM_HOLD. A bit weird
that this only happened on a few machines though.
2015-04-04 19:17:39 +02:00
Julian Eisel
59df941ea5 Fix T44259: Secondary strokes get terminated early when drawing in Continuous Drawing mode 2015-04-04 14:27:05 +02:00
f5949efb53 Missed in recent cleanup 2015-04-04 18:58:49 +11:00
e84b0e4c35 Ghost: update tests for recent changes 2015-04-04 17:21:18 +11:00
eca22d076c Cleanup: move filelist out of storage
Depends on imbuf, problematic for tests
2015-04-04 17:21:18 +11:00
e5392069cc Cleanup: Typo fix in HSV code. 2015-04-04 07:50:09 +02:00
12cede5ca3 Cleanup: use BKE_ocean_* prefix 2015-04-04 15:19:24 +11:00
7acd69958b Cleanup: use BKE_sculptsession_* prefix 2015-04-04 15:19:21 +11:00
1c96a84320 Cleanup: use BKE_animdata_* prefix 2015-04-04 15:13:56 +11:00
89a3e4deff Cleanup: redundant normalize in expmap_to_quat 2015-04-04 14:45:54 +11:00
519e20f984 Cleanup 2015-04-04 10:48:17 +11:00
92c7632835 Add missing break statements 2015-04-04 10:48:05 +11:00
4a4aaabfa9 CMake: treat inline C files as headers 2015-04-04 10:37:38 +11:00
f9b6709a17 Add missing declarations 2015-04-04 10:37:38 +11:00
53f4aa7817 WIP: Added dedicated operator for unlinking actions from the Action Editor (NLA buttons support to come)
After looking into this more carefully, I've found that we do in fact need a dedicate
operator to add some custom logic when trying to unlink an action from the editor/datablocks.

Specifically, this new operator does the following:
1) When in Tweak Mode, it shouldn't be possible to unlink the active action,
   or else, everything turns to custard.
2) If the Action doesn't have any other users, the user should at least get
   a warning that it is going to get lost.
3) We need a convenient way to exit Tweak Mode from the Action Editor
4) If none of the above apply, we can just unlink normally

This commit implements this for the Action Editor, with stubs for the NLA Editor too.
Those will be fixed next.
2015-04-04 11:37:06 +13:00
34c4133daf Tweaks to descriptions for Action Layer Up/Down 2015-04-04 11:37:05 +13:00
Julian Eisel
a3fdc6b755 Update keyconfigs for stickies
Change are needed to avoid conflicts due to rB53a3850a8a05249942a0c4
2015-04-03 16:44:42 +02:00
Julian Eisel
53a3850a8a Sticky Keys backend
Design task: T42339
Differential Revision: D840
Initial implementation proposal: T41867

Short description:
With this we can distinguish between holding and tabbing a key. Useful
is this if we want to assign to operators to a single shortcut. If two
operators are assigned to one shortcut, we call this a sticky key.

More info is accessible through the design task and the diff.

A few people that were involved with this:
* Sean Olson for stressing me with this burden ;) - It is his enthusiasm
that pushed me forward to get this done
* Campbell and Antony for the code and design review
* Ton for the design review
* All the other people that gave feedback on the patch and helped to
make this possible

A big "Thank You" for you all!
2015-04-03 16:21:22 +02:00
b444887054 Fix T44243: File browser behavior is inconsistent between append and open.
Only basic fix, the whole 'dir' field handling needs rework to correctly support
lib stuff (will be done as part of asset-experiment rewriting work)...

All this code is doing way too much filesystem inspection by itself, instead of
reusing flielist.c work - this is stupid, and will completely break with future
asset engines!
2015-04-03 16:20:18 +02:00
3f30ebf64a Fix related to T44243: do not systematically do live-update when tab-completing textedit buttons.
We now have a specific flag for that, use it! Note that for all 'search menu' buttons,
there is already a similar behavior, so there is no need to force apply butt in this case
anyway, which means in practice this change only has effect in the single place
it is needed currently - file browser dir/file fields.

In this case (dir field), applying button even on partial matches leads code
to ask to create a new dir, which breaks completely the expected behavior of
completion. And we do not need immediate apply at all here.

Note this is the only 'autocomplete' button not using search menu, so this change
does not affect anything else in UI.
2015-04-03 16:20:18 +02:00
03f2e5d4a6 Fix: Drawing glitch when renaming animation channels
When renaming animation channels, the old names are no longer drawn behind the
text boxes anymore. This used to cause problems if the names were long, or
if text boxes were set to have transparent backgrounds.

Thanks to kopias for reporting on IRC.
2015-04-04 01:40:01 +13:00
6ef7e0a194 Bugfix: Stashed actions now get added to the bottom of the NLA Stack if there weren't any stashed actions already 2015-04-04 01:40:00 +13:00
b30836dad7 Fix: Action/NLA Tweakmode Checks
Made all action management operators use the AnimData-local flag instead of the scene
global one. Technically, this is more accurate and results in less blocking
situations (i.e. another object may be in tweakmode, but because of that, the active
object's action couldn't be stashed).

The main impetus for this though was that the Action Up/Down feature doesn't clear
the global flag, since it is not in a position to do so (since it can't load up
everything to clear it).

TODO:
I'll need to review how this global flag works and/or potentially ditch it (or
perhaps add some better ways to ensure that it stays valid), since while thinking
this over, I've noticed a few problems here. But, for the meantime, this commit
at least makes things more usable here in the short term.
2015-04-04 01:39:59 +13:00
5681b4fc83 Action Editor: Move up/down buttons to be before the datablock selector
It turned out that the constantly changing width of the datablock selector
made it a pain to use these to quickly toggle between different actions,
as the buttons would keep jumping around, thus leading to errors when
quickly toggling between actions. This way doesn't look quite as great,
but should be more usable.
2015-04-04 01:39:58 +13:00
943b830bf6 Action Layer Up/Down: Fixes for NLA Solo / NLA Muting
Now marking NLA Tracks as Solo'd and muting the NLA stack are linked together
when using the Action Layer Up/Down tools. That is, when switching from a NLA strip
to the active action, if the track was solo'd, then the NLA stack will get muted;
and when switching from the active action to a NLA track, if the stack was muted,
the track will get solo'd. This linkage means that we ensure that when moving up
and down the stack, we can continue to check the actions in isolation without things
messing up when you switch to and from the active action.

Also fixed a bug where this wasn't getting applied when going in the other direction.

TODO:
- When we get the rest/reference track support, we're going to need to insert
  some calls to flush the restpose values so that values from the previously
  used action do not pollute the pose for the new action (if not all the
  same controls get keyed across both). For now, it's best to only do this
  switching from the first frame.
2015-04-04 01:39:56 +13:00
961dac55cf Code Cleanup: Deduplicate logic to switch between NLA Strips/Actions 2015-04-04 01:39:55 +13:00
f350e9f3fc Code Cleanup: Split out duplicate code for finding an available NLA strip above/below 2015-04-04 01:39:54 +13:00
bcf1abbc83 Action Editor: Go to Next/Previous Animation Layer
With this feature, it is now possible to quickly switch between different actions
stacked/stashed on top of each other in the NLA Stack without having to go to the
NLA Editor and doing a tab-select-tab dance, thus saving quite a few clicks. It
was specifically designed with Game Animation / Action Library workflows in mind,
but also helps layered animation workflows.

Usage:
Simply click on the up/down arrow buttons (between the action datablock selector
and the pushdown/stash buttons) to go to the action in the NLA Track above/below
the NLA Strip being whose action is being tweaked in the Action Editor.

Notes:
- These still work when you're not editing the action used by a NLA Strip.
If you're just animating a new action normally, it is possible to use the "down arrow"
to temporarily jump down to the previous action without losing the new action you're
working on, and then use the "up arrow" to get back to it once you're done checking
the other action(s).

- If there are multiple actions/strips on the same layer/track, then only the one
closest to the current frame will be used.
2015-04-04 01:39:53 +13:00
13a63234d6 Fix T44237: translation does not work for input sockets in 'Active node properties' panel. 2015-04-03 12:38:59 +02:00
99d8e08ed9 Fix T44237: translation does not work in spacebar search.
Added translation there, also fixed a stupid bug which was leading most internal
operators to have 'dual' i18n_context (default NULL one and default 'Operator' one).
2015-04-03 12:26:29 +02:00
89530f1486 Fix T44240: Lamp Halo invisible in rendering.
Halo is not possible when using 'deep' buffer shadow - reflect that in UI.
When not using buffered shadows, switch lamp bufftype to 'regular' on render, as already
done with 'halfway' method.
2015-04-03 11:17:58 +02:00
43101289a6 Fix T44183 particles in linked group offset from object
A nice bug combining all the broken features of blender:
Particles, duplis and multiple scene dependencies.

Fortunately this was solvable: Basically, we need to
make sure derivedmesh for dupli instance is generated before
obmat is overriden. This also makes sense, since no instance
has "true" obmat apart from original. Lazy initialization of
derivedmesh just does not work here (or it -does- work but first
use should be before instance drawing).

Fingers crossed nothing else breaks after this...
2015-04-02 17:13:45 +02:00
018dc3aeda Action Editor: Experimental tweak to ordering of buttons
This commit is an experiment exploring the relationship between the action
management buttons (i.e. action selector + pushdown/stash, and soon a few others)
and the filtering stuff (i.e. summary, only selected, etc.)

The old ordering meant that the filtering stuff was consistently in the same
place beside the mode selector, meaning that the order was "common stuff, then
editor specific stuff", this was not that great on smaller windows, where there
important stuff was often out of view.

This new order places greater emphasis on the parts which are likely to be more
important. It also allows us to have a better hierarchy/flow; this is especially
because we'll soon introduce a way to specify which datablock "level" the
action comes from, so going from "level -> action -> filters within action" will
make more sense.
2015-04-03 02:17:45 +13:00
5d4beee8c6 Code Cleanup: Split Action management operator stuff into action_data.c 2015-04-03 02:17:44 +13:00
64fed6841a Cleanup: followup to rBf87d7c605dcfb - use __func__ instead of literal func name in string.
Since we are already using BKE_reportf... This way, no more issue if/when we copy/paste
or rename that!
2015-04-02 14:51:37 +02:00
Dalai Felinto
f87d7c605d Fix error messages for RE_layer_load_from_file() and RE_layer_load_from_file() 2015-04-02 09:08:25 -03:00
77ff544d93 Fix issue reported by copias on irc, shift duplicate and snap crashes in
sequencer.

Missing snap callback case. Quick patch is to use the sequencer specific
operator instead of generic translate. We really need to support proper
snap/snap options at some point though.
2015-04-02 13:47:53 +02:00
ff45930cc5 Cleanup: Make strict flags happy
We might also just remove those arguments perhaps?
2015-04-02 16:01:23 +05:00
fd2ea3a909 Cycles: Make guarded allocator happy about strict C++ flags 2015-04-02 15:51:43 +05:00
f30b60d139 Fix: Crash when using "On Selected Markers" mode for Propogate Pose with no markers present
The function to get a list of markers was not clearing the list before it exited
early, and with no way to tell that the method failed, callers could make the
mistake of trusting that the list was now valid (i.e. either full of marker
frames or empty, vs being invalid)
2015-04-02 23:48:25 +13:00
838c3503a7 Expose the Pose Propagate tool a bit more in the UI
From the various forum threads and the fact that a new addon has cropped up,
it appears that it is not that well known that this tool exists, and that it
can be used solve a very common problem that animators face. Namely:
  When you've gone through blocking out your key poses and then realise
  that you need to adjust parts of the rig which don't change much, this
  tool solves the problem of needing to go through doing grunt-work to
  fix all the other keyframes which now need to change as well.

So, this tool is now available in the following two places (in addition to
the existing Pose -> Propagate menu):
* Toolbar - The "Propagate" button will use the default mode (or the last
            used mode for each subsequent invocation).
            The arrow-button beside this will allow choosing between the different
            modes. (NOTE: The UI team may have different thoughts on this, but,
            let's give this a try for a while first, to see if this sort of thing works)
* Alt-P   - In Pose Mode, this will now bring up a menu allowing you to choose
            which mode is used. Since this sort of thing is something that does
            get run several times in a row when you need it, having this hotkey
            will make it a bit more convenient.
2015-04-02 23:48:24 +13:00
97f6bff45a Propagate Pose: Added 'Selected Keyframes' mode
This commit adds a new mode for the Propagate Pose tool. With this new option,
the Propagate Pose will copy the current pose over to all selected keyframes
after the current frame.

For reference, some of the other/existing options are: to copy it to each subsequent
keyframe with the same value (WHILE_HELD - the default), to the next keyframe,
or to the last keyframe.
2015-04-02 23:48:23 +13:00
f5adbcc3a2 GPencil: Draw status indicator in top-right corner when in Stroke Edit Mode
When in Stroke Edit Mode, an indicator/warning message is now shown in the top-right
corner to make it easier to notice that operations will apply to Grease Pencil
strokes instead.
2015-04-02 23:48:22 +13:00
2cac2e7213 GPencil: H/Shift-H/Alt-H now work to Hide and Reveal Layers in Strokes Edit Mode
* H       = Hide active layer
* Shift-H = Hide non-active layers
* Alt-H   = Show all layers
2015-04-02 23:48:21 +13:00
146be8e258 Fix proportional editing always turned on in graph editor. 2015-04-02 12:34:35 +02:00
2fc69d11c8 Add custom properties to sequence strips 2015-04-02 21:07:23 +11:00
ac2530be8c Cleanup own todo: RE_pipeline is not a bad include from BKE, it's already used in few places 2015-04-02 14:39:58 +05:00
77667ad80f Cleanup 2015-04-02 16:12:33 +11:00
efc7c355b2 Code Cleanup: Pruning back the unusued includes now 2015-04-02 16:33:09 +13:00
26fa13e6f8 Code Cleanup: Reshuffling some of the GPencil code
* Moved the context handling stuff into gpencil_utils.c

* Moved the datablock and layer operators out into their own file too. Again,
  these weren't related to the other stuff that much

* Split the GPencil to Curves operator out into its own file (gpencil_convert.c).
  This was quite a massive blob of code (48kb) that was not that related to the
  other operators still in that file (gpencil_edit.c)
2015-04-02 16:29:33 +13:00
b6d878fa96 Fix for incorrect description 2015-04-02 12:12:35 +13:00
Julian Eisel
4b847595ee Fix T44217: Crash when starting .blend without "Load UI" enabled
Caused by changes in 31e26bb83b. This makes it fall back to the old
method if we can't find a screen.

Patch is actually by @LazyDodo with minor edits by me.
2015-04-02 00:24:58 +02:00
f1494edf78 Cycles: Make SSS intersection closer to regular triangle intersection 2015-04-01 21:20:04 +05:00
394b947a50 Cycles: Remove unused direction from triangle intersection functions
This argument was unused and got nicely optimized out. But once it
starts to be using registers are getting stressed really crazy,
causing slow down of render.
2015-04-01 21:08:12 +05:00
8e6e7010bc Proportional editing for graph editor did not work outside edit mode 2015-04-01 11:24:58 +02:00
af399884e1 Fix T44113: Ashikhmin-Shirley distribution of glossy shader at 0 roughness causes artifacts when background uses MIS
Was a division by zero error, solved in the same way as beckmann/ggx
deals with small roughness values.
2015-04-01 14:21:21 +05:00
71af08e1c9 Fix T44212: Crash on Group Rename.
Nice offset-by-one index error. ;)
2015-04-01 09:48:48 +02:00
f7dbce9914 Real fix for T44127: Python does not guarantee to free all objects on exit...
All kudos to Campbell for the head-up and patch!
2015-04-01 09:34:01 +02:00
6461fbd9ce Fix glitch scaling bone radius
connected parents radius could get out of sync with child.
2015-04-01 17:07:04 +11:00
879f5c832b Match corrective-smooth UI to smooth modifier 2015-04-01 09:29:56 +11:00
c59ca9e477 silence MSVC warning
‘*/‘ found outside of comment
2015-03-31 14:58:41 -04:00
d9c566a2d8 Corrections to submodules: we need to use latest tag available from master branch 2015-03-31 22:10:26 +05:00
f3b45eb76f Fix T43987 ambient occlusion wrong for Intel cards on windows (tested on
HD3000 and HD4000 cards so far).

Similar issue to Radeon 3xxx series but Intels need the opposite factors
for dfdy.
2015-03-31 17:37:17 +02:00
7ee340c0b4 Fix writing freed memory, exiting full view 2015-04-01 02:01:02 +11:00
79918e0577 Cycles: Avoid float/int conversion in few places 2015-03-31 19:52:14 +05:00
7da4c2637d Cycles: Fix typo in distance heuristic for shadow rays
It's not that bad because this typo could only caused not really
efficient BVH traversal, causing higher render times. Not as if
it was causing render artifacts.
2015-03-31 19:52:14 +05:00
66a028a576 Proportional editing for IPO editor - version ready for feedback by artists.
This works by using the distance in the x axis only (usually artists want to influence nearby
keyframes based on timing, not value). Tweaking handles is the same as tweaking
the central handle. It's a bit ambiguous if proportional editing is really meaningful
for handles but will leave that for artists to decide.
2015-03-31 16:45:30 +02:00
41f9cdc955 Point master's submodules to v2.74 tag as well 2015-03-31 18:57:17 +05:00
b98c7bcf3a Fix T44077 material update fails in textured mode when VBOs are off.
The issue has been here since we changed drawing code for meshes to use
vertex arrays instead of immediate mode when VBO was off. Basically we
should now always invalidate the GPU objects regardless of the VBO
setting in the preferences.

The bug has been there since 2.73 at least, but what made it apparent
now is that new version resets preferences and as an extension the VBO
flag.

Should be included in final 2.74 release
2015-03-31 11:42:39 +02:00
4153ff3610 Fix T44201: Crash Deleting Hierarchy in Outliner
Typical error using '->next' member of a freed linked list item. A bit trickier
even here, since we have some recursion...

Trivial fix for nasty crasher, safe for 2.74 imho?
2015-03-31 08:36:48 +02:00
c16a8983ef Corrective Smooth Modifier (aka delta-mush)
This modifier can be used to correct bad deformations,

Original patch D1183 by @sazerac, with own modifications
2015-03-31 10:20:11 +11:00
660173ed72 BGE: Fix: VehicleWrapper compiler warning.
The return type of raise_exc_wheel() is bool, but the method return -1. The compiler will change the return type type to an int. This can cause some problems on 64bit systems.

Reviewers: lordloki, sybren

Reviewed By: lordloki, sybren

Differential Revision: https://developer.blender.org/D1204
2015-03-30 22:47:46 +02:00
dd0604c606 Fix T44193: Hair intersection with duplis causes flickering
It was an issue with what bounds to use for BVH node during construction.

Also corrected case when there are all 4 primitive types in the range and
also there're objects in the same range.
2015-03-31 00:24:43 +05:00
9b4172cc6c Fix T43266, when we have a blendfile name use only that without the pid
for autosave. Will save Windows users from polluting their tmp folders
too much.
2015-03-30 19:21:38 +02:00
050f28f03f Remove wrong back jump detection on looping 2015-03-30 18:27:28 +02:00
bacdfc70e2 Fix T41191: Custom Loop Normals Viewport shading not updating when set from py script
Missing update tagging...

Safe for 2.74.
2015-03-30 15:04:42 +02:00
c6ce8200dd Attempt to fix T44056, dof high quality shader error in ATI cards.
ATI driver does not like declaration of gl_FragColor and glFragData in
the same source file (even though only one of the two is ever
referenced), just use one of the two.
2015-03-30 14:45:14 +02:00
79a68617b3 Pass bool arg to RNA_property_boolean_set 2015-03-30 23:31:42 +11:00
590efaacb8 Potential fix for T43987, ambient occlusion different between offscreen
and on screen rendering.

Aaaaah, the beauty of driver implementations of OpenGL!

Turns out the problem here is that drivers calculate df/dy differently
in some cases (probably because OpenGL counts y reverse to how the
window system does, so drivers can get confused).

Fixed this for the ATI case based on info we have so far, there's also
the Intel case which will be handled separately (missing info on Intel's
renderer string etc).

Unfortunately we can't really fix this for the general case so we'll
have to haldle cases as they come in our tracker and by adding silly
string comparisons in our GPU initialization module <sigh>.
2015-03-30 14:14:52 +02:00
4aeb34dc82 Cleanup: use const for typeinfo 2015-03-30 22:15:06 +11:00
98cbde91d2 Fix compilation of game engine in ubuntu 2015-03-30 13:06:54 +02:00
bfe63bbfc4 Grey out high quality depth of field when it's not supported by GPU 2015-03-30 12:49:05 +02:00
01e0062b4c missed last commit 2015-03-30 21:25:28 +11:00
268524c025 Cleanup: use const for typeinfo 2015-03-30 21:18:49 +11:00
b663f1f1cf Cycles: Correction to previous commit: non-msvc compilers also should use nullptr 2015-03-30 15:17:09 +05:00
131912dc73 Cycles: Fix compilation error with MSVC after recent C++11 changes 2015-03-30 15:06:45 +05:00
09397ac2c1 Fix for invalid buffer access on zero-face meshes 2015-03-30 20:50:23 +11:00
afbc45ed93 Cycles: Attempt to fix osl+scons compilation
Defines (and other cflags) are not inherited by scons to the subdirectories,
need to take care of them in all nested SConscripts.
2015-03-30 14:00:03 +05:00
1b327aa219 Fix T44186: Bezier Bevel facto mapping broken when 'start' was set to 'Resolution' and 'end' was not.
Trivial, we need totla_length in that case too.

Safe to be backported to 2.74.
2015-03-30 10:24:26 +02:00
59740a6c98 SCons: cudakernels now depends on some configuration tests 2015-03-30 13:11:08 +05:00
23c0e46a00 Buildbot: Use Clang with OpenMP support for 64bit OSX builds
This should make such areas as simulations and sculpting nicely threaded.

32bit will be tried to be supported later.
2015-03-30 13:05:14 +05:00
786763ca4c remove zero translations
within draw_emtpy_*
These are no-ops.

Also const-ified some variables there.
2015-03-30 02:53:39 -04:00
e47a96463d cleanup: remove unused code & vars 2015-03-30 01:25:34 -04:00
8d1dc22bec cleanup: typos in comments, style
no functional changes
2015-03-30 00:51:00 -04:00
dea0e3833f Remove use_invert_vertex_group use_ prefix
To match other modifiers.
2015-03-30 10:46:53 +11:00
ab9d903b99 Cleanup: single quotes for enums 2015-03-30 10:46:53 +11:00
3204aff6d0 Fix compilation of cycles network server when logging is enabled 2015-03-29 22:22:53 +02:00
f01456aaa4 Optionally use c++11 stuff instead of boost in cycles where possible. We do and continue to depend on boost though
Reviewers: dingto, sergey

Reviewed By: sergey

Subscribers: #cycles

Differential Revision: https://developer.blender.org/D1185
2015-03-29 22:12:40 +02:00
70d9c01325 Fix T44162: Outliner: modifier's icons toggle update issue
Use same notifier for button callback as the one used in matching outliner operator...
2015-03-29 13:14:59 +02:00
47c1112e6e Make internal functions of point density independent from Render 2015-03-29 02:34:44 +05:00
94b0193196 Make point density sampling functions a bit easier for re-use
Still not ideal but getting closer. Main annoying thing so far is
dependency of Render structure for now. It is used to switch particles
to render mode and could probably also be eliminated.
2015-03-29 02:14:06 +05:00
b25c208d5b Code cleanup: whitespace, line wrapping 2015-03-28 23:50:36 +05:00
2c5ba41413 Code cleanup: Get rid of set but unused matrix 2015-03-28 23:40:56 +05:00
44a4b90b4f Fix collada compile after BKE cleanup 2015-03-28 18:17:54 +01:00
b1d758ae6b Cleanup: redundant struct declarations 2015-03-29 03:56:39 +11:00
8a183aa26b Cleanup: use BKE_texture_ prefix 2015-03-29 03:16:55 +11:00
8c1c2b40a2 Use union for EditBone's
Avoids complicated casts accessing as int
2015-03-29 01:30:44 +11:00
fcc086a92b Cleanup: unused args 2015-03-29 01:26:09 +11:00
7a1e7295a5 NLA Strip Keyframes: Nullified the risk that NLA mapping can get applied to NLA Curves 2015-03-29 03:03:05 +13:00
b253be1a19 Nla Strip Keyframes: Active FCurve Keyframes panel displays names properly now (and doesn't disable the FCurves) 2015-03-29 02:45:24 +13:00
0c5d0422b4 NLA Strip Keyframes: Insert keyframe tools in Anim Editors work now
* Insert Keyframe tool for Dopesheet/Graph Editors needed to be modified to
  not try to resolve the paths for NLA Control Curves
* For now, the poll callback to get the "Active FCurve" also works when given
  a NLA control curve. They're really the same in most cases, and this should
  be fine until one of the channels does something funky.
2015-03-29 02:20:57 +13:00
0ffd7f721e Nla Strip Keyframes: Sliders in channel list insert keyframes now 2015-03-29 01:39:59 +13:00
34209b59b8 Nla Strip Curves: This works with anim channel rearranging tools now 2015-03-29 01:39:58 +13:00
182e84da88 Nla Strip Curves: Getting more stuff working
* Clicking anywhere on the expander collapses it (like for the gpencil one)
* Deleting these curves works now (but has the side effect of turning off
  the animated influence/time options too, as it is assumed that when those
  are enabled there is a corresponding fcurve)
2015-03-29 01:39:57 +13:00
67f983ac53 Nla Strip Controls: Added special FCurve type (in the animfiltering code)
Using the standard "FCurve" animchannel type didn't work that well for
the control FCurves on NLA Strips, as the paths would not resolve correctly,
and the indentation was wrong. Also, there would likely be issues down the
track with applying NLA mapping. Hence, it's easier to just create a separate
type for this case, and adapt the rest of the code to also consider these (todo).
2015-03-29 01:39:56 +13:00
8f4c5ff0ec Nla Strip Controls: Added dedicated "Expander" channel to Action/Graph Editors
The "Nla Strip Controls" channel is used to house the per-strip
FCurves for controlling the strip_time and influence properties.
It sits above the active action's first group, at the same level
in the hierarchy as other groups.

TODO: It looks like a dedicated FCurve channel is needed for these
control FCurves, so that we won't accidentally apply NLA mapping
or have these FCurves disabled by the path lookups failing.
2015-03-29 01:39:55 +13:00
6dac874d68 Fix for various small issues which may cause crashes 2015-03-29 01:39:54 +13:00
da0d0b2f20 Compile fix
New parameter added by these fixes did not exist when this call got added
2015-03-29 01:39:53 +13:00
90e9a22eaa Fix for earlier commit - Turning off "animated" influence/time didn't work
Reshuffled order that in which NLA Strip's F-Curves vs its automatic settings are
evaluated so that the automatic settings can always override the custom settings,
since it's not that easy to get things working correctly the other way around.
2015-03-29 01:39:53 +13:00
fc0a576c30 Keyframes on NLA-Strip F-Curves are detected by RNA buttons too 2015-03-29 01:39:52 +13:00
59b2316e82 Code Cleanup / Preemptive Bug Fixing: "action" parameter may get set when it shouldn't be
Logically, it makes sense that this parameter only gets used to describe the action
that the F-Curve actually belongs to (if it belongs to one). Otherwise, it should not
be set at all.
2015-03-29 01:39:51 +13:00
2b4ff142ab Fix T36385: Animated Strip-Time doesnt update
This commit implements proper evaluation + keyframing support for animating influence
and time on NLA Strips (among other properties) by resolving a few long standing issues
which prevented the original design for this from working.

The original design for animating these properties (and/or some of the other settings
on NLA Strips) is that NLA Strips actually have some of their own F-Curves that are
used for animating settings which will affect how they are evaluated. As seen in this
bug report, the alternative of having these animated as part of the stack (which the
strips work above/outside/on-top of) means that glitches can occur.

Although one of the original considerations for why this wasn't implemented earlier
was that introducing keyframes there isn't so clean cut, and causes UI design issues
for how we expose these via the animation editors for editing (NOTE: support for that
is still to come). Another concern is that this sets a precedent for how FModifiers
might get evaluated.
2015-03-29 01:39:50 +13:00
1a5c5ac742 Fix T44068: "Layered" option for auto keyframing doesn't "Insert Available Only" is enabled
The "Layered" option for auto keyframing will create a new NLA strip if playback
reaches the end of the frame range and jumps back again. The idea is that instead
of overwriting the keyframes you've already made, it will make a new animation
layer. However, this does not work with the "Insert Available Only" option
(which can either be set in the User Prefs, or in the active keyingset), as that
option needs some existing FCurves to tell what it can insert keyframes into.

The "fix" here is to simply not show the offending button in situations where it
cannot be used!
2015-03-28 23:48:10 +13:00
b7afbaf8cc Bugfix: Fix for crash when trying to create new action in Shape Key DopeSheet mode
When the active object had no shapekey data, trying to create a new action from the
Shape Keys mode of the DopeSheet would crash. The segfault here was a silly regression
caused by my earlier Action Stashing work.

However, the old (pre-Action Stashing) code here also wasn't that great either.
While it didn't crash, it would still silently create a new action, even if that
could not get assigned/used anywhere. To prevent both of these problems from
happening again, I've added additional null checks, as well as beefing up the poll
callback here to forbid keyframing
2015-03-28 23:23:23 +13:00
469ba8a30a Tracking: Code cleanup, missing break statements 2015-03-28 00:46:59 +05:00
5498629906 Freestyle: Code cleanup, silence warning in release mode 2015-03-28 00:34:16 +05:00
e1bcc2d779 Cycles: Code cleanyp, sky model
For as long as code stays in official folders it should follow
our code style.
2015-03-28 00:28:37 +05:00
5ff132182d Cycles: Code cleanup, spaces around keywords
This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.

Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
2015-03-28 00:15:15 +05:00
6f43e1dfef Cleanup: win32 mixed declare/statements in main()
Make it a more clear where declarations end
(ifdef's all over made it a bit confusing).
2015-03-28 04:12:12 +11:00
59b578e320 Cleanup: use const char for stats arg 2015-03-28 04:12:12 +11:00
3d305b5a37 Cycles: Code cleanup, make strict flags happy about disabled OSL 2015-03-27 19:10:36 +05:00
d18e8ad1f3 Cleanup: view3d headers 2015-03-28 01:05:50 +11:00
267904dd3c Cleanup: gpencil headers 2015-03-28 01:05:50 +11:00
7cbb659400 Use squared dist /w comparisons (mask, edge-slide) 2015-03-28 01:05:49 +11:00
7b7eac9211 Add profiling prints for audio synch to detect how continuous our frame
progression is
2015-03-27 15:00:13 +01:00
74e8e14cce Makesrna: Fix function prototypes for struct used RNA_def_struct_sdna_from
Previously makesrna would have generated code expecting DNA structure from
RNA_def_struct_sdna_from() to be passed to it. This was wrong because actual
PointerRNA points to a "parent" structure, making it impossible to add
functions to certain RNA structures.

It so far never needed and we didn't notice this issue, but it's needed for
some ongoing development now.
2015-03-27 18:44:11 +05:00
1c2f1ff725 Compositor: Cleanup, remove unused need_sync parameter 2015-03-27 18:23:32 +05:00
d84cc6a18f Compositor: Followup to previous stats commit
No need to mark tree for localization, it was never done and
it all just worked. We can save some CPU ticks by skipping doing
this.
2015-03-27 18:23:32 +05:00
da170d9dc3 Compositor: Fix heap overflow when copying previews 2015-03-27 18:23:32 +05:00
8af5390968 Fix T44149: Compositing : Node Groups do not work correctly
Input constants are to be connected before removing proxies,
otherwise node groups might give totally different result.

This is a regression and to be put into final release.
2015-03-27 18:23:32 +05:00
3366b30bf1 Compositor: Code cleanup, debug mode is now fine with strict flags 2015-03-27 18:23:32 +05:00
6cd82dbf57 CMake: Enable strict flags for C++ 2015-03-27 18:23:31 +05:00
061e73a270 Physics: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
052ebd6564 C++ RNA API: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
4393b60579 ImBuf: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
13358d049e Freestyle: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
2ada3512a2 Compositor: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
585dd26120 Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
232c2d382e Dualcon: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
3f4219a694 OpenColorIO: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
90f645855a GHost: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
38c4645f0a rename BGE attr from D1091 (match methods) 2015-03-27 22:23:19 +11:00
34c92848a7 Use preview option to detect frame range for filename when using ctrl
F11.
2015-03-27 11:39:09 +01:00
e7afba4b29 Compositor: Cleanup, don't pollute namepace with all symbols from std 2015-03-27 14:41:20 +05:00
408a2a8420 Compositor: Improve reports to the interface about what's going on
The functionality was got lost when new compositor system was landed
and it wasn't always clear what's causing the hicucps. Now it's nicely
reported to the stats line.
2015-03-27 14:38:02 +05:00
a12b2ec66d BGE: New isDynamicSuspended python attribute
This is a new KX_GameObject attribute that it increments the
possibilities of optimization during the game

Additionally the unused m_bSuspendDynamics variable is removed.

Reviewers: moguri, agoose77, lordloki

Reviewed By: agoose77, lordloki

Subscribers: agoose77, lordloki

Differential Revision: https://developer.blender.org/D1091
2015-03-27 06:11:23 +01:00
Severin
c8f95cbb60 Only enable IME for supported translation contexts
For me, weird characters are drawn if IME is enabled but translation
is not set to a supported language.
Could become an utility function if needed later.
2015-03-26 22:16:00 +01:00
Severin
065e5896c4 IME: Minor API cleanup 2015-03-26 21:24:01 +01:00
Severin
6e72f06069 Fix duplicated IME input
AFAIK a few IMEs were affected by this so I guess we can now add a
few more IMEs to the "officially supported" list.

Patch by @randon (thanks again!), minor edits by me.
2015-03-26 21:16:43 +01:00
d26c18c05e Project directory proxies:
Use BL_proxy if directory is blank to avoid filling the whole folder
with files.
2015-03-26 18:25:25 +01:00
4c7876c740 New option proxy placement, project directory.
There are two per-editor settings now, the Per-Strip setting (default)
and the Project setting.

The per strip setting basically uses the previous, per-strip options for
storing the proxies.
The project setting though will use a specified directory for -all-
proxies, or the blend file directory if no directory is given.
2015-03-26 17:54:16 +01:00
d084967627 Revert "Change Enables proxy operator to Copy proxy operator."
This reverts commit ec03ab021f.

Changing this since it looks like Mattieu does not really like the change.
Will be adding another way to tweak the directories
2015-03-26 15:44:51 +01:00
c0ef4e9b78 Fix T44122, rendering OpenGL preview movie with audio has wrong audio
range and extra frames.

Issue here is that the movie backend would unconditionally use the start
frame of the scene instead of the preview frame. Solved by passing an
explicit "preview" argument.

Strictly speaking, the preview argument is part of the renderdata
struct, that is also passed to the code, but when rendering the final
result we want to unconditionally render the full range regardless of
the preview setting of the render structure.

However, OpenGL rendering does use the preview range so we need to
account for that when making those exports.

This is also a nice chance to correct the filenames, which still used
the full range.
2015-03-26 14:50:18 +01:00
f80064f2d2 Fix compiling after sound changes 2015-03-26 13:19:33 +01:00
59132e6481 Fix building with audaspace disabled after 828c85a 2015-03-26 16:33:20 +05:00
dc3b869c9a Missed those last commit 2015-03-26 11:39:08 +01:00
828c85a1bf sound module: Append functions with BKE (makes it easier to make them
out from local functions)
2015-03-26 11:35:41 +01:00
d97b97460c Fix T44138: Crash in DataTransfer modifier when selecting a source with no loops.
Simply check and early return in case we have no source or destination items
(verts/edges/loops/polys) available...

Also, fix an assert in `BKE_mesh_calc_normals_poly()`, when called with no poly.
2015-03-26 09:20:37 +01:00
b87eaef1f7 Fix T44137: bpy.path.is_subdir fails
`bpy.path.is_subdir("/abc/def/ghi","/abc/de")` incorrectly returned True
2015-03-26 16:32:16 +11:00
770b109deb Fix: AUD_OpenALDevice::getPosition returns negative values
Reported by Antony Riakiotakis. The problem was the seeking code.
2015-03-26 14:45:21 +13:00
Julian Eisel
92f305a490 A more forward thinking version of previous commit
Basically same as 581afa9da3, but I guess we can assume that scopes added in future
to the image preview may also want to use the viewrect from the original ibuf.
2015-03-25 22:15:56 +01:00
Julian Eisel
581afa9da3 Fix T44121: VSE Preview scaling issue when using proxies and Show Overexposed 2015-03-25 21:52:54 +01:00
4dc141f933 Yet another fix for crashing particles. 2015-03-25 20:09:02 +01:00
5e2cc06518 minor cleanup: alignment 2015-03-25 14:29:08 -04:00
d4ac58d049 Fix T43694, by Krzysztof Rećko (chrisr), reviewed in D1177.
Added some guards to prevent clumping to non existing particles. Also, adjusted threaded child path evaluation, so each child is evaluated once - previously virtual parents were done twice.
2015-03-25 18:34:52 +01:00
9fc1a29de3 Fix 2 typos ( shakin' hands ) 2015-03-25 16:56:51 +01:00
4fd2f678ea Fix T44133 SSAO in OpenGL rendering from orthographic camera did not
work

Safe to include in final release
2015-03-25 15:05:36 +01:00
1a866d55ac Fix crash with computers not supporting high quality depth of field. 2015-03-25 14:43:28 +01:00
1c329af74c Fix T44026: ID prop delete leaves names in _RNA_UI 2015-03-26 00:12:28 +11:00
0ef9f61410 Attempt to fix an error in compilation of geometry shaders in Intel 4000
cards (see T44072)
2015-03-25 13:05:52 +01:00
7bc8ddc6e2 use BKE_mball_tessellate.h include
also remove unused includes
2015-03-25 22:40:09 +11:00
3d20bf75cb BKE_mball: split tessellation into its own file
this has a lot of its own local structs, functions,
better to keep isolated from general metaball selection/library logic.
2015-03-25 22:40:09 +11:00
ec03ab021f Change Enables proxy operator to Copy proxy operator.
Allows to change and copy settings much easier, also allows things like
directory settings etc to be copied over.
2015-03-25 12:36:43 +01:00
8463e6cb41 Fix for crash when using particle emission with clump/roughness curves
in a smoke sim.

This interaction between sims is totally stupid and must be recoded
entirely in some utopian future.
2015-03-25 12:29:22 +01:00
a180c8e2ed Allow multiple strips to use the same directory when custom proxy
directory is used.

This is done by appending the name of the file as extra folder. Existing
projects may need to regenerate their proxies but it should be possible
now to have all proxies nicely in the same custom folder.

Next commits will include operators to copy directory settings between
selected strips, making the process faster.
2015-03-25 12:05:34 +01:00
22dfb50622 Fix T44128: Ray visibility only enables diffuse if glossy is also enabled
Issue was caused by accident in c8a9a56 which not only disabled glossy
reflection if Glossy visibility is disabled, but also Diffuse reflection.

Quite safe and should go to final release branch.
2015-03-25 14:53:20 +05:00
3cee9d6939 Simplify recent commit 2015-03-25 20:29:38 +11:00
b38b5846ba Fix T44124: Crash deleting brush 2015-03-25 20:16:27 +11:00
3eb33b804d Fix T44118: Rotated background image disappears
Image clipping didn't take rotation into account.
2015-03-25 19:49:14 +11:00
8d0b104f43 Fix T44064: Reroute two-node loop crash
Issue was caused by cycles in shader graph confusing it's
simplification stage. Now we're ignoring links which are
marked as invalid from blender side so we don't run into
such cycles and keep graph code simple.
2015-03-25 13:46:59 +05:00
917b8754f9 Tracking: Fix one frame memory leak when tracking last frame 2015-03-25 13:20:37 +05:00
87cff57207 Fix T44123: Cycles SSS renders black in recent builds
Issue was introduced in 01ee21f where i didn't notice *_setup()
function only doing partial initialization, and some of parameters
are expected to be initialized by callee function.

This was hitting only some setups, so tests with benchmark scenes
didn't unleash issues. Now it should all be fine.

This is to go to the 2.74 branch and we actually might re-AHOY.
2015-03-25 02:33:49 +05:00
41ed59e0eb Minor UI message fix. 2015-03-24 21:36:26 +01:00
Julian Eisel
2ba82d5729 Cleanup: Remove unwanted debug printf from 7293f6d486
Sergey said this kindof cleanup is good for commit ratio... noted! ;)
2015-03-24 15:54:02 +01:00
Julian Eisel
f98b84072e Remove redundant shortcuts from keyconfigs
These have been deleted recently (cd54f07a3c, fbd4dfb2c, 3f68a0aea)
2015-03-24 15:52:14 +01:00
fa09e152af Code cleanup: r_ prefix vs. _r suffix 2015-03-24 19:20:51 +05:00
Julian Eisel
b714b23443 Fix T44092: Maya preset doesn't allow attaching Nodes to Frames via D&D 2015-03-24 14:15:03 +01:00
7293f6d486 Cleanup - move proxy storage options to the proxy itself - also will
enable more storage options, since seq->flag is running out of space
2015-03-24 12:24:54 +01:00
765fd7044b Updating python API documentation for function bge.render.makeScreenshot 2015-03-24 10:17:55 +00:00
4685092fd8 Fix T44102: Mirrored objects render black with Blender Internal and Autosmooth.
Normals are not vertices, we cannot apply matrix's scale to them...
2015-03-24 11:03:05 +01:00
0f0e080a26 Fix T44110: Plane track doesn't work when built with scons
For some reason recent change in avoiding non-aligned eigen vectors
was behaving differently for cmake and scons. Made it a bit different
now by storing scalars. This is more robust approach anyway, because
it's not really guaranteed Mat.col() gives a pointer inside data,
depending on column-major vs. row-major storage.

This is to be backported to 2.74 branch.
2015-03-24 14:05:49 +05:00
cf365275c2 Fix T44089: All addons do not use same default for orientations.
Transformed 'OrientationHelper' class into 'orientation_helper_factory' function,
which returns an OrientationHelper customized class with specified default axes.
2015-03-24 09:57:11 +01:00
3030e2d1cb CMake: tweak recent py module changes
support installing portable builds to CMAKE_INSTALL_PREFIX
2015-03-24 19:09:51 +11:00
4560570f8a Fix for building blender as a Python module
Installation didn't work on debian distro's
now install into PYTHON_SITE_PACKAGES (which is detected and can be configured).
2015-03-24 17:06:12 +11:00
3bb7e14618 UI: remove UI_BTYPE_SEARCH_MENU_UNLINK
Internal change only,
use UI_BTYPE_SEARCH_MENU with an unlink flag instead.

They are really the same button type, one just happens to have the option to unlink.
2015-03-24 15:09:58 +11:00
a93f346ff4 Cleanup: unused function 2015-03-24 15:09:58 +11:00
22e222563a Blender world value viewport update
This patch will update the 3D viewport if a word value has changed.

This patch does not depends on an other patch, but should applied after https://developer.blender.org/D151 otherwise the the word value viewport update is be slow.

Reviewers: brecht

Reviewed By: brecht

Subscribers: thelasthope, darkxiv

Differential Revision: https://developer.blender.org/D159
2015-03-24 00:31:31 +01:00
ee57968461 BGE: Remove old world bge.render API
This patch can be used to remove the old world bge.render API if the new world API D157 is used.

If  the new world API is applied we can remove the old API because the old has newer worked.
The patch keep the two old working methods for backward compatibility.

Reviewers: campbellbarton, moguri

Reviewed By: campbellbarton, moguri

Subscribers: brecht

Differential Revision: https://developer.blender.org/D158
2015-03-24 00:27:45 +01:00
fd22a92939 BGE: Add new world API KX_WorldInfo (KX_Scene)
This Patch will add a the world API (mist, background, ambient)  to KX_WorldInfo.
The new API uses now attributes.

Reviewers: campbellbarton, moguri

Reviewed By: moguri

Subscribers: klauser, brecht

Differential Revision: https://developer.blender.org/D157
2015-03-24 00:23:40 +01:00
6c9502a6c1 BGE: Remove BlenderWorldInfo
This patch will remove the BlenderWorldInfo and move the source into KX_WorldInfo.

Reviewers: brecht, moguri

Reviewed By: brecht, moguri

Differential Revision: https://developer.blender.org/D156
2015-03-24 00:19:15 +01:00
ce40fb9ab2 BGE: World color management fix
This patch will fix the color management for the mist and global ambient color.
It will remove the old "Color Management" switch in the BGE "Render > Shading" panel and will use the "Display Device" setting in the "Scene > Color Management" panel instead.

Reviewers: moguri, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D154
2015-03-23 23:56:46 +01:00
931c3e6544 BGE: Code clean up for world (mist, background, ambient)
Code clean up for BGE world mist, background and global ambient color.
Move mist render update to BlenderWolrdInfo

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Differential Revision: https://developer.blender.org/D152
2015-03-23 22:49:38 +01:00
c73693d4a5 BGE: Fix T43592: World GLSL
This patch will fix the world GLSL (mist, background, ambient) update for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Subscribers: panzergame

Differential Revision: https://developer.blender.org/D151
2015-03-23 22:32:49 +01:00
da5fb82a63 CMake: readme.html version trick broke packages 2015-03-24 07:49:17 +11:00
0737f59f62 tweaks to packman build
remove --asroot arg to makepkg
2015-03-24 07:49:17 +11:00
e7ae96ad41 BGE: Fix T27322: World F-Curve
This patch fixes the world (mist, background, ambient) F-Curve for  for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Differential Revision: https://developer.blender.org/D150
2015-03-23 21:43:42 +01:00
d07c666a0e BGE: Add setMistType and setMistIntensity API.
This patch adds the missing setMistType() and setMistIntensity() to the API

Reviewers: campbellbarton, brecht, moguri

Reviewed By: campbellbarton, brecht, moguri

Subscribers: campbellbarton, dingto

Differential Revision: https://developer.blender.org/D149
2015-03-23 21:40:11 +01:00
2affbb437b BGE: Multitexture world (mist, ambient) fix
This patch fix the existing word API for mist and global ambient lighting.
Add deprecated message to disableMist()
Add setUseMist(enable).

Reviewers: dfelinto, campbellbarton, moguri

Reviewed By: moguri

Subscribers: solarlune, jta, brecht

Projects: #bf_blender:_next

Differential Revision: https://developer.blender.org/D148
2015-03-23 21:36:08 +01:00
38321faa8d cleanup: use spaces for alignment
while studying GPU lib
2015-03-23 15:40:44 -04:00
722ddaaccd Remove 'lorem ipsum' operator
its a very specific function, and not hard to paste body text from elsewhere.
We can make an addon if its important to some users.
2015-03-24 06:17:30 +11:00
6af89c9913 compile fix 2015-03-23 15:04:11 -04:00
1bee77b77a Disable high quality depth of field for GPUs that don't support it,
system will fall back to low quality depth of field.

Also add check in case some of the errors are caused by crappy
framebuffer object support.
2015-03-23 19:24:01 +01:00
ddf58004c4 BGE: LoD Hysteresis clean up
Move scene hysteresis value to KX_Scene where it should be (instead of
KX_GameObject)
2015-03-23 19:03:56 +01:00
f65e3c7f1b Fix T44076, SSAO in solid mode will disable antialiasing in wireframe
mode.

Yes it will, because those modes stay active. So on user side, expose
depth of field option always (I don't see why not), but disable SSAO in
wireframe/bounding box mode. It is a known limitation that compositing
does not support antialiasing yet, but better give users some more
control.

This could be included in final release but it's not that serious
either.
2015-03-23 18:54:56 +01:00
1b71279adc Versioning code to correct socket naming after
340b76b42c

Reported by formerly Old_Demon on blenderartists.

Apparently this caused old files to lose their links to material sockets
(noob own mistake from inexperience with node system).

This should either be included in release with version checking being
set to version 2.73 and subversion 10, without tweaking the
BKE_blender.h file

OR

340b76b42c should be reverted for this
release.

Thanks to Lukas for checking this out.
2015-03-23 18:37:50 +01:00
b13770215c Use linear filtering for final pass of high quality depth of field, no
need to get nearest point anymore.
2015-03-23 17:07:21 +01:00
f5c33a2d48 Shader errors:
Count line from beginning of the whole shader source instead of each
string sepatately since it helps with finding out the error line in most
tested platforms
2015-03-23 15:20:12 +01:00
e8b6d86f95 Fix T44093: Color picker SV+H order wrong.
Based on HSV ordering, SV+H had S<>V swapped.
2015-03-24 00:18:57 +11:00
befaf86a99 Allow bg-image rotation for camera views 2015-03-24 00:03:51 +11:00
b8a6cd0140 Cleanup: comments, style 2015-03-23 22:52:33 +11:00
c48ebb44ae Tidy up the user interface for depth of field based on feedback by
NudelZ on irc, thanks!
2015-03-23 12:48:19 +01:00
fd2b4a74c8 Use same rgb -> greyscale for BLI_math as imbuf 2015-03-23 22:26:00 +11:00
3c21885ec4 Change coefficients to 4 digit precision only.
Need to match convention and sum up to 1.0 (previous set had a minor
10^(-10) overflow) Thanks to Campbell for taking notice.
2015-03-23 12:18:42 +01:00
0884c174b3 Make sure matcap icons are within range.
Basically out of range could happen when opening files made in 2.72 when
the new icons for texture painting were added. Apparently some more
caution is needed here.
2015-03-23 12:00:34 +01:00
c451dba550 Mitigate T44035: Proportional editing lag
Calculating connected data can be slow,
it still lags with heavy meshes but perform some optimizations (nearly twice as fast)
2015-03-23 20:03:14 +11:00
ed7e593a4b Fix T43926: Volume scatter: intersecting objects GPU rendering artifacts
Fix T44007: Cycles Volumetrics: block artifacts with overlapping volumes

The issue was caused by uninitialized parameters of some closures, which
lead to unpredictable behavior of shader_merge_closures().
2015-03-23 12:48:33 +05:00
572489ec89 Fix wrong sizeof() in new ghash hashing helpers code.
Spotted by Coverity.
2015-03-22 21:14:39 +01:00
059d5bc809 OSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop, backport to 2.74 2015-03-22 19:29:42 +01:00
e7d051043d BGE: New hysteresis offset to improve LOD level transitions
This change introduces a new hysteresis parameter that it will be added
or subtracted to/from the LOD distance to avoid popping when a LOD
object moves close to the LOD transition continuously.

Then, we have the following:

- a new LOD Hysteresis setting per scene (default 10%) which is located
in Scene context --> Level of Detail panel. This scene parameter also
will active/deactive the scene hysteresis.
- and a new LOD Hysteresis setting per object (default 10%) which is
located in Object context --> Levels of Detail panel. The LOD hysteresis
setting per object (if active) will overwrite the hysteresis setting per
scene value.

For the new blends: the hysteresis setting per scene would be active by
default and the per object would be inactive by default.
For the old blends: both hysteresis settings (per scene and per object)
would be inactive by default. A quick way to take advantage of this
feature for old blends would be to activate the hysteresis parameter in
the scene context -> Level of Detail panel

Reviewers: campbellbarton, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: nonamejuju, lordodin

Differential Revision: https://developer.blender.org/D957
2015-03-22 18:19:49 +01:00
0b4a71b072 BGE: Add physics constraints replication
This patch will add a physics constraints replication for group instances
(dupli group).
It also fix crashing when when a group instance is made from a linked
group instance and both are on the active layer.

Initial patch T31443 from moerdn (Martin Sell).

Reviewers: lordloki, sergof, moguri, sybren

Reviewed By: moguri, sybren

Differential Revision: https://developer.blender.org/D658
2015-03-22 17:56:26 +01:00
2744ce77de Revert part of D1074 related to acceleration taked into account.
It has been reverted because it was affecting obstacle avoidance
(T44041).

This fix should be backported to 2.74
2015-03-21 17:54:49 +01:00
e183199022 Cleanup: instantiate arg once in context macro 2015-03-22 03:35:13 +11:00
9ff3d8eafa Cleanup: minor edits to project generators 2015-03-22 03:35:13 +11:00
8e9c9fde42 OSX/GHOST: need one more release in error case 2015-03-21 17:15:38 +01:00
d21018b334 Fix T44065: fixed vehicle constraint
Commit ffee7f1a58 broke vehicle constraints; this fixes that.
2015-03-21 14:42:57 +01:00
d28bfb5022 Cleanup: constify view3d/camera 2015-03-21 22:44:13 +11:00
6e50bdd870 Cleanup: constify scene/modifiers 2015-03-21 22:44:00 +11:00
0025d90b98 Cleanup: use tabs 2015-03-21 16:40:43 +11:00
e0611ca832 View3D: fix view-selected zoom logic
- Correct logic converting radius to view distance.
- Wasn't taking view-zoom into account converting lens to angle.
- Support framing the selection in the camera bounds (for camera locked views).

Add ED_view3d_radius_to_dist to handles these details.
2015-03-21 15:33:10 +11:00
e88cfc28b2 View3D: use defines for default zoom-levels 2015-03-21 15:24:36 +11:00
997c0c837b Fix indentation in last commit, tab slipped in 2015-03-20 20:26:51 +01:00
ed61017391 Really fix scons with new glsl shaders 2015-03-20 20:24:30 +01:00
d5abff589e Fix scons build 2015-03-20 19:47:06 +01:00
0582aa6f13 Partly fix T44025, pixelFormat retain was left, for 2.74 backport 2015-03-20 17:57:35 +01:00
919a665497 Cycles: Avoid memcpy of intersecting memory
Could happen when assignment happens to self during sorting.
2015-03-20 21:14:50 +05:00
8ff4c53e63 Correction to previous commit, initialization of needs_free got lost by accident 2015-03-20 21:09:52 +05:00
f91850d564 Disable IME for headless builds 2015-03-21 03:02:09 +11:00
b9dc4f851b Fix link error with GLEW 2015-03-20 16:35:41 +01:00
94a3924eab Correct recent commit 2015-03-21 02:25:28 +11:00
63ab5b0883 Fix for building win32 headless 2015-03-21 02:17:27 +11:00
d12ab9a9a8 Remove unused armature code
ED_armature_deselect_all now simply de-selects
2015-03-21 02:17:27 +11:00
62b31a6e99 Avoid per-draw allocation when drawing currently rendering tiles 2015-03-20 19:56:09 +05:00
339e43e1e8 Only create vertex buffers if supported and clean them up properly. 2015-03-20 15:43:34 +01:00
07b2508305 Fix high quality depth of field on the Mac.
Quite a few things wrong here:

* Mac did not support EXT_draw_instanced, only ARB_draw_instanced
* Draw instanced did not work unless data came from vertex buffer, which
is second time we see weird things with vertex arrays in mac
* There were a few stupid mistakes by me as well, such as binding to
uniform locations for the wrong shaders (it's a wonder it ever worked
:p)
2015-03-20 15:26:13 +01:00
3d6642db83 Fix race condition and bad memory access highlighting render tiles
Is was possible that interface will be refreshed at thesame time
as render engine will start freeing render parts.

Not sure if we can get away without RW mutex here, seems we need
one way of synchronization or another..
2015-03-20 17:51:05 +05:00
c0be69f7fd Fix/Improve FKey bone creation
- new bone is now made active
- previous selection cleared
- bone direction places the tip on the active bone (if available)
2015-03-20 23:48:27 +11:00
6786ef6783 Fix T43986: VSE Mask Modifier don't move with video-Clip.
Now mask animation is offset to start of strip, instead of staying at frame 1!

Warning: this may break existing files, in case some would be using (hacking around!)
current bad behavior...
2015-03-20 12:39:25 +01:00
03d945095a Cmake: Some more tweaks to building from branch without upstream 2015-03-20 14:07:56 +05:00
6f51df5384 SCons: Attempt to deal with branches without upstream configured 2015-03-20 14:03:54 +05:00
6de12b1b43 CMake: Suppress unconfigured branch upstream error in the output 2015-03-20 13:59:05 +05:00
1cd4070e35 Fix T43786: Cycles bake disregards Auto Smooth (vertex per-face normals)
Added an utility function which performs vertex split based on the loop
normal so now backing API matches to what's happening in Cycles and BI
in terms of autosplit.

Reviewers: dfelinto, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1174
2015-03-20 12:47:19 +05:00
56edaf7867 Fix stupid strict flags in math_color_inline.c
It was unleashed with recent ghash commit and issue seems to
be the same as fixed in 69065b5b.
2015-03-20 12:25:14 +05:00
35ea7efbca Add missing update adding a shape-key
Noticeable when pin is enabled.
2015-03-20 15:50:56 +11:00
cf29010bd4 Cleanup: warnings bit-shift int overflow 2015-03-20 15:41:36 +11:00
f51a3aedc9 Cleanup remove unused variable 2015-03-19 21:11:33 +01:00
fd559ed94f Missed this last commit. 2015-03-19 21:10:41 +01:00
05e3c261a4 Fix T43989: Sequencer - Ctrl snapping a sequencer strip does not work if you specify the x axis.
New 'strip' snapping was simply not computed in case of constrained transform, hence init
'0' value was used as frame offset in this case.

This commit reorganizes a bit that snapping, to keep it more 'confined' into `snapSequenceBounds()`
dedicated function. It still needs a minor hack (setting snapping mode to something else than
defualt `SCE_SNAP_MODE_INCREMENT`, to avoid this snapping to be called by contraint code).

Thanks to Antony for review and enhancements.

This fix should be backported to 2.74.
2015-03-19 20:53:34 +01:00
ea12b87afd Fix cycles dof settings 2015-03-19 20:49:18 +01:00
81472aff2b Remove deleted list for palette colors
was used because of UI memory access only.
2015-03-20 06:08:38 +11:00
eee538f0d2 UI: minor re-organization of dof options 2015-03-20 06:08:22 +11:00
bd1e5eeab7 Blender will now use trilinear filtering by default 2015-03-19 20:05:31 +01:00
2941b4ad9b BLI GHash: add some basic gtests.
We could likely add much more, but those already covers basic behavior and should be able
to catch most errors when editing this code.

Also added some performances tests as well (timing ghash insert/lookup under heavy loads,
for different kinds of keys).
2015-03-19 19:50:51 +01:00
cfdd27381c GHash - code reorganization, performance enhancements, add a few missing utils to API.
This patch is the root of the GHash rework, all other diff will be based on it:

Reduce average load from 3.0 to 0.75
----------------------------------

This is the big performance booster part, e.g. makes tracing a dyntopo stroke between 25% and 30% faster.

Not much to say about it, aside that it obviously increase memory footprint (about 25% - 30% too).

Add optional shrinking
----------------------------------

I.e. ghashes/gsets can now shrink their buckets array when you remove enough entries. This remains optional and OFF by default.

Add code to use masking instead of modulo
----------------------------------

Buckets indices are obtained from hashes by “reducing” the hash value into the valid bucket range. This can be done either by bit-masking, or using modulo operation.
The former is quicker, but requires real hashes, while the later is slower (average 10% impact on ghash operations) but can also be used as a 'fake' hashing on raw values, like e.g. indices.

In Blender currently not all ghash usages actually hash their keys, so we stick to modulo for now (masking is ifdef’ed out), we may however investigate the benefits of switching to masking with systematic very basic hashing later…

Add various missing API helpers
----------------------------------

I.e. a way to deep-copy a ghash/gset, and a way to (re-)reserve entries (i.e. manually grow or shrink the ghash after its creation).

Various code refactoring
----------------------------------

* Get rid of the 'hack' regarding ghash size when used as gset (it’s simpler and safer to have two structs defined here, and cast pointers as needed).
* Various re-shuffle and factorization in low-level internal code.
* Some work on hashing helpers, introducing some murmur2a-based hashing too.

Thanks a bunch to Campbell for the extensive review work. :)

Reviewers: sergey, campbellbarton

Subscribers: psy-fi, lukastoenne

Projects: #bf_blender

Maniphest Tasks: T43766

Differential Revision: https://developer.blender.org/D1178
2015-03-19 17:37:54 +01:00
881e05fc54 Armature select-hierarchy now uses connected bones
Traverse down connected child bones (when available)

Also remove redundant bone loops.
2015-03-20 01:40:45 +11:00
3e9947c4d4 Depth of field high quality:
A new checkbox "High quality" is provided in camera settings to enable
this. This creates a depth of field that is much closer to the rendered
result and even supports aperture blades in the effect, but it's more
expensive too. There are optimizations to do here since the technique is
very fill rate heavy.

People, be careful, this -can- lock up your screen if depth of field
blurring is too extreme.

Technical details:

This uses geometry shaders + instancing and is an adaptation of
techniques gathered from

http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane-

 http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20-
%20in%20Real-Time%20Rendering%20Course).ppt

TODOs:

* Support dithering to minimize banding.
* Optimize fill rate in geometry shader.
2015-03-19 15:18:14 +01:00
93048873f1 Fix compilation error of blenderplayer after recent constraint commit 2015-03-19 19:10:40 +05:00
7c65b75d01 Correct recent armature symmetrize
Duplicating part of a chain could have invalid 'connected' flag.
2015-03-20 00:42:17 +11:00
15b37a4a4d Speedup for constraints update from python script
General idea is to avoid actual calculation from property update()
callback and tag things for update later instead.

That said, pose constraint flags are now tagged for update and
handled as a part of object update. In the new depsgraph it'll
be a nice dedicated operation node.

Also avoid updating disabled flags for all the modifiers. This
part of the path is not totally optimal since it'll still need
to iterate over bones in order to get pchan, but to optimize it
further would be nice to find a way to avoid pchan requirement
all together.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1191
2015-03-19 18:28:49 +05:00
c69b5e0276 Fix T44040: Blender crashes when nodes are muted
It was actually an old issue with wrong conversion happening for muted
nodes, which wasn't visible before memory optimization commit.

This is to be backported to the final release.
2015-03-19 16:04:49 +05:00
52d72a37cd Cleanup 2015-03-19 20:34:02 +11:00
ad95cb72bc Transform: Shift for precision PET adjustment
Patch T36753 by @hjaarnio
2015-03-19 20:11:33 +11:00
156921114e Armature Symmetrize tool
D1147 by @julien, with fixes/improvements

Duplicate bones where needed, otherwise use existing.
Keeps parent relations intact, can operate on parts of an armature.
2015-03-19 19:26:48 +11:00
c6ee43d384 Cleanup: style (armature duplicate) 2015-03-19 18:13:47 +11:00
8b6e777736 Fix out-of-bounds read BKE_deform_flip_side_name 2015-03-19 18:13:47 +11:00
4b88541d59 CMake: unbundle eigen3
Optionally use systems eigen3 library.

T41989 by @hasufell with edits
2015-03-19 15:41:41 +11:00
2df4444def CMake: exclude Colamd when OpenNL's disabled 2015-03-19 14:48:52 +11:00
2a2bf3c1ab Freestyle: pass Main struct to new/copy 2015-03-19 14:34:14 +11:00
9b54c88e0f Cleanup: spelling grey -> gray 2015-03-19 14:14:48 +11:00
4f602ff943 Revert part of recent color-management commit
This adds back rgb_to_grayscale,
not all color is managed or depends on the current loaded blend file's CM options.

Noted in comments that this is only to be used outside the CM pipeline.
2015-03-19 14:12:51 +11:00
255b07681a Color managed luminance for shader ramp-in-energy 2015-03-19 12:59:36 +11:00
ce11e1c878 Cleanup: better not pass function call to FTOCHAR
also use rgb_uchar_to_float
2015-03-19 12:42:34 +11:00
c31aae0487 Use fabsf for floats 2015-03-19 06:13:50 +11:00
1dd1d286c6 Select nth option to skip steps
Patch T43752 @codemanx, added matching curve option.
2015-03-19 04:40:43 +11:00
64451f0928 Fix for crash adding mask modifier 2015-03-19 01:10:44 +11:00
9231d35caa Simplify math in mix_linear glsl function. Thanks to valentin for
pointing out on irc.
2015-03-18 14:09:03 +01:00
72419eebc2 Fix T44029 textures disappear in viewport if GPU mipmap generation is
off.

GPUs need a full tree of mipmaps up to dimension 1xn to work. This will
make it so for all imbufs but cost is negligible and it's unlikely that
something could break due to that.
2015-03-18 13:48:49 +01:00
3e5cd52783 Fix bad memory access freeing viewport which uses movie clip 2015-03-18 17:17:04 +05:00
aff4aa173a Support UV island selection in UV synch and face select mode.
Enough said, people wanted this for ages, enjoy!
2015-03-18 12:41:03 +01:00
ff1ed872d9 Fix crash using "Copy to selected" on ID-props 2015-03-18 18:53:32 +11:00
2919519714 RNA: palette colors api
Methods so Python can manage colors.
palette.colors.new()/remove()/clear()/active
2015-03-18 16:10:43 +11:00
a975a3ca63 RNA: move palette into its own file 2015-03-18 15:57:53 +11:00
db710e6c0d Fix crash using removed data as function arguments 2015-03-18 15:52:36 +11:00
d0fcbab152 Fix RNA active spline assignment 2015-03-18 15:15:52 +11:00
63897304a9 Fix T44028: Vertex Colors Baking error
Was wrong color management flag used for some bakers.
Actually goes back to 7997e38.
2015-03-18 00:10:58 +05:00
2ab4489f17 Fix T44027: Normal Edit Mod : Radial from object normals affected by target object scale.
The way we were getting diff to apply to vcos from target object was just bad!

Also, fixed another related issue - negated scale would be clamped to nearly zero,
now only consider absolute version of size (we do not care about its sign here anyway).

This should be backported to 2.74 (with previous commit too).
2015-03-17 19:57:16 +01:00
6ceb84c217 BLI math vec: add 'abs' functions to get absolute values of a vector.
Unseful when handling e.g. scale, sometimes.
2015-03-17 19:57:16 +01:00
948bc66a00 Cycles: Improve readability of dumped graphs 2015-03-17 21:15:17 +05:00
a43d00d51e Cycles: Fix displacement code creating cyclic dependencies in graph
Bump result was passed to set_normal node and then set_node was connected
to all unconnected Normal inputs, including the one from original Bump
node, causing cycles.
2015-03-17 19:39:09 +05:00
dd38dce7f0 Part 2 of D1082 by Troy Sobotka, remove our functions that do luma
calculations and use the OCIO one instead.
2015-03-17 15:20:33 +01:00
42aac45d7f Part 1 of D1082 by Troy Sobotka, add API in OCIO for luminance
calculation.
2015-03-17 14:15:05 +01:00
bf8ea6b60e Kick particle systems to force redistribution, needed for reliably
applying recent jitter fix.
2015-03-17 11:04:44 +01:00
07f53d6454 Fix T44020: Crash exporting fluid sim to fbx
The issue is coming from wrong fluid modifier copy callback,
which might have left some pointers shared across original
and target fluid modifiers.
2015-03-17 12:59:44 +05:00
1724513fc6 Fix T44021: Crash switching Rendering Engines while viewport rendering + animating
Make sure preview render job is cancelled before freeing the render engine
associated to the viewport.
2015-03-17 12:02:10 +05:00
f138666f68 cleanup: Mac #include
Don’t need all of Cocoa, or any of Carbon here.
2015-03-17 01:18:52 -04:00
c0fa864e24 Cleanup: bool & const
Using bool when we're asking yes/no questions such as whether some GPU
feature is supported.

Consolidated these simple functions into gpu_extensions.c and grouped
them in the header.

Const-ified some args where the functions don't modify the pointed-to
data.
2015-03-16 22:57:56 -04:00
b0bbd34ac2 I18n: update for new akward algo names in UI messages... 2015-03-16 20:55:01 +01:00
ef70d644d6 reverting unintentionally changed value of enum OBJ_TEXT 2015-03-16 18:58:58 +01:00
9ed5a1073e fix D1130 renamed the enum OBJ_FONT to OBJ_TEXT to avoid naming conflicts in Windows 2015-03-16 18:46:40 +01:00
77bc623bc4 Get rid og gluBuild2DMipmaps on game engine. 2015-03-16 16:18:37 +01:00
664c611fc8 Get rid of gluBuild2DMipmaps on rna API.
Code here is a bit weird/simpler than GPU_draw, but we can reuse the API
here, albeit with a few restrictions (no high resolution, custom
filtering mode - which will probably get lost next time blender reloads
textures)
2015-03-16 16:07:21 +01:00
6d03e94491 Get rid of gluBuild2DMipmaps on gpu_draw.c (use our own imbuf scaling
functions instead)
2015-03-16 15:45:34 +01:00
86c828d9fd Make sure disabling attribute arrays also resets the counter so we don't
do it twice.
2015-03-16 12:14:23 +01:00
2fa593a6f7 Fix T43853: Audio animation bug (fcurves)
For a detailed bug explanation see the comments in the report.
2015-03-16 23:02:04 +13:00
19ce78fb3b Code cleanup: Comment 2015-03-16 14:52:54 +05:00
9542cf041a Fix an incorrect assert in lnor code.
There is one case where we do can have only two edges for two loops...
2015-03-16 10:38:45 +01:00
30527e3e55 Fix T43178: BGE has hard-coded 60 Hz as frame rate
Two areas of the BGE use a hard-coded 60 Hz as frame rate. However, this 60 Hz is just a default setting, and can be changed in the Blender interface.
This setting is now used instead of the hard-coded 60 Hz.

CcdPhysicsEnvironment::SetFixedTimeStep() is actually never called, as we don't even support a true fixed-timestep simulation.
2015-03-16 10:12:37 +01:00
6aaedc7cfd Refer to Task 43975: Deleting a Shapekey can break the relative pointers
This patch would reassign the relative of all keyblocks to the relative
of the deleted keyblock. And it fixes the misalignement of the index values
after the keyblock is deleted.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1176
2015-03-16 10:03:23 +01:00
60df4d10ff Fix T43999: MIS for environment broken after multi-threading commit
Typo in task start row calculation.
2015-03-16 13:31:27 +05:00
ce009c8019 PyConsole: double-click to select word
patch T43641 by @v-disp with own edits
2015-03-16 16:03:32 +11:00
4c58cb8bd9 Correct assert 2015-03-16 13:39:27 +11:00
f03e004c23 Fix T43997: Paste fcurve keeps handle selection 2015-03-16 13:08:26 +11:00
927306d60a Cleanup 2015-03-16 11:46:20 +11:00
13dc766148 PyAPI: bpy.ops enum error was cut short 2015-03-16 10:16:16 +11:00
06cc89d744 Fix T43976: Edit-mode crash /w (scene/screen.scene) mismatch 2015-03-16 09:57:15 +11:00
d49eeabae7 Cleanup: warnings 2015-03-16 09:37:00 +11:00
15374d31d5 Update themes for 2.74 2015-03-16 09:29:26 +11:00
2140cb60cb Fix T39184: Multisegment bevel profiles should curve in-plane sometimes.
When the multisegment profile joins two unbeveled edges, all in the same
plane, users desire that rather than the current behavior of linear
interpolation between those edges, the profile should curve.
This changes behavior to do that.  The old behavior can be obtained
by setting the profile parameter to 0.25, if desired.
2015-03-15 18:24:36 -04:00
Julian Eisel
3e6cfcca86 Nodes: Shortcuts for Snap and Snap Element Menu
Added Shift + Tab for Snap and Ctrl + Shift + Tab for Snap Element Menu (consistent to
3D View)

NOTE: Exit Group is now Ctrl + Tab instead of Shift + Tab
2015-03-15 22:35:26 +01:00
Julian Eisel
62070ae6e1 Fix T44003: Flatty Light: GPencil vertices and timeline keyframes black
I noticed our version code and subversion got out of sync in the past, maybe
that's what the issue was here.
Deleting the entries from the .xml makes it fall back to the default values.
2015-03-15 22:13:05 +01:00
225027ce5d BGE - new read-only attribute in KX_GameObject python api (LOD level)
Added a new "current_lod_level" property to the python api of
KX_GameObject. The property returns the current lod level of the game
object. The purpose of the property is activate logic routines only when
an object is at a certain lod-distance from the camera, avoiding to
separately recomputing the same distance in the logic script. Usage in
python script might look like:

owner = bge.logic.getCurrentController().owner
lod_level = owner.currentLodLevel
if lod_level == 0: ...do something
else: ... object might be too distant

Reviewers: dfelinto, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D978
2015-03-15 17:26:49 +01:00
dd3ade250d BGE: Fix for T43994 Steering actuator bug with Navmesh
Now the facing option is taken into account as before

This is a regression and to be ported to the final release branch.
2015-03-15 11:38:04 +01:00
176ecd9c9c BGE : Fix for T43724 and T41599 addObject() with KX_FontObject and
overlay scene

GetGameObjectType is overwritten in KX_FontObject to differentiate a
font object into AddNodeReplicaObject function. Now, in this function,
we add fonts in the appropriate list.

Reviewers: campbellbarton, moguri, dfelinto, lordloki

Reviewed By: lordloki

Subscribers: lordloki

Projects: #game_logic, #game_engine

Differential Revision: https://developer.blender.org/D1130
2015-03-15 10:50:59 +01:00
3824e0f124 Cleanup: style 2015-03-14 12:10:09 +11:00
6e17420548 BGE: Fix for T43788 Light casts shadow when use_shadow unchecked
Makes use_shadow usage consistent across supported lamp types (Spot and
Sun)

Differential D1148

Reviewers: Moguri, Brecht
2015-03-13 23:47:15 +01:00
fc3de690ac RNA: avoid inefficient array printing 2015-03-13 23:52:47 +11:00
a1a7317f6b Add argument to DM_to_mesh() function to take ownership over the DM
The idea is pretty simple: instead of making temporary copy of all the
related custom data layers just pass the ownership from the DM to the
mesh.

This is really handy in cases when you've got DM which you need to
convert to Mesh datablock and wouldn't need that DM after conversion
anyway.

Foe example, render database conversion, exporters and even Modifier
Apply will benefit from this option.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1127
2015-03-13 17:46:55 +05:00
2ef2f085fb Add an option to mesh.calc_tessface() to get rid of polygons and loops
The purpose of this change is to add extra possibility to render engines and
export scripts to reduce peak memory footprint during their operation.

This new argument should be used with care since it'll leave mesh in not really
compatible with blender format, but it's ok to be used on temp meshes.

Unfortunately, it's hard to get scene where it'll show huge benefit because
in my tests with cycles peak memory is reached in MEM_printmemlist_stats().

However, in the file with sintel dragon it gives around 1gig of memory benefit
after removing the polys which would allow other heavy to compute stuff such as
hair (or even pointiness calculation) to not be a peak memory usage.

In any case, this change is nice to have IMO, and only means more parts of
scene export code should be optimized memory-wise.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1125
2015-03-13 17:39:21 +05:00
0e18a56432 Cycles: Free caches used by the synchronized objects
Issue this commit is addressed to is that particle system and particle modifier
will contain caches once derived mesh was requested and this cached data will
never be freed.

This could easily lead to unwanted memory peaks during synchronization stage
of rendering.

The idea is to have RNA function in object which would free caches which can't
be freed otherwise. This function is not intended to deal with derived final
since it might be used by other objects (for example by object with boolean
modifier).

This cache freeing is only happening in the background rendering and locked
interface rendering.

From quick tests with victor file this change reduces peak memory usage by
command line rendering by around 6% (1780MB vs. 1883MB). For rendering from
the interface it's about 12% (1763MB vs. 1998MB).

Reviewers: campbellbarton, lukastoenne

Differential Revision: https://developer.blender.org/D1121
2015-03-13 17:38:03 +05:00
79393cb7a2 Fix T43959 jittering in 2D texture painting.
This is still not perfect,
but should work smoother now. Previously there was visible wobbling
while painting.

This can be included in final release.
2015-03-13 13:10:38 +01:00
a0a6cb129e Fix unstable particle jittered distribution.
This was never working for threaded distribution.
2015-03-13 13:07:23 +01:00
63ea8dd156 Initial compilation support with C++11 featureset enabled
This commit makes some preliminary fixes and tweaks aimed to make blender
compilable with C++11 feature set. This includes:

- Build system attribute to enable C++11 featureset.

  It's for sure default OFF, but easy to enable to have a play around with
  it and make sure all the stuff is compilable before we go C++11 for real.

- Changes in Compositor to use non-named cl_int structure fields.

  This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL
  does not use named fields in this case.

- Changes to TYPE_CHECK() related on lack of typeof() in C++11

  This uses decltype() instead with some trickery to make sure returned type
  is not a reference.

- Changes for auto_ptr in Freestyle

  This actually conditionally switches between auto_ptr and unique_ptr since
  auto_ptr is deprecated in C++11. Seems to be not strictly needed but still
  nice to be ready for such an update anyway/

This all based on changes form depsgraph_refactor branch apart from the weird
changes which were made in order to support MinGW compilation. Those parts of
change would need to be carefully reviewed again after official move to gcc49
in MinGW.

Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and
likely needs some more tweaks.

Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3

Differential Revision: https://developer.blender.org/D1089
2015-03-13 16:47:40 +05:00
278871db5b error in last commit 2015-03-13 22:46:15 +11:00
bb825d02f8 CMake: unbundle LZO library
Patch T41989 by @hasufell
2015-03-13 22:36:01 +11:00
61eab743f1 Cycles: Optimization for CMJ in CUDA kernels
Two things:
- Use intrinsics for clz/ctz (ctz is implemented via ffs()).
- Use faster sqrt() function which precision is enough for
  integer values.
2015-03-13 12:38:14 +05:00
aa4cb95a5c Pass proper bmain to the updateDepgraph() of modifiers
This is mainly to make physics modifiers being able to work
with it. For other cases this main is not needed.
2015-03-13 12:03:23 +05:00
1cac8c23b5 Fix T43803: Crash playing smoke animation, when linked as group instance
The issue was caused by missing relations between smoke domain and flow/source
objects. This happened because smoke's modifier only iterated base objects and
ignored cases when flow/source could be linked to scene via dupli-group and
does not have real base.

The same seems to be still needed for fluid and dynamic paint modifiers,
will do it as a separate commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1172
2015-03-13 12:03:23 +05:00
73ad76970e BGE: Fix for T43980 MouseLook (actuator) triggers MouseMovement (sensor)
on other objects permanently

only trigger mouse event when it is necessary, this way we avoid
conflicts with other mouse sensors.
2015-03-13 00:50:25 +01:00
3db0e1ef6a Cycles: Simplify volume light connect code. 2015-03-13 00:09:13 +01:00
0ed914a194 Cleanup: Use differential helper class. 2015-03-12 23:35:01 +01:00
90f36d4ec8 BGE: Fix for T43793 Increment frame_start/end value to 255 frames
Currently, for animated textures we were allowing 16x16 tiles but we can reproduce 128 frames only.

Reviewers: moguri, sergey, campbellbarton

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1164
2015-03-12 22:07:35 +01:00
e160da30ea View3D: Quad-view opposite axis switching
Pressing Numpad9 now orbits to the opposite side in any viewport,
with the advantage that it can switch locked-quadview axis to their opposite side.
2015-03-13 04:48:23 +11:00
f8de442a35 Cleanup: remove unused viewnumpad code 2015-03-13 03:40:58 +11:00
a8f6d51ebc D1171: Use GHash for BHead idname lookups
This patch avoids looping over bhead's linked list when looking up values by name.

Used during appaned and library loading.
Gives noticeable overall speedup loading files that used libraries. (nearly 2x on some Mango files)
2015-03-13 01:55:49 +11:00
f2d4f6b086 Cleanup: use realloc for entry-array-resizing 2015-03-13 01:55:48 +11:00
1ce256cb8f Cleanup: refactor header lookups into functions 2015-03-13 00:41:21 +11:00
b007fa41c6 Cleanup: use POINTER_OFFSET macro 2015-03-13 00:41:21 +11:00
03c77fbb99 Readme: tweaks to make it less hassle to edit
also remove "this is the Nth release" text, not so helpful and easy to forget to update.
2015-03-13 00:34:27 +11:00
dce16d57dc Revert "Fix T43865: Cycles: Watertight rendering produces artifacts on a huge plane"
The fix was really flacky, in terms during speed benchmarks i had
abort() in the fallback block to be sure it never runs in production
scenes, but that affected on the optimization as well. Without this
abort there's quite bad slowdown of 5-7% on the renders even tho
the Pleucker fallback was never run.

This is all weird and for now reverting the change which affects on
all the production scenes and will look into alternative fixes for
the original issue with precision loss on huge planes.

This reverts commit 9489205c5c.
2015-03-12 18:24:53 +05:00
c4b3b60aad Fix T43974: Alpha output of movie clip node crashes blender
Issue was caused by a bug in the memory optimization commit,
should be backported to the final release branch.
2015-03-12 18:24:53 +05:00
13d443496c Partial fix for T43967: Background is wrong in 2.74
Was missing do-versions code after rotation order change in Cycles.

This is a regression and to be ported to the final release branch.
2015-03-12 18:24:53 +05:00
cef379242b Cleanup: style 2015-03-13 00:07:26 +11:00
92d77b250e makesrna: move extern prototypes into own header
Patch T36049 by @jeske
2015-03-13 00:05:11 +11:00
ae45496812 OpenEXR 2.2 add support for Dreamworks DWAA / DWAB compression
This patch makes it possible for the user to select all supported compression types in OpenEXR 2.2

Discussion points:
 - B44 is only defined for half's it compresses to a fixed representation of 44% of the halfs. We do currently not reflect in the UI that in the case of float32's it will be equal to compression = NONE
 - ZIPS is single scanline zip and is supposed to be useful in cases where importing in Nuke happens.
 - The new Dreamworks formats, are the worth exposing etc etc

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1050
2015-03-12 14:02:33 +01:00
2814039ee3 Remove version from readme, (replace on install) 2015-03-12 23:52:48 +11:00
4b3641ec99 Fix loading of indexed .bmp files
D1173 by @rdb

Support for 1,2,4 bit images
2015-03-12 23:52:09 +11:00
064fa4baae Cycles / Decoupled Ray Marching: Skip consecutive empty steps.
This merges consecutive empty steps in the decoupled record function,
which can lead to fewer iterations in the scatter functions.

Only helps slightly though (1%), but doesn't hurt to have this.

Differential Revision: https://developer.blender.org/D873
2015-03-12 13:50:12 +01:00
cdb47b9dfc Cycles: Make Background MIS building threaded
Use multiple threads for building the MIS table, if the
resolution is higher than 512.
Also replace division by cdf_total, with a inverse multiplication by
cdf_total_inv. This gives further speedup.

On my Macbook (8 CPU threads) this improves the time to build the table:
Resolution 4096: From 0.16s to 0.03s
Resolution 8096: From 0.61s to 0.11s

This especially helps to reduce the scene update time, when tweaking world
shader while viewport rendering is running.

Patch by Sergey and myself.

Differential Revision: https://developer.blender.org/D1159
2015-03-12 13:50:11 +01:00
583466fccf Blender 2.75 release cycle start: BCon1 2015-03-12 13:50:11 +01:00
26a2b7b38f Py/RNA: add bpy.data.palettes 2015-03-12 23:49:15 +11:00
42c7200248 CustomData: don't calloc when duplicating layers 2015-03-12 23:49:15 +11:00
56f794fce6 Cleanup: de-duplicate view3d clipping 2015-03-12 23:49:15 +11:00
17d96ca2aa GuardedAlloc: safer MEM_SAFE_FREE
only instantiate the argument once,
so MEM_SAFE_FREE(array[i++]), won't cause incorrect behavior.
2015-03-12 23:49:15 +11:00
57646cb2ce Py Tests: manual URL validator
Support for URL checker to use locally generated manual.
2015-03-12 23:49:15 +11:00
4aa51096a7 Point submodules to RC1 tags 2015-03-11 20:49:46 +05:00
b40b6431c8 2.74 splash
by Manu Järvinen
2015-03-12 02:38:57 +11:00
124a226eaa 2.74 release: update HTML
Also remove unneeded metadata
2015-03-12 02:38:56 +11:00
639a3dd53b 2.74 version bump 2015-03-12 02:30:55 +11:00
99ed95bba2 Fix really stupid issue reported by Campbell, code retry to render
without VBOs would return prematurely and leak.
2015-03-11 12:19:16 +01:00
72f86ad046 Fix typo in RNA definition of "shape_key_add"
Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1167
2015-03-11 16:17:13 +05:00
527302bc0b Fix 8bit BMP palette reading
part of D1173 by @rdb, load BGR -> RGB
2015-03-11 21:26:29 +11:00
cf385caf92 Fix flip node making unsigned int out-of-range 2015-03-11 15:39:58 +11:00
62faffc800 Cleanup: style 2015-03-11 13:15:52 +11:00
6b610500b9 Cleanup: indentation 2015-03-11 13:14:24 +11:00
0d053158ec Fix T43342 bad rendering of normal maps on NVIDIAs on the MacOS
This is not limited to normal maps, it's just that normal maps cause a
mix of interleaved vertex arrays + non interleaved vertex arrays + GLSL,
which could confuse the GL. Possible explanation is that it may be
clobbering the vertex index of the shader somehow but this is difficult
to know without extensive tests and the Mac is needed by Francesco in
the morning :).

Do brute force solution instead, just force legacy drawing on Macs when
VBOs is off. On the plus side VBOs work fine, so we should be fine when
we update.
2015-03-10 23:08:43 +01:00
26d7b6c517 Fix T43831: Image Editor: Render info not displayed
Issue was caused by b62c2a9 and root of it goes to the fact that text
info is stored in the "main" scene, not the currently rendering one.

This is a bit annoying but making it so text and result are coming
from the same scene is a bit dangerous to do now. Will re-visit this
change after the release and see if it might be done in a more clear
fashion.
2015-03-11 00:04:59 +05:00
56c0a3faef Fix T43953, make opengl render work like before, basically, if we render
transparent, it will render sky/transparent, regardless of the "show
world setting".
2015-03-10 16:47:50 +01:00
edc8a4c484 Fix memory leak when using two bump maps on the same material 2015-03-10 15:27:24 +01:00
51a60cbaf8 Fix T43887: Quick Fur duplicate particle system on edit
Forbid add quick fur operator from adding fur to objects in edit mode.

Fur is not visible for them anyway and because of local undo stack used
in edit mode tweaking values of this operator does not lead to proper
operator redo.
2015-03-10 17:02:29 +05:00
9d72c9e7e5 Tests: Print counter with operator test 2015-03-10 22:00:24 +11:00
8a551394e5 Fix crash in mesh data transfer 2015-03-10 19:46:24 +11:00
95a1cc20dc Fix crash extruding an empty curve 2015-03-10 18:22:08 +11:00
81b50bcf5f Fix crash enabling dyntopo in background mode 2015-03-10 18:21:26 +11:00
f1a0c2a4f0 Fix T43941: Grease pencil eraser outline vanishes 2015-03-10 18:17:02 +11:00
afa8a0ac19 Fix for yet another assert fail of particle dmcache index.
This is totally broken, just making sure Blender does not crash and devs
can investigate other issues that are actually fixable.
2015-03-09 18:45:27 +01:00
e2471ea96a Attempt to fix T43919, avoid using GPU_framebuffer_slots_bind just in
case a system does not support drawing to many framebuffers.
2015-03-09 18:27:27 +01:00
219937fc5d Fix T43674: Smoke collision does not detect obstacles reliably.
The smoke obstacle detection was using a maximum distance for BVH
checks to find mesh elements that define boundary cells in the grid.
This BVH test was using an arbitrary value of 0.6 cell units. It should
be `sqrt(3)*0.5` to account for the maximum possible distance of mesh
elements inside a cell. Otherwise some cells that should form the
boundary are not detected as such (no closest mesh element found inside
the radius), so you get gaps in the smoke obstacle.
2015-03-09 15:23:52 +01:00
Julian Eisel
b14e2876a7 Fix T43937: Changing Texture Brush doesn't update toolbar 2015-03-09 14:48:56 +01:00
b21e0cccfa Fix T43872: Adding a constraint to a bone of a proxy armature resets all bones' transformations.
Temp hack for until new depsgraph is here. Thanks the Joshua and Sergey for their help.
2015-03-09 13:02:30 +01:00
fd94d2d80f T37832: OpenCL compositing bug in defocus node
The issue seems to be caused by the integer overflow. It's actually
still needed to investigate why exactly buffer contained such a huge
value, but the patch is still legit and seems to be solving the issue
just nicely.
2015-03-09 16:56:37 +05:00
a1549bc47a Image Space: enable zoom/cursor warping 2015-03-09 21:01:43 +11:00
40ef25d000 Fix T43891: Skin modifier inverts some faces 2015-03-09 20:26:09 +11:00
9ffc66b1c0 Math Lib: add mid_v3_v3v3v3v3 2015-03-09 20:26:09 +11:00
d4c1e98dd4 Fix T43484: Motion blur fails in certain circumstances
The issue was caused by mismatch in how aligned triangles storage was
filled in during BVH construction and how it was used during rendering.

Basically, i  was leaving uninitialized storage for triangles when
there was deformation motion blur detected for the mesh. Was likely
some sort of optimization, but in fact it's still possible that regular
triangles would be needed for rendering.

So now we're storing aligned storage for all triangle primitives and
only skipping motion triangles (the deformation motion blur flag from
mesh is now ignored).
2015-03-09 14:15:35 +05:00
b13b900d50 Cycles: Improve logging in object motion detection
Reporting mesh name is not really useful, since it's name does not
any relation with the original object/mesh names.
2015-03-09 13:25:27 +05:00
2ae0f1e70b Fix T43908: Mask render bug, one pixel black line
This was a regression caused by attempts to fix T42844 and there were
some red-herrings which lead me to the wrong way to fix it. It's some
deeper issue than just interpolation offset, it's mainly how the node
resolution is being mapped to each other.

It could be actually a part of canvas awareness project..
2015-03-09 12:48:42 +05:00
36df8cc1e5 Fix T43421: bisect_edges returns insufficient data 2015-03-09 18:33:24 +11:00
09e072a245 Fix T43858: Collision Bounds Display Bug
Was using draw-type when drawing BGE collision bounds.
2015-03-09 17:24:14 +11:00
29e5de3728 Fix BGE: calling ReleaseInstance on NULL joystick 2015-03-09 16:36:35 +11:00
c44f489d24 Fix for clamping large UV coords in UV-panel
Would clamp value ranges in UI when outside hard coded range.
2015-03-09 15:49:45 +11:00
60f7f93c16 Freestyle: Fix for a few line style properties left not copied. 2015-03-09 12:53:16 +09:00
Folkert de Vries
7d38d85340 Freestyle: Fix for references of deprecated texture stroke shaders.
Removed all references of deprecated texture shader.  Also deleted
several lines of dead code.

Since texture_shader.py no longer does what it was supposed to do,
the file itself was removed.

Patch reviewed by Tamito Kajiyama (kjym3).
2015-03-09 12:53:13 +09:00
a0fa3de267 Fix T43624: Freestyle uses wrong colour on second Line Set with textured lines in Cycles.
This is a regression introduced by rBd8b00a3bf5c1 (Freestyle: memory
consumption optimization in stroke rendering).

The issue was caused by uninitialized MPoly::mat_nr values.  Before the
stroke rendering optimization, individual Freestyle strokes were
represented by distinct mesh objects, and thus MPoly::mat_nr was left
unset (i.e., was always zero).  Now that the stroke rendering optimization
has been done and mesh objects may represent multiple strokes of different
materials, MPoly::mat_nr had to be properly set to the material index that
refers to the material of the poly face.
2015-03-09 12:53:11 +09:00
ec18021867 Fix T43337: Group object disappear after append
Relying on user-count of 1 wasn't reliable because of custom-bones.
2015-03-09 14:33:27 +11:00
Severin
573783259d IME: Disable IME for number buttons 2015-03-09 02:27:11 +01:00
Severin
7d5d971dea Fix T43920: Crash when clicking into different area during IME composition
Fix by @randon
2015-03-09 02:27:11 +01:00
a7855f81d4 Fix T43332: Adding polygon int layer failed 2015-03-09 12:23:58 +11:00
fee0e6e211 BMesh Py API: calc_edge_angle functions
Make consistent with calc_edge_angle,
take an optional fallback arg for non-manifold edges
otherwise raise an exception.
2015-03-09 00:47:53 +11:00
b4fccce1f6 BGE: Fix for regressions T43883 and T43456 (and T43876 likely). SDL joystick related
Only to create and destroy joystick devices for connected joysticks

Reviewers: campbellbarton, sybren, moguri

Reviewed By: sybren

Maniphest Tasks: T43883, T43876

Differential Revision: https://developer.blender.org/D1161
2015-03-07 21:27:30 +01:00
c32ded3654 Cycles: add better specializations for SSE shuffle function and few more wrappers. 2015-03-07 17:25:21 +00:00
c8fb488b08 Fix T41066: An actual fix for curve intersection on FMA-enabled CPUs 2015-03-07 16:20:34 +00:00
b7a759502f InstallDeps: Fix stupid typo which broke OIIO building (and nobody reported it :| ). 2015-03-07 14:42:03 +01:00
8dbbb60e8a Fix T43910: Unpack fails when stored filename is broken (empty, or no file part...).
Now we have an helper that will generate local/global paths and ensure they are valid.

Note: We currently have no way to 'generate' a valid extension in these cases, so just
using raw (file-safe) ID name.
2015-03-07 14:41:43 +01:00
cf1227d4ad Fix edit-lattice leaving incorrect point-size 2015-03-07 03:53:08 +11:00
1c3b2c58af Fix issue reported on irc by Sebastian, crash when undoing and changing
screen.

Apparently the screen on the given file did not have a scene attached.

Not sure how this is possible exactly, but for now just guard against it
at load time by assigning default scene in that case.
2015-03-06 14:22:00 +01:00
e95732bced Fix broken "force setting multisamples only once", introduced in b5b359b48f 2015-03-06 13:07:02 +01:00
9794facab3 Fix metaball->mesh removing all metas in the scene
Assumed the entire scene used the one motherball.
2015-03-06 22:46:45 +11:00
6405aa4e9c Fix access freed memory when doing constraints ID counter on main free
Basically just made constraints free function aware of possible do_id_users
argument, same as we've got for objects, object data and so on.
2015-03-06 15:22:25 +05:00
3f572fe7d2 Fix T43905: Crash happens when press Create Plane Track
It was only happening on 32bit platforms because of alignment
differences when allocating class.

Now got rid of copy of eigen matricies stored by value in the
residual block which solves aligment issues and should also
give some unmeasurable speedup.
2015-03-06 14:58:16 +05:00
f682129d62 PyAPI: clarify fallback docstring 2015-03-06 19:02:57 +11:00
8638142c3b Fix T43904: calc_vert_angle returns wrong value
This was mis-named, rename to `calc_edge_angle`
and allow a fallback value in the case when the vert doesn't have 2-edges.
2015-03-06 18:55:36 +11:00
7df60becb9 BMesh: Add extended BM_vert_calc_edge_angle that takes a fallback value 2015-03-06 18:45:00 +11:00
d17e6c10df Cleanup: quiet minilzo warnings 2015-03-06 17:47:23 +11:00
2f21dbf38b Cleanup: unused warnings 2015-03-06 17:30:05 +11:00
a9b7d5e4e8 Cleanup: unused macro warning 2015-03-06 14:17:21 +11:00
b1f4301deb Fix typo in "Add" and "Subtract" mode of Vector Math node.
Differential Revision: https://developer.blender.org/D1003
2015-03-06 02:34:03 +01:00
Julian Eisel
d6a6950547 Correction to previous commit
Calling ensure_lookup_table for each face is stupid! :/
(Noted by Sergey - thx)
2015-03-05 20:36:58 +01:00
Julian Eisel
61aede4305 Fix T43900: "Operator Mesh Add" template fails
Another script that was missing the lookup_table call.
2015-03-05 20:26:41 +01:00
37d7b2d3b6 Revert "COLLADA - support for shadeless material (SHADER_CONSTANT)"
This reverts commit 04b0a9f4b8.
2015-03-05 19:44:23 +01:00
e2d4a93a00 Fix T43880 really stupid mistake from fixing stick mode selection 2015-03-05 19:14:38 +01:00
6f3629607b Make limits of sequencer scaling a bit more sane 2015-03-05 19:05:39 +01:00
7c38ba0a9e Audio library, early exit when animation is found 2015-03-05 18:50:44 +01:00
a7d292394e Fix T43898, correct all uv layers in bevel, not only the active one 2015-03-05 18:50:44 +01:00
04b0a9f4b8 COLLADA - support for shadeless material (SHADER_CONSTANT)
This patch make it possible to export and import shadeless material.

Reviewers: sergey, sauraedron

Subscribers: sergey

Projects: #collada

Differential Revision: https://developer.blender.org/D1094
2015-03-05 18:44:04 +01:00
23af8984bb Compositor: Add sanity check around pass element size and compositor data type
Only happening in the debug builds, avoids issues like recent AO one from happening.
2015-03-05 20:24:41 +05:00
6e1ea04ada Fix T43894: Wrong alpha with bilateral blur node
The issue was caused by AO operation reporting it's a color operation
(which means it's expected to output RGBA) but internally it's RGB
only in the render engine, which caused some memory to be uninitialized.
2015-03-05 20:21:55 +05:00
73d0749a59 Compositor: Fix compilation error with COM_DEBUG enabled 2015-03-05 20:12:28 +05:00
9489205c5c Fix T43865: Cycles: Watertight rendering produces artifacts on a huge plane
The issue was caused by numerical instability whrn having ray origin close to a huge
triangle, which could have aused bad ray distance check.

Watertight Woop intersection isn't really addressing such cases, it's dealing with
small triangles far away from the ray origin instead, so it's a bit tricky yo make
it working reliably.

While we're quite close to the release it's safer to do check in Pleaucker coordinates
if ray close to a huge triangle. Likely this additional check combined with some other
tweaks to the code doesn't cause measurable slowdown in the scenes tested here.

After the release we can play a bit more with this code in order to make it more
stable without Pleucker fallback.
2015-03-05 18:55:30 +05:00
eb16b04b9d CMake: Need to find pugixml.hpp instead of pugixml.h
That's how file is actually called in the upstream.
2015-03-05 17:23:23 +05:00
6883a9bad9 Recent changes broke SDL/GHOST 2015-03-05 21:01:48 +11:00
37771e8fff Cleanup: unused var 2015-03-05 17:58:22 +11:00
61215999b5 Update install_deps for recent CMake change 2015-03-05 17:45:21 +11:00
da0176614b Fix T43672: Cycles preview stalls when out of view 2015-03-05 15:42:01 +11:00
1e817cceb0 CMake: rename LLVM_DIRECTORY -> LLVM_ROOT_DIR
Matching convention with all other libs
2015-03-05 15:42:01 +11:00
acfc0d4a18 CMake: was defaulting to an old LLVM version
Made finding LLVM fail.

only use LLVM_VERSION if set, else set to installed version
2015-03-05 15:42:01 +11:00
30d6589069 CMake: mark lib/debug options advanced 2015-03-05 15:42:01 +11:00
90e1b83696 Fix T43890: Crash, Alt-D over operator redo button 2015-03-05 09:10:16 +11:00
ffee7f1a58 BGE: Fix crash when a constraint misses its reference object
Blender allows you to create a constraint without specifying its reference
object, even when the constraint requires such a reference. The BGE would
crash on this. This change simply ignores such a constraint.
2015-03-04 14:15:41 +01:00
6efcd9e8fe Math Lib: redundant axis flip decomposing a plane
Also add a faster, non-normalized version of the function.

(Neither are used currently used).
2015-03-04 20:11:49 +11:00
b1e48ab4e4 Fix T43879: Autokey ignore pref /w viewlock-camera 2015-03-04 17:15:11 +11:00
cf2876b77a Fix for snap to cursor /w parents (object/pose)
Also don't use pose-bone transform unless the user is in pose-mode.
2015-03-04 15:13:10 +11:00
d48c3666da Snap: ignore unselected items, /w snap from active 2015-03-04 15:13:10 +11:00
27fe640104 Own error in recent commit (Snap active) 2015-03-04 13:28:45 +11:00
c755d8fbb5 RNA: rename mesh validate argument
cleanup_cddata -> clean_customdata
2015-03-04 12:58:14 +11:00
85c38e7389 Fixed wrong label and hint text in Collada exporter 2015-03-03 23:42:33 +01:00
7f25da6509 fix T43094 Added check for out of bounds in vertex color array 2015-03-03 23:42:32 +01:00
d544bc5cd5 Cycles: Fix embarrassing type remained after getting rid of utility SWAP() 2015-03-04 00:16:21 +05:00
ed5df50192 Cycles: Fix/workaround for toggling world MIS causing CUDA to fail
Seems it's just another issue with the compiler, worked around by explicitly
telling not to inline some function.

In theory we can unify this with CPU, but we're quite close to the release
so better be safe than sorry.
2015-03-03 18:48:37 +05:00
19656233dd Style cleanup 2015-03-03 13:43:47 +01:00
d58a15c0a6 Windows: Add stacktrace support when unhandled exception occurs.
We need to register the exception handler slightly differently here, as
well as adding DbgHelp as a library, but according to docs it should be
supported in recent Windows editions (Win XP included even).

We can try it first and revert if there are issues.
2015-03-03 13:39:15 +01:00
b42a3d2485 Another stability commit for legacy users - don't crash when toggling
dyntopo just notify user that their system doesn't support it.
2015-03-03 11:34:23 +01:00
f2bc3dd678 Grrr, missed those ones in previous commit! 2015-03-03 10:44:14 +01:00
82cafcfdb7 UI messages fixes... 2015-03-03 10:40:52 +01:00
23330473e3 Cleanup: remove unused collada conversion 2015-03-03 15:40:34 +11:00
26a251202b Fix mesh-validate for polys using successive verts 2015-03-03 15:32:35 +11:00
34003dd034 Fix T43151: Collada meshes crash Blender
We have multiple reports of collada files crashing, run all meshes through validate.
2015-03-03 15:30:45 +11:00
6d5ab8fdb7 Cleanup: collada had own defined Global (why?)
Wasn't needed and made linking fail here
2015-03-03 15:07:19 +11:00
6856ea0642 Bugfix T43866: 'Purge all' button in the outliner
The cleanups in 08a2101 forgot to modify the UI code which was using these values.
2015-03-03 12:52:18 +13:00
e2c24a18e3 Knife: fix glitch dragging mouse outside the face
Had a small gap between the last-vertex & new-cut
2015-03-03 09:29:44 +11:00
Julian Eisel
c271a9fa8b Fix T43864: Saving from top area in fullscreen changes wrong area into File Browser
We now always use the actual fullscreen area.
2015-03-02 22:38:59 +01:00
d2b6c6fd9b Fix T43862: Knife fails with concave ngon 2015-03-03 00:26:20 +11:00
8c6073db11 BMesh: BM_loop/edge_point_side_of_loop_test
change behavior to use a negative number when outside,
and return the signed, squared distance.
2015-03-03 00:26:13 +11:00
e38dc33f80 Fix dist_signed_squared_to_corner_v3v3v3 with concave corners 2015-03-03 00:20:53 +11:00
cea3892813 Revert "Reshuffle applying of solver results a bit to ensure it works exactly"
This reverts commit 4c723eb80e.
2015-03-02 12:18:57 +01:00
bc20a745be Fix T43859: Texture baking crashes blender
The issue was caused by particles using billboard distribution, which
requires either object to be specified or camera in the scene to be
existing.

This commit prevents backing from crash, but bake result might not be
totally expected because of the thing mentioned above.
2015-03-02 16:08:23 +05:00
4c723eb80e Reshuffle applying of solver results a bit to ensure it works exactly
as complicated as before cloth solver changes.

Still doesn't solve the collapsing cloth cube issue mentioned in T43406,
probably the bending springs work somewhat differently now.
2015-03-02 11:47:42 +01:00
1adfa36f88 Fix missing newline in the button cycle error print 2015-03-02 14:26:52 +05:00
520646b421 cleanup: whitespace 2015-03-02 16:51:01 +11:00
3281c3f3ce error in last commit 2015-03-02 16:51:01 +11:00
6373078321 Fix T43848: Wrong direction recalculating normals
Face islands furthest faces could face towards the center point when connected to sharp edges.

Now check the furthest edge of the furthest face, to test for face winding.
2015-03-02 15:51:07 +11:00
9d85e32ee3 BMesh: calc normals, use area weighted center
Prevents many small faces skewing center calculation.
2015-03-02 13:04:46 +11:00
56935e23c4 cleanup: float/double promotion, redundant casts 2015-03-02 11:05:34 +11:00
2058505da4 Bugfix T43851: Creating a new action after stashing crashes blender 2015-03-02 05:05:04 +13:00
f076eb482b Use the old double-step collision method only for cloth.
This method does not work for hair anyway. Even though hair collision
needs work at this point, it's still better than nothing.
2015-03-01 15:37:55 +01:00
dfefd36837 Fix T43406: Bring back cloth collisions.
This was disabled during the course of hair dynamics work. The cloth
collision solution is based on a secondary velocity-only solver step.

While this approach is usable in general, the collision response
calculation still does not work well for hair meshes. Better contact
point generation is needed here (Bullet) and preferably an improved
solver for unilateral constraints.
2015-03-01 12:33:30 +01:00
9f6f151536 I18n: Do not skip Polish anymore, translation work has started on it. 2015-02-28 21:51:17 +01:00
4ad31d5bab NLA Drawing Tweaks
* Strips in muted tracks are also drawn with dotted borders now to make it clearer
  that they are not contributing.

TODO:
* Perhaps dotted should be used for protected, and opacity for muted instead?
2015-03-01 02:34:54 +13:00
46ad5b6f67 Tweaks for NLA and newly added Action Stash Tracks
* Do not make Action Stash Tracks or their strips active/selected
* Lock the track to prevent accidental editing/adding of other strips

* Prevent strips from being added into locked tracks by the pushdown operator.
  This is mainly to prevent pushdown actions from getting into the stash tracks.
2015-03-01 02:34:53 +13:00
ea84b0e4ac Action Editor: "New Action" operator now stashes old actions, and is used by default again
This commit modifies the "New Action" operator to always stash the old action
before it creates a new one. As a result, the old active action will now have
a proper user of sorts after the new one is created, preventing previously
created actions from being lost.

Now that the New operator does this, it can be used for the Action Editor header AND
NLA Editor (Animation Data Panel -> Active Action) again. The "stash and create"
operator is somewhat redundant at this point as a result.
2015-03-01 02:34:52 +13:00
741a66e472 Action Editor WIP: Adding new actions in Action Editor now uses the "stash and create new" operator
In constrast to the old "new" operator, this operator will stash the existing action
in the stack to prevent it from being lost. This situation isn't totally ideal yet,
since the NLA Editor still calls the old method.
2015-03-01 02:34:51 +13:00
13a0dce51c Action Stashing: Don't allow an action to get stashed more than once 2015-03-01 02:34:50 +13:00
b16fbabd61 Reshuffle code 2015-03-01 02:34:49 +13:00
7c611e2204 Code Cleanup: Deduplicate logic for getting AnimData block associated with Action Editor modes 2015-03-01 02:34:48 +13:00
2b51eab69d Code cleanup: Split off the creation and setting logic for new actions into different functions
This is also just as prep for the next step
2015-03-01 02:34:47 +13:00
9c82a0478f UI Tweak: Display labels for Push Down and Stash
I'm still not sure which version is better, but I suspect that with the labels,
this might help users figure this out more than if they were just unlabelled
icon buttons...
2015-03-01 02:34:46 +13:00
8d2fc99618 Code Cleanup: Separate out the logic for stashing actions into a separate function 2015-03-01 02:34:46 +13:00
ac30378e3e Action Editor: Stash Action Operator
This operator (the snowflake icon, beside the pushdown button on the Action Editor
header) adds the currently active action to the NLA stack in a muted track, then
creates + loads a new action ready to be populated with new keyframes.
Since the NLA is being used to hang on to all the actions here, no actions are
getting lost.

Usage Notes (there will be some additional tweaks to make this nicer):
* To preview different actions that have been "stashed", simply click the "Solo"
  toggle for the track containing the action in question. Playing back the NLA will
  now show the stashed track
* To edit a previously stashed action - simply enter tweakmode on it in the NLA
  while the "Solo" toggle is enabled.

Todo:
* Add some more operators here to polish up the Action <-> NLA bridge to make the
  layered and stash workflows smoother. Examples include some tools to easily
  switch between the different actions layers in the stack, as well as making it
  easier to get out of tweakmode (and sync up the action lengths)

* Review and cleanup the behaviour of the "new" operator here to avoid the old
  problems that users were running into

* After the next release - Implement the full Action Libraries functionality, with
  ways to bridge the stashed strips over to a full-blown library.
2015-03-01 02:34:44 +13:00
7af4690295 NLA: Auto-Blends option is no longer enabled on all newly added strips
This may be put back again later, but currently, this is a bit too trigger-happy
to have it on. It tends to mess up results more than it helps.
2015-03-01 02:34:43 +13:00
b44201d8b9 Fix for NLA Solo/Mute behaviour
The Solo and Mute functionality for the NLA system should really be mutually
exclusive features. They both affect whether a given track applies or not.
The only difference is that the Solo option mutes all the others, while the Mute
only does this on a per track basis.

Before this fix, muting a strip and then making it solo meant that the solo'd
track would not play at all, which isn't really what we want.
2015-03-01 02:34:43 +13:00
bb7ce9173a Fix for previous commit: Pop up a warning in cases where the operator will refuse to do anything 2015-03-01 02:34:42 +13:00
b28a24091f Action Editor: Added "Push Down" operator to send the current action on to the NLA Stack
This commit exposes the "Push Down" button/functionality found in the NLA Editor
to the Action Editor, so that actions can be added NLA Stack from here too. The
main point of this for now is to make the whole layered-animation workflow nicer
more efficient, but not requiring the second editor be visible in common cases.
It also conveniently sets things up for the next few changes (already hinted at
here)...
2015-03-01 02:34:41 +13:00
cec1691a91 Code Cleanup: Clarify some comments regarding usercount management
(Note for the uninitiated looking at the diffs: this is very much *not* what
 you're probably thinking right now, if you're looking at the line in
 act_new_exec())
2015-03-01 02:34:40 +13:00
8bb3e2a3ea gameengine physics: moving collision filtering inside the collision panel and relabeling some parts 2015-02-28 09:09:55 +00:00
b00fecc85d UI: place camera DOF buttons to be more compact 2015-02-28 17:26:05 +11:00
08a2101eb6 Outliner: rename "Orphaned Datablocks" menu item
Makes the drop-down push searchbox out of the view (which is already quite cramped)
change to "Orphan Data".
2015-02-28 16:24:54 +11:00
38c30c41d7 BGE: Fix ShowDeprecationWarning macro.
Reviewers: lordloki, brita_, sybren, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D1144
2015-02-27 23:10:43 +01:00
fff8a519b8 Py Enum props definition: 'default' parameter cleanup/fix.
* There was no real default value for this parameter (neither "" nor None would work the same as
  not specifying that parameter). Now, 'None' is considered as default value, and you get
  exact same behavior with this value and if not specifying it. This is important at least for
  consistency, and potentially too in some esoteric cases (like generated code or so).
* Add a warning about the fact that 'default' parameter shall not be psecified when items
  are given a callback function.
2015-02-27 23:02:13 +01:00
12f60e7825 Fix T43834: Text object looses one char after another by entering/leaving edit mode.
Own mistake in refactoring of `BLI_strncpy_wchar_as_utf8()`, if given size was exactly
the one needed, we'd lost last char (off-by-one error).

Many thanks to plasmasolutions (Thomas Beck) who found the issue and did
all the investigation work here!
2015-02-27 21:31:54 +01:00
15957a9e4d Get rid of gluScaleImage in our game engine as well. 2015-02-27 14:47:39 +01:00
55e7d726c4 Make some adjustments to the units for viewport camera dof.
This is still not so correct, to make it work we really have to do a
blurring pass based on the real coc (currently we are just blending 3
levels of blur)
2015-02-27 14:11:26 +01:00
d7a877b69c Fix WPaint inactive when painting on a vgroup and the only other vgroup is locked.
`enforce_locks()` would reset weights of non-locked modified vgroups if it could not
find any other non-modified non-locked vgroup to 'distribute' weights into.
Sounds rather stupid, yet I hope I did not break something else, this code
is rather convoluted to say the least.

Side-reported by zeauro (ronan ducluzeau) in T43814, thanks!
2015-02-27 11:46:55 +01:00
a7e80a9470 Fix T43814: Skinning : set parent with automatic weights doesn't take into account locked vertex groups.
Simply skip a bone's vgroup when it already exists and is locked.
2015-02-27 11:46:55 +01:00
af032873a2 error in last commit 2015-02-27 20:58:32 +11:00
9ab28727ac Fix T43605: Spot Cone+Curve creates odd shadow
Curves could leave glFrontFace in an unknown state.
2015-02-27 20:54:57 +11:00
9683c2b129 Fix T42833: Kink on nurbs curve
Threshold for normalizing was too big.
2015-02-27 20:16:51 +11:00
0b67c21077 Fix T43807: invalid mesh from 2-sided cyclic curve 2015-02-27 17:43:10 +11:00
7293291a40 cleanup: typos 2015-02-27 15:57:59 +11:00
cfd176bcb1 MEM_SAFE_FREE caused issues /w const & GCC5 2015-02-27 15:26:22 +11:00
5520b8df4b cleanup: double promotion 2015-02-27 14:52:58 +11:00
2a5e92c989 cleanup: use GHOST_PRINT instead of stdio
Mostly from my own NDoF stuff.
2015-02-26 21:21:11 -05:00
6cb692f48e cleanup: ghost Win32 event processing functions
Removed window arg from key conversion functions.

Removed processModifierKeys declaration since that function was
apparently never implemented.

Using Win32-specific classes instead of their generic superclass -- this
helps in a few cases like WinTab.
2015-02-26 19:53:55 -05:00
a6ebc9a813 Compile fixes for mingw64
* m_hDC was always included after m_hWnd in all the constructors and other functions,
  but the order was reversed in the struct, meaning that they would not get initialised
  correctly

* Got rid of the gotos for the error handling case in initializeDrawingContext()
  This was causing "jump to label ... crosses initialisation" errors for the calls
  to get GL version string info (i.e. const char *vendor = ...;  etc.)  I wasn't sure
  if those glGetString calls needed the rest of the context to be defined first, so
  I decided to leave them where they are now, and got rid of the gotos (which were
  making this particular piece of code a bit confusing) instead.


TODO:
There are still a bunch of warnings about around 660, which I haven't managed to solve
(but at least they won't prevent Blender from compiling)

  narrowing conversion of '(stereoVisual ? 1063 : 1061)' from 'int' to
  'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
2015-02-27 13:14:09 +13:00
7aa91f5fbc cleanup: ghost Win32 IME
Took out lots of redundant function calls (getters). Also wrapped more
code in WITH_INPUT_IME guards.
2015-02-26 18:40:34 -05:00
87dc01e690 Fix T43806: Knife project crashes
Need to re-create the bmbvh after executing the cut.
2015-02-27 09:53:23 +11:00
90cc2643e9 cleanup: spelling & typos
Comments only, no functional change.
2015-02-26 14:12:24 -05:00
eaabe9d6c6 BGE: Fix for CreateConstraint API
This patch fix two bugs related to CreateConstraint().
1. Disable linked collision only working with 6DoF constraints.
2. If all pivot axis rotations setted to zero the linked object disappears.

{F101374}

Reviewers: moguri, sybren, brita_, lordloki

Reviewed By: lordloki

Subscribers: p9ablo

Differential Revision: https://developer.blender.org/D704
2015-02-26 20:08:22 +01:00
0aa258117d Fix T43303 impossible to select a joint in stick bone edit mode.
Things here are simple, selected bone joint could have same priority as
unselected bone, so bone would always win. Gave joints a little more
priority than bones, usually user will be more precise just to select
the joint anyway.
2015-02-26 15:44:06 +01:00
84f314c875 Remove redundant glInitNames calls (shouod be handled in selection code
now.)
2015-02-26 15:20:30 +01:00
46fe39ff31 Fix T43479 animated textures lost after going to a frame before animated
frame start.

Issue here is that if we failed to get an image from the cache, we would
try to load from file. This would fail when the queried frame was less
than the animated sequence start frame, and invalidate the OK state of
the image.

Solution is that when loading from cache succeeds, we also reset the OK
state of the image for animated textures.

The fix might be relevant elsewhere too, but kept it isolated just in
case.
2015-02-26 15:10:19 +01:00
13c275ce84 Fix T42506 sequencer not limiting zoom.
Fix by Campbell thanks!
2015-02-26 14:27:33 +01:00
60679a171d Revert "Cleanup: Simplify camera sample motion blur code."
This reverts commit 8197f0bb64.
2015-02-26 13:27:02 +01:00
f159ed7746 Workaround T43491: Python readline causes crash
loading 'readline' module could crash blender if 'libedit' was already linked (via LLVM).

Workaround the problem for now since we don't even need readline,
a _real_ fix likely involves changing how LLVM or Python are built.
2015-02-26 22:54:18 +11:00
d9fa9bffd5 Grmll, sorry for the noise, fix stupi cpoypaste typo in previous commit. 2015-02-26 11:46:05 +01:00
ac26a61385 Attempt to fix BGE build on windows.
Caused by rBb5b359b48f7f35a79b3eec, better to try a full build before pushing that type of commit. :/
2015-02-26 11:42:22 +01:00
98e3694c39 Fix T43817: issue with non-utf8 encodings in Windows paths, again...
We need to use 'W' widechar variants of win funcs and convert wchar to utf8-encoded bytes
in those cases, sigh...

Note: theoritical fix only, need org reporter to test it...
2015-02-26 11:27:58 +01:00
88facb8876 Fix potential buffer overflow in BLI_strncpy_wchar_as_utf8(). 2015-02-26 11:27:58 +01:00
8197f0bb64 Cleanup: Simplify camera sample motion blur code. 2015-02-26 10:30:01 +01:00
31f6e621b8 Fix T43643: Solidify crashes with 'only-rim'
When verts were shared by 2+ face-islands, the number of allocated edges was wrong.

Cleanup the logic for new verts/edges.
2015-02-26 18:48:22 +11:00
d282728f1d mesh_validate: don't add invalid edges into the hash 2015-02-26 17:49:21 +11:00
7708012b9d Change samples variable for SSAO - now it is actual samples, not squared
- spiral scheme is much more intuitive here. Also use float number for
spirals to avoid having samples on the same radial direction when sample
number is divisible by spiral number.
2015-02-25 23:30:50 +01:00
22ab4e6e13 Use spiral mapping for SSAO - it reduces banding a lot, especially in
higher sample counts. Probably a blurring pass might be a good addition
here as well.
2015-02-25 23:10:01 +01:00
442664e02c SSAO: sampling coordinates go out of screen, reject the sample
Previous behaviour would get occlusion at borders which could create
over occlusion at edges of the screen.
2015-02-25 22:05:03 +01:00
6a65bc91e2 Minor message fixes - thanks to S.J.Bennett for the heads up 2015-02-25 14:41:54 +01:00
df258c9054 Fix silly mistake with flags which would make stereo buffers unsupported 2015-02-25 14:15:07 +01:00
5d01db8035 Make the message even more clear in case someone does not know what GPU
is

(we are talking about people who won't have installed a driver -
anything is possible)
2015-02-25 14:09:40 +01:00
b5b359b48f Warning messagebox for windows when an unsupported implementation of
OpenGL is detected:

Hoping to decrease the frequency of by far one of the most frequent bug
reports by windows users.

There is some reorganization of the GHOST API to allow easy addition of
further OpenGL options in the future. The change is not propagated too
deep to keep the size of the patch managable. We might reorganize things
here later.

For OpenGL we do two checks here:
One is a combination of GDI generic renderer or vendor microsoft
corporation and OpenGL version 1.1. This means the system does not
use GPU acceleration at all. We warn user to install a graphics
driver and of cases where this might happen (remote connection, using
blender through virtual machine)

The other one just checks if OpenGL version is less than 1.4 (we can
easily change that in the future of course) and warns that it is
deprecated.

Both cases will still let blender startup correctly but users should now
have a clear idea of the system being unsupported.

A user preference flag is provided to turn the warning off.

Now stop posting those bug reports without installing a driver first -
please?
2015-02-25 13:51:53 +01:00
1da5e8df6f error in last commit 2015-02-25 18:19:39 +11:00
83caabebd2 CMake: error making get_blender_version a function
Incorrect use of PARENT_SCOPE meant the vars would be used uninitialized elsewhere.
2015-02-25 18:15:54 +11:00
37556d9a9a Fix T43798: Individual origins disabled object PET 2015-02-25 13:41:02 +11:00
565df1559f T43771: Fix
There is a difference between the socket order of the BokehBlur node and
the BokehBlur operation. Socket[2] and Socket[3] have switched their
order.
2015-02-24 20:28:12 +01:00
6ddd2549ed Fix T43535 - weight paint issues
Two issues in this report:

* Shift-F key conflict between painting and selecting mirrored bone
(moved select mirrored to ctrl-shift-F)
* It was possible to display texture overlay in weight painting, even
though the mode does not support textures yet.
2015-02-24 20:12:49 +01:00
cc388ccca4 Add Inset Faces to the mesh edit mode toolbar.
Inset has been missing from the toolbar for a long time, even though it's a fundamental mesh tool. It now lives, happily, alongside Extrude.
2015-02-24 12:19:24 -06:00
2dd37614bc Cleanup leftover code from previous commit 2015-02-24 17:28:43 +01:00
50e9868abe Fix T43785 crash with border select.
Naming here is slightly misleading. We have:

* Number of elements (objects) that can be picked
* Buffer size
* Number of integers in buffer.

Interestingly enough, bufsize in OpenGL (as far as I could find in
examples on the web) and in most of the code refers to the latter and
actual buffer size is only used whenever we do allocations on the heap.
Added an extra defines here to make things a bit clearer:

* MAXPICKELEMS refers to the number of objects that can be picked
* MAXPICKBUF   refers to the number of integers in the selection buffer

Also made all buffers use MAXPICKBUF where some used MAXPICKBUF * 4.
That means that some parts of blender will use less space for selection
now. MAXPICKBUF is set to 10000 for 2500 object selection, which can be
changed at any time, but I think 10000 integers on the stack touches the
borders of uglyland anyway.
2015-02-24 17:19:07 +01:00
340b76b42c Patch D843 by Alexander Romanov, fixes to the naming of the material
node so it's more similar to the names in the material properties
2015-02-24 16:15:46 +01:00
831a111353 Fix T43792: Connect faces fails with ngons
Complex ngons that intersected the path multiple times would fail to connect.

Now find closest intersections in both directions.
2015-02-25 00:08:39 +11:00
6c96113d5f Modifier: no need to calloc (immediately filled) 2015-02-25 00:08:38 +11:00
07c61e9389 Fix T43743 R key not working after recent rake/random source
refactoring.

Use a new menu instead of old enum key.
2015-02-24 11:56:26 +01:00
77faefb453 Fix T43634: Selecting 'Drop Color' from spacebar menu causes instant close
This is an internal operator, should not be invoked manually.
2015-02-24 14:38:49 +05:00
625101da99 RNA: correct enum flag callback
Was returning NULL, auto-completing:

    bpy.types.Material.bl_rna.properties["type"].

Would crash, accessing 'default_flag', thanks to @lukastoenne for investigating.
2015-02-24 19:45:56 +11:00
a585cbd2af Fix T43783: Cycles clipping doesn't match viewport when camera is inside volume
Ray length adjustment got lost in some refactor commit back to 2.71 days.
2015-02-24 13:07:52 +05:00
4c75f77669 Fix T43784: Compositing scale node border error
This was still the known issue with pixel center, original commit didn't cover all the
cases by the looks of it.

Should be all fine now, but much more intense testing is welcome.
2015-02-24 12:42:31 +05:00
1f527c6033 Fix BKE_mesh_validate_arrays, ignored do_fixes 2015-02-24 13:10:15 +11:00
cdd14ea96d Cleanup: use bit-shift for bmesh_elem_check 2015-02-24 13:10:15 +11:00
Dalai Felinto
abd630de62 Disable Bake Jitter code (recently added)
The following commits were supposed to add anti-alias and help with OSL
baking:

7b16fda379
1b92dfa961

However they introduced other issues (artifacts mostly), see T43550 .
Leaving the code ifdef'ed for now.
2015-02-23 17:50:44 -03:00
4f86f62f32 RNA: use 0/1 for pose layer operator 2015-02-24 07:43:04 +11:00
225f68c324 Fix interpolation functions ignoring number of components when doing early output 2015-02-24 00:36:33 +05:00
2081fd1d7d Gooseberry request:
Show World will now influence if world is rendered in opengl rendering.

This is a little undefined according to blender history, since sky used
to always be drawn when offscreen rendering, as if "Only Render" was
ticked. Since if we don't draw sky in that case there's no valid color
really (and using theme colors is not so nice) we just draw transparent
background.
2015-02-23 18:49:29 +01:00
67fcf5256d Move allocation of imbuf from array to allocimbuf.
Skip allocation of temporary imbuf
2015-02-23 17:19:31 +01:00
97422ea64f Cleanup: Simplify brick texture code a bit. 2015-02-23 16:49:50 +01:00
Dalai Felinto
249f2b9ccf RNA: use 1/0 for move layers operator
internal api Consistency.

For the records, I suspect there are still a few cases of this. I found
this by chance (moving an object to a different layer), and I ran into
the previous one (fixed by Campbell) as well (by adding a cube).

Anyways, since it only happens when building with crash on asserts is
not a big issue. But by the time we change RNA to use bool instead of
int it would be nice to do a call for test to prevent those breaks.
2015-02-23 12:34:15 -03:00
9626f4fdf5 GPU module: get rid of gluscaleimage - game engine also uses that but
commit to remove from there will be done separately due to issues with
linking.
2015-02-23 16:33:18 +01:00
1940cf5a0b After discussion on irc change new function to only allocate from a
buffer only. scaling can be done separately
2015-02-23 16:30:37 +01:00
041f706506 IMB library: Add function that scales an array of byte or float pixels.
Function just wraps the array in an imbuf and does regular imbuf
scaling.
2015-02-23 15:51:30 +01:00
eacc3debb7 Fix compilation error after recent GPU debug changes 2015-02-23 18:09:28 +05:00
ced19783fd Fix mismatch (missing 'const' to mactch funcs declarations).
Was breaking windows compile, reported by bdancer over IRC, thanks.

Also, quite some annoying 'unused vars' warnings (debug-only vars).
2015-02-23 13:57:02 +01:00
fed61d50c7 Debug GPU functionality from soc-viewport_fx by Jason Wilkins
patch number D706 with changes:

- WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging
system functions) but leaves the checks we had intact. Old patch
added the debug functionality only if we had the flag on to save some
performance.

Rationale here is that we might not want to recompile blender just to get
the extra information, and having users start blender with a -d flag to
get the extra information is also useful for bug reports. Those checks already
existed and most expensive ones are hidden behind a debug mode check
so performance should not be that bad.

- Did some cleanup of existing functionality:
When things go wrong blender side, just print the error,
don't check for GL errors first.

- Did not port changes needed for GLES to regular glew.h

- Got rid of duplicate or very similar new functionality.

Generally, code is more moving things around/cleanup and should work exactly
as before apart from the debug context, so it's safe to add even now.

It also provides a nice substitute function for glu error descriptions
2015-02-23 13:35:57 +01:00
34479d8b63 Snap to Active: missing armature/pose/mball/curve
de-duplicate active center calc between transform & snap-to-selected.
2015-02-23 23:05:54 +11:00
17b8479101 Fix T43774: Snap to Cursor ignores active pivot 2015-02-23 22:26:19 +11:00
ec36e3ae80 Fix T43776: Rigging : Clear User transform is not working when mesh is in weight paint mode.
Use same trick as for regular 'clear transform' operators to get a valid armature
in weight paint mode (where active object is weight-painted one).
2015-02-23 12:23:13 +01:00
8ee2b01b04 Fix T43740: 'Back to Previous' failed on reload
Would restore with the file-selector where the 'info' header should be.
2015-02-23 21:33:14 +11:00
b497eae0a8 Screen: remove redundant NULL check in ED_area_prevspace 2015-02-23 21:06:55 +11:00
86cfbeec6a Partial fix for T43740
ED_area_data_swap would put the screen in an invalid state and crash.
(SpaceLink.spacetype didn't match ScrArea.type)

However behavior is still odd in the instance of the report.
2015-02-23 20:02:54 +11:00
96c452bdf6 Fix T43769: Envmap Texture copy looses image 2015-02-23 18:22:09 +11:00
7c03ef295b CustomData: const correctness 2015-02-23 16:17:16 +11:00
0c4fb47edd BLI_utildefines: correct comment 2015-02-23 16:17:16 +11:00
64b328f22b Edge/Vert Slide: avoid redundant loop angle calls
No need to calculate loop angle for each layer
2015-02-23 15:44:28 +11:00
bc876f9ea4 Error in last commit
Accidentally left in malloc/free
2015-02-23 15:40:43 +11:00
5a372dbd89 Fix error in recent vert/edge-slide commits
`CustomData_bmesh_interp_n` was expecting the 'dest' arg not to have its offset applied.

This was a bit confusing since the source args have it applied,
and in some cases we only have the destination with the offset.
2015-02-23 13:57:06 +11:00
50c977b54d CustomData: replace calloc -> malloc
stack array is uninitialized, relying on calloc here would just hide bugs.
2015-02-23 13:57:06 +11:00
d580c90469 CustomData: const correctness for interp() 2015-02-23 13:54:33 +11:00
c26fa67bcd BLI_utildefines: add pointer offset macro
Handy since it keeps the type of the original.
2015-02-23 13:50:12 +11:00
765b842f95 Subsurf: missing NULL checks on free 2015-02-23 08:34:20 +11:00
Julian Eisel
0f1ffd4792 Fix T43768: Pointcache end frame ignores preview range
Fix for T43768

This way it works consistent with cloth, softbodys, etc.

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D1134
2015-02-22 17:14:19 +01:00
63b0a7feb2 Cycles: Make it survive if preview_cycles.blend uses persistent data
Currently should be no functional changes, but nice thing to have fixed
for some further experiments.
2015-02-21 19:18:20 +05:00
6d9c99422b Fix T43748: MouseLook actuator raises an Assert error
An assertion seems to be inverted by mistake, as MT_assert(!m_mouse); is followed
by using m_mouse->XXXX.
2015-02-21 14:39:04 +01:00
813dcb9feb GPencil: Another fix for the "big square dots" problem
Strokes containing only a single point are now drawn so that they respect the
pressure values too. Previously, they were getting drawn at a fixed size based
on the thickness of strokes. Thanks to @kekeljevic for posting a screenshot which
made the problem here easy to identify!

(On a side note: Perhaps it's a combination of the drivers I'm using, or the
multisampling goodness at work, but after applying this change, the dots are
now appearing as round circles as originally intended, and can also be scaled
up quite a bit too. And that's for 3D points which couldn't be affected like
this earlier! I'm not sure what's going on here, but whatever it is, I like it ;)
2015-02-22 02:09:52 +13:00
6ec05eb3e6 Code cleanup: Use bools instead of int 2015-02-21 17:50:05 +05:00
578cc2143d Cycles: Add note about autodiff in OSL wireframe shader 2015-02-21 17:31:41 +05:00
888d810185 Cycles: Use lower progressive update timeout for preview rendering
This ways previews are refreshing with the same ratio as job was expecting
this to happen, giving more instant feedback on the changes.
2015-02-21 17:30:29 +05:00
a97bc1bedf Fix T43755: Wireframe attribute doesn't work with displace
This attribute missed derivatives calculation.

Not totally sure what's the proper approach for algebraic derivative
calculation, so calculating them by definition. This isn't fastest
way to do it in this case and could be replaced with some smarter magic
in the wireframe calculation loop.

At least currently implemented approach is better than nothing.
2015-02-21 17:30:29 +05:00
3445ff0f93 scene conversion: style cleanup 2015-02-21 12:16:21 +00:00
4c0adb95dc gamengine: removing useless comment 2015-02-21 12:16:21 +00:00
9bfdcc4d32 gameengine: removing addInitFromFrame hack 2015-02-21 12:16:20 +00:00
5785df431b gameengine: dataconversion import and whitespace cleanup 2015-02-21 12:16:20 +00:00
f15bb2b793 doxygen: updating blender version and link to tracker 2015-02-21 12:16:20 +00:00
7501bdc52e python bge.types module - Updating documentation to close T40778 2015-02-21 12:16:20 +00:00
8db9b07cb3 Fix T33762 - texture fonts were not using the material color (gameengine) 2015-02-21 12:16:20 +00:00
f1a65a9fab makeScreenshot - adding frame number to the filename 2015-02-21 12:16:20 +00:00
cf4646b95f commiting patch to fix T30173 2015-02-21 12:16:19 +00:00
c391a67830 gameengine: KX_Scene comment cleanup 2015-02-21 12:16:19 +00:00
cfec320f1e BGE cleanup: removing unused async logic bricks
This code was never run and is an outdated copy from the code above.
If someday this is needed again, it is better to start clean.
2015-02-21 12:16:19 +00:00
e0187ec0c3 Documentation update: references to OpenGL tutorials in the python bgl module 2015-02-21 12:16:19 +00:00
7bd4c78a1a Cleanup: Put all Bump dx/dy code in the beginning here, same as with other nodes. 2015-02-21 12:55:19 +01:00
913e109f14 Correction for RNA getter of use_save_buffers 2015-02-21 12:47:29 +05:00
09893ec7fc Cycles: Workaround for NVidia OpenCL compilation
It was complaining about explicit __constant to __private memory conversion,
which is now worked around using implicit conversion.

It's not a real fix i'm afraid and i'm still failing to build OpenCL kernel
with latest Linux drivers, but maybe it'll let someone else to investigate
what causes compiler to run out of memory?
2015-02-21 12:35:06 +05:00
87572091fb BGE: Fix T43215: Rigidbody constraints deletion.
Deleting an object was deleting all rigidbody constraints in the scene.
Bug was introduced with D701.

Reviewers: agoose77, sergof, moguri, lordloki, sybren

Reviewed By: lordloki, sybren

Subscribers: sybren, hbar, blueprintrandom, sergof, agoose77

Differential Revision: https://developer.blender.org/D1007
2015-02-20 23:37:32 +01:00
1b92dfa961 Fix T43550: Bug in Cycles Bake Texture
Issue was caused by the changes in 7b16fda which changed the initial
state for rng. This commit makes it so the same initial hash is used
(which solves the regression without distorting AA-looking image.

It also makes it so OpenCL compiler is happy about this code (before
this change it'll complain about trying to cast private variable to
global one).
2015-02-21 01:56:48 +05:00
f7a2a36b31 RNA: use 1/0 for object layers
internal api Consistency.
2015-02-21 02:10:08 +11:00
8e955449a8 Yet another commit to get rid of missing faces in fill brushes.
We are now guarding against some divisions by small values.
There are still issues here but they are not on boundary faces
anymore so they must be related to some other issue such as
the triangle intersection test.
2015-02-20 15:11:24 +01:00
d12eba61a5 Sequencer: allow scene volume above 1 2015-02-21 00:08:56 +11:00
de4dcda545 Fix T43651: New pointiness attribute doesn't work with displacement
Simple fix: just make pointiness aware of bump offset.
2015-02-20 17:20:24 +05:00
51b0ae8a85 Fix T43739: bad documentation for bmesh py intersect_face_point()
Previous text could make think this func was checking whether a point was
inside and on the face, while it actually checks whether the projection
of that point onto the face is inside its boundary...
2015-02-20 10:54:26 +01:00
185e301229 RNA: correct bool callbacks 2015-02-20 19:54:51 +11:00
d0978103ae Revert "Cast result of rna_RenderSettings_use_game_engine_get to {0, 1}"
There are more flags that trigger this assertion, so I want to discuss
an appropriate way to fix it before changing them all.

This reverts commit b1191e5caf.
2015-02-20 08:41:31 +01:00
b1191e5caf Cast result of rna_RenderSettings_use_game_engine_get to {0, 1}
rna_RenderSettings_use_game_engine_get() in rna_scene.c would return 0 or 2,
whereas the assertion in rna_access.c:1843 indicates that boolean values
should only be 0 or 1.
2015-02-20 08:36:50 +01:00
f9a5dab529 RNA: calloc -> malloc when fixbuf is uninitialized 2015-02-20 17:18:41 +11:00
919e38cfc8 Fix for unlikely NULL pointer dereference
Potential crash reading freestyle modifiers from future blend-files
2015-02-20 17:18:41 +11:00
1ec83f41c1 Fix possible (unlikely) memory leak 2015-02-20 17:09:40 +11:00
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
2ddfd3a123 Skip flip check in cases where it's not needed. 2015-02-19 16:58:35 +01:00
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
b1d02f3d57 Projective painting: Only dither if factor is more than zero 2015-02-19 16:48:51 +01:00
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
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
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
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
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
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
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
b7033e3d4e BGE physics: adding links to bullet documentation 2015-02-19 11:20:18 +00:00
d2c2b10aeb gameengine physics: removing triangle mesh collision option for character controllers 2015-02-19 11:20:17 +00:00
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
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
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
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
5004b58262 Cycles: Make util_math_fast.h compatible with OpenCL 2015-02-19 12:29:06 +05:00
5721863805 RNA: pass only 0/1 to RNA_property_boolean_set 2015-02-19 12:33:14 +11:00
eee79641c3 RNA: poll functions restricting object types
D1100,D1105,D1106 by @lichtwerk
2015-02-19 11:59:24 +11:00
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
5ed2cc8070 Fix T43652: X11 "_NET_WM_PID" not set by Ghost
D1107 by @kevindietrich
2015-02-19 09:54:11 +11:00
f0527d9631 Ghost/X11 cleanup (reduce variable scope) 2015-02-19 09:54:11 +11:00
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
bd5154bb2c Fix Cycles OpenCL error with scons, util_math_fast.h was missing.ø 2015-02-18 22:44:17 +01:00
f1a9dbb0d7 Fix minor mistake - only increase size of compositing when stencil -is-
set.
2015-02-18 22:16:20 +01:00
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
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
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
ee9ac4e4fc CMake: remove expression in endif(...) 2015-02-19 07:45:59 +11:00
54994740bd CMake: indent & missing header 2015-02-19 07:15:55 +11:00
483fa4c387 CMake: picky style edit
'cmake_consistency_check.py' relies on this formattng.
2015-02-19 07:15:00 +11:00
bbc7dc169d RNA: assert when non 0/1 values used as bool
Prepare for using 'bool' type.
2015-02-19 07:08:10 +11:00
86e04c4ca9 RNA: assert on over-sized array index access 2015-02-19 07:01:49 +11:00
9d464a7538 RNA: use __func__ for alloc-id's 2015-02-19 06:57:45 +11:00
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
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
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
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
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
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
bf0a001e61 Cleanup: Remove support for Boost filesystem 2.
This is deprecated since Boost 1.48.
2015-02-18 13:49:49 +01:00
55fd389a70 New filebrowser bookmarks: Some minor fix/optimization from latest coverity report. 2015-02-18 13:18:04 +01:00
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
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
7f7413bce2 Cleanup: Use bools in BVHParams class. 2015-02-18 12:05:59 +01:00
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
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
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
bd92168643 Cycles / BVH: Remove unused temp copy of prim_object.
This will save some memory during BVH Build.
2015-02-18 01:14:59 +01:00
5eecfbd980 Quiet uninitialized mem use for blank cursor
harmless but may as well initialize.
2015-02-18 10:44:28 +11:00
1fa98b374f Fix free'd memory use removing constraint 2015-02-18 10:44:17 +11:00
b337cc1c21 Do not allocate an XRay buffer if compositing is dnot one for offscreen
rendering.
2015-02-17 23:38:28 +01:00
d74189a78a cleanup & missing break 2015-02-18 09:08:24 +11:00
ef11be0e77 Cycles: Avoid over-allocation in decouple ray marching
It could have happened with really long rays and small steps.

Step size will be adjusted to the clamped number of steps in order
to preserve render result compatibility as much as possible.

We should probably reformulate this a bit, so it will give the
same looking results without step tweaks. But this new behavior
should already be much better that it was before.
2015-02-18 02:26:24 +05:00
a9dbaf3755 Ensure BLI_stat() return value is checked.
also add function attrs on BLI_fileops to ensure they're used correctly.
2015-02-18 07:27:27 +11:00
e089b0e911 Amend to previous own Fix T43684: only use hack on WIN32, and use case-insensitive comparison.
Thanks to Campbell for the headup.
2015-02-17 21:10:08 +01:00
5115e86246 Fix T38808: Re-opening an image makes absolute 2015-02-18 06:39:28 +11:00
9d879c43f3 Fix T43708: Wrong manipulator in individual origin
Manipulator and actual behavior were out-of-sync with a single edge selected.
2015-02-18 06:08:59 +11:00
6133d14028 BMesh: calc_manipulator_stats can only check verts
Code assumed selection wasn't correctly flushed, which we ensure now.
2015-02-18 05:41:13 +11:00
07ba8b96e5 Tweak to new UIList bookmarks & co: extend up to ten entries before using scrollbars.
But again, what we really need to fix is UI saving for that temp area...
2015-02-17 19:27:14 +01:00
7e73b6aa25 Cleanup: Add comment about light_p being modified in one case. 2015-02-17 19:24:37 +01:00
1aa93dd9fd Cycles: Cleanup after recent changes 2015-02-17 23:21:53 +05:00
21a2b73a1e Fix T43684 (again!): Mighty Windows thinks it’s perfectly sensible to block everyone during 5 seconds for a mere stat() call on "A:\" path...
For now, just always consider those floppy entries ("A:\" and "B:\") as valid... sigh.
2015-02-17 19:13:22 +01:00
e6f40b4ceb Some tweaks to last commit, this is better. 2015-02-17 19:03:50 +01:00
f3e831f02d Cycles: Fix for hair transmission BSDF not returning proper label 2015-02-17 22:40:00 +05:00
6f820664c4 Cleanup: Deduplicate area light sampling code. 2015-02-17 18:39:37 +01:00
f05f99f9d4 Fix crash when rendering to offscreen OpenGL, fix scons build 2015-02-17 18:35:56 +01:00
ff7220349d Compositing works with X-Ray.
Basically, before drawing X-Rays, we now bind a second depth buffer.
After drawing XRays, we do an extra resolve pass where we overwrite the
non-XRay depth buffer in pixels where the depth is not maximum (which
means background pixel, since depth is cleared before drawing X-Ray
objects).

This ensures both scene and X-Rays keep their depth values and are ready
for compositing. Well, the odd effect due to depth discontinuities can be
expected, and X-Rays are a bit more expensive (extra buffer + resolve pass)
but at least X-Rays won't invalidate depth values anymore. Whee!
2015-02-17 18:11:22 +01:00
a0d7db503d Cycles: Small tweaks for Henyey Greenstein closure code.
* Avoid duplicative fabs(g) check in sample code.
* Avoid dot product in eval code.

Helps like ~1% when Scatter Anisotropy is 0.
2015-02-17 17:48:18 +01:00
ea2fc5b9d6 Fix for particle path drawing with black tips.
The last path segment can be shortended due to randomized path length.
In that case the last segment's color vector was not defined.
2015-02-17 15:22:02 +01:00
9b845359a6 Quick fix/hack for too small 'operator' panel in filebrowser
Real issue is that temp area used to draw modal filebrowser is never saved,
so non of UI 'edits' (like UIList resize, regions resize, panels reorder, etc.)
are ever saved. Should be addressed, but no time for that currently.
2015-02-17 15:18:02 +01:00
18e849b05d GPencil: On the fly switching between Drawing and Erasing when using "Continuous Drawing"
It is now possible to switch between drawing and erasing strokes when in
the modal "Continous Drawing" sessions. This makes the drawing experience
just a little more fluid, saving some unncessary steps to get out of
the editing mode to activate the intended tool.

TODO: Is there interest for tablet support for this too?
2015-02-18 03:16:33 +13:00
bf878d3c3d Cycles: Remove empty closure blur code and the corresponding entries in the switch.
Most compilers will probably optimize that out, but I still don't see a reason to keep it.
2015-02-17 13:44:25 +01:00
4660c00ac5 Cycles: Make blender session aware of rendering from command line
This way we can do some more aggressive policy about releasing temporary
data during synchronization.
2015-02-17 16:25:16 +05:00
7307f3b485 Fix T43706: Creating a directory in the file browser (by typing it in the file path) crashes Blender
Issue was caused by 2e9105c, free() does nothing if pointer is NULL, but guarded
allocator expects you to not free NULL.
2015-02-17 15:55:18 +05:00
2c1b0536c9 Fix T43697, grid drawing over wires and grease pencil. Props to Julian
for figuring out a simple solution to that :)
2015-02-17 11:37:20 +01:00
cdc1dab073 Fix T43685: New pointiness attribute error with auto-smooth enabled
Simple fix: all vertex attributes should be filled in before split.
2015-02-17 13:49:11 +05:00
587d8771e0 Cycles: Minor code cleanup in recent attributes changes 2015-02-17 13:46:25 +05:00
86a2e9d0e4 etch-a-ton: off by one error
was writing past the buffer when inserting strokes
2015-02-17 17:12:19 +11:00
28f31bdfd8 etch-a-ton: fix crash selecting strokes 2015-02-17 16:49:30 +11:00
a8487fc7fe etch-a-ton: fix uninitialized memory use 2015-02-17 16:48:53 +11:00
Julian Eisel
0294327615 Hide 3D Cursor in Paint Modes (with exceptions)
= Hide 3D Cursor in Paint Modes (with exceptions)

In paint modes, the 3D Cursor mostly is rather useless so it's more annoying than useful. This patch aims to hide the cursor in cases it's not used.

Included exceptions (cases where cursor is drawn in paint modes):
* Active object is in weight paint mode and a selected bone in pose mode can be found
* Clone brush (only if //Clone from paint slot// is disabled)

There might be more exceptions where the cursor should be shown in paint modes, but those are all I could find for now. Feel free to hint me for more.

Note: After D1110 was rejected, Campbell and me discussed this a bit more on IRC and agreed that this behaviour might be a good solution.

Reviewers: psy-fi, campbellbarton

Reviewed By: psy-fi, campbellbarton

Projects: #user_interface

Differential Revision: https://developer.blender.org/D1113
2015-02-17 03:26:03 +01:00
4bb331dfd5 RNA API: reuse property lookups 2015-02-17 13:13:59 +11:00
Julian Eisel
691cb61835 Fix for another missing update from GPencil in Outliner 2015-02-17 02:12:23 +01:00
Julian Eisel
89412028ce Fix T43669: Grease Pencil visibility toggle not working in Outliner 2015-02-17 02:12:23 +01:00
070f516b52 Fix FileSel globbing including dirs & ".." 2015-02-17 12:01:47 +11:00
8cb4011220 Revert "Fix file size not drawn using Link/Append"
This reverts commit 4ca4f04c75.

Was running an fs-stat on redraw, on every file! (every mouse motion!).
Could become very slow on network-fs

also caused crash (T43631)
2015-02-17 11:36:41 +11:00
9f008d17fe assert when BLI_exists is called with NULL path 2015-02-17 11:36:35 +11:00
00133ba8f0 Subsurf: Use guarded allocator for non-arena CCG
Our new guarded allocator implementation has much smaller memory
block size overhead and doesn't have any locks now. So in order
to make fuller track of what's happening in blender and avoid
confusion why certain circumstances reports much less memory than
others we'll now switch to guarded allocator.

This was actually one of the biggest reasons of the confusion in
the recent memory usage investigation. There's still some overhead
is happening due to non-freeing nature of arena allocator but the
things are not nearly as bad as they looked before: memory overhead
is measured in tens of megabytes, not hundreds as it looked before.

Plus with some smarter allocation policy we can almost eliminate this
overhead.
2015-02-17 03:42:16 +05:00
1e00e87e3a FileSpace selection didn't call op.check sometimes
(de)select all & globbing didnt run operators check callback.

D867 by @igel with edits
2015-02-17 08:54:25 +11:00
fa9311c9a4 Cleanup: Update comments and make it more clear what volume interpolation is for. 2015-02-16 22:11:41 +01:00
652b2b656a Fix bake action visual-keying option
Disabling did nothing
2015-02-17 07:19:48 +11:00
00a3c9afc8 UI messages fixes and cleanup. 2015-02-16 20:38:07 +01:00
0dfdca6d13 Fix T43684: File Browser is unusable on Windows Machines (do not BLI_is_dir() in draw loop!)
Did not had any issue on linux, but looks like on some windows can slow things as Hell.
Or maybe just the presence of some network FS?

Anyway, not a good idea, so now fsmenu entries' valid status is stored and only evaluated
on startup (reading of bookmarks & co) and when opening file browser (refresh, like
for system bookmarks).
2015-02-16 15:58:57 +01:00
fd4f0ed39e Cleanup: Remove unused code from hair BSDF. 2015-02-16 15:23:01 +01:00
bbe1b54818 Fix T43689, viewport compositing does not respect alpha settings for
background.

For SSAO supporting this is no problem, for DOF we would ideally do
blurred alpha, but alpha channel in blurred buffers is occupied by coc
field, so use original color alpha instead. It's not entirely correct
but it's better than nothing.
2015-02-16 14:42:36 +01:00
6e08aa0a9e Tracking: Expose Filter Tracks operators to the Cleanup panel
Not totally happy with this, but it's better than nothing for until
we've got real outlier detection. Also made it more cleat how exactly
filtering happens, so users don't expect something the operator is not
intended to do.
2015-02-16 17:16:14 +05:00
7c3d5a3337 Cycles: Use some more bools in microfacet code. 2015-02-16 12:32:42 +01:00
e7d2e5ffbc Extended RNA support for mesh customdata property layers.
Support for user-defined customdata layers (named int, float, string
layers) was limited to polygon customdata. This is not accessible in
cycles because only tessfaces are used there. Furthermore the polygon
attributes were simply described as MeshFloatProperty, MeshIntProperty,
MeshStringProperty, omitting the distinction by element type.

The patch only adds vertex attributes so far. However, the code now
explicitly defines polygon and vertex attributes, so adding edges, loops
and tessfaces is much easier should the need arise.

Problem is that the RNA definition, which is already much more
complicated than the basic DNA/BKE definition of custom properties, now
becomes extremely bloated and cumbersome. A simpler solution would be
preferable but may not be possible within the constraints of RNA.
2015-02-16 12:26:25 +01:00
9daac198f5 Cycles: Correction for C++11 compilation error after recent vector changes 2015-02-16 15:38:13 +05:00
9a10b208ba Ensure CMake finds SDL 2.0
CMake 2.8 doesn't search /usr/include/SDL2, which is the include directory
for SDL 2.x on Ubuntu Linux (and possibly others). This results in SDL 1.2
headers being found when WITH_SDL_DYNLOAD=OFF, and our shipped SDL 2.0
headers when WITH_SDL_DYNLOAD=ON. This patch ensures that in both
cases the correct SDL headers are used.

Reviewers: sergey, campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1112
2015-02-16 09:27:50 +01:00
58652301de Vert/Edge Slide: better UV interpolation
Ignore faces which the sliding vert is outside of.
2015-02-16 18:49:18 +11:00
421d0f3bde Math Lib: add dist_signed_squared_to_corner_v3v3v3
Can be used to check if a point is inside the 2-planes defined by a face-corner.
2015-02-16 18:47:15 +11:00
81be1c7a21 Correct crash /w vertex slide with no faces
Error in recent commit
2015-02-16 13:41:46 +11:00
7975c0d35a cleanup: split VSE view-size into own function 2015-02-16 13:19:22 +11:00
5c747e7196 Fix T43681: VSE draw glitch with no-display
Missed clearning the backdrop
2015-02-16 13:05:59 +11:00
b1dbda143d BMesh: Connect path, use select order
Could connect a pair of verts previously,
now connect all vertices along the path, running a second time closes the loop.

Can also be used for without faces to connect edges between selected points.
2015-02-16 09:44:30 +11:00
e2573aea9b Compilation error fix for strict compiler flags 2015-02-15 23:12:54 +05:00
478d67e858 Cycles: Hopefully compilation error fix for OSX 2015-02-15 23:11:33 +05:00
a98fc4f8f9 Fix T43671: Playing with Mix Factor of Data Transfer Modifier Is Overwritting Data of Base Mesh
The issue was actually affecting all data types that are not regular CDLayer ones, since by default
DerivedMesh references mesh data (verts, edges, etc. - modifying custom normals often implies
modifying edges' sarpness too).
Modfying edge/face sharpness etc. could directly affect the mesh in this case, **bad**!

So we detect whether we are copying data types that may affect non-CDlayers data, and whether
verts array of org dm is same as mesh one - in which case we copy the DM. This avoids
useless copying in most cases.

Note Edit Normals was quite obviously suffering the same issue.
2015-02-15 19:00:06 +01:00
1c64543aef Cleanup of SpaceFile, from asset-experiments branch mostly.
Helps keeping diff with branch relevant and clean...
2015-02-15 16:35:42 +01:00
f1ee11fcca Fix for previous commit, sorry for the noise. 2015-02-15 15:55:13 +01:00
2e9105cc96 Cleanup: BLI_listdir (direntry): get rid of usage of raw malloc/free here.
No reason at all not to use MEM_xxx as everywhere else, especially confusing
when members of direntry **are** MEM_-allocated (relname, etc.)!
2015-02-15 15:07:48 +01:00
35567d563d Possible todo notes for more polished UI? 2015-02-16 01:21:48 +13:00
263518ec49 Outliner: "Purge All" function for Outliner in "Orphaned Datablocks" mode
Many users have been requesting a way to remove unused datablocks from the file/session
"without closing and reopening" Blender (or at least that's the impression I'm getting).

This commit adds a new operator (exposed as the "Purge All" button in the header of
the "Orphaned Datablocks" mode in the Outliner, which seems to be the logical
place for this) for doing so. It does so by wrapping up the save and "revert"
(i.e. reload the saved file from disk, without needing to quit Blender) operators
along with a confirmation prompt for good measure.

Caveats:
* Ultimately, we still cannot really cleanly delete any datablocks from the current
  session outright without reloading the file/data at some point. Thus, we do need
  to reload the file again before it can be used.
* This does mean that this operation is irreversible. Notably, Undo history is lost
  is doing this operation. Hence the warnings...   (Then again, undo/redo actually
  reloads the entire scene DB from memory, so it's not anything uncommon ;)

Other Notes:
* The addition of this operator brings this mode more into line with being a kind of
  "Trashcan" place, with this new operator being the manual "Empty Trash" button.
  If the "Orphaned Datablocks" name is too obscure, maybe we could rename this
  mode to "Trash" or something similar?
2015-02-16 01:21:47 +13:00
0688f6e012 Code Cleanup: Reshuffle libraries and orphaned datablocks views to a more appropriate place in the file 2015-02-16 01:21:46 +13:00
d0609d09e4 Outliner: Do not show RMB menu for "ID Base" entries 2015-02-16 01:21:45 +13:00
16689a1db0 Outliner: Use restriction columns in "Orphaned Datablocks" view to manage usercounts
When in "Orphaned Datablocks" mode, the restriction columns are used to display
usercount indicators and toggles to manage whether datablocks get saved or not.

* The first column shows an icon to indicate whether that datablock is going to get
  saved. A tick indicates the datablock will be saved, while a cross indicates the
  opposite. Clicking on this changes whether the datablock will get saved.

* The second column shows the usercount.

* The third column shows whether the datablock has a fake user.


Notes:
* The second and third columns are pretty much redundant (functionally speaking).
  While it is possible to also toggle fake users by clicking in the third column,
  its role here is more as information for power users (and hopefully to allow others
  to connect the relationship between the saved/not saved status and fake users)

* I'm not sure whether the use of the X here for the "not saved" state stands out enough
  to draw user's attention to items which are "in the danger zone".
2015-02-16 01:21:44 +13:00
030b0aab43 Outliner: Added new mode for displaying "orphaned" datablocks
Orphaned datablocks are those which have either:
* 0 users
* A "fake" user only

In the case of the former, they will be quietly discarded from the file on the next
save + reload. Hence, it is helpful to have a view where you can confirm which ones
fall into this category and might be worth saving.

We also include datablocks with a fake user only so that datablocks given a user
above can have that easily turned off again (in case the user makes a mistake).
Another benefit of showing these is that it become easier to remove fake users from
datablocks you no longer want retained without having to hunt for them.
2015-02-16 01:21:43 +13:00
Julian Eisel
0ff56ca2aa Revert/Remove "Auto View" Feature
Turned out that I misinterpreted the feature request, plus there are some
minor issues with the commit that would need to be corrected.
After all, I decided to just remove it again as it seems to not be really
useful for the users.
2015-02-15 04:29:11 +01:00
c439d14a9a missed this second last commit 2015-02-15 14:11:05 +11:00
fa2f7c69ac mathutils: Implement __hash__() functions
- all mathutils types
- only works on frozen data (so vectors can be used in sets/dict keys)
- uses same method as CPython, (matches hashing a tuple)

D1104 by @juicyfruit with own modifications
2015-02-15 14:02:08 +11:00
a9d979c8ef mathutils: add freeze() method, is_frozen attr
This allows you to make any mathutils object immutable.
2015-02-15 14:01:59 +11:00
ce85aef0d9 mathutils: remove redundant read callback 2015-02-15 13:46:47 +11:00
4feb77cf03 mathutils: avoid extra alloc for Vector.lerp 2015-02-15 13:46:47 +11:00
24f9ed0b34 Fix crash setting Euler.order to a non-string 2015-02-15 13:46:47 +11:00
bf157ce927 Fix T42919 & T42218: BGE: Python-driven armature animation got buggy
Due to changes in the way animation updates were handled,
BL_ArmatureObjects were no longer registering to KX_Scene as animated.

Moguri says: It might have been relying on the deformer update which
moved rom being called on every object in the render step. Now
armature deformers are only updated if they need to be.

Fix T42919 & Fix T42218
2015-02-15 02:00:56 +01:00
a83b2d3fd9 Cycles: Fix wrong attribute count calculation in prevous commit
The workaround for generated texture coordinates is to be done before
calculating number of elements for attribute, otherwise counter wouldn't
include those attributes.
2015-02-15 02:55:18 +05:00
1862fbf203 Cycles: Optimize memory usage when creating mesh attributes
The idea behind the change is to pre-allocate attribute arrays in advance,
which avoids re-allocation of arrays later for each of meshes being handled.

This reduces peak memory used by Cycles database from 1.3G to 0.9G for
victor.blend from Gooseberry.

It doesn't mean every file will benefit from this change since peak memory
usage is happening in the different places of the rendering code.

Also, unfortunately, attributes export might not cause the peak of render
preparation stage. That said, it's actually object_to_mesh() which causes
the memory to peak in the same test file. So we really need to optimize that
part first in order to get visible results for artists. But in any case it's
now quite easy to track hotspots in Cycles itself which is good.
2015-02-15 02:01:48 +05:00
18937f6fb5 Cycles: Add ifdef switch to use blender's guardedalloc for vector allocation
It's actually a bad level call, but it's inside ifdef block and disabled by
default and only intended to be used for development purposes.

Main idea of this change is to combine statistics coming from Cycles and
Blender during scene synchronization step, to see if further changes are
actually reducing memory footprint.
2015-02-15 02:01:48 +05:00
d0cc1180b0 Cycles: Add utility method to vector which totally frees memory used the vector
The method is called vector::free_memory(). Use with care since it'll invalidate
all the pointers to vector memory, all iterators and so on.

Currently unused, but might become handy when clearing unused data.
2015-02-15 02:01:48 +05:00
aad96506c1 Cycles: Report system memory usage and peak after scene device update
This only happens when built with WITH_CYCLES_DEBUG flag, memory statistics
is coming from guarded STL allocator.
2015-02-15 02:01:48 +05:00
a445e49186 Cycles: Implement guarded allocator for STL classes
The commit implements a guarded allocator which can be used by STL classes
such as vectors, maps and so on. This allocator will keep track of current
and peak memory usage which then can be queried.

New code for allocator is only active when building Cycles with debug flag
(WITH_CYCLES_DEBUG) and doesn't distort regular builds too much.

Additionally now we're using own subclass of std::vector which allows us
to implement shrink_to_fit() method which would ensure capacity of the
vector is as big as it should be (without this making vector smaller will
still use all previous memory allocated).
2015-02-15 02:01:48 +05:00
01067fe51c Cycles: Replace own aligned allocator with system one
This replaces our own implementation of aligned malloc with system calls,
which depends on which operation system you're on.

This is probably really minor noticeable change, but in the same time it
might reduce amount of wasted memory.
2015-02-15 02:01:48 +05:00
Julian Eisel
24976dd29d Outliner: Toggle restrict buttons only for selectable child objects
D404 by @rupp with minor edits by me.
2015-02-14 21:54:31 +01:00
354cf76803 Cleanup: Comment block for sse helpers. 2015-02-14 20:57:21 +01:00
d979f39cf1 Cycles: Small improvement for volume render (decoupled)
Simplify branching here a bit, helps ~3% in volume_light_sampling.blend (Branched MIS scene).
2015-02-14 20:44:30 +01:00
2fad3132a3 Cycles: Fix compilation error of Cycles standalone with Libmv disabled 2015-02-14 21:33:14 +05:00
db297e7ea3 Revert "Fix T43471, based on patch submitted by @sean_loh."
This reverts commit b2b54b0902.

The patch breaks particle distribution even in simple cases, not worth
doing this for keeping a hackish loophole open.
2015-02-14 16:40:57 +01:00
cfa1fd1c1f object drawing: only use halo-draw in object mode 2015-02-14 22:29:45 +11:00
dd6edac803 Bring copy/free operations into line with changes in previous commit 2015-02-15 00:06:19 +13:00
ec2ede4302 Bugfix: Referencing actions from Action Actuator was not setting a user
This reverts the change made in 8872cba7e9
which was contributing to actions being lost in some cases [1], even when
they were assigned to those actuaters, which needed them to be able to
function. Now there's one less case where users are needed but were missing :)

Note that this still doesn't solve the core issue where nothing is responsible
for associating actions created for a particular datablock (and not currently
being used in its active action slot, or in the NLA stack) with that datablock.
That issue is the cause of most action disappearances as well as for other problems
(such as renaming bones being unable to fix unreferenced/unused actions) where there
are diifferences between users' mental models and the data model. Proper fixes are
coming soon (restoring fake users here isn't a proper fix, as it only masks the
fundamental mismatch/problem here).


[1] http://blenderartists.org/forum/showthread.php?357021-BGE-loses-actions
2015-02-15 00:06:18 +13:00
dde0765de2 CMake: Enable JeMalloc by default
It's really handy to have blender linked against jemalloc because of
much better memory fragmentation handling by that library.

To be noted: if jemalloc library is not found it'll be disabled with
message about that, no compilation error should happen.
2015-02-14 15:13:48 +05:00
a439c8026a CMake: Add search path for jemalloc which corresponds to own and studio setup 2015-02-14 12:29:48 +05:00
7a977df6d4 Refactor array_utils out of BLI_array
BLI_array.h is for resizing array macros, where as array_utils can operate on any arrays.
2015-02-14 08:00:41 +11:00
2af905391d cleanup: doxy comments 2015-02-14 08:00:41 +11:00
2c1143aa2f Comments: use doxy sections for nodes header 2015-02-14 08:00:41 +11:00
3ec9b8e0c2 Purge temporary files on abort
This way both BLI_assert() and abort() called directly shouldn't
leave any files in the temp folder.

Previously it was really possible to have gadzillions of files
left over because of assert failures and debug aborts during the
development process.
2015-02-14 01:30:36 +05:00
ab77466105 Fix T43585 XRay + transparency broken
We need to turn off restore depth mask in transparency.
2015-02-13 14:38:38 +01:00
Julian Eisel
ef2f31028e Revert "Fix T43646: VSE preview allows displaying channels down to -5"
This reverts commit e652f781a3.

@schlaile, mentioned in T43646 that this was an intended feature. Checked git
history and it's seems like he's right.
2015-02-13 13:57:48 +01:00
90a9415c9a No need to use "SSAO" for SSAO color 2015-02-13 12:15:57 +01:00
c01a2aa4bb Alleviate grid creating shadows in Ambient Occlusion effect.
Draw the grid last with depth masking disabled. That should have no ill
effects otherwise as far as I can tell except from some exceptional
cases (axis lines over grid) but this is hardly annoying.

Generally to properly solve such issues we need to have a better render
pipeline with wire objects/materials being drawn after compositing. This
is not impossible but for now doing it the simple way.
2015-02-13 11:56:41 +01:00
Julian Eisel
e652f781a3 Fix T43646: VSE preview allows displaying channels down to -5
Maybe just another typo (tm). (Checked with @psy-fi)
2015-02-13 11:53:29 +01:00
261cd7f6bf Fix T43649: Geometry node breaks GLSL shading
The issue was caused by the recently added attribute, which is to be
added to the shader function even tho it's not supported.
2015-02-13 15:24:35 +05:00
e63594a6e5 Fix again tablets with linux!
Yes, for me tablets (both wacom and no-name) were again broken - curse X11!
So now, we want ButtonPress, Button1Motion does not work anymore...

Anyway, this patch makes things much cleaner, storing each event type
in its own variable!

Patch by cedricp (Cédric PAILLE) from T43367, thanks a bunch!
2015-02-13 10:57:26 +01:00
46151a6a69 Fix issue with some files having non-unique modifier names
Originally the files are coming from ancient early-2.4x epoch, but in
theory such setups might have been re-saved multiple times already with
more recent blender versions.

So the verisoning code is applied on all the files, including very
recent ones.

Bumped subversion, because this check si not really cheap.
2015-02-13 13:51:10 +05:00
67fa545ed0 Make modifier_unique_name return whether modifier was renamed or not 2015-02-13 13:46:51 +05:00
270bbc89ec Fix Cycles compilation on x86, without SSE. 2015-02-13 09:29:16 +01:00
34e9f6b956 Fix (revert) mistake in rB1ae2098a6e04359b, causing broken UI (see e.g. Scene buttons).
Reported by  sebastian_k through IRC, thanks!
2015-02-13 09:10:53 +01:00
616eb6818f cleanup 2015-02-13 16:17:00 +11:00
1ae2098a6e cleanup: ui, use bools 2015-02-13 11:43:28 +11:00
4132ca1ac2 UI: show check-boxes pie-menu bool/enums 2015-02-13 11:33:11 +11:00
29e19cecd8 BMesh: avoid ugly macro for loop interpolation
Compiler optimizes to practically the same output
2015-02-13 11:06:16 +11:00
1af042d9ed BGE: Fix for T42285 & T38935 crashes. They are Rayhit related.
We make sure that good values are passed to GetPolygon() and we check that the visual mesh doesn't have a wrong displacement when it passes over a object which has a mesh triangle as compound bound.

Reviewers: dfelinto, sergof, agoose77, moguri

Reviewed By: moguri

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D979
2015-02-13 00:12:21 +01:00
2b847d1e65 BGE: Remove translation and rotation constrains subpanel from dynamics type
The translation and rotation locks subpanel was not used by dynamic physics type to avoid inestability in the application of forces and/or torques. Therefore it is better to remove it from UI (for dynamics) to avoid misunderstandings.

Reviewers: moguri, dfelinto, campbellbarton

Reviewed By: campbellbarton

Subscribers: panzergame

Differential Revision: https://developer.blender.org/D1090
2015-02-13 00:05:16 +01:00
9e217ccb2e BGE Fix T39026: No collisions detected with parented rigid body object
Fix for T39026. Preliminary investigation by blenderscripter on D446.
Also it solves bug T41285 (Parenting object leave collission box).

Refactor commit b90de0331d introduced a
regression bug.

Reviewers: sergof, campbellbarton, moguri

Reviewed By: moguri

Subscribers: blueprintrandom, blenderscripter

Differential Revision: https://developer.blender.org/D1064
2015-02-12 23:56:50 +01:00
eda2d563bc Cleanup horrible artifact of Greek to English translation. 2015-02-12 22:05:47 +01:00
8de421bbf1 Use the RNA for overriding the name instead. 2015-02-12 19:59:34 +01:00
d0a91eb1b4 More naming refinement GPU fstop -> Viewport f-stop 2015-02-12 19:50:19 +01:00
090623c6b6 Revert "Add missing trailing '}' in GLSL files"
This reverts commit ebd4a6e0dd.

Trailing '}' is added in C, also we add some extra code as needed.
2015-02-12 19:39:10 +01:00
f20fa24ba1 Add DOF fstop property for cycles, also don't grey it out when object is
set as focused
2015-02-12 19:35:43 +01:00
ebd4a6e0dd Add missing trailing '}' in GLSL files 2015-02-13 05:12:15 +11:00
5e613198e5 Viewport compositing - first code
This commit introduces a few ready made effects for the 3D viewport
and OpenGL rendering.

Included effects are Depth of Field, accessible from camera view
and screen space ambient occlusion. Those effects can be turned on and
tweaked from the shading panel in the 3D viewport.

Off screen rendering will use the settings of the current camera.

WIP documentation can be found here:

http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-02-12 18:54:41 +01:00
d40ac45610 Fix (unreported) load_file() func from creator.c not setting G.save_over correctly.
This was rather annoying, since if you were script-editing a .blend file in background
mode, opened through this commandline option system,  and wanted to save over,
a mere `bpy.ops.wm.save_mainfile()` *would not* overwrite expected file,
but instead write/replace the dummy `untitled.blend` one!
2015-02-12 17:30:19 +01:00
d70c7c06e7 Removed the cloth preroll feature.
This feature has been totally broken for a long time. It was added
originally because negative frames were not supported.

Giving simulations (cloth and others) time to settle before animation
starts needs to be solved in a much better and more generic way.
2015-02-12 16:30:07 +01:00
912b4659ec Tracker operators: filter & copy track settings
D1069 by @sebastian_k
2015-02-13 02:22:39 +11:00
719fd5a1ce GPencil: Alt-S can now be used to adjust the pressure values (i.e. thickness) of strokes 2015-02-13 02:48:50 +13:00
d92d8c3768 GPencil: Some tweaks to make GPencil UI more compact when there are 0 or 1 layer(s) only
As brought up in T43595, the Grease Pencil layers list could sometimes end up
taking up too much space when there are no layers. Another issue raised there
was that the up/down buttons are redundant when there is only a single layer.
This commit makes some changes to get these a bit more compact for the case where
you have an empty GPencil datablock left over from previous work.
2015-02-13 02:48:49 +13:00
4f3f9cb280 GPencil: LKEY can now be used for Select Linked too now 2015-02-13 02:48:49 +13:00
5c02afb698 Bugfix: Old NLA Strips from 2.4x got converted with no names (since they didn't use to have any) 2015-02-13 02:48:48 +13:00
7221fbe9dd cleanup 2015-02-12 23:51:02 +11:00
e408e632a1 Addons: print short message if an addons missing
Was printing full traceback, harmless but verbose.
2015-02-12 23:44:37 +11:00
3b68a74c2a Follow functionality: Scrubbing with the arrow keys and during jumps,
will update the editors range.

Offsetting to a certain direction will put the editors min/max to the
new frame if the frame is out of the editor bounds while jumping will
set the new frame at the editor's center.
2015-02-12 13:08:40 +01:00
d266733dad Fix T43612: VSE crash clearing proxies 2015-02-12 22:59:48 +11:00
dce59530d0 Fix part 1 of T43239, multisegment vertex bevel on 2-edge vertices.
Implemented multisegment rounding of vertices with two edges.
Works both with wire edges and edges that have one or two faces
attached.
2015-02-12 06:55:30 -05:00
7f47cd9b17 Correct fix for T43424
Would crash undoing adding a new scene in camera view.
2015-02-12 21:33:59 +11:00
b2b54b0902 Fix T43471, based on patch submitted by @sean_loh.
Particle textures always override timing information of particles.
Previously particle times could be scripted, but now these changes are
discarded by the texture evaluation function.

The patch disables texture overriding when no textures are defined, this
way at least some old scripts can keep working.
2015-02-12 10:15:25 +01:00
a9d09ff7ae BGE: Improve UI of Anisotropic Friction subpanel
Little patch that introduces X: Y: and Z: texts over anisotropic friction sliders

Reviewers: moguri, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1073
2015-02-12 06:38:21 +01:00
e60259c1cd Fix for previous commit - since it's for non-debug unused vars, name it UNUSED_VARS_NDEBUG.
This commit was proudly crafted by the Commit Rate Raising Committee!
2015-02-11 22:22:40 +01:00
e1bdf5333d Add new UNUSED_VARS_DEBUG utils, which is NOP in debug build, but tags given vars as unused in non-debug builds.
Helps handling cleanly pure-debug variables.
2015-02-11 22:10:09 +01:00
fbe5282c1e Outliner: use enum for outliner_group_operation()
No functional changes.

D1067 by @lichtwerk
2015-02-12 07:43:32 +11:00
23214ecad0 Outliner: ContextMenus for constraints/modifiers
Context menu to toggle render, visibility & delete

D996 by @lichtwerk
2015-02-12 07:29:31 +11:00
27b2ab8cf4 Fix VSE strip channel skip overlapping strips
D1096 by @mangostaniko (with some edits)
2015-02-12 06:20:36 +11:00
26d7ac5077 Full screen mode did not remember the follow mode of previous screen.
Also make follow mode do something similar in reverse play.
2015-02-11 20:01:21 +01:00
de85d6cdbf cleanup: rename enum type to blender convention 2015-02-12 03:30:01 +11:00
b9ffd70960 FileBrowser Bookmarks: fix issue with invalid bookmarks.
Reported by maxon through IRC, thanks.

Invalid (inexistant) bookmarks would not be selectable, hence not removable.

First, made invalid bookmarks grayed out in lists, so that user knows when there are some.

Then, added a new 'cleanup' operator that removes all invalid bookmarks.

This solution may not be completely satisfaying, but should do the work for now.
I do not want to add back those ugly 'X' delete buttons for each entry in list,
so better solution would be to make UIList able to select several items at once...
2015-02-11 17:13:16 +01:00
f60b4228b9 BPY RNA: add is_property_readonly().
This property may be defined dynamically, so mere access to static flag value
through `bl_rna.properties[...].is_readonly` is not enough.
2015-02-11 17:13:16 +01:00
cde1ef403b Fix (unreported) disabled items in UIList not grayed out.
Since we override widget's theme colors in this case in widget_state,
we have to redo 'disabled' alpha shading...
2015-02-11 17:13:16 +01:00
2613bfadb2 RNA: sequencer channel range was incorrect
Broke since 2.4x, zero sequence channels shouldn't be allowed
2015-02-12 02:36:33 +11:00
3b5eac548f Fix depth-eyedropper crashing outside 3d view
Also set the eyedropper operators as internal.
2015-02-12 02:17:03 +11:00
44f09c93d1 Use line curve for cavity mask instead of sharp as default when no curve
is found during loading
2015-02-11 15:29:24 +01:00
743a67c6cb Cavity option active even in fill brushes 2015-02-11 15:09:11 +01:00
f7e131a6ac Cavity masking - add curve control to cavity mask and move relevant
structs to paint struct (might be useful for vertex paint too in the
future)

Cavity masking now has a curve control. The control will set the amount
of masking for positive cavity ("pointness") or negative cavity
("cavity") with x axis being the amount of cavity and 0.0 = full cavity,
1.0 = full pointness, 0.5 = no cavity and the y axis being the amount of
alpha.
2015-02-11 15:07:24 +01:00
Julian Eisel
b7bac19aca Fix T43621: Layout only using 65% of available width
Not really a bug, more like a silly typo.
2015-02-11 14:41:35 +01:00
88efcdc376 Compositor: Expose Alpha socket for multilayer EXR node
This way re-mapping scene nodes to EXR files becomes much easier,
no extra trickery with separate RGBA setups is needed.

Plus makes it more consistent with regular EXR files.

This uses EGBA pass to get alpha from.
2015-02-11 18:28:41 +05:00
Dalai Felinto
560c05e8bd Fix T43628: Circular dependency error preventing multiple highpoly objects to bake
Throwing an RPT_ERROR was stopping baking after the first object.
2015-02-11 11:23:03 -02:00
259d47a15e Minor code cleanup: move some duplicated texpaint code into function
Reviewers: psy-fi

Reviewed By: psy-fi

Differential Revision: https://developer.blender.org/D1098
2015-02-11 13:33:47 +01:00
2d1e072686 UV Island support for vertex & edge slide
This ensures slide with `Correct UVs` enabled, keeps UV's (any loop custom-data) contiguous.

Adds 2 key functions `BM_vert_loop_groups_data_layer_create` and `BM_vert_loop_groups_data_layer_merge`

They work by collecting matching loop custom-data around the vertices loop-fan,
and merging the custom-data after edits are made.

Thanks to @mont29 for review!
2015-02-11 21:30:13 +11:00
f2951c23cf Cleanup: Remove unused Cycles cpuid code. 2015-02-11 11:28:42 +01:00
8668006519 Fix crasher in own UIList bookmarks commit.
Immediate crash in merged asset-experiments branch, no idea why it did not show in master too?
2015-02-11 11:16:32 +01:00
d4934f8f6d cleanup: style/indentation 2015-02-11 18:39:28 +11:00
387d91829d Fix T43149: Grease Pencil fill areas look divided by multiples ray lines
The problem here was caused by the usage of GL_POLYGON_SMOOTH (thanks Campbell
for the help tracking this down!). Apparently the issue is that this option
ends up doing some nasty accumulation with whatever is in the framebuffer for
each *tesselated* polygon (instead of the whole polygon as intended/expected).

** IMPORTANT USER NOTES **
With the removal of this option, filled areas and volumetric strokes will now
have jagged edges again. To resolve these artifacts, it is necessary to enable
Viewport Multisampling (found in the User Preferences, under the System tab),
and restart Blender to see the effects of this change.
2015-02-11 17:54:14 +13:00
4ae6d58999 Minor optimization for mask modifier
- don't resize ghash buckets (reserve maximum size)
- get vert, edge arrays instead of DM getVert, getEdge
- calloc -> malloc
2015-02-11 10:39:50 +11:00
9e2abbc9ba FileBrowser: Editable Bookmarks.
Bookmarks are now editable (i.e. you can rename them, and reorder them).
They are also listed in regular UILists, so you can filter/sort them as usual too.

Also, FileBrowser 'T' side area is changed to something similar to 3DView one,
in this case because we need op panel to remain at the bottom, and later because
we'll more than likely need tabs here!

Thanks to Campbell and Sergey for reviews.

Differential Revision: https://developer.blender.org/D1093
2015-02-11 00:09:45 +01:00
4f1e387588 UI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.
When defined, uiBut->tip_func is called when button's tip is generated. This allows
for advanced, dynamic generation of tooltips.

For now, only used by UIList, which can now optionaly use a given string property
of each item for its tooltip.

Thanks to Campbell for the reviews!
2015-02-11 00:07:09 +01:00
d18993d4e4 Fix T43297 The Exporter assumed ANSII encoding but we need to support UTF-8 instead 2015-02-10 22:14:31 +01:00
4b04a4e2ff Cycles: Control CPU capabilities via environment variables
Purely developers-only feature which allows to disable some of the CPU
capabilities. This way it's easier to test different kernels on the
same machine.
2015-02-11 01:56:58 +05:00
28e76bbb93 Remove legacy color transform functions.
Differential Revision: https://developer.blender.org/D1095
2015-02-10 21:34:19 +01:00
1d64dff671 Fix recent vert-slide UV's when cancelled
Added support recently, but wasn't cancelling correctly.
2015-02-11 07:30:11 +11:00
2b01b71339 Fix T43565: BGE removed unneeded if/else in BL_KetsjiEmbedStart 2015-02-10 21:28:18 +01:00
59c0a1e7c8 Typo fix + clarification in mathutils.Vector example 2015-02-10 21:25:01 +01:00
bb08502cf4 Cycles: Fallback to bottom-top tile order when rendering from the command line
In the worst case it'll do nothing, in the best case it might give some percent
of speedup because of better cache coherency.

Currently it's all handled as an override on blender_python level, don't really
see reason to penetrate the boolean flag further into sync code. This can always
be done later if needed.
2015-02-11 01:11:57 +05:00
a3b7f83cb5 Cavity mask support for texture painting.
Title says it all, options can be found in the options panel,

A slider controls the amount of cavity masking that is applied while
it's also possible to invert the mask and paint outside or inside
cavities.

Again we might greatly benefit from caching of the cavity result, but
that should only affect startup time for the stroke.
2015-02-10 20:23:43 +01:00
13ad69c68e Cycles: Add print functions for sse3f, sse3i and sse3b 2015-02-11 00:20:34 +05:00
5646a9f759 Cycles: Add utility functions to print ssef, ssei and sseb
Nothing special, just really handy for debugging.
2015-02-11 00:11:04 +05:00
4e37b29631 Cycles: Move mesh attribute creation into separate functions
This makes overall code of create_mesh() much cleaner and easier to follow.
2015-02-10 23:41:54 +05:00
bc218cf4d2 BLI_linklist: Add a new helper to move an item (identified by its current index) to a new position in the list. 2015-02-10 19:20:36 +01:00
a9c5d0ba51 Slip tool: add enter and space to confirm the operation 2015-02-10 17:40:11 +01:00
0b1a886292 Cycles: optimize one normalization out from the previous commit 2015-02-10 21:32:44 +05:00
227a94077f Cycles: implement pointiness geometry attribute
This attribute means how "pointy" the geometry surface is, which allows to do
effects like dirt maps and wear-off effects on render geometry. This means the
attribute is calculated for the final mesh which means no baking (which implies
UV unwrap) is needed. Apart from this the behavior is quite close to how vertex
dirty colors works.

The new attribute is available as an output socket of Geometry node.

There's no penalty for the render time, only some delay on scene preparation
(the delay is linear of the mesh complexity).

Reviewers: brecht, juicyfruit

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1086
2015-02-10 20:33:41 +05:00
1ebf95bfd7 Tests: Disable failing import/export tests for until they're fixed 2015-02-10 19:29:18 +05:00
edb7195f27 Cycles: Bring back distance check in re-intersection
From more investigation of the numeric failures in the kernel it appears
the check was rather correct. But in theory it;s also needed for the motion
triangles.
2015-02-10 19:07:55 +05:00
b03ac83843 Cycles: Correction to glossy shaders not handling total internal reflection
The issue was caused by lack of check for whether fresnel term is actually
giving total internal reflection in refraction BSDFs. This lead to usage of
arbitrary vector of (0, 0, 0) as reflection, giving numeric issues in other
areas of the kernel.

This gives some visual changes of sharp reflection but it seems to be rather
proper now. Which also corresponds with rough glossy reflection with sharpness
set to 0.001 (previously it was totally different from sharpness of 0.0, which
is just weird).
2015-02-10 18:20:36 +05:00
298d8681a0 Fix T43596: Refraction BSDF crashes blender on pre-sse4 CPU
This is the same issue T43475: SSE4 code is more robust to non-finite values
in the ray origin/direction. So for now added a check before doing BVH traversal
for pre-SSE4 CPUs.

For sure actual root of the issue is a bit different and much more tricky to
solve, especially without disturbing render results too much. Still looking
into this.

In any case, it's kinda fine to have such a check, we might later make it to be
a kernel_assert() instead of just a return.
2015-02-10 17:36:05 +05:00
e7d20b0be4 Fix grease-pencil crash without clip/track data 2015-02-10 23:34:16 +11:00
1cfe0c1fb2 UI: scale timeline cache-height by DPI/pixelsize
D602 by @blakenator with edits
2015-02-10 22:33:52 +11:00
27f81bf6ce correct last commit 2015-02-10 22:03:10 +11:00
040b510df1 Fix: Grease Pencil datablocks can be copied using the ID.copy() API method now 2015-02-10 23:30:30 +13:00
d21668de5c Synchronize changes from buildbot server 2015-02-10 13:47:28 +05:00
6971bd9a4f Fix T43611: Collision shape of rigid bodies changes inadvertently
The issue was caused by the fix for T34108, which modified DNA in order to
get a fallback box collision shape. Not sue why it's needed, we can just get
box shape directly, without modifying user's settings.
2015-02-10 12:56:25 +05:00
julianeisel
25412d8ae2 Nodes: Various UI cleanups for Image and Environment Texture Nodes
Mainly consistency changes and smaller fixes.

* Environment Texture Nodes:
** show image info
** split layout for menus (showing menu title on the left)
** hierarchical button order

* Image Nodes:
** disable Alpha Mode menu if Use Alpha is disabled
** Don't show "+" icon/button if an image is already loaded
** Consistent alignment of menu buttons (see Input Color Space menu)

Requested and approved by @venomgfx
2015-02-09 23:17:33 +01:00
julianeisel
64ef6e74f7 Nodes: (Un)pack, filepath, refresh buttons for Environment Texture nodes
The same buttons are already used for other image textures and since the
environment tex node does only allow images as well, it makes sense to
have this here too.

Approved by @lukastoenne and @venomgfx,
requested by @venomgfx
2015-02-09 23:17:33 +01:00
53c4033b5b CMake cleanup: Move OSL detection code into FindOpenShadingLanguage.cmake
Should be no functional changes.
2015-02-10 02:45:59 +05:00
julianeisel
4ca4f04c75 Fix file size not drawn using Link/Append
For linking/appending, .blends get the type S_IFDIR added which prevents
the size from being drawn. BLI_is_dir gets the type from the OS so it's
better suited for this case.

Reported by @sergey.
2015-02-09 22:06:45 +01:00
4edc1bbe02 BGE - Vehicle Controller - add background and API checks for arguments of function calls
Fixes T41570 crash
For readability, attachDir was renamed to downDir and the Python API docs renamed accordingly
2015-02-09 20:58:15 +00:00
a088b9488d Recreating bge python modules instead of using existing
All of the initXPythonBinding functions are changed to always creating the module instead of importing if previously existing.
I can instead only remove the module return when the import is ok, so that it always inits. But then, I don't see the point in importing.

I make sure that these functions are called only once per run, inside initBGE.
This was not the case with GameTypes. I moved initPyTypes inside of initGameTypesPythonBinding due to that.

I reorganized initGamePlayerPythonScripting and initGamePythonScripting so that they run things in the same order.
initGamePlayerPythonScripting imports mathutils and aud, the other only aud. Shouldn't it be the same for both?

Reviewers: campbellbarton

Subscribers: sybren

Projects: #game_engine, #game_python

Differential Revision: https://developer.blender.org/D1070
2015-02-09 20:56:38 +00:00
31e26bb83b Fix T43424: undo changes the active scene
Using different scenes with 2+ windows broke entirely using undo.
Now keep track of the current windows scene in each undo-file,
and ensure the undo-scene is on a visible window when undo is executed,
switching the scene only when its not in a visible window.
2015-02-10 05:51:05 +11:00
2fe9e3c1f0 more direct fix for last commit 2015-02-10 03:00:37 +11:00
c4e8d74563 Fix T43498: New curves fails /w radius & rotation
Scaling matrix assumed no rotation,
also remove unused apply_diameter arg.
2015-02-10 02:50:59 +11:00
3c755fd6a5 Fix outliner crash renaming library /w filter
D1045 by @a.romanov
2015-02-10 02:05:22 +11:00
b83d851901 Cycles: Another attempt to solve 32bit CUDA kernel
Previous fix didn't quite work well. For some reason everything worked fine when
using native nvcc in 32bit environment, but cross-compiling from 64bit platform
it was still running out of memory.

For now just made it so all the kernels are slower on 32bit CUDA as a temporary
solution. Either it'll be solved in next CUDA releases (by dropped 32bit? =\) or
we'll find better workaround.
2015-02-09 16:14:44 +05:00
5544ded2b5 Fix ImBuf leaked by Image from View operator
Running this operator and and closing Blender gives this:
Error: Not freed memory blocks: 2
ImBuf_struct len: 2480 0x69ba4f8
imb_addrectImBuf len: 1048576 0x6ccc2d8

Fixed with added call to IMB_freeImBuf in BKE_image_add_from_imbuf.
Could be fixed in the operator instead, but I think the BKE function
is the correct place since the comment says it should take ownership
of the ImBuf.

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1084
2015-02-09 12:02:59 +01:00
567e147f61 Code cleanup: remove unused function BKE_image_assign_ibuf
Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1083
2015-02-09 11:28:38 +01:00
9c90c559fe SpaceFile: rework filelist_find, was looping way too much. 2015-02-09 10:10:20 +01:00
12ed439d8e GPencil: Show color swatches for GPencil layers in Outliner
Instead of showing a meaningless "dot" icon or having to come up with an arbitrary
icon, the Outliner now shows the stroke/fill color swatches for each layer to
match every other place where these are shown.

NOTE: Like many other widgets in the outliner though, these are not editable.
2015-02-09 12:48:00 +13:00
7df0a19d63 GPencil: Viewport visbility and editability toggles for layers in Outliner
* Viewport visibility and locking are currently exposed
* Later on, visibility in renders can also be included
2015-02-09 12:47:59 +13:00
julianeisel
6b107daf23 Fix T43554: Zoom to mousepos makes 2D Views pan after zoom limits are
reached

There are a couple of things that I don't like here, but it seems like
the best way to handle this for now.
2015-02-08 22:35:33 +01:00
a19229b80c ndof: detect new 3Dx devices on Linux
Was filtering for Logitech's USB vendor ID. 3Dconnexion now uses their
own vendor ID for new products. Mac & Windows don't look for specific
vendors so they should be fine.

Also added a note to eventually make USE_FINISH_GLITCH_WORKAROUND
available on all platforms.
2015-02-08 15:01:18 -05:00
f0f3554e17 GHOST: fewer virtual functions
Reined back over-use of virtual functions in GHOST, especially in
"leaves" of the inheritance hierarchy. This eliminates vtables for many
classes and (in some places) turns virtual function dispatch into direct
function calls.

I'll be around to fix things if other coders think this change is too
much.

Still lots of virtual in GHOST_TaskbarWin32 since it just loves virtual.
2015-02-08 14:18:53 -05:00
8aeb9d2158 minor Windows include tweak
Needed a minor change to test committing from a new development system.
2015-02-08 12:41:45 -05:00
0d766aa532 Some minor fixes from latest coverity scan, nothing crucial here. 2015-02-08 16:26:45 +01:00
dd65a44c9a BGE physics: When colliding, report first contact point to Python
This patch adds two parameters to the functions in the
collisionCallbacks list. The callback function should thus be like
this:

```
def on_colliding(other, point, normal):
    print("Colliding with %s at %s with normal %s" % (other, point, normal))

game_ob.collisionCallbacks.append(on_colliding)
```

The `point` parameter will contain the collision point in world
coordinates on the current object, and the `normal` contains the
surface normal at the collision point.

The callback functions are checked for the number of arguments
`co_argcount`. The new `point` and `normal` arguments are only passed
when `co_argcount > 1` or when `co_argcount` cannot be determined.

Reviewers: brita_, campbellbarton

Subscribers: sergey, sybren, agoose77

Projects: #game_physics

Differential Revision: https://developer.blender.org/D926
2015-02-08 15:52:13 +01:00
51b645a655 Initial vertex slide UV-correct support
Still need to adjust for contiguous UV's
2015-02-08 17:58:11 +11:00
8ff099bc7b BoxPack: avoid using static vars (make threadsafe) 2015-02-08 17:07:47 +11:00
c6abfa6114 Fix for mask modifier invert UI missing
D1066 by @gregzaal
2015-02-08 16:30:27 +11:00
d989d8a374 CMake: only quiet warnings for generated rna files
also minor warning cleanup
2015-02-08 15:08:31 +11:00
9c9dab095d RNA: use FUNC_USE_MAIN to avoid 'G' global 2015-02-08 02:20:55 +11:00
e7c7f57481 RNA: packing functions for vfont & sound
D389 by @kevindietrich
2015-02-07 22:35:32 +11:00
5ebae1c0c0 GPencil: Initial support for GP Layers in Outliner
This is still very rudimentary, and lacks many things.
* This needs a better icon. Perhaps we can look into using colour swatches here
  too like in all the other places?
* The "active" check needs to be implemented still
* Various restriction toggles to come still
2015-02-07 12:50:22 +13:00
68fc2e210e GPencil: Initial support for Grease Pencil in the Outliner
This commit just adds entries for the Grease Pencil datablocks in the Outliner.
Currently, there's not much more to see here, but the following commits will see
to that.
2015-02-07 12:28:17 +13:00
ca06c3343e Fix T43515: Initial velocity for fire bug
Visual representation of fire was generated before simulation step took place. This caused fire to essentially lag one simulation step behind, even though all emission areas were up to date.
2015-02-06 22:05:09 +02:00
1b85ca6fc0 Fix T42950: Smoke particle flow doesn't work with high res and subframes unless "set size" option is ticked. 2015-02-06 21:23:43 +02:00
a42553f986 Fix T43579: FBX Export shading issue (Broken normals?)
Error in custom split normals work, non-autosmooth normals != vertex normals!
Loops from flat faces shall take normal of their face, not their vertex.

Tsst...
2015-02-06 20:14:18 +01:00
b12f3cbee7 cleanup: style 2015-02-07 04:50:21 +11:00
fa9e42b57d UserPrefs: increase max undo steps to 256 2015-02-07 04:26:57 +11:00
8ab1188e39 rename SIPO_AUTOVIEW -> SIPO_AUTO_VIEW_SELECTED
The term auto-view on its own isn't very meaningful
2015-02-07 03:47:06 +11:00
0e049e88e2 One more crashing instance for hashes 2015-02-06 17:39:26 +01:00
14dbe1c261 Slip tool accepts numerical input. 2015-02-06 16:38:32 +01:00
bf54867ff1 Get rid of no scaling for proxies for master, it causes FX to crash,
will code another workaround for gooseberry.
2015-02-06 15:58:50 +01:00
julianeisel
dffdde4cdc Graph Editor: Auto View
Auto View automatically adjusts the view based on selection, so that the view is
always focused on the current selection.
A checkbox in the header is used to access it and it works for the following
selection methods: Toggle All, Border, Circle, Lasso, Left, Right, More, Less,
Linked, Column (so all except of single selection, in which this can be a bit
annoying)

Reviewed by @Aligorith (thanks for that :) )
2015-02-06 15:53:13 +01:00
31170ec19e Fix T43578: Beauty Triangulation would hang in infinite loop, due to float rpecision issue.
Only recompute if cost is below -FLT_EPSILON, we can get cases where both cases generate
very tiny negative costs (see 'Cylinder.004' mesh in .blend attached to report).
2015-02-06 15:11:34 +01:00
f4f468fc48 Fix sequencer crashing after recent GHash refactor.
Code frees hash element while iterating - I don't think that's a good
idea but this should keep things working for now at least.
2015-02-06 14:28:08 +01:00
24edab07cc Add a precision to 'show group color' tooltip, that fcurve/action editors option was confusing users a bit. 2015-02-06 12:38:33 +01:00
c62c44bdc1 Fix for scons + mingw64 warning flags fix
So, it turns out my changes here the other day were a bit too over-eager:
  -Wdeclaration-after-statement and -Wstrict-prototypes only applied to C code
and not C++ (which that set of flags was getting included for too).

  However, -Wno-char-subscripts is fine where it is now, so I've left it in place
2015-02-06 23:51:31 +13:00
bf4c44491a Cycles: Some more constants fixes for fast math 2015-02-06 15:40:07 +05:00
460681bd62 Cycles: Use proper constant name for 1/pi in fast math 2015-02-06 15:15:55 +05:00
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
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
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
b752597805 cleanup: use bool args & redundant casts 2015-02-06 18:19:29 +11:00
f9f04726e5 GHash: no need to malloc iterators 2015-02-06 15:34:36 +11:00
4cbf2ebdc9 Cleanup: style 2015-02-06 13:55:20 +11:00
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
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
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
a1ec1b3974 Fix part of T43556 brush increase/decrease size operators do not update
the UI sliders.
2015-02-05 18:14:05 +01:00
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
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
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
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
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
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
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
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
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
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
343ddc52dc UI: UVWarp-Modifier had duplicate names
D1047 by @lichtwerk
2015-02-05 19:30:02 +11:00
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
57e1a5373f Fix T43531: Wrong object center-dot color
Write objects center point to the nearest depth.
2015-02-05 17:01:58 +11:00
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
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
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
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
a78a17bad5 Fix T43366 export/import materials inconsistent 2015-02-04 19:07:28 +01:00
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
4339caf7cb Cleanup: name flip x/y 2015-02-05 03:56:24 +11:00
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
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
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
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
810c7ee825 Fix T43552: Cannot jump between GP keyframes in dopesheet 2015-02-05 00:04:46 +13:00
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
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
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
d16ac1e152 Compositor: Code cleanup, trailing whitespace and wrapping 2015-02-04 13:04:09 +05:00
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
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
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
37a08ae5c5 UI messages: minor fixes... 2015-02-03 20:25:14 +01:00
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
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
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
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
2699866720 BGE: python API cleanup - initialization for bge with submodules, closes D615 2015-02-03 15:32:55 +00:00
0e0af4f772 BGE: python API cleanup - adding proper initialization to GameTypes 2015-02-03 15:32:55 +00:00
e67bd30bdf BGE: python API cleanup - replace BLI_program_path with BKE_appdir_program_path 2015-02-03 15:32:55 +00:00
ba0978c1a9 BGE: python API cleanup - bge submodules definitions 2015-02-03 15:32:54 +00:00
a7b0330c13 BGE: python API cleanup - using PyDoc_STRVAR instead of static char*
Cherry-picking d503f8a onto 117edbb
Conflicts:
	source/gameengine/Ketsji/KX_PythonInit.cpp
2015-02-03 15:32:54 +00:00
95425bc97a BGE: python API initialization cleanup
-Removing unused parameters
-Updating some parts to match bpy_interface.c initialization

Cherry-picking 14fceb6 onto 117edbb
Conflicts:
	source/gameengine/Ketsji/KX_PythonInit.cpp
2015-02-03 15:32:54 +00:00
c48c20b498 Fix T43530 using blender on remote connection crashes
Issue here is that remote connection will use OpenGL 1.1.
There was a call here that would free VBOs always without a check,
however the VBO free function pointer is NULL on such contexts causing a
crash.

This must have been causing some of the crashes with old contexts. While
I think supporting those systems is not such a good idea in general,
they can have a few more moments of support I guess.

Things might be better now for systems using OGL 1.1 though there are
still things that could be done better here - for instance going to
dyntopo can crash immediately because we don't have a fallback
implementation there. It might be worth reimplementing sculpting with
vertex arrays for the legacy case too, but I guess if we move on to
OpenGL 2.1 soon this is a bit of a wasted effort.
2015-02-03 16:18:19 +01:00
2d4980e68e Fix T42510: bake animation wrong result.
Caused by own rBfb7ff31315a1c9 - not surprising code using Object.matrix_local
in other contexts than mere Object parenting fails, since it was using a broken
implementation before...

Note that whole NLA_OT_Bake op would need some love, it is quite brittle in many aspects.
2015-02-03 15:44:20 +01:00
3ff9e52dca Fix T43380 modulo operation in GLSL does not return negatives.
Make it so by checking operand sign.
2015-02-03 15:08:42 +01:00
8186214c39 Fix T43514: Environment map doesn't update 2015-02-03 18:52:01 +05:00
a01501443b Bugfix T43541: Inserting keyframes using sliders in Action Editor doesn't respect NLA time remapping 2015-02-04 02:22:57 +13:00
445eed8e38 Fix T43403: Compositor does not respect interlaced video
This is actually issue with Image datablock, which had obscure Fields settings
but didn't allow to de-interlace the video.

Now added the option to de-interlace Image with Movie input type.
2015-02-03 18:17:12 +05:00
701a7dcc87 Fix T43544: Runtime Error when Locale is not valid
This is not a real fix and only prevents crash, textures IO might be not
working totally correct if they're unicode path or so. Proper solution
would be to detect which locale we can use and set LANG, LC_ALL and friends.
2015-02-03 17:36:15 +05:00
1667e68797 Revert "Keep mingw specific includes ifdef'd"
This reverts commit ba8b9ae307.

Turns out this is needed on other systems, just happened to be indirect included on them.
2015-02-03 23:24:31 +11:00
ba8b9ae307 Keep mingw specific includes ifdef'd 2015-02-03 22:54:57 +11:00
529ca92975 MinGW still uses SDL1 - will need to change this of course but no need
to keep compilation broken for now
2015-02-03 12:51:12 +01:00
7345d558f9 MinGW64 complains about clock, include time.h 2015-02-03 12:31:51 +01:00
488b342741 BMesh: optimize selection flushing
De-selecting a face would do flushing checks on each vertex 3 times, now only do once.
2015-02-03 19:59:39 +11:00
af2d75b9a7 cleanup: inconsistent BMesh select checks 2015-02-03 19:08:25 +11:00
faaaf7ee1f Possible NULL de-reference on fullsceen check
Also quiet some other minor warnings
2015-02-03 16:42:22 +11:00
32125c40d3 Fix own mistake unlinking text (recent commit) 2015-02-03 16:39:32 +11:00
27cfd291c6 Fix copypaste error in x11 tablet init 2015-02-03 16:37:37 +11:00
75249259f4 BMesh: optimize edge select
It's called a lot, so avoid using a generic iterator for edges of vert.
2015-02-03 09:33:04 +11:00
052a021711 cleanup: indentation & redundant casts
also use 'const' bucket rect args
2015-02-03 09:33:04 +11:00
5678691fe4 cleanup: use bools in drawobject 2015-02-03 09:33:04 +11:00
ce6e71ea90 Make MSVC 2013 win32 also use new OpenEXR 2.2 2015-02-02 21:30:28 +01:00
d7ad64cc5e Bump OpenEXR to 2.2 for windows MSVC 2013 2015-02-02 19:44:49 +01:00
9f874ddb99 Warp modifier: remove redundant NULL check 2015-02-03 04:38:59 +11:00
72f02437e7 Warp modifier: avoid sqrt checking radius 2015-02-03 04:35:40 +11:00
d0ae2624f5 Fix T43524: Warp modifier curve clamped to 0-1 2015-02-03 04:35:40 +11:00
e224b5b9ca Cycles: OSL kernel now also ignores maybe-uninitialized
This is a bit of a mess because of the header dependency hell, but
since the tweak is small enough it's gonna be fine.
2015-02-02 22:15:33 +05:00
432e478f43 Cycles: Further tweaks to T43511 to solve compilation error on 32bit platforms 2015-02-02 22:09:02 +05:00
30e4009f0a Cycles: Solve dependency between camera and object synchronization
IN theory object might depend on camera location (spatial adaptive subdivisions
for example) which became not possible to achieve after camera in volume support.

Should be no functional changes for artists.
2015-02-02 22:09:01 +05:00
ddba5c27a7 Cycles: Ignore -Wmaybe-uninitialized from the kernel in release builds
This warning provided too much false-positive issues in release version of the
kernel, making it really easy to miss actual warnings.
2015-02-02 22:09:01 +05:00
23e3dbb726 Selection: avoid uninitialized memory read with occlusion queries 2015-02-02 17:45:07 +01:00
2c82e748c1 Fix for hair child roughness.
The fixed-function roughness was not getting used once the curve
roughness has been enabled at least once.
2015-02-02 14:47:50 +01:00
750506be97 Adjust GLSL drawing of window coordinates from camera view (use camera
bounds instead of window bounds). Fixes remaining part of T43346
2015-02-02 14:26:05 +01:00
14755dde97 Fix for unfreed effector weights in hair dynamics.
The internal cloth modifier effector weights get replaced temporarily
to make the cloth sim use the particle weight settings instead. But
the particle sim was not putting back the original weights, which can be
non-NULL in case the cloth sim allocated these already. Messy design ...
2015-02-02 14:19:05 +01:00
159124726e Fix for unfreed memory due to unnecessary early exit in the free
function.
2015-02-02 14:19:05 +01:00
961b7e78b4 Fix for unfreed memory of internal hair cloth modifier pointcache. 2015-02-02 14:19:04 +01:00
5030daf2a8 Cycles: Remove redundant calculation of w in recent cubic commit
Was rather harmless since compiler will optimize it out, but nice to get
rid of this anyway.
2015-02-02 17:35:57 +05:00
31263192bb Fix T43511: Major slow down with many instanced objects in cycles GPU
Slowdown was caused by watertight intersection commit and follow-up workaorund
for compiler crash which uninlined utility function which rotates the ray.

Now it's only uninlined for sm_50 and sm_52 experimental kernels which are the
only ones which failed to compile.

Rendering still might be a bit slower but at least shouldn't be that dramatic.
2015-02-02 17:35:57 +05:00
81f97692ae cleanup: style/spelling 2015-02-02 23:29:53 +11:00
7b369080d0 Avoid warping the pointer when doing constrained texture painting
strokes
2015-02-02 11:29:01 +01:00
7ea7c2aab2 Cycles: Fix inconsistent command line used for runtime kernel compilation
Basically build-time compiled kernels were using --fast-math (which is correct)
but run-time compiled did not.
2015-02-02 15:00:21 +05:00
8cd106f12a minor edits to last commit 2015-02-02 19:21:26 +11:00
julianeisel
f12c17abfe Fix T43501: Crash on custom node tree creation 2015-02-02 03:04:31 +01:00
0305b208eb Fix for Freestyle view map caching not properly updated upon changes of render resolution and scale.
Problem reports independently by Light BWK and Folkert de Vries, thanks.
2015-02-02 10:00:12 +09:00
64124ba904 BMesh: tool to ensure all faces are convex
Access from Mesh -> Cleanup
2015-02-02 09:23:44 +11:00
d655a8f168 BMesh: BM_face_triangulate take edge array
To access edges created between the tris.
2015-02-02 09:22:54 +11:00
b757f04a15 Cycles: Indentation fix for the previous commit 2015-02-02 02:04:47 +05:00
3b9d455a90 Cycles: Implement cubit image interpolation on CPU
Basically title says it all. Could be not totally optimized but the code is there now.
2015-02-02 02:02:10 +05:00
0827441c32 Add extra Cycles regression tests
This new tests are aimed to issues/regressions reported to the tracker.
2015-02-02 02:02:10 +05:00
77e6f2212f Cycles: Allow paths customization via environment variables
This is for development and test environment setup only, not for
regular users usage hence no mentioning in the man page needed.
2015-02-02 02:02:10 +05:00
60c643d66a error in last commit 2015-02-02 05:01:48 +11:00
8350f7a587 RNA: add readonly pixelsize to userprefs 2015-02-02 04:57:41 +11:00
baa8b63111 Documentation: updated mathutils documentation
Added descriptions of the constructors, and improved the module-level
documentation.
2015-02-01 18:16:12 +01:00
fd75796afe cleanup: use const 2015-02-02 01:23:08 +11:00
2e6e92cf50 Documentation: Support documenting constructors in class __doc__
Python types defined in C can now start their docstring with a
`.. class:: TypeName(args)` line, to document their constructor.
In that case the documentation writer is responsible for indenting the
remainder of the docstring by 3 spaces, matching the generated
documentation.
2015-02-01 14:00:43 +01:00
9fa628f35b mathutils: added exponential map to Quaternion
Added conversion to and from exponential map representation. This
representation is useful for interpolation of > 2 quaternions, or in
PD controllers.

Implementation in C functions quat_to_expmap,
quat_normalized_to_expmap, and expmap_to_quat with Python API, unit
tests and documentation.

Added Quaternion.to_exponential_map() and Quaternion(3-vector) to
Python API.

Reviewers: campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1049
2015-02-01 13:06:00 +01:00
8c7e1b648b Fix: correctly describing Quaternion.normalize()
The original comment seems to suggest that only the rotation vector
is normalized, leaving the rotation angle alone. This is not what happens,
though. The new comment matches the actual implementation, and the
implementation matches what is commonly understood as quaternion
normalization.
2015-02-01 10:34:49 +01:00
01ec66423c BMesh: remove redundant connect-nonplanar loop 2015-02-01 19:18:39 +11:00
26f9a92453 WM: empty menu so addons can extend the splash 2015-02-01 04:19:55 +11:00
595675ea7a Cleanup: style 2015-02-01 04:19:55 +11:00
5ac7e23e88 Blender metadata changes to accommodate non string data
Work towards T42418

For now got rid of linked list holding key,value pairs for metadata in favour of ID properties.

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D872
2015-01-31 17:15:43 +01:00
f90891d87e Add PIL_check_seconds_timer_i to avoid casting
note, win32 casts still casts from double.
2015-02-01 02:00:08 +11:00
9e9cd77b8d Compiler warning: double-promotion 2015-02-01 01:17:21 +11:00
535de7ec1f Comment for math defines, also add M_PI_4 2015-02-01 00:37:55 +11:00
03cb146afa Fix T43496: Infinite loop in kernel when using surface attribute for volume
The issue was caused bu the optimization in surface attributes for cases when
there's only a volume shader used. Some attributes doesn't make sense in that
case and were skipped from calculation.

However, it is possible that kernel would still try to access them (because of
the shader setup etc). Prevented an infinite loop in the kernel now, which
should not have much affect on regular renders.
2015-01-31 14:39:19 +05:00
3f5771475d Cycles: Don't perform re-intersection if ray distance is zero
It is possible that ray distance will be zero which would make intersection
refinement return NaN as the refined position which would later lead to all
sort of mathematical issues.

Don't think there are ways to improve intersection accuracy for such rays
so just return original intersection coordinate.

This should fix T43475.

TODO: Need to look into possible issues in Ashikhmin BSDF which might return
zero-length reflected/transmitted ray?
2015-01-31 01:49:48 +05:00
cb2007906f Cycles: Use bool for is_lead array
This way we save 3 bytes per BVH node while building BVH, which overall
gives 100Mb memory save when preparing Frank for render.

It's not really much comparing to overall memory usage (which is 11Gb
during scene preparation here) but still doesn't harm to have solved.
2015-01-31 01:49:41 +05:00
d632ef7c66 Cycles: Use fast math functions in hair BSDF
Precision of the fast functions seems to be enough in there and
since the code was heavily using inverse trigonometric functions
this change gives few percent speedup on Victor's hair.

From the tests files from ctests storage doesn't have any meaningful
difference, hair on Victor is all below 4% absolute error and only
few pixels are exceeding 1% absolute difference.

In any case, let it be as it is currently so it allows us to have
fast math file in sources for it's further evaluation and possible
usage in other areas as well.
2015-01-31 01:49:41 +05:00
dc1043dda0 Cycles: Add fast math function module
It is based on fmath.h from OIIO and could be used to give some speedup
in areas where absolute accuracy is not so critical.
2015-01-31 01:49:41 +05:00
3dbfebc42c First version of constrained line strokes - there's some flickering
still, will look into it later.
2015-01-30 19:47:58 +01:00
0da38ada07 Operator that sets proxies needs to cater for all supported strip types 2015-01-30 16:09:55 +01:00
b58b182753 Get rid of the file touch hack.
If user cancels, there's an issue with leftover files.
Instead use a hash to record files that have akready been registered for
generation and skip them if so.

That should guarantee things will go smoothly and when a file exists it
is assumed to be valid.
2015-01-30 16:00:30 +01:00
f7e8da6f5a Proxy enable operator:
* Enable operator for proxies now becomes set operator for selected and
can unset-set all options.
* Properties become read-only labels, only use operator to set proxies.
2015-01-30 15:13:59 +01:00
7760e97c6b More hacks for proxy generation:
Touch the proxy files if they do not exist so subsequent strips
referencing the same source file won't regenerate it.
2015-01-30 14:30:24 +01:00
d8c20fbb66 Fix T43324: Shrinkwrap projection issue in editmode.
Nice stupid error in low-level `get_cddm` helper, was probably affecting other
modifiers too actualy!
2015-01-30 12:50:38 +01:00
7d543e7310 Corrections to Cycles ctests
- Apply VERBOSE to idiff result as well
- Don't treat verification failed error as unknown
2015-01-30 15:13:09 +05:00
a3c13fa9e8 Cycles: Remove confusing labels usage in hair BSDF
BSDF sampler function shouldn't give labels it's not intended to do.
That said reflection shouldn't give transmission ray and transmission
give reflection ray.

Added an assert in the transmission sampling but reflection still
needs some investigation because even after recent fixes the check
for projection onto the reflected ray could give both positive and
negative values.

It shouldn't have any affect on renders just makes internal logic
consistent and unleashes an issue to be investigate further.
2015-01-30 14:00:24 +05:00
bd10b72ad3 Fix T43458: Crashes with hair transmission BSDF
Hair BSDF did not have proper behavior because of non-normalized
tangent direction (which it expected to be normalized).This lead
to wrong labels being returned by the hair BSDF samplers.
2015-01-30 13:03:01 +05:00
6b81ee6bea Committing the impressive RTheme to the default collection 2015-01-29 23:24:30 -06:00
c6d4a3f3ba Correct location of 'text' button in frame-node 2015-01-30 13:41:07 +11:00
d56c9fb420 Fix T43472: IMBuf: crash on loading top-to-bottom bitmaps.
Height of bitmap may be negative, which indicates a 'top to bottom' line storage.

Also, fixed header handling, bitmaps using other header than 'BM' would most likely
have lead to errors/crashes too...
2015-01-29 20:42:34 +01:00
cff7ef6ee8 Fix texture sampling getting srgb color after fix for subsurf sampling. 2015-01-29 19:34:51 +01:00
ebc064f5c0 Gooseberry request: Dithering support for byte images when painting on
projection painting (2D will be separate commit).
2015-01-29 19:23:57 +01:00
12a38abac6 Fix T43473: mathtutils.geometry.interpolate_bezier returns only 2d coordinates
Fixed/enhanced a few usages of `mathutils_array_parse()` in this file actually...
2015-01-29 18:11:13 +01:00
d2e526a82d Cycles: Fix for bump node not working with object texture mapping
This was intended to be in the original patch of texco copy from object.
2015-01-29 21:48:22 +05:00
a0e8b98b61 Fix T43207 fill brush fails in perspective mode
Divide only the length of the edge by the homogenous coordinate, not the
final coordinate. Also fix the swapping (though it's still a bit
doubtfull if it's really needed)
2015-01-29 17:45:43 +01:00
43fab448f3 Followup for previous commit: fix mismatches between menu entry and shortcut properties.
For now, did most of the changes in menu entries (i.e. py space UI scripts).

Note we do not get 100% same results as previously, but current situation is
globally better than previous one, though the whole system to retrieve shortcuts
remains a bit weak...
2015-01-29 17:34:05 +01:00
945ea40887 Fix T41757: Inconsistent hotkey label with setting.
Issue is double here:

* Quite a handfull of menu entries actually diverge slightly from their shortcut
  counterpart (often one has a prop explicitely set to its default value,
  when the other keep it unset).
* Current code was actually basically sending 'is_strict' option into canal,
  by doing a second check in `wm_keymap_item_find` setting unset op props
  to their default value!

Now, is_strict mostly says one thing: "never consider an unset property as
equal to a set one". Even if set property matches default value. Default values
are not always the same things as unset ones, as demonstrated by this report.

So we are being much stricter now, and also have to check shortcuts and
menu entries definitions actually matches, added some code (triggered by
--debug-wm option) that prints when it finds some (potential) issue.

There is one exception though - Macros. Those have their whole prop set defined
in menu entries currently, this shall probably not be the case, but is another issue,
so for now for macro operators we always do non-strict comparison (pretty much
the same as previously, in this case).

Also 'enum' operators are still tricky. Currently, shortcut extraction relies on
`ot->prop` being set, so even if this is not aboslutely needed anymore (when defining
UI you can specify an arbitrary enum property by name), `ot->prop` shall be set.

Note fix commit for mismatches between menu entries and shortcuts is needed next.
2015-01-29 17:32:34 +01:00
79ba5e52dd Revert "mathutils: let Vector.normalize() return the original length."
Please discuss changes to core mathutils functions first.

Changes like this should be considered and applied to all areas of the API (or not at all).
Missed quaternion, matrix normalize for eg.
2015-01-30 02:12:07 +11:00
7ce7cb5e0f Fix T43454 color is washed out in textured brushes
Yet another color space issue, we multiplied texture color with srgb
brush color and retrasnformed it to srgb. Now use the linear brush color
for the multiplication.
2015-01-29 15:46:49 +01:00
6912fe132f mathutils: let Vector.normalize() return the original length.
The length has to be calculated for normalization anyway, and it is already
returned by normalize_vn(vec, size).
2015-01-29 15:29:01 +01:00
4a99c1ad75 Add override setting to proxy enable operator 2015-01-29 14:40:16 +01:00
87986ed139 Sequencer: Report proxies which are being skipped to the console 2015-01-29 16:58:18 +05:00
a863261ee8 Whitespace cleanup 2015-01-29 12:37:57 +01:00
e0fa282340 Add some convenience operators to sequencer proxy panel:
Enable proxies for all selected movie strips (won't do recursive
enabling for metastrips yet)
Generate proxies operator here, as well as in strip menu
2015-01-29 12:37:57 +01:00
eb150ef337 Node UI: add support to show text-blocks in frames
Some node setups benefit from being documented like this.
2015-01-29 22:04:32 +11:00
c44d7b0340 BGE: Remove duplicated audio panel from Render context
This commit removes the audio panel from Render context as it exists a similar panel in Scene context.
Also, it gives to the Distance Model a similar UI layout as it was in the removed render->audio panel
2015-01-29 18:26:28 +11:00
3cf7a8008e Fix crash on joystick access (if SDL's not found)
D985 by @pgi
2015-01-29 17:17:29 +11:00
072d80a9de Fix T42858: Non uniform gamelogic names on copy
Use generic function for consistent behavior

D949 by @lordloki
2015-01-29 16:43:20 +11:00
65574b0b03 cleanup: shebang lines
D888 by @sambler
2015-01-29 15:56:23 +11:00
1738d4acc9 Bone calculate roll (pos/neg options in menu)
This change means you can see the option to do +/- aligned axis when calculating roll
(in that case the flip-axis option is ignored).

This is added since you mostly don't want to set the option in the toolbar each time.
2015-01-29 15:46:38 +11:00
7095f47665 cleanup: pep8
also remove empty class parenthesis
2015-01-29 15:35:06 +11:00
d434815ff7 Audaspace: Fix typo in speed of sound initialization value by lordloki (Jorge Bernal) 2015-01-29 12:20:41 +13:00
julianeisel
d183e9b43b File Browser: Remove unused fileselect event value
This was initially added for a later support of making the automatic File
Browser fullscreen optional. As this idea was rejected for now (D1037) it
doesn't really make sense to leave these things in.
2015-01-28 23:35:46 +01:00
dd673337f1 BGE: draw contact points + normals in yellow
Red was used with different semantics in the physics visualisation,
switching to yellow to prevent confusion.

A screenshot can be found at http://www.pasteall.org/pic/80766 -- it's
the yellow balls + lines.

Reviewers: brita_, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: lordloki

Projects: #game_physics

Differential Revision: https://developer.blender.org/D925
2015-01-28 22:09:58 +01:00
e5a852c3f3 BGE: draw contact points as sphere + line indicating the surface normal.
A screenshot can be found at http://www.pasteall.org/pic/80766 -- it's the yellow balls + lines.

Reviewers: brita_, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: lordloki

Projects: #game_physics

Differential Revision: https://developer.blender.org/D925
2015-01-28 22:09:58 +01:00
773d85ab32 Based on Sergey's suggestion, use spinlocks for threaded loading of
waveforms.
2015-01-28 19:45:29 +01:00
424100cecb Update scons build documentation
- fix dead blender.org link (build dependencies)
  - rewrite $BLENDERHOME/{config,tools}/* to $BLENDERHOME/build_files/scons/{config,tools}/*

Patch by David Creswick, thanks!

Reviewers: jesterking

Differential Revision: https://developer.blender.org/D798
2015-01-28 23:40:41 +05:00
66f85d3487 Added default install location from install_deps.sh to FindOpenEXR.cmake
Patch by Oliver Weissbarth, thanks!

Differential Revision: https://developer.blender.org/D907
2015-01-28 23:36:51 +05:00
cde9b1b948 Fix clicking into texpaint slots not changing active image in blender
internal when using nodes.

Using nodes in blender internal is not well supported, but there's no
harm in allowing this and it will help manu do his texturing better :)
2015-01-28 15:34:11 +01:00
17cb55e442 Fix warning from previous commit:
Set slot to NULL when no active slot is found.
2015-01-28 15:24:37 +01:00
1a0ef58bdf Code cleanup: break up project_paint_begin() into smaller functions
This initialization function was massive with lots of local variables,
quite hard to follow. Splitting up doesn't make it perfectly clear,
but a bit better.

The changes are mostly quite mechanical splitting apart code, plus a
few new temporary structs for passing data without too many confusing
args. No intentional changes to functionality.

Reviewed By: psy-fi

Differential Revision: https://developer.blender.org/D1035
2015-01-28 14:49:44 +01:00
5d04470851 Texture painting, support cycles UV Map nodes:
Support UV Map nodes for determining active UV layer. Now when an image
node is enocuntered, the system will recursively search the node's input
sockets for any UV Map nodes. Obviously this won't fetch any coordinate
transforms into painting, and it will only choose the first UV Map node
encountered if more than one UV Map nodes are combined.

However it should allow custom UV setups per materials and tweaking of
the UV Map node's UV layer from the Slots panel.
2015-01-28 14:43:07 +01:00
7c72ba60d7 Sequencer: Option to skip strip proxy generation if they already exists
This is a per-strip option next to the build proxy size which tells blender
whether to skip building proxy size if the file for it already exists or not.
The option is called "Overwrite" for simplicity.

This option is enabled by default to avoid changes in the file behavior.

TODO: Would be nice to do something like that for movie clips as well.
2015-01-28 17:32:33 +05:00
7a6d757a3b Add theme option for cliping border 2015-01-28 13:03:42 +01:00
1678cb9af2 Fix dreaded black screen for missing proxies - if requested proxy size
is not found, use the original footage instead
2015-01-28 11:48:22 +01:00
0451934538 Properly decrease users of images when deleting a paint slot. 2015-01-28 11:09:30 +01:00
ce52e781b0 Switch windows MSVC builds to OpenAL-soft 2015-01-28 10:36:19 +01:00
e17c6f79a5 cleanup: py imports 2015-01-28 16:50:51 +11:00
julianeisel
3e59092348 Stacked fullscreen area support (proper implemenation)
Adds support for stacked fullscreens. This basically means, if a user opens a
temporary fullscreen mode, such as the File Browser or the Image Editor render
view, from a different fullscreen, the "Back to Previous" function or the other
ways to escape those temporary fullscreens don't return to the split screen
layout but to the previous fullscreen he has been in.

I already committed something similar (f7e844570f) but that was only
supposed as a fix, it didn't work for the "Back to Previous" operator and the
implementation wasn't really reusable. This one looks a bit nicer + makes some
older hacks unnecessary :)
2015-01-28 02:52:49 +01:00
01cebb6e91 OSL: Updates for OSL 1.5 API changes.
* create() and destroy() are deprecated since OSL 1.5, use regular constructors / destructors.
2015-01-28 01:07:59 +01:00
Dalai Felinto
7b16fda379 Fix T43388 Cycles Baking gives different results than Cycles Render
Reported and nailed down by Michale (MeshLogic).
The code that fixes this was commented out, but Brecht gave the go ahead to use it even if it is not the real solution
2015-01-27 18:20:42 -02:00
86d2765ebe Interface get rid of some quadstrips in favor of trianglestrips
If we ever want OpenGL 3.2 core context quadstrips need to go anyway and while there is much more things that need to be done this is something that can be tackled without any mayor surgery.
And without losing any kind of compatibility with ancient GL.

Reviewers: psy-fi

Reviewed By: psy-fi

Subscribers: psy-fi

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1027
2015-01-27 20:18:59 +01:00
1bfeabf4c5 Correction to tooltip, object texture space is supported by both SVM and OSL 2015-01-27 23:54:24 +05:00
9aefe08711 Fix T43398: Viewport "Renderend" ist not updated when a material is assigned to a face
The issues goes back to eb016eb and now it becomes clear object could be tagged for
update from the edit mode as well.
2015-01-27 22:41:56 +05:00
3f8f4175c3 Fix T43309 saving takes longer.
Issue is that world shader compilation and loading may take long so we
just draw file previews with premultiplied background. Should create the
old familiar transparent background files.

Thanks to Sergey for figuring out the issue.
2015-01-27 18:02:08 +01:00
937c2d8473 Followup fix for T43394: Reconnect feature was using identity matrix for
transforming hair into world space, but this is already happining due to
the global flag.

Still is a horrible mess, legacy code headache as always ...
2015-01-27 17:51:21 +01:00
3b50d3a04f Fix T43346: Window mapping is wrong in preview render
The issue was caused by the whole viewplane used for mapping calculation
which would for sure lead to differences between final camera render and
viewport render from the camera view.

This commit makes it so window texture mapping is the same as final render
when viewing from the camera in viewport render.

It's not totally clear what's the right thing to do when viewport is not
in the camera view mode and that part is left unchanged.
2015-01-27 21:47:00 +05:00
332cf291e4 Fix T43250, lamp node did not use energy when used with nodes in blender
internal.

Similar to fix for T42074 we need to multiply with energy -after-
texture application.
2015-01-27 16:34:40 +01:00
2d86f58e0f And one more infamous BPlayer Fix (tm).
Seriously, please build complete Blender when you change some public func signature...
2015-01-27 16:28:54 +01:00
0d5ebabe43 Fix T43367: Non-wacom tablets broken on Blender in linux?
Looks like with some versions of Xlib (at least the 1.6.2 currently used on Debian testing)
and/or evdev generic driver (2.9.0 currently on Debian testing), you have to also 'select'
DeviceButton1Motion with the extended tablet's motion event, otherwise you won't get any
tablet motion event once pen is pressed, leading to no pressure (each stroke keeping its
init pressure until the end). Crap!
2015-01-27 16:23:56 +01:00
77848f23a4 Fix T43371 lamps not updated on appenidng. Remove GPU materials on
appeniding.
2015-01-27 15:41:45 +01:00
d687625ad8 Correct path to mingw64 libs so some minimal blender subset is possible to be compiled with older gcc 2015-01-27 19:29:22 +05:00
58f7deca58 Fix T43429: bpy.ops.render.render() not working with scene in VSE
Was a mistake in threading conflict prevention condition.
2015-01-27 17:14:14 +05:00
9e48f010c4 Proxy job: make user cancelling actually matter 2015-01-27 12:30:00 +01:00
d9c77a490c Fix T43427: Particle system children sometimes not generated on reload
The issue was caused by the conflict between preview render which would set
R_NO_IMAGE_LOAD flag on the renderer and texture samplers called outside of
the render pipeline trying to use this flag.

Now the sampler functions accepts extra argument so render pipeline can
still skip image load, but calls outside of the pipeline will nicely load
all the images.

Not cleanest change in the world but good enough to unlock gooseberry team,
and assuming we already had pool passed all over the place it should be all
fine.

Will need to reshuffle arguments into SamplerOptions structure later.
2015-01-27 16:14:53 +05:00
df07a25d28 Cycles: Support texture coordinate from another object
This is the same as blender internal's texture mapping from another object,
so this way it's possible to control texture space of one object by another.

Quite straightforward change apart from the workaround for the stupidness of
the dependency graph. Now shader has flag telling that it depends on object
transform. This is the simplest way to know which shaders needs to be tagged
for update when object changes. This might give some false-positive tags now
but reducing them should not be priority for Cycles and rather be a priority
to bring new dependency graph.

Also GLSL preview does not support using other object for mapping.

This is actually correct for BI shading as well and to be addressed as
a part of general GLSL viewport improvements since it's not really clear
how to support this in GLSL.

Reviewers: brecht, juicyfruit

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1021
2015-01-27 13:36:30 +05:00
ddc0d28031 Fix T43408: Putting steps and keys properties into an inactive sublayout
based on the interpolate property does not make any sense at all.

These settings are still totally confusing - this code has not been
touched since 2009 at least! Go figure ...
2015-01-27 09:09:07 +01:00
59e2f919ac missed last commit 2015-01-27 03:41:05 +11:00
b94efe0e8b BGE: remove Py3.1 workaround 2015-01-27 03:29:45 +11:00
7bc6fbf158 Cleanup: current/parent paths: add helpers in BLI_path_utils.
Also, avoid calling ugly strcmp with '.' or '..', making direct char checks is
much cheaper here!
2015-01-26 16:59:24 +01:00
fca515838e Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
2015-01-26 16:59:24 +01:00
d44890ee75 Code cleanup: de-duplicate codegen texid assignment
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:10 +01:00
c5f5012c5a Code cleanup: use GPUDynamicType instead of int
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:07 +01:00
8174ea2684 Code cleanup: use GPUDataSource enum instead of int
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:04 +01:00
3a3d68cd88 Code cleanup: use bool instead of int
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:01 +01:00
fdb55e3719 Code cleanup: use an enum for GPUNodeLink.image
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:59 +01:00
6cfc55c4f9 Code cleanup: use enums instead of defines
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:55 +01:00
42eaf82d10 Code cleanup: move struct GPUFunction and related code out of header
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:53 +01:00
4c3a49ef34 Code cleanup: use lowercase "gpu" prefix for static functions
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:50 +01:00
548d222d81 Code cleanup: remove do-nothing function GPU_node_end
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:47 +01:00
2233a3556d Code cleanup: remove some UNUSED parameters from static functions
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:44 +01:00
d1f88c05aa Code cleanup: retype various fields/parameters from int to GPUType
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:40 +01:00
a59e590e7f Code cleanup: remove parameter from GPU_node_link_create()
In all but one call the value 0 (aka GPU_NONE) was passed in. Clearer
to just default to GPU_NONE and change the one caller that sets a real
type to do it explicitly.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:34 +01:00
27284e4f34 Code cleanup: minor comment improvements
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:31 +01:00
8cafa0afa6 Code cleanup: give anomymous enum used for CustomData.type a name
Used this in GPU module to clarify what some "ints" really are.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:34:39 +01:00
d1e1fb2239 UV Unwrap: Correct aspect was inverted 2015-01-27 01:05:51 +11:00
4013ae6382 Fix T43409: Particle instancing on hair sometimes doesn't have a path
cache available.
2015-01-26 14:58:15 +01:00
895fa8bc79 Timeline: Draw keyframe lines at 60% height
This patch updates the timeline editor. Ordinarily, it draws the
yellow keyframe lines at 100% of the available height. This becomes an
issue when there are keyframes for every frame, which can happen when
importing motion capture data or recording animations from the BGE. In
such cases, the green "current frame" indicator becomes very hard to
see.

This patch restricts the drawing to the bottom 60% of the available
space, thereby making the "current frame" indicator more visible.

Reviewers: aligorith

Reviewed By: aligorith

Subscribers: Severin

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1033
2015-01-26 14:49:12 +01:00
6f2034cead Fix T43394: hair remapping needs to handle "global" hair correctly.
The function was checking the psys flag for this, but since for
disconnect/connect the same psys is used as source and target, the flag
must be passed explicitly.
2015-01-26 14:38:58 +01:00
e0ee74a171 Fix T38619: Confusing logic for Keying Set keyframing Settings
The logic used for determining whether certain keyframing settings (i.e. visual,
only needed, xyz -> rgb) got applied was wonky. The original intention here was
that the Keying Set settings would override the global settings, and the path
settings would override what was used for the Keying Set. However, that was not
happening in all cases previously, as it was only possible to add flags and not
to turn them off.

This commit fixes that by introducing separate toggles to control whether the
Keying Set/Path's settings override the settings inherited from its parent
(i.e. the Keying Set for the Path, and the User Prefs for the Keying Set).
The icons used for these toggles could get revised a bit (we need something
which communicates "override this"; the current one is the closest I could find)

WARNING: If you have old keying sets, this may cause some breakage!
2015-01-27 02:10:26 +13:00
b648ba4103 Fix T43345: Dirty Vertex Colors - odd behavior
was cancelling when the dynamic range was zero, but gave odd behavior,
using the last value, not the values from the UI.
2015-01-26 22:44:59 +11:00
027361c898 Fix T41834: Ctrl+LMB, Extrude Curves 2+ splines
Extrude and Ctrl+LMB now support multiple selected vertices.
Also maintain active vertices.

D964 by Tyler Sliwkanich with own modifications
2015-01-26 21:08:43 +11:00
9415976d17 Change exception syntax to be more modern and hopefully fix buildbot issue in the process 2015-01-26 08:48:55 +01:00
5d61cbf008 Curves: BKE_nurb_copy left duplicate arrays
While callers accounted for this, its quite error prone. Just NULL instead.
2015-01-26 18:22:54 +11:00
8db4a24e4e Bugfix T43343: Buttons for Keyframing Settings are Mutually Exclusive
Since 1c3f2354f8 the keyframing settings on
Keying Sets have been incorrectly displayed as a clump of toggle buttons,
which are usually only used when only one of the options apply.

Reverting this back to how it was, while leaving bl_options in place still for
the one case where it makes sense to do it that way (i.e. for KeyingSetInfo)
2015-01-26 19:19:33 +13:00
julianeisel
146a0e9447 UI: macro for checking modifiers
Useful for UI handling where its common to check multiple modifiers at once.
2015-01-26 13:34:30 +11:00
julianeisel
b636599fde Correction to c792e54699: OS-Key should be checked as well 2015-01-26 02:51:09 +01:00
julianeisel
b554bcf124 Cleanup: Remove ugly ELEM checks in modifier key handling
Campbell once told me such checks can cause warnings on some compilers, so
let's try to avoid them.

From the theoretical view, this check works quite different than the old
one, but in this case everything should work just like previousely.
2015-01-26 02:38:39 +01:00
julianeisel
c792e54699 If a modifier key is held, don't open context menu
D1019 by @gregzaal (minor edits by me).

Thanks for the patch!
2015-01-26 01:57:58 +01:00
ce6ba965dc cleanup: warnings, spelling 2015-01-25 21:15:27 +11:00
f4a418b031 Crash when deleting NlaTrack
Steps to reproduce:
1) Create an object, animated with shape keys
2) Copy it with Alt-D
3) Push action down to nla track
4) Select that track and delete it

In attached file 1-3 steps are completed.
{F138559}

Alexander (Blend4Web Team)

Reviewers: aligorith

Subscribers: yurikovelenov, Evgeny_Rodygin, valentin_b4w, AlexKowel

Differential Revision: https://developer.blender.org/D1015
2015-01-25 18:55:05 +13:00
julianeisel
b112ea3d76 Fix T43315: Minor Conflict in Maya Key Configs
Alt+Mousewheel was used for frame scrubbing which isn't really good as users
may often use this by accident while using Alt for Viewport navigation.

Frame scrubbing/frame_offset() is now called by Ctrl+Alt+Mousewheel (shift +
Mousewheel was already used for scrolling up/down)
2015-01-25 03:25:25 +01:00
julianeisel
2855485565 Fix T43399: VSE - don't show fps info when stopping animation with ALT+A
Caused by a missing notifier on the animation_play operator.
2015-01-25 02:43:57 +01:00
julianeisel
492b9ab5e3 Fix T43335: Node Editor: name doesn't update
Update Node Editor info (drawn on the bottom left) on redraw if needed
2015-01-25 01:59:49 +01:00
julianeisel
c2af749ac3 Cleanup: Ugly typo (retore->restore) 2015-01-24 23:39:06 +01:00
julianeisel
f7e844570f Fix T43008: Support stacked fullscreen areas 2015-01-24 23:01:39 +01:00
31219415d6 Fix BGE compilation after recent renames in BKE_image (tsst...). 2015-01-24 14:57:57 +01:00
d036ad552f BKE_image: use BKE_image_*** prefix
use bools for return values and some api naming consistency.
2015-01-24 17:26:59 +11:00
fcda27cdae Cleanup: style 2015-01-24 17:09:24 +11:00
ae213d740d Don't add Cycles tests if tests folder does not exist
Also print message about those tests being disabled.
2015-01-23 20:56:03 +05:00
433ecb88bd Revert "New cycles tests require buildbot to checkout tests of have test succeed if we test 0 files."
This reverts commit d390e24c49.

Forcing tests to success is really bad idea. It'll only lead to cases when
you see PASSED and will think everything is OK.

Long story short: never force tests to pass!
2015-01-23 20:48:55 +05:00
d390e24c49 New cycles tests require buildbot to checkout tests of have test succeed if we test 0 files. 2015-01-23 16:29:06 +01:00
6d78936c43 cleanup: style 2015-01-24 01:59:09 +11:00
e40387b1e2 Keep proper bone active group after removing first one
Previously active bone group would be set to NONE after removing the first
one even if there are more groups in the armature.
2015-01-23 17:00:18 +05:00
3ff3f563e5 PyAPI: don't adjust prefs when an fails to load
Recent addons commit meant that addons would be enabled even if they weren't found.
This would give an error (which is fine), but also remove from preferences.
2015-01-23 21:18:35 +11:00
2dfe5e30ac Cycles: Don't re-generate blackbody/beckmann tables on every shaders update
This commit makes it so blackbody and beckmann lookup tables are stored on CPU
after being generated and then only being copied to the device if needed.

This solves lag of viewport update when tweaking shader tree by using 266KB of
CPU memory.
2015-01-23 14:00:48 +05:00
7733bd5efc PyAPI: avoid scanning all addons on startup
Gives small speedup
2015-01-23 16:38:29 +11:00
783b4cd1ca PyAPI: use set.discard instead of set-subtraction 2015-01-23 16:37:56 +11:00
2242022653 PyAPI: Replace importlib.reload, not 'imp' 2015-01-23 16:37:30 +11:00
3e8c0027a3 Cleanup: replace deprecated imp -> importlib 2015-01-23 12:37:58 +11:00
6a6e4a9d47 Set bAction.chanbase to deprecated 2015-01-23 10:52:20 +11:00
87fb7ee7e9 Theme Flatty Light
As discussed, welcome flatty light to master!
2015-01-22 23:52:14 +01:00
a730cda72f Fix: Joining armatures fixes up the drivers accordingly
Finally! At long last, I've gotten this working! This ended up being far trickier
to get right than anticipated; the normal remapping API's cannot be used as-is
as they will just clobber over subtleties whenever datablock changes are involved.
So, for now, we have to duplicate the logic a bit.
2015-01-23 02:33:32 +13:00
99a5f376a2 WIP: Attempt to get driver links remapped correctly when joining armatures
Now, RNA Paths and driver targets get corrected, but at the expense of this
always happening (i.e. even for those affecting drivers which existed before).
2015-01-23 02:33:31 +13:00
6248381783 Fix: Joining armatures wasn't updating Action Constraints properly
The code here was still trying to access ancient 2.4x "action channels" to rename
them. Now, this renames the relevant FCurves instead.
2015-01-23 02:33:31 +13:00
9617446be2 Cycles: Fix compilation error with some compilers
Not sure why this was not visible previously, but the change is
logical anyway.
2015-01-22 17:04:01 +05:00
cae72caa82 CTests: Add render tests for Cycles
The idea is to use the set of really small images from the lib folder
and run Cycles render on them comparing render output to reference
images in the tests repository.

For sure same thing could become more generic for BI or Freestyle
render engines.

Thanks Campbell for review and code tweaks!
2015-01-22 15:57:20 +05:00
90f2febbf4 CMake: Auto-detect path to idiff application in FindOpenImageIO.cmake
Not used at this moment, but will be real soon with new ctests.
2015-01-22 15:53:15 +05:00
4d4456015c Quit blender with non-zero exit code if tryign to use non-existing render engine via the command line 2015-01-22 15:23:09 +05:00
fa46f5a289 Fix T43357: Cycles crash with spatial splits after recent changes
When doing BVH leaf node split we can't rely on leaf size limit from
BVH parameters in case there's spatial split enabled.

This commit basically reverts previous optimization change here which
used stack-allocated memory and uses heap-allocated vector now.

It's possible to boost this code up again by using own allocator.
2015-01-22 14:56:00 +05:00
1841b12900 Cycles: Add assert check to triangle packing
Handy for troubleshooting.
2015-01-22 14:27:13 +05:00
a1ffb49e49 Fix T43120: Cycles mapping node rotation order is different from viewport
Root of the issue goes to the fact that since the very beginning Cycles was
using ZYX euler rotation for mapping shader node but blender was always
using XYZ euler rotation.

This commit switches Cycles to use XYZ euler order and adds versioning code
to preserve backward compatibility.

There was no really nice solution here because either we're ending up with
versioning code or we'll need to deal with all sort of exceptions from blender
side in order to support ZYX order for the mapping node. The latest one is
also creepy from the other render engines points of view -- that might break
compatibility with existing bindings or introduce some extra headache for them
in the future.

This could also become a PITA for us with need of supporting all sort of weird
and wonderful exceptions in the refactored viewport project.

NOTE: This commit breaks forward compatibility, meaning opening new files in
older blender might not give proper result if Mapping node was used.

Also, libraries are to be re-saved separately from the scene file, otherwise
versioning code for them wouldn't run if scene file was re-saved with new
version of blender.

Reviewers: brecht, juicyfruit, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D973
2015-01-22 14:12:22 +05:00
1aa8f0d3c0 Cleanup / Cycles: Code de-duplication for graph node relinking.
Differential Revision: https://developer.blender.org/D1018
2015-01-22 09:59:16 +01:00
82702db407 Expose shading node shading compatibility to the RNA
This way it is possible to probe shading compatibility of a given node from
python, making things like versioning code much easier to perform.

it's only valid for shading nodes, for other nodes the property also exists
but reads as an empty enum.

To access this compatibilities:

  node.shading_compatibility
2015-01-22 13:52:17 +05:00
21eb3ce44a Fix: Audaspace threw an exception for files it could not open. 2015-01-22 19:06:23 +13:00
Dalai Felinto
5c6ef95b71 Docs: touch ups in the bge.render doc introduction 2015-01-22 03:20:39 -02:00
Dalai Felinto
8ed439b89e bge.render.getStereoEye() and bge.types.LEFT_EYE/RIGHT_EYE
This function allows the user to run specific code for each of the
rendered stereoscopic eyes in the Game Engine.

The initial use case is to set the camera projection matrix in
a scene.pre_draw callback function for each eye, to be used in VR
(Virtual Reality) installations.

Reviewed by Mitchell Stokes and Campbell Barton, thank you guys.

Sample Test Python Script:
"""
import bge
import bgl
import blf

def init():
    """init function - runs once"""
    scene = bge.logic.getCurrentScene()
    scene.post_draw.append(write)

def write():
    """write on screen - depending on the eye"""
    width = bge.render.getWindowWidth()
    height = bge.render.getWindowHeight()

    # OpenGL setup
    bgl.glMatrixMode(bgl.GL_PROJECTION)
    bgl.glLoadIdentity()
    bgl.gluOrtho2D(0, width, 0, height)
    bgl.glMatrixMode(bgl.GL_MODELVIEW)
    bgl.glLoadIdentity()

    eye = bge.render.getStereoEye()

    if eye == bge.render.LEFT_EYE:
        blf.position(0, (width * 0.2), (height * 0.3), 0)
        blf.size(0, 40, 72)
        blf.draw(0, "Left")

    else: # bge.render.RIGHT_EYE:
        blf.position(0, (width * 0.7), (height * 0.3), 0)
        blf.size(0, 40, 72)
        blf.draw(0, "Right")
"""
2015-01-22 03:00:24 -02:00
1b1a6e0c92 error in last commit (missed in review) 2015-01-22 10:56:52 +11:00
64e869ed35 Outliner: use enum for outliner_data_operation()
No functional change, D997 by @lichtwerk
2015-01-22 10:49:10 +11:00
dda355442d Cycles: Support tube projection for images
This way Cycles finally becomes feature-full on image projections
compared to Blender Internal and Gooseberry Project Team could
finally finish the movie.
2015-01-22 00:41:42 +05:00
12ccac657f Cycles: Support sphere mapping for the image texture 2015-01-22 00:41:42 +05:00
cd72396797 Cycles: Optimization for black world backgrounds
* If a Background node is set to a black color or zero strength,
it now gets removed from the shader graph.

* In case the graph is empty (no background node), the kernel will skip
evaluating it and save some rendertime. This can help quite a bit in scenes,
where the majority of the image consists of a black background.

Example: http://www.pasteall.org/pic/show.php?id=82650
In this case the render is ~16% faster.

Differential Revision: https://developer.blender.org/D972
2015-01-21 20:16:18 +01:00
7165db53f2 Cleanup of BGE code CcdPhysicsEnvironment::CallbackTriggers()
Refactored some code to be easier to read. Semantically the code is
identical.

  - Some conditions were negated to be able to return/continue early,
    rather than having the majority of the code inside an if-body.
  - Conditions were simplified (!(a == b)) turned into (a != b);
    repeated conditions calculated only once.
  - Unnecessary variables and one unnecessary condition were
    eliminated.

Reviewers: campbellbarton, lordloki

Reviewed By: lordloki

Projects: #game_physics

Differential Revision: https://developer.blender.org/D954
2015-01-21 18:43:05 +01:00
684942c2fe CMake/MSVC: Quotes around the path
D940 by @TeeTrizZz
2015-01-22 01:53:12 +11:00
3df93d063e Fix: Joining armatures loses drivers
Currently, when joining two armatures, the drivers of the armatures being merged
in are lost. This commit introduces a new AnimData API function for merging
animation data into another AnimData block.

NOTE:
* For now, this only copies the drivers over. As a result, manual effort will
  still be needed to go through and fix the drivers.

  I am working on automating that process, but it's more important that the
  drivers don't have to be created from scratch for now (since this is needed
  for the Goosberry rigging work).
2015-01-22 02:09:16 +13:00
f087e9930d Added new debug flag which can be used to lazy-init the SimDebug drawing.
A development addon can be used now to enable the debug drawing, without
the need to add UI code for this in the release files.

The SimDebug feature should also get an overall build flag and use
function stubs unless enabled. That way any possibility of overhead in
releases is eliminated.
2015-01-21 14:00:59 +01:00
Martin Ettl
f23338e107 Fix limit check before accessing array in opennl
Please note that opennl is already modified (for double precision)
so re-integration is not really easy. Also, we'll eventually switch
to Eigen.

For until that let's just solve the condition in our bundled opennl.
2015-01-21 17:19:39 +05:00
a86482f81c Fix T43158: pixels in the 3d-view was mis-aligned
Change the pixel offset for regions, it make oversampling blurry when drawing pixel aligned values.
See T41749
2015-01-21 23:15:39 +11:00
47bf0934f5 Removed generic debug1..4 values from the cloth data.
These were used as UI buttons during development. If such parameters are
needed again later they should instead be added in the (now global)
SimDebugData and made accessible with a dev addon or so.
2015-01-21 10:07:11 +01:00
4422ecbb96 UI: support alt+wheel for expanded enums 2015-01-21 16:27:58 +11:00
julianeisel
17422124ec Fix T43247: Don't open pulldown when a popup overlaps it
Auto-opening of pulldown menus didn't take overlapping popups into account.
2015-01-21 03:51:18 +01:00
12bf84cbe4 BKE_screen: add BKE_screen_find_area_xy
Use from eyedropper & screen operators
also define SPACE_TYPE_ANY for readability.
2015-01-21 13:43:46 +11:00
bb4c34fe78 Fix Python CTest's, ignore 'addons_contrib'
Too many contrib addons are in an unstable state making the test not so useful.

Thanks to Sergey initial patch: D1012, redid mostly - but outcome is the same.
2015-01-21 12:56:30 +11:00
88222fac63 Remove 'addons_extern' was used before git move 2015-01-21 12:56:03 +11:00
6b655ca62c Cleanup: style 2015-01-21 11:57:11 +11:00
280ed325a2 Update icons after recent cleanup in svg file.
Note differences in those five icons are invisible by eye, just for sake of consistency.
2015-01-20 21:53:06 +01:00
f67c6445e1 Cleanup SVG icon file, pass II.
Name each icon group from its define in Blender.

Simplifies searching for a given icon (in one way or the other), and could also be
useful one day in some scripting.

Also, removed/fixed more empty and stray groups...

Finally, found that we have several svg icons not linked to any defines, and one define
with no icon (dyntopo), would be nice to sort this one way or the other too.
2015-01-20 21:53:06 +01:00
fc6d10f5e8 Cleanup SVG icons file: pass I.
Made sure each icon has its own, 'private' group.
Removed empty groups, and some stray paths and rects (among other benefits,
'make icons' do not generate anymore that half o dozen of empty icons one had to remove
by hand before committing ;) ).

Note: double checked, only five generated icons differ (on binary level) from before,
with no actual visual diff.
2015-01-20 21:53:05 +01:00
9d9dc06014 Made SimDebugData into a single global instance.
This way it doesn't have to be stored as DNA runtime pointers or passed
down as a function argument. Currently there is now no property or
button to enable debugging, this will be added again later.
2015-01-20 18:32:06 +01:00
julianeisel
3356f3f0bb Outliner: "Show Active" - if active is a child, open tree to show child
Previously, if the active object was a child, "Show Active" only showed the
parent object. Now it also opens the tree to take children into account.

Patch D974 by @lichtwerk with some minor edits, reviewed by me.
2015-01-20 17:32:54 +01:00
408adfae8a Fix for BI rendering of hair spirals: Was not taking the extra points
into account.
2015-01-20 16:38:47 +01:00
8604ec9053 De-duplicate large block of shared code for GL vert attribs
Code in ccgdm_draw_attrib_vertex() was entirely the same as the top
portion of the code in cddm_draw_attrib_vertex(). Moved this code to a
new function, DM_draw_attrib_vertex().

ccgdm_draw_attrib_vertex() was removed in favor of calling
DM_draw_attrib_vertex(). cddm_draw_attrib_vertex() still does a couple
extra things, so it still exists but calls DM_draw_attrib_vertex().

In the interest of easy code review, no changes made to the code in
DM_draw_attrib_vertex() other than the new name and an added comment.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1010
2015-01-20 14:17:08 +01:00
58e5509da0 Fix UI glitch: Ctrl/Shift didnt refresh the UI 2015-01-20 23:16:03 +11:00
dfaf26412d Fix transform glitch: Ctrl/Shift didn't refresh 2015-01-20 23:16:02 +11:00
664ef69c9f Cleanup: use const 2015-01-20 23:16:02 +11:00
4a132abd9d Fix for crash when using virtual parent hairs and clumping.
The paths for parents and children are generated using the same function
with a rather obscure test to distinguish them. Modifiers (clump, kink,
roughness) should not be applied to parents though.
2015-01-20 11:42:33 +01:00
6e44e4181f Cleanup: warnings 2015-01-20 21:07:35 +11:00
06160adbf8 Code cleanup: Unused variable in RNA callback 2015-01-20 15:05:39 +05:00
02fad7dca4 Fix T42844: Compositor scale offset
Different interpolation methods in compositor could lead to 0.5 pixel offset in
final renders. This is because of some inconsistency in integer coordinates
which might mean pixel corner or pixel center.

Should be all fine now.
2015-01-20 15:02:35 +05:00
bffd824800 Fixed missing import in particles UI script. 2015-01-20 10:36:05 +01:00
967f93d1c1 Fix error in freestyle api 2015-01-20 20:00:31 +11:00
b22a38786d Fixed merge errors. 2015-01-20 09:38:39 +01:00
c8912073e6 Fix for incorrect DNA field name in versioning, causes constant
resetting of clump noise size on reload.

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-01-20 09:30:33 +01:00
8ac20d1dee Use separate flags to enable/disable clump and roughness curves for
child hairs.

This allows disabling the curves temporarily without losing the setup.

Conflicts:
	source/blender/blenkernel/BKE_blender.h
2015-01-20 09:30:32 +01:00
1a918cb66e Fix for slow deformation-motionblur in Cycles using the new spiral kink
mode.

This was caused by variation of the number of keys on child hairs due
to shortening of hair curves based on euclidian distances. The other
kink modes also shorten hairs, but use the parametric distance instead,
which does not vary with deformation of hairs.
2015-01-20 09:30:12 +01:00
755734c12f Second variant of the copy-to-select operator for particles to only
copy the active particle system (and not remove existing in the process).
2015-01-20 09:30:11 +01:00
6d65107656 Make removal of existing particle systems on copying optional.
This will be most useful when copying individual particle systems
one-by-one (to be implemented).
2015-01-20 09:30:11 +01:00
04226e324e Added space selection option to the particle system copy operator.
By default this now copies from one object's local space to another
object's local space (instead of the previous world space). This is
more useful when transferring particles between objects, because it
doesn't require moving objects on top of each other, as long as they
have similar shapes.
2015-01-20 09:30:11 +01:00
53135f91d2 Removed debugging code. 2015-01-20 09:30:11 +01:00
0666de06f3 Fix for particle system copy: This has to make sure the ORIGSPACE data
layer is available.

Otherwise particle mapping to the new mesh cannot work with subdivided
and constructively-modified meshes.
2015-01-20 09:30:11 +01:00
2a41d8ebdc Added a "specials" menu button next to the particle systems list for
accessing the copy operator.
2015-01-20 09:30:11 +01:00
2a3279bb87 Changed the workflow for the particle system copy operator to the common
active-to-selected pattern.
2015-01-20 09:30:11 +01:00
91b70d3c56 New operator for copying (hair) particle systems from one object to
another, including edit data (grooming).

This uses basically the same method as the existing connect/disconnect
feature. The main difference is that it allows working with multiple
objects and transferring the //particle/hair data// instead of the
//mesh// data (which is what connect/disconnect expects). This is a much
more realistic workflow when rigging, topology etc. changes and
groomed hair has to be transferred to the changed model.
2015-01-20 09:30:11 +01:00
8f9f55498e Removed unused particles pointer from particle edit data. 2015-01-20 09:30:11 +01:00
2fe96f3f88 New texture influence option for particle kink amplitude (as opposed to
frequency).
2015-01-20 09:30:11 +01:00
9698182227 Renaming "Kink" texture influence to "Kink Frequency" to be more
specific.
2015-01-20 09:30:11 +01:00
68608c5428 Spiral rotation axis was not always fully normalized, avoid an assert. 2015-01-20 09:30:11 +01:00
dcfa75bc89 Make random child length work again with the spiral kink mode. 2015-01-20 09:30:11 +01:00
c2a7f26cbc Add missing stub to the player, so buildbot keeps delivering gooseberry builds 2015-01-20 09:30:10 +01:00
6c908790e7 Allow clumping and roughness in Spiral kink mode as well.
This requires interpolating the parent key properties, because no single
parent key can be mapped to each key on the children any more.
2015-01-20 09:30:10 +01:00
90e46ae6c0 Optional randomization factors for the spiral radius and axis orientation. 2015-01-20 09:30:10 +01:00
76c7d693d9 Support in Cycles for the extra spiral keys in hair paths. 2015-01-20 09:30:10 +01:00
6edeb43c16 Nicer calculation of the kink axis and result of the spiraling for
negative radius.
2015-01-20 09:30:10 +01:00
9f3a840df2 Removed unused old code. 2015-01-20 09:30:10 +01:00
374188cdfe Disable the path length check for spiral kink mode.
This test is terribly expensive for some reason and not necessary for
for the spiral mode anyway.
2015-01-20 09:30:10 +01:00
14af65b3ef Fix for calculation of the key velocity on the last child hair segment. 2015-01-20 09:30:10 +01:00
307c4a4df9 Another crappy approach to spirals on hairs, crazy expensive though.
Conflicts:
	source/blender/blenkernel/intern/particle.c
2015-01-20 09:30:10 +01:00
9bf7633936 Spiral kink mode for particles.
This is BAD code, but the particle kinking does not make it easy to
write a non-local modifier that requires neighboring positions,
curvature, etc. The feature is needed for Gooseberry.
2015-01-20 09:30:10 +01:00
c2306919b7 Optional clumping noise feature for simulating twisted hair strands.
This adds another level of clumping on child hairs. When enabled, child
hairs chose a secondary clumping target using a Voronoi pattern. This
adds visual detail on a smaller scale, which is useful particularly when
the number of parents is relatively small.

Natural fibres behave in a similar way when they become sticky and
intertwined. Hairs close to each other form a first twisted strand, then
combine into larger strands. Similar features can be found in ropes:
http://en.wikipedia.org/wiki/Hair_twists
http://en.wikipedia.org/wiki/Rope

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-01-20 09:30:10 +01:00
7f219137cf Disable scope updates in texture and image paint modes.
Scope update is very slow for high resolutions, and currently blocks
the UI thread(!). This is especially terrible in paint modes, where
each stroke causes a scope update and unacceptable freezing.

The scopes update method tries to avoid this somewhat by skipping if the
toolbar is disabled, but this doesn't help when painting where brush
tools etc. are frequently needed. It's also a bad-level poll, with the
core system accessing a UI element.

Eventually scope updates should become a low-priority background job,
as well as becoming threaded. Until then this polling provides a usable
workaround to the most outrageous cases.
2015-01-20 09:30:09 +01:00
d1246969ed Curve-based control for "roughness" (noise displacement) of child hair. 2015-01-20 09:30:09 +01:00
c86d55d5e7 Curve-based control for child path tapering.
This is an alternative method to the current fixed function with a
clump factor and "shape" parameter. This function is quite limited and
does not give the desired result in many cases (e.g. long, parallel
rasta strands are problematic). So rather than trying to add more
parameters there is now a fully user-defined optional curve for setting
the tapering shape.
2015-01-20 09:30:09 +01:00
4c82367fd8 Moved kink, clump and roughness functions into the dedicated source file. 2015-01-20 09:30:09 +01:00
4f1c0a181d Reorganizing hair child code a little bit to make it not totally insane.
This contains a few pieces of code for a future "modifier" system that
would allow more flexible combination of effects. Eventually a node
system is the way to go, but the current code makes that impossible.
2015-01-20 09:30:09 +01:00
b292d783f2 Separate context freeing from task freeing in threaded particle updates
to prevent double-freeing/invalid mem access.

This can happen with the "virtual parents" feature, which generates both
parent and child paths. Each task free function also freed the shared
context, leading to double freeing.
2015-01-20 09:30:09 +01:00
1727a165dd Properly register the mathutils.interpolate submodule. 2015-01-20 09:30:09 +01:00
1b6f5ecbf4 Fix for invalid access to undefined hair data in edge-only cloth meshes.
Cloth data is used both for hair and actual cloth, which makes things
really difficult. The face number was used for distinguishing the two
types (no faces == hair mesh), but the extra hair data necessary for
hair sim is generated by particles and not available for edge-only cloth
meshes. This really needs to be sanitized ...

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:09 +01:00
bb76e96339 Presets for hair dynamics.
This is necessary because the hair dynamics settings are not part of the
ParticleSettings datablock, but part of the convoluted cloth modifier
inside the particle system struct. In the future this will be recoded
properly, but in the meantime presets provide a simple an unobtrusive
way to have reusable dynamics settings for hair.

Conflicts:
	release/scripts/startup/bl_ui/properties_particle.py
2015-01-20 09:30:09 +01:00
db2ac79fc7 Radical simplification of the wind effect on hair, since the previous
approach does not work very well.

Using a cross section estimate still causes large oscillations due to
varying hair force based on angles. It also requires a sensible hair
thickness value (particle radius) which is difficult to control and
visualize at this point.

The new model is based purely on per-vertex forces, which seems to be
much more stable. It's also somewhat justified by the fact that each
hair vertex represents a certain mass.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:09 +01:00
f0e8690526 Fix for wind force function call. 2015-01-20 09:30:09 +01:00
5c7adf5be2 Improved force field effects on hair strands.
The previous calculation was modulated with the angle between the wind
direction and the segments, which leads to very oscillating behavior.

Now the formula includes an estimate for the geometric cross section
of a hair segment based on the incident angle and the hair thickness
(currently just the particle size). This gives a more stable behavior
and more realistic response to wind.

Conflicts:
	source/blender/blenkernel/intern/particle_system.c
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:09 +01:00
658fc3ddbc New python submodule mathutils.interpolate for various mesh interpolation and weighting methods.
This module will contain mirrored functions for calculating and applying
weights for points on a mesh. This includes barycentric and UV weighting
and possibly more advanced global weighting such as harmonic weights.

The naming should follow this scheme:
<type>_{2d,3d}_{calc,apply}

e.g.
poly_2d_calc
poly_2d_apply
uv_3d_calc
...

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D939
2015-01-20 09:30:09 +01:00
3b938f3d7f Fix for missing library linking in blenderplayer. 2015-01-20 09:30:08 +01:00
3f3c19e391 Another fix for particle instance child lookups, was not subtracting
parent amount.
2015-01-20 09:30:08 +01:00
c3c19509b3 Fix for invalid particle pointer access in mixed particle/child loop. 2015-01-20 09:30:08 +01:00
790b931956 Better update function for particle settings affecting nested cloth
modifier.
2015-01-20 09:30:08 +01:00
60bf6c123f Fix for applying the bending randomness factor.
A stupid hack is needed here, changing the way the factor is applied to
angular bending springs. In cloth sim the bending factor of individual
springs is applied as a mix value between the bending stiffness and a
max value, but this max value isn't even used in hair sim so that
approach becomes useless.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
d031831a05 Randomness factor for hair bending stiffness.
This helps to create some variation in a hair system, which can
otherwise become very uniform and boring. It's yet another confusing
setting in a system that should have been nodified, but only option for
now (broken windows ...)

Conflicts:
	source/blender/blenkernel/intern/particle_system.c
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
64a4d4ed25 Fix for particle instance initial frames.
These were not orthonormal and tended to flip with changing hair
direction, now use the particle hair matrix which is stable wrt. the
mesh surface.
2015-01-20 09:30:08 +01:00
bd033721c2 Fix for particle instance modifier: use a stable parallel-transport
framing method instead of the Frenet frame.

The Frenet frame is very succeptible to sudden twists along straight
sections of a curve where the second derivative (curvature) becomes 0.
2015-01-20 09:30:08 +01:00
674c98bd06 Nicer hashing functionality for sim debugging using a variadic macro
to support multiple hash identifiers.

Using explicit hashing functions for every sim debug call defeats the
purpose of having a quick feedback system. Now this can be done simply
by passing an arbitrary number of hash inputs (integers) at the end of
the function calls, which are then combined by a system of variadic
macros (based on the ELEM feature). Up to 8 identifiers are supported
currently, but more could be added easily if needed.

Conflicts:
	source/blender/blenkernel/intern/particle_system.c
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
52384179f4 Some tweaking of value ranges for hair target density and removed
density factor (already included in grid velocity).

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
2da21b30ae Inverted effect of target density was unstable, the divergence term
needs to be substracted instead.
2015-01-20 09:30:08 +01:00
325990ff6e Use dedicated debug values in cloth settings instead of abusing unused
other values.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
faa112cd27 Fixed wrong stride values used for offsetting the index of Eigen values.
The Eigen solver for hair grids uses an extra margin of 1, which means
greater stride values.
2015-01-20 09:30:08 +01:00
d73de8f277 Hair grid code was using an invalid hair segment at each hair end with
zero vectors, leading to bad density values.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
95f9726173 A bunch of debug drawing changes.
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
7c153c3a3d Corrected the divergence and gradient calculation for the hair grid
solver input and output.

This uses the central difference method (instead of combined forward/
backward difference), which makes it easier to correctly account for
grid borders.
2015-01-20 09:30:07 +01:00
42fc88de43 Fallback method for defining density in the hair grid using discrete
samples.

This is just an intermediate method to make sure the density is valid.
Eventually the closest-point method should be used, but for testing
the poisson solver this is easier to debug.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
e73df249c7 Added a margin to the number of cells used in the poisson grid solver,
to ensure we always have one layer of empty cells around the fluid.
2015-01-20 09:30:07 +01:00
e6b80eb179 Fix for merge errors and leftover unused code lines. 2015-01-20 09:30:07 +01:00
b3cbafb966 Implementation of a target density feature for the hair simulation.
This allows setting a target density which the fluid simulation will
take into account as an additional term in the pressure Poisson
equation. Based on two papers
"Detail Preserving Continuum Simulation of Straight Hair" (McAdams et al. 2009)
and
"Two-way Coupled SPH and Particle Level Set Fluid Simulation" (Losasso et al. 2008)

Currently the target pressure is specified directly, but it will be
a lot more convenient to define this in terms of a geometric value such
as "number of hairs per area" (combined with hair "thickness").

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
a754c0af40 Another fix for off-by-one hair grid resolution errors. 2015-01-20 09:30:07 +01:00
9c660f18ac Rewriting the grid rasterization function for hair segments. 2015-01-20 09:30:07 +01:00
e56bda4a02 Draw actual hair keys when the "Guide Hair" setting is enabled.
Without this certain debug tasks become very hard to visualize.
2015-01-20 09:30:07 +01:00
62d9aa05ab Fix for grid drawing in 3D view, was using one less grid cell. 2015-01-20 09:30:07 +01:00
046510fcf9 Merge branch 'hair_immediate_fixes' into gooseberry
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
be24adc9ef Implemented PIC and FLIP methods for combining the fluid grid simulation
with the Lagrangian hair model.
2015-01-20 09:30:07 +01:00
926a674fe8 Main solver step for generating a divergence-free hair velocity field
on the grid.

This uses the Eigen conjugate-gradient solver to solve the implicit
Poisson equation for the pressure Laplacian:

    div(grad(p)) = div(v)

As described in "Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle, 2009).

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
7740b1671c Pampering the stupid MSVC compiler again, it fails to build valid C code. 2015-01-20 09:30:06 +01:00
aa16b5c222 Added new header for Eigen utility classes.
These make passing data between Eigen vector and matrix types and plain
C arrays more convenient.
2015-01-20 09:30:06 +01:00
74d6f31879 Updated a few comments. 2015-01-20 09:30:06 +01:00
9cd8e9f146 Compile hair volumetrics code as C++, so we can use Eigen easier. 2015-01-20 09:30:06 +01:00
46db288832 Minor debug code fix.
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
bf96400558 Use a fixed, uniform cell size for hair continuum grids.
This is a bit more awkward for artists to use, but necessary for
a stable solution of the hair continuum calculation. The grid size is
defined by the user, the extent of the grid is then calculated based on
the hair geometry. A hard upper limit prevents bad memory allocation
in case too small values are entered.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
8dbb6f0d5d Removed unused voxel_filter_size DNA property.
This is an artifact of earlier attempts to implement velocity smoothing,
but doesn't work anyway.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
e3dcbc3679 Renamed HairVertexGrid to HairGrid, since it's not actually storing
hair vertex data.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
dddf088375 Removed unused "collider grid" struct from hair volumetrics.
This is a leftover from previous approach of hair collisions (with
insufficient results). The hair volumetrics actually implements
"collision" with solid objects as well, but uses a Neumann boundary
condition on the main grid for this purpose.
2015-01-20 09:30:06 +01:00
d05c653ade Better grid rasterization method for hair volumetric grids.
This is based on the paper
"Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle, Ward, 2009)

The main difference is that hair line segments are used rather than only
rasterizing velocity at the vertices. This gives a much better coverage
of the hair volume grid, otherwise gaps can be produced at smaller grid
cell sizes and the distribution is uneven along the hair curve.

The algorithm for rasterizing is a variation of Bresenham's algorithm
extended onto 3D grids.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
c37de38716 New debug element "circle" for simulations, which is quite useful for
visualizing scalar fields.
2015-01-20 09:30:06 +01:00
7dda1ea396 Debug grid drawing for hair volume was drawing one subdivision too many. 2015-01-20 09:30:06 +01:00
211be0ae6e Unused leftover debug variable. 2015-01-20 09:30:06 +01:00
d42525a9b5 Reimplemented the voxel texture type for displaying hair continuum grids.
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:05 +01:00
cd717f145d Expose hair grid info in the RNA (read-only); it can be useful for
debugging purposes.
2015-01-20 09:30:05 +01:00
9d27b53d41 Debug visualization code of a slice of the hair velocity vector field. 2015-01-20 09:30:05 +01:00
9be290c92e Removed arbitrary factor 2.0 on volumetric hair friction factor.
This was introducing energy into the system for any factor beyond 0.5
and caused major instability.
2015-01-20 09:30:05 +01:00
54c69c4ed8 Fill the hair volume grid with the _new_ velocities from the first
solver step, instead of using the previous step's velocities.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:05 +01:00
c3968861b3 Debug drawing feature to visualize the hair continuum grid. 2015-01-20 09:30:05 +01:00
aea309779f Perform grid-based velocity smoothing for hair outside of the implicit
solver step.

Calculating forces and jacobians from linearly interpolated grid values
is problematic due to discontinuities at the grid boundaries. The new
approach of modifying velocities after the backward euler solver step
was suggested in a newer paper

"Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle 2009)

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:05 +01:00
4381fa3157 Minor fix for lost variable declaration during cherry-picking. 2015-01-20 09:30:05 +01:00
4ff68d031d Fix for warnings/errors
Conflicts:
	source/blender/blenkernel/intern/key.c
	source/blender/blenkernel/intern/particle_system.c
	source/blender/makesrna/intern/rna_particle.c
2015-01-20 09:30:05 +01:00
a351e8b6ef Reorganizing hair dynamics UI layout a bit to make settings slightly
more intuitive.

Also removed a couple of unused or useless features from the UI:
* collider friction is unused and replaced in favor of true collision
* spring damping refers to structural springs (stretch), which is
  not noticable in hair due to extreme stiffness atm.
* pressure factors are not sure since this feature is too unstable atm.

Conflicts:
	release/scripts/startup/bl_ui/properties_particle.py
2015-01-20 09:30:05 +01:00
edc9baaae4 Moved render simplification function for particle distribution into the
distribution code.
2015-01-20 09:30:05 +01:00
34762de38f Removed unused variable. 2015-01-20 09:30:05 +01:00
09f171c525 A little bit of code sanity by splitting particle distribution function
by type.

Instead of squashing totally unrelated code into the same monster
function.
2015-01-20 09:30:04 +01:00
0f43ba8235 Moved particle code for distributions into own file to make hacking
easier.

This code is badly broken and needs to be replaced, but at least having
a workable code structure might help with quick hacks to fix the worst
cases.
2015-01-20 09:30:04 +01:00
f03fc27bf7 Removed unused line. 2015-01-20 09:30:04 +01:00
c01ed4875b New hair editing feature "Shape Cut", for cutting hair based on a mesh
shape instead of a brush tool.

The brush cutting tool for hair, while useful, is not very accurate and
often requires rotating the model constantly to get the right trimming
on every side. This makes adjustments to a hair shape a very tedious
process.

On the other hand, making proxy meshes for hair shapes is a common
workflow. The new operator allows using such rough meshes as boundaries
for hair. All hairs that are outside the shape mesh are removed, while
those cutting it at some length are shortened accordingly.

The operator can be accessed in the particle edit mode toolbar via the
"Shape Cut" button. The "Shape Object" must be set first and stays
selected as a tool setting for repeatedly applying the shape.
2015-01-20 09:30:04 +01:00
117f4bbe66 Switched back to blender implicit solver for merge. 2015-01-20 09:30:04 +01:00
4cdf0ab5cf Unified the main Eigen solver function a bit for constrained/unconstrained
solver variants.
2015-01-20 09:30:04 +01:00
2356264ca9 Ported the remaining implicit solver functions for Eigen.
Also added a couple of utility wrapper functions for Eigen types to make
interfacing with plain float arrays and blenlib math easier.
2015-01-20 09:30:04 +01:00
4eac83da66 Updating Eigen implicit dynamics solver implementation to adhere to the
new mass-spring solver API.

Conflicts:
	source/blender/physics/intern/implicit_eigen.cpp
2015-01-20 09:30:04 +01:00
35d09c7ab6 Fix for inverted condition: hair data needs to be rebuilt when the
cloth DM does not exist.
2015-01-20 09:30:04 +01:00
4a16242e60 Cleanup: Removed the unnecessary cloth solver abstraction (there is only
one solver anyway), and split some particle cloth functions for clarity.

Conflicts:
	source/blender/blenkernel/BKE_particle.h
	source/blender/blenkernel/intern/particle_system.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/makesdna/DNA_particle_types.h
	source/blender/makesrna/intern/rna_particle.c
2015-01-20 09:30:04 +01:00
0b0acb6124 enum instead of #define for cloth vertex flags. 2015-01-20 09:30:04 +01:00
ce53303f61 Removed accidentally committed debug print. 2015-01-20 09:30:04 +01:00
fe8fad54b1 Use the generic task scheduler for threaded particle tasks, i.e.
distribution and path caching for child particles.

This gives a significant improvement of viewport playback performance
with higher child particle counts. Particles previously used their own
threads and had a rather high limit for threading. Also threading
apparently was disabled because only 1 thread was being used ...
2015-01-20 09:30:03 +01:00
c1f4542f0f Removed block matrix indices storage from ClothSpring struct.
This is not necessary: the implicit solver data can keep track instead
of how many off-diagonal matrix blocks are in use (provided the
allocation limit is calculated correctly). Every time a spring is
created it then simply increments this counter and uses the block index
locally - no need to store this persistently.
2015-01-20 09:30:03 +01:00
a5f207de79 Removed unused force arguments for angular bending springs and avoid
redundant calculation for counterforces.
2015-01-20 09:30:03 +01:00
173bdfe05e Guide hair drawing for hair particles.
Without this the particle system only shows the actual non-simulated
hairs ("guide hairs") during edit mode. These hairs are used for goals
as well, so showing them in the regular viewport is pretty important.

Also the usual hair curves are interpolated along the entire length,
which makes it very difficult to see exact vertex positions, unless
using exact powers of 2 for the segment number and match the display
steps.

Conflicts:
	source/blender/blenkernel/intern/particle.c
2015-01-20 09:30:03 +01:00
acf4506299 Improved child hair curling for interpolated child particles.
The curl radius for children in interpolated mode was calculated using
the total offset from the parent particle. This leads to very large
radii when the distance is large due to sparse parents. Such behavior is
also very unrealistic because the curl radius is mostly constant and
defined by the material properties.

All the child hairs are roughly parallel by default. To simulate the
agglomeration of children into hair wisps the "flatness" parameter is
now used to clump them together.
2015-01-20 09:30:03 +01:00
64b9ba06a7 Cloth solver data for edit mode is unused, removed it. 2015-01-20 09:30:03 +01:00
6097de2db9 Fix for scons files missing physics include folder. 2015-01-20 09:30:03 +01:00
48e67c49a5 Added separate damping for bending springs.
The bend damping factor was hardcoded to the same value as the stiffness.
Now it has its own factor in the settings and button in hair dynamics.
2015-01-20 09:30:03 +01:00
e694b7c04b Set the length threshold for hair simulation to 10% again (from 1%).
With the default 5 substeps the simulation can otherwise still become
unstable. This is just a preliminary measure anyway until the length
variance can be fixed properly.
2015-01-20 09:30:03 +01:00
43424a639b Fix for outdated root array size when changing the particle amount
during simulation.
2015-01-20 09:30:03 +01:00
d613c38171 Fix for hair chain testing in the cloth modifier.
Bending springs are en-bloc and not interleaved with other springs, so
this can't be used as a test for hair roots. Use consecutive indices
instead.
2015-01-20 09:30:03 +01:00
577150c635 Completed the implementation of bent rest shapes for hair.
Basically follows the Pixar approach from "Artistic Simulation of Curly
Hair".
2015-01-20 09:30:03 +01:00
520922876a Target calculation for local non-straight rest shapes.
This is more involved than using simple straight bending targets
constructed from the neighboring segments, but necessary for restoring
groomed rest shapes.

The targets are defined by parallel-transporting a coordinate frame
along the hair, which smoothly rotates to avoid sudden twisting (Frenet
frame problem). The rest positions of hair vertices defines the target
vectors relative to the frame. In the deformed motion state the frame
is then recalculated and the targets constructed in world/root space.
2015-01-20 09:30:03 +01:00
7d4799b41d Have to include BLI_utildefines before BKE_collision now to have bool
defined.
2015-01-20 09:30:02 +01:00
6394189e68 Clear forces and constraints together at the start of the time step,
easier to verify.
2015-01-20 09:30:02 +01:00
e44187cd5f Fix for missing initialization of local cloth modifier inside particle
systems.
2015-01-20 09:30:02 +01:00
c036c72284 Proper implementation of angular bending springs including jacobian
derivatives for stabilization.

The bending forces are based on a simplified torsion model where each
neighboring point of a vertex creates a force toward a local goal. This
can be extended later by defining the goals in a local curve frame, so
that natural hair shapes other than perfectly straight hair are
supported.

Calculating the jacobians for the bending forces analytically proved
quite difficult and doesn't work yet, so the fallback method for now
is a straightforward finite difference method. This works very well and
is not too costly. Even the original paper ("Artistic Simulation of
Curly Hair") suggests this approach.
2015-01-20 09:30:02 +01:00
3a8ef0ef6c Unused function declaration. 2015-01-20 09:30:02 +01:00
491e7493c7 Basic solver result feedback from the mass-spring (cloth/hair) solver.
This returns a general status (success/no-convergence/other) along with
basic statistics (min/max/average) for the error value and the number
of iterations. It allows some general estimation of the simulation
quality and detection of critical settings that could become a problem.
Better visualization and extended feedback can follow later.
2015-01-20 09:30:02 +01:00
00bb836e17 Calculate bending targets based on the direction of previous segments.
This makes the bending a truely local effect. Eventually target
directions should be based in a local coordinate frame that gets
parallel transported along the curve. This will allow non-straight
rest shapes for hairs as well as supporting twist forces. However,
calculating locally transformed spring forces is more complicated.
2015-01-20 09:30:02 +01:00
e5ae13b809 Simple debug drawing support inside the implicit solver. 2015-01-20 09:30:02 +01:00
14bd99b0f3 Added a damping term for angular bending springs. 2015-01-20 09:30:02 +01:00
7a7778d003 Simple initial implementation of angular bending springs.
These are much better suited for creating stiff hair. The previous
bending springs are based on "push" type spring along the hypothenuse
of 3 hair vertices. This sort of spring requires a very large force
in the direction of the spring for any angular effect, and is still
unstable in the equilibrium.

The new bending spring model is based on "target" vectors defined in a
local hair frame, which generates a force perpendicular to the hair
segment. For further details see
"Artistic Simulation of Curly Hair" (Pixar technical memo #12-03a)
or
"A Mass Spring Model for Hair Simulation" (Selle, Lentine, Fedkiw 2008)

Currently the implementation uses a single root frame that is not yet
propagated along the hair, so the resulting rest shape is not very
natural. Also damping and derivatives are still missing.
2015-01-20 09:30:02 +01:00
86a4da1c54 Replace the dynamic root transform in the implicit solver data with a
single transform matrix.

Dynamic properties of the transformation are only needed during the
setup phase when they should be read from external data (hair system
roots) and generate fictitious forces on each point.
2015-01-20 09:30:02 +01:00
fa1c2ba7c6 More scons fixes for physics lib. 2015-01-20 09:30:02 +01:00
09ad433179 Fixed scons build files for new physics subfolder. 2015-01-20 09:30:02 +01:00
f03d253f55 Disabled the velocity filtering feature for now, since the weighting is
incorrect.

The voxel grid needs better tool support to make it usable, so fixing
the filtering is not high priority right now.
2015-01-20 09:30:02 +01:00
226beb9866 Added basic filtering feature for velocity smoothing.
This is part of the original method from "Volumetric Methods for
Simulation and Rendering of Hair". The current filter is a simple box
filter. Other energy-preserving filters such as gaussian filtering
can be implemented later.

The filter size is currently given as a cell count. This is not ideal,
rather it should use a geometrical length value, but this is too
abstract for proper artistical use. Eventually defining the whole grid
in terms of spatial size might work better (possibly using an external
object).
2015-01-20 09:30:01 +01:00
bbae8f88b8 Made the voxel grid size for hair interaction configurable and increased
the default to 32.

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-01-20 09:30:01 +01:00
be016daf15 Reduced the length threshold for disabling short hairs from 0.1 to 0.01. 2015-01-20 09:30:01 +01:00
0ddea77b1a Fix for rB71271bb, was replacing the force vectors entirely instead of
adding.
2015-01-20 09:30:01 +01:00
59d76a406e Fix for effector force fields on hair, using the world-to-root
transformation.
2015-01-20 09:30:01 +01:00
d43170d09d Add weak repulsion forces to hair collision response to keep the hair
at a the margin distance ("outer" softbody margin).

This has to be clamped arbitrarily unfortunately, otherwise the
repulsion force can add too much energy into the system. A factor of
4 * restitution impulse seems to give good results for now, this can
be refined later on if necessary.
2015-01-20 09:30:01 +01:00
8876429edd Added back the velocity smoothing implementation.
This is now also decoupled from the internal solver data. The grid is
created as an opaque structure, filled with vertex or collider data
(todo), and then forces can be calculated by interpolating the grid at
random locations. These forces and derivatives are then fed into the
solver.
2015-01-20 09:30:01 +01:00
a8cf092160 Fix for Sintel hair bug.
The hair solver needs sane input to converge within reasonable time
steps. In particular the spring lengths must not be too difference
(factor 0.01..100 or so max, this is comparable to rigid body simulation
of vastly different masses, which is also unstable).

The basic hair system generate strands with equally spaced points, which
is good solver material. However, the hair edit operators, specifically
the cutting tool, can move points along the strands, creating tightly
packed hair points. This puts the solver under enormous stress and
causes the "explosions" observed already during the Sintel project.

The simple solution for now is to exclude very short hairs from the
simulation. Later the cutting tool should be modified such that it
keeps the segments roughly at the same length and throws away vertices
when the hair gets too short (same goes for the extension tool).

The hair system should have a general mechanism for making sure that
situations such as this don't occur. This will have to be a design
consideration for replacements in any future hair system.
2015-01-20 09:30:01 +01:00
6623395638 Minor fix when gravity code is disabled. 2015-01-20 09:30:01 +01:00
58e33ab279 Removed unused code.
Conflicts:
	source/blender/physics/intern/implicit_blender.c
2015-01-20 09:30:01 +01:00
d0379f82d1 Added a calculation function for the fictitious forces introduced by
moving hair root reference frames.

This calculates Euler, Coriolis and Centrifugal forces which result
from describing hair in a moving reference frame.
http://en.wikipedia.org/wiki/Fictitious_force
2015-01-20 09:30:01 +01:00
a49b170b27 Fix for own misconception of fictitious forces in the moving hair root
frames.

These forces don't have to be calculated for each individual
contribution. Rather they can be split off and be calculated on top of
the basic force vector rotation (todo).
2015-01-20 09:30:01 +01:00
02c8bf99c9 Added back spring force definitions outside the implicit solver.
There are currently 3 types of springs: basic linear springs, goal
springs toward a fixed global target (not recommended, but works) and
bending springs.

These are agnostic to the specific spring definition in the cloth system
so hair systems can use the same API without converting everything to
cloth first.

Conflicts:
	source/blender/physics/intern/implicit_blender.c
2015-01-20 09:30:01 +01:00
dd0a7444d8 Main cloth force calculation function outside of implicit core code.
Still misses spring forces.
2015-01-20 09:30:00 +01:00
64de714a08 Hair volume calculation is now in its own file.
Code is currently disabled until the other main forces are in place.
2015-01-20 09:30:00 +01:00
b9b784f039 Moved the unused goal force calculation function to the main mass-spring
source file.
2015-01-20 09:30:00 +01:00
2901d6ab21 Moved most of the main cloth solver function out of implicit code core.
Force calculation is disabled, will follow shortly.
2015-01-20 09:30:00 +01:00
ac071de405 Moved init/free functions for solver data out of implicit core.
This also initializes spring matrix indices (off-diagonal 3x3 blocks),
which now uses a new API function.
2015-01-20 09:30:00 +01:00
d2e8a72d8a Moved "set_positions" for cloth out of core implicit solver.
API for the solver now has functions for setting of vertex motion state
and the associated root transform data.
2015-01-20 09:30:00 +01:00
0d60337a83 Renamed functions to make them explicitly refer to cloth, and split the
create/free functions for solver data off from the cloth solver.
2015-01-20 09:30:00 +01:00
5322def57c Moved the cloth solver code into a new subfolder/library inside Blender
code.

The implicit solver itself should remain agnostic to the specifics of
the Blender data (cloth vs. hair). This way we could avoid the bloated
data conversion chain from particles/hair to derived mesh to cloth
modifier to implicit solver data and back. Every step in this chain adds
overhead as well as rounding errors and a possibility for bugs, not to
speak of making the code horribly complicated.

The new subfolder is named "physics" since it should be the start of a
somewhat "unified" physics systems combining all the various solvers in
the same place and managing things like synchronized time steps.
2015-01-20 09:30:00 +01:00
1c8a33ab92 Desperate attempt to get stable collisions: Disable restitution and
handle only one collision contact at a time.

Collision still randomly explodes, even with differing results on the
same file. This could indicate a threading issue, possibly also related
to the dependency graph since multiple objects are involved in
collisions.
2015-01-20 09:30:00 +01:00
3007fc6eb7 Revert "Ignore velocity changes when the cloth solver does not converge."
This reverts commit c52b8ae818.

Sadly, at this point solver convergence is an exception rather than the
rule... Individual hairs can "explode" easily and thus disable the whole
simulation, which isn't helpful either.
2015-01-20 09:30:00 +01:00
8532cf206e Ignore velocity changes when the cloth solver does not converge.
This helps keep the simulation stable as long as there are only a few
substeps that become too constrained for the solver.

Eventually we need better feedback about these solver results, so that
artists can tweak situations specifically to resolve bad solver results.
This is somewhat similar to the camera tracker, which also can run into
cases that cannot be resolved and have to be fixed manually.
2015-01-20 09:30:00 +01:00
3119d718f8 Moved collision response into the main cloth sim source file and fixed
some coordinate transform issues.

Collision response should be regarded as part of the dynamics system
instead of the basic collision detection.
2015-01-20 09:30:00 +01:00
2b06b899b0 Correction for inverse constraint matrix rotation. 2015-01-20 09:30:00 +01:00
0f3cbf3f56 Transform the constraint matrix and target solver vector z according to
the root frame transforms as well.

This ensures the hair constraints are actually in root space and applied
correctly by the solver.
2015-01-20 09:30:00 +01:00
bc6fa4fa11 Use identity transform in the solver data roots to avoid possible errors
when this data is used outside the transform functions.
2015-01-20 09:29:59 +01:00
b391e963a9 Option for disabling the root frame transformation altogether, mostly
for testing.
2015-01-20 09:29:59 +01:00
c5038b12c3 Ported root frame transformation to the old cloth solver. 2015-01-20 09:29:59 +01:00
3ad7974373 Switched back to the old solver for the time being.
The Eigen solver is not quite stable currently (possibly due to
incorrect porting of force calculations). It also still lacks threading
support and optimized matrix construction, making it slower in
comparison. Eventually would still like to switch, but fixing these
issues takes time.
2015-01-20 09:29:59 +01:00
9f28ced756 Implemented gradient transformation for forces in the root frame (dFdX,
dFdV).
2015-01-20 09:29:59 +01:00
2410dc32ff Removed unused variable. 2015-01-20 09:29:59 +01:00
55a5351a03 First stage of implementing moving frames of reference for hair/cloth.
This adds transformations for each hair from world to "root space".
Currently positions and velocities are simply transformed for the solver
data and inverse-transformed when copying the results back to the cloth
data. This way the hair movement becomes independent from the movement
of the emitter object. Eventually the "fictitious" forces originating
from emitter movement can be added back in a controlled way.

http://en.wikipedia.org/wiki/Fictitious_force

Ignoring these fictitious forces or scaling their effect is physically
correct, because in the absence of external forces the hair will always
return to rest position in this root frame.

External forces currently are not yet transformed into the root space.
2015-01-20 09:29:59 +01:00
d496b308db Disable some debugging options in Eigen to make it more usable in Debug
mode.

Eigen can become very slow in debug mode, which is a bit of a problem.
It relies heavily on compiler optimizations to remove function calls
etc. More optimizations may be desirable, possibly putting the implicit
solver into its own little library and enabling optimizations in debug
mode there could help.
2015-01-20 09:29:59 +01:00
d115bdb505 Added new data in the cloth modifier for hair root information.
This will allow us to implement moving reference frames for hair and
make "fictitious" forces optional, aiding in creating stable and
controllable hair systems.

Adding data in this place is a nasty hack, but it's too difficult to
encode as a DM data layer and the whole cloth modifier/DM intermediate
data copying for hair should be removed anyway.
2015-01-20 09:29:59 +01:00
da01c884e5 Cleanup, removed unused old code. 2015-01-20 09:29:59 +01:00
d91a4cd1a1 Optimized matrix filling using the Eigen triplets method.
Otherwise the construction of matrices becomes very slow for larger
vertex counts because adding a new element is O(n), making it O(n^2) in
total.
2015-01-20 09:29:59 +01:00
e55d11478d Added back external effector forces for the cloth solver. 2015-01-20 09:29:59 +01:00
ace1b5050b Reenabled goal springs and removed the arbitrary structural scaling
factor.
2015-01-20 09:29:59 +01:00
c7932e93fa Fixed bending forces for cloth springs. 2015-01-20 09:29:58 +01:00
6d4c704f17 Correctly implemented and verified gravity, drag, structural springs. 2015-01-20 09:29:58 +01:00
f336ca5952 Minor fix in debug print, so solver prints can be diff'ed. 2015-01-20 09:29:58 +01:00
b241f23b19 A couple of defines to disable various influences on the cloth sim for
debugging.
2015-01-20 09:29:58 +01:00
1819cbd02c Debug printing code for large sparse vectors and matrices, to compare
solver input/output of the old and new methods.
2015-01-20 09:29:58 +01:00
8283122cda Added a new internal header for implicit solver defines.
Should become its own intern wrapper library eventually.
2015-01-20 09:29:58 +01:00
7896827f75 Reenabled air drag force for cloth sim. 2015-01-20 09:29:58 +01:00
e0b46b136e Arbitrary scaling factor for the structural spring forces (stretching).
This is not nice at all, but for some reason (possibly time scale) the
old force values are much too high and cause the solver to become
unstable. These will be revisited later anyway, so for now such scaling
should be fine.
2015-01-20 09:29:58 +01:00
8163fca264 Switched to the modified CG method that supports constraints, and
added back structural stretch springs.
2015-01-20 09:29:58 +01:00
c6a65ff5b8 Implemented a modifier conjugate gradient algorithm to support stable
constraining.

The algorithm is described in the paper "Large Steps in Cloth Simulation"
(Baraff/Witkin 1998). The same method was (incorrectly) implemented in
the old cloth solver.

It is based on restricting the degrees of freedom (ndof) of vertices
using a block matrix and a vector of target velocity deltas.
See chapter 5 of the paper for details.
2015-01-20 09:29:58 +01:00
722fd30a9f Reimplemented Goal springs for the Eigen CG solver method.
Note that goal springs currently are really bad ... They have a factor
on hairs that "fades" goal influence from the root to the tip. The last
point on the hair is completely free, which makes the goal springs
pretty much useless on their own without supporting bend stiffness.
Can only assume this was added to compensate unphysical behavior of
goal springs when using uniform weight, but it's a poor replacement for
true localized bending forces ...
2015-01-20 09:29:58 +01:00
d2c0503f19 To make gravity a true force vector, multiply by the mass. 2015-01-20 09:29:58 +01:00
83137358c0 Alternative new solver for cloth using the Eigen CG solver instead of
a custom built solver.

The old cloth solver is broken unfortunately. Eigen is a designated
linear algebra library and very likely their implementation is a lot
better (can't compare until it's implemented though).

Only basic gravity is active atm, spring forces, external force fields,
damping and volumetric friction have to be added back by converting
the data into the Eigen format.
2015-01-20 09:29:58 +01:00
396f7ea158 Don't try to enforce a velocity change for pinned vertices; their
velocity is defined externally by hair root motion.
2015-01-20 09:29:58 +01:00
d1cb8b08bd Use squareroot of the current epsilon error target for CG, since we
square this value anyway.
2015-01-20 09:29:57 +01:00
8ec4c31d9c Disabled collision culling on the inside of the collider faces for now,
this seems to remove too many contact points somehow ...
2015-01-20 09:29:57 +01:00
4bfd3c8f0c Fix for collision response, the impulse response was far too small. 2015-01-20 09:29:57 +01:00
27ecda9995 Use the S matrix of the modifier CG algorithm for implementing collision
responses.

The S matrix together with the z Vector encodes the degrees of freedom
of a colliding hair point and the target velocity change. In a collision
the hair vertex is restricted in the normal direction (when moving
toward the collider) and the collision dynamics define target velocity.
2015-01-20 09:29:57 +01:00
02ab74eb55 Better contact point near-test for hair.
This simply uses the position above the triangle instead of the
intersection point of the vertex path. The other method was broken
anyway, but also has a problem catching all the contacts reliably. The
new method might have a few false positives but that is acceptable.
2015-01-20 09:29:57 +01:00
93194eb0e9 Fixed for hair collision detection, old/new positions were swapped. 2015-01-20 09:29:57 +01:00
971419c27d Reduced minimum for cloth solver substeps to 1.
This is not very useful for artists, but helps with debugging.
2015-01-20 09:29:57 +01:00
b8a9579954 Removed own debug print. 2015-01-20 09:29:57 +01:00
ae162f61e7 Added a comment and use the new CG solver as the "official" version now. 2015-01-20 09:29:57 +01:00
c6e5f6afe0 Fixed implementation of the Conjugate Gradient method for the cloth
solver that properly supports constraints with some degrees-of-freedom.

The previous solver implementation only used the S matrix (constraint
filter matrix) for pinning vertices, in which case all elements are
zero and the error doesn't show up. With partial constraints (useful for
collision contacts) the matrix has non-zero off-diagonal elements and
the algorithm easily diverges.

There are also initial steps for implementing collision prevention as
described in the Baraff/Witkin paper "Large Steps in Cloth Simulation"
(http://www.cs.cmu.edu/~baraff/papers/sig98.pdf).
2015-01-20 09:29:57 +01:00
b38663338e Hair collision: Use the S matrix for enforcing contact constraints.
This is a first test, the contacts are very explosive atm because they
basically pin hair vertices globally on collision, which leads to
stretching of the springs which is then suddenly released in the next
frame.
2015-01-20 09:29:57 +01:00
fc083b4e5b Preparation for collision code fixing.
Instead of handling contact tests and collision response in the same
function in collision.c, first generate contact points and return them
as a list, then free at the end of the stepping function. This way the
contact response can be integrated into the conjugate gradient method
properly instead of using the hackish and unstable double evaluation
that is currently used.
2015-01-20 09:29:57 +01:00
0f45f4a3e2 Cleanup: added some comments to the members of Implicit_Data. 2015-01-20 09:29:57 +01:00
c6db1d0858 Cleanup: No point in passing all the implicit solver arguments
individually.
2015-01-20 09:29:56 +01:00
e9849bdf17 Cleanup: removed the unused olddV vectors from implicit solver data. 2015-01-20 09:29:56 +01:00
ccad968e26 Some more debug elements for hair collisions. 2015-01-20 09:29:56 +01:00
f98d388fd3 Extended line/face collision near-check, to allow for distance margins.
The original BLI method for line/triangle intersection returns false
in case the line does not actually intersect, but in order to generate
repulsion forces we need to also handle contacts inside the margin.
2015-01-20 09:29:56 +01:00
dbf7840643 Fix bounce/repulse calculation. 2015-01-20 09:29:56 +01:00
d43f760892 Hair debugging: use "categories" (strings) for grouping debug elements
and support clearing for categories.
2015-01-20 09:29:56 +01:00
70df8f8dd6 Fix for hair collision detection: need to use the second point of the
timestep segment.

This ensures the distance for a collision pair is the one of the current
point position, and the response gets calculated accordingly.
2015-01-20 09:29:56 +01:00
a580be6399 Use repulsion forces in combination with the one-time penalty forces
in collision.
2015-01-20 09:29:56 +01:00
67fdd5e01a Fix for crash when going into particle edit mode with baked hair
simulation.

Note that this currently generates an extreme amount of points, by
making a edit pathcache curve for each hair in every frame! But at least
doesn't simply crash now.
2015-01-20 09:29:56 +01:00
f757364fc0 Clear debug_data pointer in local cloth modifier data of the particle
systems on blend file load.
2015-01-20 09:29:56 +01:00
1ed88bb24e Partial response force for hair collisions.
This implements a penalty force as well as a repulsion force to avoid
further penetration, as suggested in
"Simulating Complex Hair with Robust Collision Handling"
(http://graphics.snu.ac.kr/publications/2005-choe-HairSim/Choe_2005_SCA.pdf)

Friction forces are still missing. More problematic is handling of
moving colliders, when face swap places with the hair vertex and a
collision is missed, putting the vertex inside the mesh volume. Larger
margins might help, but ultimately using Bullet collision detection is
probably more reliable and failsafe.
2015-01-20 09:29:56 +01:00
d8cf12fe5a Debug drawing for simulations, to aid in visualizing abstract data such
as forces, velocities, contact points etc.

This uses a hash table to store debug elements (dots, lines, vectors at
this point). The hash table allows continuous display of elements that
are generated only in certain time steps, e.g. contact points, while
avoiding massive memory allocation. In any case, this system is really
a development feature, but very helpful in finding issues with the
internal solver data.
2015-01-20 09:29:56 +01:00
5a43e8493e Some initial collision code, without actual response forces still.
This is still using the old BVH tree collision methods to generate
contact points, similar to what cloth does. This should be replaced
by a Bullet collision check, but generating contacts in this way is
easier for now, and lets us test responses and stability (although in
more complex collision cases the BVH method fails utterly, beside being
terribly inefficient with many colliders).
2015-01-20 09:29:21 +01:00
ba8b8ec998 Implemented internal hair pressure to prevent hair from collapsing in
on itself.

This uses the same voxel structure as the hair smoothing algorithm.
A slightly different method was suggested in the original paper
(Volumetric Methods for Simulation and Rendering of Hair), but this is
based on directing hair based on a target density, which is another
way of implementing global goals. Our own approach is to define a
pressure threshold above which the hair is repelled in the density
gradient direction to simulate internal pressure from collisions.
2015-01-20 09:29:21 +01:00
345c7b144d Fixed hair velocity smoothing.
This is an important hair interaction feature that simulates friction
between hairs in an efficient way. The method is based on the paper
"Volumetric Methods for Simulation and Rendering of Hair"
( http://graphics.pixar.com/library/Hair/paper.pdf )

It was partially implemented already, but didn't work in this simplified
version. The same voxel structure can be used for implemeting repelling
forces on hair based on density, which can help a hair system maintain
volume instead of collapsing in on itself.
2015-01-20 09:29:21 +01:00
b331a82910 Support for various data properties of the hair grid in the voxel
texture.
2015-01-20 09:29:21 +01:00
efc0cd1658 Fixed voxel grid initialization from hair points and colliders by using
the suggested tent function from the original paper.

Plain float->int conversion for the grid location otherwise leads to
skewed data and unnecessary loss of information.
2015-01-20 09:29:21 +01:00
5f41b19463 New voxel texture mode "Hair", for displaying the internal hair volume
structure as a texture.

This is mostly a debugging feature that may be removed again later.
2015-01-20 09:29:21 +01:00
4cd6111159 Code cleanup: Use a variable-sized array for the hair volume velocity
smoothing and collision code, split into multiple functions.
2015-01-20 09:29:21 +01:00
9e5c3a1fa9 Fix for Trusted option, loading new file
Would use the setting of the previously loaded file, now re-initialize from preferences.
2015-01-20 16:38:31 +11:00
1d56f456f7 Fix glitch in view-axis (order of drawing) 2015-01-20 16:37:07 +11:00
289960787e Fix UI glitches drawing text at different sizes
Font height was ignoring DPI in some cases (camera-name & eyedropper).
2015-01-20 15:50:20 +11:00
09eec627ed UI: cleanup UI_fontstyle_string_width, UI_draw_string
Both were maked as temp, but used often.

Now pass uiFontStyle to both, rename UI_draw_string to UI_fontstyle_draw_simple,
since its a variant of UI_fontstyle_draw that skips shadow, align... etc.
2015-01-20 15:50:20 +11:00
f8c52402d6 BLF: remove paranoid checks for unset default font 2015-01-20 15:50:20 +11:00
a1f4821b94 Fix T42212: Singular reflection pass is incorrect in regular path tracer
Issue seems to be caused by not totally proper pdf and eval values for this
closure. Changed it so they reflect to ggx/beckmann reflection with roughness
set to 0, which is effectively the same as the sharp reflection.
2015-01-20 03:03:45 +05:00
4a4297ba02 I18n tools minor update. 2015-01-19 20:49:36 +01:00
35d3b6316b D627: Memory usage optimization for the compositor.
The compostor used a fixed size of 4 floats to hold pixel data. this
patch will select size of a pixel based on its type.
It uses 1 float for Value, 3 float for vector and 4 floats for color
data types.

When benchmarking on shots (opening shot of caminandes) we get a
reduction of memory of 30% and a tiny speedup as less data
transformations needs to take place (but these are negligable.

More information of the patch can be found on
https://developer.blender.org/D627 and
http://wiki.blender.org/index.php/Dev:Ref/Proposals/Compositor2014_p1.1_TD

Developers: jbakker & mdewanchand
Thanks for Sergey for his indept review.
2015-01-19 18:17:50 +01:00
a8fa291b8c Fix two potential bugs reported by latest coverity scan. 2015-01-19 17:51:25 +01:00
50cbff1851 Fix a crasher in recent own mesh remap code ('island' area... :/ ). 2015-01-19 15:51:21 +01:00
0af11a1742 Make use/computation of lnors consistant.
Issue was, when requesting (building) lnors for a mesh that has
autosmooth disabled, one would expect to simply get vnors as lnors.

Until now, it wasn't the case, which was bad e.g. for normal projections
of loops in recent remap code (projecting along split loop normals
when you would expect projection along vertex normals...).

Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`.
This should *always* use mesh settings (both autosmooth and smoothresh),
otherwise once again we'd get inconsistencies in some cases.
Will update fbx and obj addons too.
2015-01-19 15:51:20 +01:00
694806a9cf Cycles: Correction to camera in volume detection after clipping commit
The check should also become aware of the fact were using clipping plane
instead of clipping sphere now.
2015-01-19 19:28:28 +05:00
7fd4c440ec Fix T43311: using displacement shader crashes blender
Issue was caused by wrong order of scene device update, which could
lead to missing object flags in shader kernel.

This patch solves a bit more than that making sure objects flags are
always properly updated, so adding/removing volume BSDF will properly
reflect on viewport where camera might become being in volume and so.
2015-01-19 19:23:21 +05:00
18ae259cc4 Cleanup: unused Global flags. 2015-01-20 01:07:12 +11:00
45dfb3b742 Fix for security issue loading blend's
Auto-Execute option could be overridden by opening a startup.blend
2015-01-20 00:58:32 +11:00
4c74fb24a2 Fix: ActionGroups.new() UI description copy-paste error 2015-01-19 12:58:48 +01:00
2f4aef9f3b Cycles: Avoid crash in statistics when canceling BVH build
Also add missing render_time initialization in progress.
2015-01-19 13:39:35 +05:00
32ffc63d20 Bugfix T43293: Crash when editing shared GPencil datablock in VSE
The problem here was that when a Grease Pencil datablock is shared between
the 3D view and another one of the editors, all the strokes were getting handled
by the editing operators, even if those strokes could not be displayed/used
in that context. As a result, the coordinate conversion methods would fail,
as some of the needed data would not be set.

The fix here involves not including any offending strokes in such cases...
2015-01-19 19:11:18 +13:00
0a128af21d GPencil: Added asserts for checking when trying to convert coordinates for invalid stroke types (for current editor)
Added for checking on the cause of T43293, and to aid in setting up a fix to
remedy the situation.
2015-01-19 19:11:17 +13:00
09c83d6fea Viewport: Add adjustable safe areas, 3d-view & VSE
Also adds safe-area presets.

D325 by Diego Gangl with own edits.
2015-01-19 16:47:57 +11:00
9f54a73b32 WM: add a notifier for camera/viewport options
Added so viewport options only used in a camera view wont cause all 3d-views to redraw.
2015-01-19 15:42:18 +11:00
e91148e463 RNA/API: name outliner sort option like UIList 2015-01-19 14:22:02 +11:00
704494e8cd Fix own error in freestyle api 2015-01-19 11:31:23 +11:00
julianeisel
ffe56536f1 Outliner: Make alphabetical sorting optional
A new option to the Outliner's View menu is added to enable/disable sorting of items.
2015-01-19 01:01:23 +01:00
90b5697459 Fix mathutils.barycentric_transform()
Dummy typo, we need a 3D vector here...
2015-01-18 18:41:47 +01:00
ecc58da8f1 Documentation: fixed documented types to match actual types
The BGE API uses Vectors, but often this was documented as list.

Maniphest Tasks: T43240

Differential Revision: https://developer.blender.org/D1006
2015-01-18 11:08:33 +01:00
6e97db7b30 Fix T43301: Three of the 'mirror keyframes' tools were mirroring along wrong axis.
Names are rather confusing here... :/
2015-01-17 23:09:41 +01:00
119ff676e1 Fix T43283: Crash on undo/redo/ and save/reload after (new) weight transfer.
Mesh stores its dvert in a specific pointer too, in addition of regular CD layer...
That whole vgroup handling is really breaking apart the 'universality' of CD system. :(

Also added some DAG and WM updates in operators...
2015-01-17 17:42:45 +01:00
c9e5d9226b Fix T43090: Cycles + Freestyle + border render = black render.
The reported problem was due to a special case where there are no strokes
to be rendered.  Since rendering an empty scene is a waste of time, the issue
was addressed here by skipping the stroke rendering process entirely.
2015-01-18 00:39:03 +09:00
448d143ad0 Fix T43273: vector math cross product inconsistent
GLSL missed the normalization step.

Reviewers: psy-fi, sergey, mont29

Reviewed By: mont29, sergey

Subscribers: mont29

Maniphest Tasks: T43273

Differential Revision: https://developer.blender.org/D1000
2015-01-17 14:58:48 +01:00
Torsten Rupp
82223270a8 Fix T23942: Add "Delete Hierarchy" to outliner context menu.
Patch by rupp (Torsten Rupp), review and minor style edits by mont29 (Bastien Montagne).
2015-01-17 14:55:18 +01:00
f65b369f16 Fix compilation error with strict compiler rules 2015-01-17 00:22:46 +05:00
89e562e19b Cycles: Fix compilation error with latest OSL
They went back from string_view to string for compiler options.

Still having linking errors here, but maybe others will be more lucky to fully
compiler blender with new OSL.
2015-01-17 00:15:47 +05:00
09ac6cae09 Cycles: Cleanup and optimization comment update 2015-01-17 00:15:47 +05:00
eff2fe9a72 Cycles: Minot cleanup, save some cpu tics per curve segment export 2015-01-17 00:15:47 +05:00
585275325e Fix T43275: Crash on Render when using 'save buffer' and render layer name contains a '/'
Added a new BLI_path_utils func, `BLI_filename_make_safe()`, which for now simply
replaces unsafe chars for paths (like '\' or '/') by an underscore...
2015-01-16 18:48:59 +01:00
da8f16e288 FCurve RNA API: add funcs to convert to samples/to keyframes.
So far, we had an operator to 'bake' keyframe curves into samples, but no
way to make the fcurve editable again (i.e. to convert it back into a keyframes one).

Needed to fix mocap addon (see T43259).

Also, fixed a glitch in `fcurve_store_samples()`, since given end frame is included in range,
it is valid to give same start and end frame (in case you want a single point in samples,
not much practical cases, but...).
2015-01-16 17:26:28 +01:00
913e2bae19 Show buttons for particle system modifiers render/viewport toggles
in the particle buttons list.

This is much more convenient than having to switch back and forth
between particle and modifier buttons. The modifier box for particles
does not contain anything useful other than these two toggles anyway.
2015-01-16 17:08:07 +01:00
5685c43586 Select appropriate folder for MinGW-w64 gcc 4.9 2015-01-16 15:04:02 +02:00
9bb06c99f3 Cycles: Minor typo fix in debug print 2015-01-16 18:03:58 +05:00
5d5077957e Cycles; Correction to previous debug print to survive prints from multiple threads
This commit basically makes it so statistics print from different BVH trees are not
being interleaved with each other. Glog ensures this when debug print is done as a
single put to stream operator.
2015-01-16 16:39:02 +05:00
5684ad8072 Cycles: Report BVH statistics after build 2015-01-16 15:05:53 +05:00
fd58f5ac9d Fix T43271: Sequencer: RNA's 'add_effect' was not updating effect strip len correctly. 2015-01-16 10:41:38 +01:00
3f60d665bb Cycles: Fix stupid typo in the previous commit 2015-01-16 02:21:35 +05:00
146eb7947e Cycles: Tweak to leaf creation criteria in all BVH types
Since leaf node gets split further into per-primitive type leaves old check
for number of curves became a bit ridiculous -- it might lead to two leaf nodes
each of which would contain only one curve primitive (one motion curve and one
regular curve).

This lead to quite dramatic slowdown for Victor model -- around 40%, which is
totally unacceptable.

This commit is aimed to prevent such situation and from quick render test it
seems victor is now back to normal render time. Further testing is needed tho.

There are also other ideas about splitting the node, will need to look into
them next.
2015-01-16 01:42:58 +05:00
f02dba58ff Nodes: Put Blended Box Mapping properties next to each other. 2015-01-15 21:23:22 +01:00
ed8dc78691 BGE physics: get/set linear and angular damping
This patch adds the following R/W properties and method to `KX_GameObject`:

  - `linearDamping`  -- get/set linear damping
  - `angluarDamping`  -- get/set angular damping
  - `setDamping(linear, angular)` -- set both simultaneously

These allow runtime changes to the same properties that are accessible at design time in Blender's UI via `game.damping` and `game.rotation_damping`. The names of the properties were chosen to mirror the internal names of the BGE physics engine, as these are (AFAIK) also the commonly used names in physics literature.

Reviewers: campbellbarton

Projects: #game_physics

Differential Revision: https://developer.blender.org/D936
2015-01-15 18:37:22 +01:00
b675418d01 Sequencer: Allow generating proxies from script without having sequencer space active 2015-01-15 22:35:34 +05:00
1994e843d6 Sequencer: Don't crash when trying to rebuild proxy without having sequence edits 2015-01-15 22:27:58 +05:00
197dcfdc19 Cycles: Fix compilation error happened after recent render time commit 2015-01-15 21:28:04 +05:00
b8dd68cfc4 Cycles: Fix equiangular textures after recent commit
Just wrong constant used, names are indeed too close to each other.
2015-01-15 21:21:58 +05:00
1568a4b295 Bugfix: Wrong flags used in Spline IK eval for bounds limits 2015-01-16 03:02:28 +13:00
4b0007cf82 Prevent waveform drawing from continually retrying bad files
If sound_read_waveform() cannot read the file (i.e. info.length is
zero), set the sound's waveform to a valid waveform of zero
length. This indicates that reading the waveform is done so that it
doesn't get tried over and over again.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D988
2015-01-15 14:01:04 +01:00
b41ce0d1b9 Remove 'locked' parameter from sound_read_waveform()
This parameter was confusing in three ways:

1. It should have been named "lock" because it was used to take and
   release the sound mutex, not to indicate whether it was locked.

2. In the one place this function gets called the locked argument was
   set to "true", so not much point in having it optional.

3. I can't imagine that it would ever be a good idea to skip taking
   and releasing the mutex.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D988
2015-01-15 14:00:51 +01:00
588656a568 Review for the gsoc UI cleanup for the BGE
Review for the gsoc UI cleanup for the BGE.
Surviving commits are:
 - Game Engine UI cleanup: removing Scene/Active Clip
 - Game Engine UI cleanup: Adding missing 'not available' labels in empty panels
The rest was reverted for being subjective and polluting the UI code with an if for every button:
http://wiki.blender.org/index.php/User:Brita/GSoC_BGE_cleanup_and_support/reports/final#UI_Review

Reviewers: kupoman

Subscribers: dingto

Projects: #game_ui

Differential Revision: https://developer.blender.org/D982
2015-01-15 10:47:02 +01:00
1ec44b22e9 Make grumpy gcc happy (double to float conversion...). 2015-01-15 10:29:14 +01:00
a0fd7ab28d Revert "Make version_update() callback being invoked when linking/appending datablocks"
This reverts commit fbc2909cef.

The reason for revert is that the commit made it so bpy.data is not set to any
of the new main (on both file open and file link/append) which basically totally
broke versioning code.

Needs some smarter solution there.
2015-01-15 14:22:28 +05:00
08cc4bfa61 Small change for the new Lat/Long properties.
We use upper case for properties.
2015-01-15 08:23:27 +01:00
4118c1b4e6 Cycles: Adding field-of-view options to the equirectangular panorama camera
This patch adds the option to set minimum/maximum latitude/longitude values for
the equirectangular panorama camera in Cycles, as discussed in T34400.

The separate functions in kernel_projection.h are needed because the regular
ones are also used as helper functions for environment map sampling.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: dingto, sergey, brecht

Differential Revision: https://developer.blender.org/D960
2015-01-14 23:22:24 +05:00
193871ae7d Cycles: Ignore preprocessing time in ETA calculation
This patch makes Cycles ignore the time spent in BVH construction etc. when
estimating the remaining time. Considering that the remaining time is calculated
based on the average time per tile so far, as far as I understand it makes no
sense to include the preprocessing time.

Reviewers: sergey, #cycles

Reviewed By: sergey, #cycles

Subscribers: sergey

Projects: #cycles

Differential Revision: https://developer.blender.org/D895
2015-01-14 23:14:16 +05:00
0d6e88b446 Fix operator tooltip MBALL_OT_duplicate_move 2015-01-14 15:57:32 +01:00
bcd9b29a0d PyAPI: name OrientationHelper (io prefix in module name already) 2015-01-14 23:55:16 +11:00
ca0605b3ae cleanup: minor edits 2015-01-14 23:53:39 +11:00
edad3f93f6 Py IO utils: Add helper class to handle orientation (axes).
Also 'fix' T43243, since we can easily add a common better behavior now
when both axis settings are incompatible, by systematically changing
the other axis.

Will update 'main' addons in next commit, contrib ones I'll let to the authors
(old behavior is still possible anyway).
2015-01-14 13:10:18 +01:00
c8a9a563a7 Fix T42621: Glossy world ray visibility affects on transmission rays
There seems to be inconsistency in flags checks in Cycles kernel. In the interface
glossy means "Glossy Reflection" and it is properly taken into  account when doing
visibility check in BVH traversal.

The check in indirect background/light emission was treating this flags as "any of
glossy reflection or transmission" which is kind of weird.

Made it so emission code follows ray visibility assumptions in other parts of the
kernel now.
2015-01-14 15:33:38 +05:00
90a8aa2dab Fix T43201: Update the "in use" flags of sockets before drawing,
so value buttons are displayed when the link is not used.
2015-01-14 11:15:55 +01:00
dd5d31b515 Ignore "unavailable" links in the compositor, where one or both sockets
are unavailable (hidden).
2015-01-14 11:15:55 +01:00
197e889104 Transfer Data: resurrect fake AND/OR when transferring 'boolean' values like UVSeam, Freestyle marks, etc. 2015-01-14 10:51:41 +01:00
e88936a128 cleanup: bScreen (char for bools) 2015-01-14 19:11:02 +11:00
e0075f93e4 Remove redundant pad flag 2015-01-14 18:05:05 +11:00
julianeisel
f19013158a Workaround/Fix T43139: Calling bpy.ops.screen.screen_full_area() multiple times in python console causes Blender to crash
This was sort of a chicken<->egg dilemma, because after a maximized screen was restored, the screen handling used region
coordinates which weren't updated yet. I'm still not sure why, but this resulted in area coords that go beond INT_MAX.

To fix this I made sure the first screen handling after restoring a maximized screen is skipped, so that it's delayed to
the next call of wm_event_do_handlers (since this is called from main loop there shouldn't be a noticable delay or any
handling glitches).
2015-01-14 01:29:17 +01:00
3d503ea8d6 UI: Eyedropper for view-depth
Currently this is mainly useful for picking camera DOF depth.

- EKey over a distance field prompts you to pick a depth from the camera.
- WKey (Specials menu) to pick from the 3D view (when the active camera's selected).
2015-01-14 08:46:55 +11:00
54fd3f36a0 Fix T43195: Cycles uses clipping sphere instead of clipping plane
Basically the title tells it all, now Cycles uses proper clipping plane,
matching other render engines.
2015-01-14 02:34:49 +05:00
e6c79b7369 Cycles: Fix QBVH refit nodes not setting primitive type properly 2015-01-14 02:17:28 +05:00
cfd2af0d48 Fix UI messages (own stupidness even :/ ). 2015-01-13 21:03:43 +01:00
653c6f2edd SDL wrangler: Support loading SDL2 libraries of different names
Seems different distros might have different naming rules, so need
to adopt our code for that.
2015-01-14 00:26:43 +05:00
45d131ff08 Recent extrude rework caused bug with single faces
extrude_discrete_faces doesn't duplicate faces on extrude, see: T43237
2015-01-14 05:24:16 +11:00
b09563ca8c Cleanup: fixes for building with recent clang 2015-01-14 05:11:20 +11:00
ef80914c99 error in last commit 2015-01-14 05:11:19 +11:00
3f0113be4d Fix T43156: Cycles incorrect final render, proper viewport with moblur disabled
Really stupid issue caused by typo in bitfield bit lead to bit conflict,

Not sure how it was done, could be some bad merge conflict resolve in the
original commit or just pure man stupidnes.

This is a nice example when having set of small test render scenes hooked
to the ctest would really help.

It's probably not that stopper issue (even tho still quite bad) since it
was made 2 months ago. But if we ever do 'a' this time it's a nice change
to include.
2015-01-13 20:56:34 +05:00
be2994a6f1 FileBrowser: minor tweak/UI consistency: add 'viewzoom' icon to search field. 2015-01-13 16:43:55 +01:00
0d7c41d789 FileBrowser: Add an 'hidden file' icon, and use it instead of named checkbox for 'show hidden' param. 2015-01-13 16:37:27 +01:00
a97c5d1f9f Fix T42459: Knife fails at small scale
Occluding geometry failed when near overlapping (or cutting small objects).
2015-01-14 01:36:03 +11:00
a2a7260915 BMesh: option to filter out faces during raycast
This allows us to more easily cast from the surface of a mesh
without normal offsets (Which can give precision issues).
2015-01-14 01:36:03 +11:00
bd00770715 Cleanup: consistent arg order in bmesh 2015-01-14 01:36:03 +11:00
fbc2909cef Make version_update() callback being invoked when linking/appending datablocks
This way addons and render engines which needs to do versioning code on files will properly
do it when something is being linked or appended to the scene. Previously that callback was
only called for the local main only, making it impossible to do tweaks on linking.
2015-01-13 18:24:53 +05:00
117edbbf88 Fix T40616: Deformation Motion Blur for modifiers
Added extra checks for constructive modifiers which might in theory cause deformation
motion blur. it's still not totally perfect but we're getting really close to what we
can do in the best case scenario.

This commit might cause some extra time being spent on scene synchronization because
there might be now some false-positive results, but render time should stay quite the
same as before (apart from cases when there is deformation happening which was not
detected before).
2015-01-13 15:41:34 +05:00
b77dd13004 Fix T43229: Knife-project regression (broke knife-project)
There have been quite a few issues with knife precision,
tested reports (T43229, T42864, T42459, T41164) and this works with all.
2015-01-13 21:28:58 +11:00
98ad7c21c0 Blender-Internal: avoid redundant area check 2015-01-13 19:10:15 +11:00
3debcc8b51 Math Lib: improve area calculation
- area_quad_v3 now works correctly with concave quads.
- add area_squared_*** functions, to use when comparing to avoid a sqrt().
2015-01-13 19:10:15 +11:00
00ef77c1a2 Fixes for SplineIK:
* Ensure that when new constraints are created, the new settings have sensible
  default values.
  TODO: we need to version-patch old files

* Fix problem with variable shadowing (which wasn't causing problems AFAIK)
2015-01-13 19:30:31 +13:00
8787532184 Bugfix: The "bulge_min" setting for the Stretch To constraint prevented bones from shrinking below 1.0 scale
From the looks of things, this was a typo. The result was that if you had a bone
with the minimum volume restriction in place, the bone would not get any thinner
when it was stretched out.
2015-01-13 18:13:57 +13:00
f0361fcf54 Pataz-Gooseberry Request: Limits on Volume Preservation for Spline IK
This commit adds a new type of volume preservation mode to Spline IK
which makes it possible to set limits on the minimum and maximum
scaling of bone "fatness".

* The old volume preseving mode has been kept but renamed, to avoid
  breaking old rigs. "Volume Presevation" uses the new method, while
  "Inverse Preservation" is the old one.

* The code and settings for this new xz scale mode are directly lifted
  from the improved Stretch To constraint
2015-01-13 18:06:53 +13:00
julianeisel
f453df5b03 Fix T43128: Headerless panels are reorderable on Windows
Seems like a weird issue, but to sort panels "qsort" is used, which works slightly different on Windows. So all I had
to do was cleaning up the logic in find_highest_panel so that headerless panels are sorted, but that it absolutly not
allows headerless panels to be above normal panels.
I made sure it works fine on Linux as well.
2015-01-13 03:29:25 +01:00
aca329ba64 Cleanup: add missing MovieClip entry in RNA's id_type_items, and respect alphabetical sorting (on UI names for enums, on ID codes otherwise). 2015-01-12 19:56:18 +01:00
d47804cb06 correct last commit: less cryptic camera check 2015-01-13 05:55:10 +11:00
a4366497db Fix T43206: region_2d_to_origin_3d has no ortho offset
With ortho views the value would be aligned to the 'rv3d->ofs'
Now it works in camera ortho & regular ortho views.
2015-01-13 05:41:56 +11:00
dcd662c695 BMesh: Tweak behavior for select more/less
Stepping over faces gives overall nice results but it stopped wire edges from working.
Now step over wire too.
2015-01-13 02:36:51 +11:00
0996ee3bb8 Fix: Don't show filesel buttons when no operators running 2015-01-13 02:08:26 +11:00
c6d28a94be Fix T42754: File-Selector lost on fullscreen exit
There  was a hard-coded check to exit the fileselector when restoring a view.

Now, when space types differ, flag areas as temporary and switch back to the previous type only in this case.
This means you can select a file while having a file-selector space type open, and not loose it every time.
2015-01-13 01:44:40 +11:00
301433fe9d Fix OpenGL Context freeing 2015-01-13 01:44:40 +11:00
3027ff8b13 Second try to fix missing previews of mat/tex/etc. in .blend files.
This time, it's a dedicated operator user has to run before saving the file.

And it recursively check all IDs linked from each scene, therefore rendering
materials etc. previews using a scene they are used in.

Note the renderengine issue is not completely addressed this way
(existing code for icon previews seems to ignore completely other engines,
and IDs not linked anywhere (fake-user ones) will be rendered with current scene's engine
as fallback, also you can get a material linked to an hidden object in a scene, etc.).

Reviewers: sergey, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D980
2015-01-12 15:13:46 +01:00
51779d9407 Cycles: Fix crash after recent BVH changes on empty BVH trees
It's apparently not nice to access 0th element of zero-size vector in C++.
2015-01-12 19:11:32 +05:00
f9a4f8ada4 BLI linkstack macros: do not prepend the 'anti-namespace-collision' to var name.
Issue was, in case of using such stack within a structure, the '_' underscore
would be added in front of struct variable
(e.g. `my_struct.my_stack` would lead to (try to) using `_my_struct.my_var_pool` ...).

Now underscore is appended to var names, ugly but working.

Note did not touch to the alloca variants of those macros, since in this case enforcing
a pure local use is best I think.
2015-01-12 14:37:59 +01:00
e8730af87f Cycles: Fix compilation error on platforms without SSE support
Overview this in one of the previous BVH commits.
2015-01-12 17:14:40 +05:00
a3bfaa481f Cleanup: rename BKE's 'object_data_transfer' to 'data_transfer' to avoid same file names with ED_object's one. 2015-01-12 12:05:47 +01:00
47e47e6760 Avoid type re-definition for as long C11 is explicitly enabled in compilers 2015-01-12 15:36:18 +05:00
9d02e2626b Fix typo in OCIO configuration file 2015-01-12 15:06:03 +05:00
5719ed1225 Cycles: Add leaf primitives sanity check asserts to the kernel
This way we'll notice that leaf splitting didn't happen correct pretty easily
in debug builds.

There'll be absolutely no impact on release builds.
2015-01-12 15:05:14 +05:00
bc7ff3c2b4 Cycles: Enable leaf split by primitive type and adopt BVH traversal for this
This commit enables BVH leaf nodes split by the primitive type and makes it
so BVH traversal code is now aware and benefits from this.

As was mentioned in original commit, this change is crucial to be able to do
single ray to multiple triangle intersection. But it also appears to give
barely visible speedup in some scene.

In any case there should be no noticeable slowdown, and this change is what
we need to have anyway.
2015-01-12 15:04:52 +05:00
c707b91ce6 Cycles: Optimize leaf splitting code by avoid vector allocation
Use variables allocated in the stack and avoid heap allocation which should make
leaf splitting code a bit faster.
2015-01-12 14:49:59 +05:00
b56f5900dc Cycles: BVH params option to split leaf node by primitive types
The idea of this change is make it possible to split leaf nodes by primitive
type, making leaf containing primitives of the same type.

This would become handy when working on a single ray to multiple triangles
intersection code, plus with careful implementation it might give some extra
benefits on BVH traversal code by avoiding primitive type fetch and check for
each primitive in the node. But that's a bit tricky to have benefits on this
change only because depth of BVH increases.

This option is not exposed to the interface at all and not used even secretly,
the commit is only needed to help working further in this direction without
messing around with local patches and worrying of them running out of date.
2015-01-12 14:49:56 +05:00
d8fc404415 Cleanup: style 2015-01-12 18:56:36 +11:00
bae5826b65 Fix T42069: Fonts /w non-ascii paths fail in win32
Workaround freetype's use of fopen by swapping FT_New_Face for our own version which uses BLI_fopen.
2015-01-12 18:30:11 +11:00
f9c7cbd989 revert part of 7a1dc20
These warnings are false positives & confuses intended logic to set dummy values.
2015-01-12 11:46:44 +11:00
1864253db0 Fix T43208 material flickering in edit mode.
Happens because material setting now occurs in the derived mesh drawing
routine as it should. However that means that it also happens during
selection and that influenced the drawing state somehow.

In 2.72 this did not occur because material setting happened during draw
setting (skip or draw) instead of after the draw setting passed (so
selection would skip it by use another draw setting function). Of course
this violated design but worked.

Made it now so backbuffer selection does not enable materials (it's
redundant in those cases anyway).

This could be ported to a possible 'a' release but as is classic with
display code there may be some other places that it could backfire.

Tested fix with texture/vertex painting and selection which use
backbuffer for both subsurf and regular meshes and it seems to work OK.
2015-01-11 21:29:51 +01:00
0a5ad65512 Modifiers shall be listed in alphabetical order in UI... 2015-01-11 21:23:43 +01:00
7a1dc20560 Cleanup: quite some harmless but noisy warnings from gcc... 2015-01-11 21:14:39 +01:00
1b3b011354 Transfer data: cleanup: Remove 'vertex_group_transfer_weight' operator.
We can now use 'generic' data transfer instead.

Note new one is not an exact replacement, it should be able to do
everyting old op could do though, and more.
2015-01-11 18:33:12 +01:00
a628a8240e Data transfer: make operator able to work 'reversed' (i.e. transfer from selected objects to active).
Needed to replace weight transfer modifier in WeightPaint mode...

Note this is not exposed to users in UI, shall remain technical intern
parameter imho. Esp. since behavior when several sources is a bit 'random'
(merely uses each source in selection order...).

Also, this correct a bug, where 'lib' linked objects/meshes could not be used
as source...
2015-01-11 18:32:25 +01:00
599c8a2c8e Fix T43204: Shrinkwrap constraint, project mode: Space ignored in bone case.
Own fault in rBb154aa8c060a60d to fix T42447... Reverted that commit, and added
kind of not-so-nice hack instead.

Note root of the issue comes from the special case we are doing here re 'Local'
space of parent-less objects. In that case, local space should be the same as
world one, but instead we apply the object rotation to it... This is inconsistent
with all other cases and could very well lead to other issues as T42447, but afraid
fixing that properly would be rather hairy - not to mention it would likely break
all existing riggings etc. :(

Should be safe for a 2.73a, shall we need it.
2015-01-11 14:59:11 +01:00
cd2d84d91c Fix three issues reported by coverity in own recent code. Including two potential crashers. 2015-01-10 22:54:32 +01:00
5357474ad8 Fix building with very strict flags, use size_t rather than int for string length.
Reported on bf-committers.
2015-01-10 19:15:49 +01:00
ab3f037ccc GPencil Editing: FKEY now controls the eraser size when in Stroke Edit Mode 2015-01-11 02:15:18 +13:00
9590e77a59 cleanup: style & warnings 2015-01-10 12:40:09 +11:00
dec523da87 Fix for regression in bmesh connect-pair
T42563 fix wasn't right, fortunately this doesn't fail in most cases.
2015-01-10 12:32:14 +11:00
79d8617424 Transfer data: add modifier.
Not much to add, modifier uses same code as operator basically, only key difference
is that modifier will never create data layers itself, you have to use dedicated operator
for that.
2015-01-10 00:04:43 +01:00
8615977624 Fix: Delkey didn't activate the Grease Pencil strokes delete operator like XKEY does 2015-01-10 11:20:11 +13:00
ee4453f083 Transfer Data: add main core code and operators.
This add code needed to map a CD data layout from source mesh towards destination one,
and code needed to actually transfer data, using BKE's mesh remap generated data.

This allows to transfer most CD layers (vgroups, vcols, uvs...) as well as fake, boolean ones
(like smooth/sharp edges/faces, etc.). Some types are not yet transferable, mainly
shape keys, this is known TODO.

Data transfer can also use some advanced mixing in some cases (mostly, vgroups and vcols).

Notes:
* New transfer operators transfer data from active object towards selected ones.
* Modifier will be committed separately.
* Old weight transfer code (for vgroups) is kept for now, mostly because it is the only
  usable one in weightpaint mode (it transfers from selected object to active one,
  this is not sensible in Object mode, but needed in WeightPaint one). This will be addressed soon.

Again, heavily reviewed and enhanced by Campbell, thanks!
2015-01-09 19:32:44 +01:00
67b1412bc9 Radial operator number angle input should use angles.
Much more lenient if you are a human.
2015-01-09 19:23:27 +01:00
58d7153c6c BKE: Add 'mesh remap' code.
This is the (big!) core of mesh transfer data, it defines a set of structures
to represent a mapping of mesh elements (verts, edges, polys of loops) between
two arbitrary meshes, and code to compute such mappings.

No similarity is required between source and destination meshes (though results
when using complete different meshes are rather unlikely to be useful!).

This code is not bound to data transfer, it is defined to be as generic as possible,
and easy to reuse or extend as needs arise.

Several methods of mapping generation are defined for each element type,
we probably will have to adjust that in future (remove useless ones, add
new ones...).

For loops, you can also define islands (for UVs e.g.) so that loops of a same
destination polygon do not 'spread' across several source islands.

Heavily reviewed and enhanced by Campbell, thanks a lot!
2015-01-09 18:35:32 +01:00
b99687169d Fix texture sampling with generative modifiers - sample backbuffer
returns indices in mesh face range
2015-01-09 18:06:15 +01:00
1187b98d48 Fix T43174: "Record animation" does not update fcurve handles
`INSERT_FAST` implies you call `calchandles_fcurve()` at the end...
For now, since we do not store edited FCurves nor can we get them easily
(requires RNA...), just update handles of all fcurves, it's much more
performant than removing usage of `INSERT_FAST` anyway.
2015-01-09 15:29:47 +01:00
ac619aaf38 BLI_string: BLI_str_ends_with -> BLI_str_endswith
Loosely following Python str convention.
2015-01-09 23:47:17 +11:00
73955e2566 Fix for GTest 2015-01-09 23:33:02 +11:00
ca9bdf3f28 Fix rotate around selection only working if object is at origin for
texpaint
2015-01-09 13:27:49 +01:00
62cc4bab08 BKE bvhutils: cleanup and refactor to make it more flexible.
You can now use lower-level '_ex' versions of bvh creators to only use part of
the mesh's elements in the BVH, and/or create bvh from non-DM sources.

Needed for transfer data.

Note edges extend version of bvh creator is not added here, not needed so far.
2015-01-09 13:03:55 +01:00
1794186053 BLI_math: add vector's dot_v3v3v3() func, for when you have three points instead of two vectors. 2015-01-09 13:03:55 +01:00
2e72d756c4 BLI_rand: add a function returning a random point whithin given 2D triangle.
Needed by transfer data.
2015-01-09 13:03:55 +01:00
88ee44a9ac BLI: add 'A*' (AStar) shortest path solver algorithm.
Needed for transfer data.
2015-01-09 13:03:55 +01:00
2f16098d20 Gooseberry animation request: Paste flipped pose in action
and graph editor.

This was a tricky commit that was not so straightforward to make work.
The information for bones is not easy to come by in the animation curves,
however we do have some string manipulation tricks to make it happen.

Testing in gooseberry worked for the rigs there, commiting to master now
2015-01-09 12:16:58 +01:00
95847f6ac7 Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies.
Propper fix reverting most of rB60e70c0c6014e5, which was only partial specific fix.
This code uses generic `BKE_id_lib_local_paths()` func to handle all possible paths.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D977
2015-01-09 09:53:58 +01:00
1b8240f5af Fix T43154: Extrude edges ignored isolated verts
Also cleanup extrude code.

- remove normal calculation.
- remove return values for transform type.
- use enums.

Thanks to Psy-fi for finding the initial fix.
2015-01-09 07:31:05 +11:00
db0b8017cb DDS missed newline printing errors. 2015-01-09 04:23:43 +11:00
e02af840e1 Fix gtest linking on ubuntu and do minor cleanup.
Generally for build systems, libraries that do not depend on other
libraries, such as system libraries, OpenGL etc always go at the end.

We could even get rid of some duplicate dependency libraries here but
auto duplication by build systems and differences between OSs make this
difficult.

GTest still duplicates all libraries twice to solve some issues which is
weird (maybe libs are not sorted correctly for some reason? needs
investigation)
2015-01-08 17:17:40 +01:00
60e70c0c60 Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies.
Simply have to rebase onto main filepath when copying, if source datablock is lib and path is relative.

Afaict, only affected Image and Text datablocks. MovieClip would also be a candidate, but has
no copy implemented currently.
2015-01-08 14:38:48 +01:00
72ca952641 correct permissions 2015-01-08 23:01:15 +11:00
37d748cd17 exclude git/arc files from tgz archive 2015-01-08 22:53:23 +11:00
def2ef88b0 Fix crash in texture paint sampling when sampling materials without
textures slots
2015-01-08 12:47:19 +01:00
acce9f0841 Fix for wrong boolean flag check
This fixes obvious overflows when checking bitflags, who knows how much
undiscovered issues exists in the code still..
2015-01-08 14:43:18 +05:00
8f0b6a1dd1 Better check that preview seq is cleared on exit 2015-01-08 20:16:22 +11:00
4305950fc0 GHash: use reinsert instead of remove/insert 2015-01-08 19:58:01 +11:00
9fadacfd0f cleanup: style 2015-01-08 19:57:50 +11:00
8ebb552a95 Fix T40257: Frustum culling not working properly
Instead of getting fancy this time, we'll just use Mahalin's simpler
fix. This may have slight performance impacts, but it is a lot simpler
than the previous fix and shouldn't cause as many bugs.
2015-01-07 20:41:07 -08:00
4fac29ca0e Revert "Fix T40257: Frustum culling not working properly"
This reverts commit 315609ec0c.

This fix still causes more issues than it solves.
2015-01-07 20:38:05 -08:00
ae18fd5937 Fix invalid memory access in gradient brushes - could cause a crash in
MacOS.

This looks like an oldie and should not influence release, but if we do
make an 'a' build it's safe to include.

Report by Craig Jones, thanks!
2015-01-07 23:01:42 +01:00
ef05bc5dd7 Quite warning about unused func.
(not my day...)
2015-01-07 19:47:31 +01:00
cda149b9c8 Remove 'ensure previews' call from write code.
Sorry about that, should have checked this stuff more, with Internal material
renders are very fast (unoticable), but with Cycles it can take (a lot of) time,
like several minutes or more.

Will probably fall back to a dedicated operator users will have to fire themselves
when they want previews in their files.
2015-01-07 19:38:13 +01:00
7c53c3483c PyAPI docs: minor changes to sphinx docs. 2015-01-08 03:55:01 +11:00
19169de9f7 Recalculate particle pathcache stuff for all particles instead of
trying to be smart.

This breaks child interpolation otherwise because sometimes parent
paths are not calculated and give bad clumping results.
2015-01-07 16:16:40 +01:00
e0e9cd0163 PyAPI: Call to get the pixel x,y in a text block
This allows scripts to request the screen location of any (line, column) pair.
2015-01-08 01:22:11 +11:00
14f2597d7e More tweak to preview commit - do not 'render' non-used IDs either.
Thanks to Campbell for the headup.
2015-01-07 14:10:14 +01:00
5bbb8a0d9d Ugh, forgot to invert that one in previous commit, sorry for the noise... 2015-01-07 12:46:18 +01:00
820b6b3731 Ensure mat/tex/etc. previews are generated/saved in .blend files when enabled in userprefs.
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D970
2015-01-07 12:31:31 +01:00
3f05797333 Followup to fe3e000: no need to exit pose mode on operator redo
This is to be backported to the release branch.
2015-01-07 15:38:32 +05:00
29d2c71117 Fix for bool flag use 2015-01-07 12:08:55 +11:00
848c00f7e7 cleanup: de-duplicate code 2015-01-07 12:08:54 +11:00
3bd01c6056 Fix: Segfault in Image Editor when transforming GPencil Strokes 2015-01-07 13:19:49 +13:00
45c7af6c9c Fix: Missing updates for UI panels and main region when using Grease Pencil in Image Editor 2015-01-07 13:12:37 +13:00
bafabf4eda Fix: Restored "Draw Poly" to D Ctrl RMB, as D Alt LMB was blocked by Alt-D (duplicate) keymap 2015-01-07 12:41:25 +13:00
257d513aa8 Cycles: Allow negative values in Combine XYZ node. 2015-01-06 22:53:15 +01:00
julianeisel
70f3a47d57 Event System Cleanup: Modifier Key Assignment Switch
Was quite messy previously, think this is much more readable and easier to follow.
2015-01-06 20:33:22 +01:00
c66d7359fd Submodules: Make them pointing to the master branch
Otherwise it gives all sort of weird and wonderful artifacts.
2015-01-07 00:18:18 +05:00
julianeisel
eefb393cfd Fix T40435: Fix event system modifier key handling
This partial reverts rBd800cffaf10cb7, but fixes T40435 (Background label is not
redrawn).

It now isn't possible to use single modifier keys as shortcuts anymore. But this
is something that's not really useful at all, since it breaks more than it allows.
2015-01-06 18:48:36 +01:00
8e73b770d4 Remove slurph shape-key feature
This is an old option which wasn't working in over a year without complaint.
2015-01-07 02:06:37 +11:00
0527183090 Fix copy-paste of colors to generated color not being correct. '
Change generated color property to gamma space to match the add new
image operator.
2015-01-06 15:48:18 +01:00
Dalai Felinto
d36fb8e34e Logic Bricks *must* be kept in alphabetical order 2015-01-06 12:29:48 -02:00
bf168f0600 Fix T43137: vertex bevel percent mode wasn't implemented. 2015-01-06 09:13:38 -05:00
22c9979b51 Point submodules ot latest release tags 2015-01-06 18:48:04 +05:00
e9d6350e7e Sequencer: show extensions when preview enabled 2015-01-06 23:11:20 +11:00
4b586895f2 Expose viewer panels also when backdrop is active. Allows to select
proxy size, render type etc.
2015-01-06 12:17:06 +01:00
a922be9270 Cycles: Repot CPU and CUDA capabilities to system info operator
For CPU it gives available instructions set (SSE, AVX and so).

For GPU CUDA it reports most of the attribute values returned by
cuDeviceGetAttribute(). Ideally we need to only use set of those
which are driver-specific (so we don't clutter system info with
values which we can get from GPU specifications and be sure they
stay the same because driver can't affect on them).
2015-01-06 14:13:21 +05:00
e961c06a6e Fix T43143: DPX header wrong, making it impossible to import to other software
The issue was caused by the single letter in header, which is expected to be
captial as per standard: http://www.simplesystems.org/users/bfriesen/dpx/S268M_Revised.pdf
2015-01-06 13:47:53 +05:00
77c926933b cleanup: warnings 2015-01-06 19:09:56 +11:00
1829c049be Correct args from recent mathutils refactor 2015-01-06 19:09:55 +11:00
bf0c8e116d PyAPI: add PyList_APPEND
This appends while giving ownership to the list, avoiding temp assignment.
This matches PyList_SET_ITEM which bypasses refcount's

Note, this also reduce code-size, Py_DECREF is a rather heavy macro.
2015-01-06 19:09:53 +11:00
9fd569a654 PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
2015-01-06 19:09:11 +11:00
ee58d44945 BGE: Fix for bugs T42520 and T42097 (mouse look actuator related).
With this fix the mouse actuator movement works well as with even screen resolutions as odd screen resolutions.
Also it fixed the movement when the border of the blenderplayer window is out of the screen limits.

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D946
2015-01-05 22:07:35 -08:00
2d2bfd416b Fix T43122: Shrinkwrap target, wrong linked object 2015-01-06 14:01:18 +11:00
62f2b751f8 UI: refactor button string get/set into functions. 2015-01-06 11:05:08 +11:00
julianeisel
ffd06de470 Correction to previous commit
Just realized menu buttons are using hardmin and hardmax for a bad hack which will make the assert fail :/
2015-01-06 00:02:57 +01:00
c91e64faa6 Fix/cleanup very ugly and unsafe usage of but->str in ui_but_update().
Currently, but->str should never be smaller than but->strdata, but code shall
not rely on this.

Further more, but->strdata is 'only' 128 chars, this could become limit with some
translations, if the org label is already rather long, leading to truncated str
(Chinese e.g. can only store about 40 chars in strdata).
2015-01-05 21:38:15 +01:00
julianeisel
e7a9bf88d2 Fix T43111: Node Editor (Slider) Draw Glitch
* don't allow Node Editor input max value to be less then min value
* avoid the num slider drawing glitch if softmin equals softmax
* assert if softmax/hardmax is smaller than softmin/hardmin

With this, we sort of allow softmin/hardmin and softmax/hardmax being the same.
2015-01-05 21:05:17 +01:00
22ce525bcd More border clamping removed. 2015-01-05 14:26:56 +01:00
8a547af2bd Remove border clamping. Usually we just want to clamp to edge instead.
Note - checked all glTexImage functions and we never use that. Border is
ifdefed out too here.
2015-01-05 14:25:22 +01:00
89b654dc56 FileBrowser: small tweak to new search feature: clear that string when changing dir.
In 99% of cases, you do not want to keep the same filter when changing dir,
and having to reset it by hand is *very* annoying!
2015-01-05 12:23:41 +01:00
caf5a325b0 Outliner 'Blender file' view: Show libs used both directly and indirectly both on main level and in nested tree.
Request from Gooseberry team. This eases a bit managing dependancies in complex .blend files.

Reviewers: campbellbarton

Subscribers: fsiddi

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D943
2015-01-05 11:28:48 +01:00
3414d01411 Use float format for high bit depth textures if available - storage
requirements are the same but we may avoid some clipping of float values
for HDRs when used in shaders.
2015-01-05 11:23:54 +01:00
1ef33968fd Recent fix for SDL2 broke joysticks for SDL1.2 2015-01-05 20:23:30 +11:00
e5063b0bd3 Cleanup: OSX: remove obsolete ppc/ppc64 sw-renderer kCGL attributes 2015-01-04 20:42:16 +01:00
a08c5e1183 Partial fix for T43113: Filebrowser: Empty folders do not contain go back arrow.
Do not allow going into un-readable directories at all.
Note we might want to reflect that 'state' in UI for users too, but that will be
for later.

Also, not quite sure this fix the windows case, will have to start my VM... :/
2015-01-04 17:57:39 +01:00
8abdc89912 Sequencer: Preview dragging playhead over strips
Bring back the 2.4x feature.

also show a highlight when a strip is being previewed.
2015-01-05 02:27:50 +11:00
c7eb83bc17 Fix sequencer border-flickering
Offscreen viewport drawing wasn't properly restoring the theme.
Add API calls to store/restore the theme so it can be temporarily overridden.
2015-01-04 23:23:17 +11:00
3447944c3f sequencer: don't return big values (fill pointer instead) 2015-01-04 22:46:54 +11:00
44e02651ab Fix for crash for 'Edit Source'
was accessing freed menu region.
2015-01-04 22:25:53 +11:00
026cb6bdeb FileBrowser: Cleanup: rename some (really ugly) enum names. 2015-01-04 12:04:47 +01:00
b240b8e231 Freestyle: reserve array sizes before filling
also use PyList_GET_ITEM when list size is known.
2015-01-04 21:23:26 +11:00
de6b546e15 Fix 8 memory leaks from bad PyList_Append use 2015-01-04 20:35:16 +11:00
e0db0f84ac Fix T43119: mathutils.intersect_point_line always returns a 2D vector as first value.
Trivial, safe for final 2.73.
2015-01-04 10:11:21 +01:00
8106a6b75d mathutils: refactor instantiation
remove 'type' argument, very few mathutils objects are wrapped,
add new function for creating wrapped objects.

also fixes unlikely memory leak if the data-array can't be allocated.
2015-01-04 17:43:57 +11:00
c41431f1e9 cleanup: use 'coords' abbreviation for functions. 2015-01-04 14:21:16 +11:00
fd9b25df75 cleanup: create cube, use index lookups 2015-01-04 14:21:16 +11:00
julianeisel
555c1d6a63 Fix T43114: File Browser - don't highlight '..' while using border select 2015-01-04 02:36:42 +01:00
dcc5997527 FileBrowser: add search field in header bar.
Not much to add, pretty straightforward...
2015-01-03 21:55:16 +01:00
d8b00a3bf5 Freestyle: memory consumption optimization in stroke rendering.
Previously individual strokes were represented by distinct mesh objects
no matter how many vertices and materials each stroke has, although
the vertex and material counts can be quite small depending on the input
scene data.  Now stroke meshes are packed into a minimum number of
mesh objects, so as to reduce the overheads of Blender object creation.
2015-01-03 21:54:56 +09:00
babfec9e8f Bump subversion so that version patches for theme changes work 2015-01-04 01:17:53 +13:00
Diego Garcia
f329ebe38a D824: Add themeing for keyframe lines in Timeline
Reviewed by: Joshua Leung (aligorith)
2015-01-04 01:17:51 +13:00
c50003cd09 Grease Pencil: Vertex size and colours are now themable 2015-01-04 01:17:50 +13:00
b137f06d7e Cleanup: rename 'filelist' BLI funcs to consistent naming.
Also, add an optional callback to `BLI_filelist_free()` to allow freein
void poin if needed (consistency with `BLI_filelist_duplicate()`...).
2015-01-03 12:41:36 +01:00
780bb88a7a Refactor 'fit in camera view' code, and expose it to RNA.
This changes BKE's fitting code to use `BKE_camera_params_compute_viewplane` instead of
`BKE_camera_view_frame`. This allows that code to work with orthographic projection too.

Also, two funcs were added to rna's Object, to resp. get the projection matrix of that
object (mostly useful for cameras and lamps objects), and return position this object
should be to see all (to fit) a given set of points.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D961
2015-01-03 12:05:23 +01:00
16ed20ff3c Add some BLI helpers needed by asset branch.
`BLI_strncpy_ensure_pad()` is also useful with current master code.

The two others (`BLI_strcmp_ignore_pad()` and `BLI_filelist_duplicate()`)
are only used in asset branch currently, but think they could be useful
in other places too, and simplifies handling of asset branch & future patch review.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D965
2015-01-03 10:13:44 +01:00
6b8b3badf5 GTest: test beautify with polyfill 2015-01-03 18:05:18 +11:00
0d7e8cc869 GTest was broken on Linux 2015-01-03 17:55:59 +11:00
f06335e12f Fix for view map cache not flushed by updates of edge detection options.
This fix should be considered for inclusion in the 2.73 release, since
it concerns a new feature of Freestyle introduced in 2.73.
2015-01-03 15:40:07 +09:00
8a288953cc Fix RNA Image.frame_duration.
If a video was loaded (e.g. from python) but never 'ibuf-acquired', its Image->anim
prop would still be NULL, returning useless '1' value as frame duration!
2015-01-02 22:51:51 +01:00
1369bd562c Cycles: Fix compilation error on AVX platforms with -arch-native
Was a conflict in headers between clew and util_optimization.h.
2015-01-03 00:11:28 +05:00
8e37a45ac0 Fix (unreported) 'pad9' not shown by UserPrefs' KeyBinding filter.
Minor glicth, but still... Safe for 2.73.
2015-01-02 18:24:25 +01:00
2a8a56929b Cycles: Fix unneeded int/float conversion happened in previous commit 2015-01-02 17:21:24 +05:00
4f2583ee13 Fix T43027: OpenCL kernel compilation broken after QBVH
OpenCL apparently does not support templates, so the idea of generic
function for swapping is a bit of a failure. Now it is either inlined
into the code (in triangle intersection) or has specific implementation
for QBVH.

This is probably even better, because we can't create QBVH-specific
function in util_math anyway.
2015-01-02 14:58:01 +05:00
da66a2c871 Fix T43099: Modifiers in edit mode might mess up materials
The issue was originall caused by 2e8ba17 by removing necessery call
GPU_enable_material(). It was probably removed because in some cases
material was enabled after calling setDrawOptions.

That wasn't always a case for edit mode.

This is absolutely to be included to 2.73
2015-01-02 14:28:58 +05:00
4abe548527 cleanup: style 2015-01-02 19:29:00 +11:00
bf169d6ca6 Fix T43066: Joystick broken in GE since 2.73rc
Caused by move to SDL2, fix thanks to jensverwiebe.
2015-01-02 17:14:33 +11:00
fdddd4ed66 Fix same operator (curve.separate) in double in Curve menu.
Reported by Leon Cheung on IRC, thanks.
2015-01-01 15:09:42 +01:00
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
4bdd4aa633 SpaceFile: Cleanup: fix stupid indices in filelist_from_main()
Dead code (currently), but still...
2015-01-01 11:11:37 +01:00
46bce66805 SpaceFile: Tweak thumbnail to avoid restarting the job needlessly. 2015-01-01 11:11:37 +01:00
950f2c84a3 SpaceFile: Refactor sorting and filtering of filelist.
New code shall be more easy to maintain and extend.
Sorting is now handled quite the same as filtering, and all filtering parameters
are now packed into a sub-struct to help extending it later.

Also done some optimizations in filelist refresh, and sorting/filtering area.
Now we should avoid re-sorting and re-filtering too often, also removed
calls to those in read_xxx funcs.

Note thumbnail job is still started basically on each call to `file_refresh()`,
will be addressed in next commit.
2015-01-01 11:11:37 +01:00
d8bb30d87e SpaceFile: Filelist: reorder a bit things, also cleanup some unused and pure-private funcs. 2015-01-01 11:11:37 +01:00
9de54da5a0 Fix T43079: Proxies of 100% size are ignored in sequencer 2015-01-01 15:06:22 +05:00
ec9a137bb2 Fix T43078: Strip custom proxy files did not respect color space settings 2015-01-01 14:52:37 +05:00
c24b694986 Add GPencil Copy/Paste to secondary pie + toolshelf 2015-01-01 12:50:00 +13:00
c0805722ed GPencil Editing: Copy and Paste selected stroke segments with Ctrl-C and Ctrl-V 2015-01-01 12:49:59 +13:00
e9596e5def Cycles: Post-reintegration tweaks to ensure things do compile
This commit contains all the tweaks which were missing in initial patch
re-integration from the standalone Cycles repository.

This commit also contains an utility cmake macro to help linking targets
with different libraries for release/debug builds, the name currently is

  target_link_libraries_decoupled

it gets a target and list of libraries and makes sure debug builds are
using libraries with "_d" suffix.

After all this changes it'll hopefully be easier to interchange patches
between blender and standalone repositories, because they're now quite
identical.
2015-01-01 01:31:08 +05:00
b8fc4fe5aa Cycles: Correction to previous SSE/AVX flags detection
Ensure AVX/AVX2 is not used when Cycles is configured with
WITH_CPU_SSE set to OFF.
2015-01-01 01:31:08 +05:00
93ca68b50c Cycles: Be ready for gflags namespace auto-detect
This way it is now possible to use gflags >= 2.1, where all the
functions were moved from google to gflags namespace.

This isn't currently used in blender, but for standalone repository
this change is essential.
2015-01-01 01:31:08 +05:00
405c0fddb4 CMake: Rework linking strategy a bit
Made it a dedicated macro to link release/debug targets against lib/lib_d
libraries which helps keeping code a bit more clean.

Also made it so MSVC is now happy about building debug Cycles with OSL
support.

Reshuffled code a bit and put some comments about what's going on, which
should make it a bit more clear.
2015-01-01 01:31:08 +05:00
2382c8decd Cycles: Fix compilation error with compilers which doesn't support AVX
For SSE checks still could be decoupled to be able to compile SSE2
kernel and not SSE4 depending on the CPU or so.
2015-01-01 01:31:08 +05:00
3b6b32d6a3 Cycles FTBFS: Send Boost after OIIO to the linker since the order matters 2015-01-01 01:31:08 +05:00
9b8942ac71 Cycles Standalone: Add initial support for compilation on Windows
This applies to an application comiling from the standalone Cycles repository
only.

There's still lack of proper install target, so currently pthreads
library is to be copied next to cycles.exe manually.
2015-01-01 01:31:08 +05:00
9e2e408323 Cycles: Add logging to OSL and CUDA initialization/compilation
This is what was handy troubleshooting issues in the studio,
plus this is exactly the same thing which would be helpful
when solving issues with paths to compiled shaders and cubins
for standalone repository.
2015-01-01 01:31:08 +05:00
bbf12722ed Cycles: Fully support WITH_CYCLES_LOGGING option
This commit generalizes logging module a little bit in making it possible to use
Glog logging in standalone Cycles repository.
2015-01-01 01:31:07 +05:00
f2665d52e2 CMake: Minor cleanup 2015-01-01 01:31:07 +05:00
e0a809fb1d Cycles: Fix compilation error when OIIO is compiled with external PugiXML parser
Basic idea is to check whether OIIO is compiled with embedded PugiXML parser
and if so use PugiXML from OIIO, otherwise find a standalone PugiXML library.
2015-01-01 01:31:07 +05:00
a4c3ca8671 CMake: use pthreads on all os's 2015-01-01 01:31:07 +05:00
b6c175b27a Cycles: Solve linking error caused by missing pthreads library
Not sure why it worked on Debian but didn't work on Arch, could have
been some indirect link dependency or so.

Anyway, we explicitly depends on pthreads, so need to do corresponding
find_package().
2015-01-01 01:31:07 +05:00
4497b6ac84 Cycles: Synchronize changes with standalone repository
This changes were done in original commit of the standalone Cycles repository
and needed here for easier patch synchronization.
2015-01-01 01:31:07 +05:00
7f356c20dc Modify shader for texture coordinates of objects to also match the
rendered result more closely (all three parameters should match now)
2014-12-31 15:48:16 +01:00
59742167ce Just another attempt to make MSVC happy
No idea why standalone libmv remo was all fine with the code..
2014-12-31 19:04:29 +05:00
f31f28c3f4 Corrections to world texture coordinates to match the rendered result
more closely
2014-12-31 15:00:18 +01:00
Dotsnov Valentin
01c187fb93 Gamma node support for Blender Internal
Patch by Blend4Web Team, thanks!

Reviewers: psy-fi

Subscribers: yurikovelenov, AlexKowel, Evgeny_Rodygin

Differential Revision: https://developer.blender.org/D899
2014-12-31 13:36:14 +01:00
a3e832e68b Fix T42984 detail flood fill not respecting mask values for smooth/sharp
curves.

Issue here is that brush curve could return negative values. This would
result in overflow of mask values. Those were not visible during real
time preview because result would be clamped.

We had two functions in the code, one of which allowed negatives but I
don't think that we really want that, users have no control over the
negative values at all anyway.

Thanks to the reporter, Leon Cheung for figuring out the issue :)
2014-12-31 13:11:54 +01:00
bca434de78 Hopefully fix compilation error after recent update 2014-12-31 16:42:40 +05:00
caa2306d16 Libmv: Update to latest upstream version
Main purpose of this is to bring new gflags library which is more likely
to have a fix for undefined order of static variables initialization and
also to bring new glog where some compilation error are fixed (which are
only visible with more strict checks with clang and c++11 enabled).
2014-12-31 16:02:04 +05:00
784517dfb9 Joystick: Suppress add/remove device events
Previously they'll be printed to the console as a totally unknown events
together claim this shouldn't have happened which is just misleading.
2014-12-31 14:56:42 +05:00
f3e7369d48 Compilation error fix for strict flags 2014-12-31 14:50:27 +05:00
f80eb37e21 Remove executable flag from the build configuration files
They're not intended to be executed directly and seems mode change happened
by accident.

Setting -x for this files to avoid possible incidents by trying to run this
files in shell.
2014-12-31 14:05:53 +05:00
d5f3aee41f Operator to duplicate the active Grease Pencil layer
TODO: this needs a proper "duplicate" icon, without the "ID" label
2014-12-31 14:20:44 +13:00
70b6c82fd3 Fix an odd line that slipped in my ghost_hack_first_file commit 2014-12-30 18:31:37 +01:00
9e950ea661 Fix issue in separate rake control commit:
Mask slot still depended on regular slot to check some capabilities.
Some angle capabilities now only depend on the texture slot, not the
brush, so separate them and use the slot where appropriate.
2014-12-30 18:07:12 +01:00
016bbc8793 Fix T42780: Object linking allows to have linked armatures in pose mode
This isn't so bad for until one goes re-posing the armature and then uses undo.

It is the same issue as with edit mode which was solved back in the days.
2014-12-30 21:33:15 +05:00
cefb764269 PyAPI: geometry.normal, support polygons
Previously this only supported tri/quads,
now arbitrary size poly lines are supported.
2014-12-30 22:49:52 +11:00
68600920ce PyAPI: allow non-vector args for geometry module
Previously only vector args were accepted,
now allow generic sequence of numbers.

Was annoying to create vectors just to pass in args.
2014-12-30 22:05:34 +11:00
d993bad5e7 Fix possible NULL pointer dereference
also remove redundant NULL check
2014-12-30 08:13:15 +11:00
4748e34642 I18n scripts: minor spelling exceptions update. 2014-12-29 21:55:51 +01:00
7778f0ff20 Cycles: Fix MSVC which desn't like condition to be split by preprocessor 2014-12-29 21:10:37 +05:00
fb7ff31315 Fix stupid handling of 'Object.matrix_local' in RNA.
The getter of this matrix (actually, `BKE_object_matrix_local_get()`) was only correct
in case of pure-object parenting, bone parenting and such did not gave valid results.

Also cleaned up a bit setter code, was using as temp storage ob->obmat itself,
which is supposed to be a world matrix!

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D958
2014-12-29 15:26:38 +01:00
c5927cd977 Revert "Fix T42888: Separate and Combine HSV distorts the hue value"
This reverts commit 1549fea999.

After some further discussion with other developers in the team it becomes
clear there's no correct solution here. It is just more matter of what's
more convenient in particular case.

We're just going back to old code to avoid possible frustration with the
older files in newer blenders. This also means all HSV/HSL is considered
to be "linear" in the shading nodes.

Would be ported to 2.73 final.
2014-12-29 18:14:08 +05:00
f392f56397 Small fix for QTCreator project script, by Sybren Stüvel.
Either ./blender-git or ~/blender-git should be used, but not
.~/blender-git. This patch fixes that, by choosing ~/blender-git,
in line with the last CLI argument.
2014-12-29 13:45:05 +01:00
18854a6506 Rotate around selection now will work on last stroke position in texture
paint too.
2014-12-29 12:35:03 +01:00
51a66a5a6e fix for doc generator 2014-12-29 22:16:44 +11:00
427fbc879e Move average stroke from sculpt session to unified paint settings so it
can be reused by other paint systems too.
2014-12-29 11:35:43 +01:00
e0cb67f740 CMake: Add check for whether OIIO has bundled pugixml library
Will become handy when we'll be re-integrating changes from Cycles standalone
repository back to blender.
2014-12-29 15:08:16 +05:00
936604e801 Cleanup: get rid of sculpt minmax and reuse last stroke function (code
did that anyway, just kept the result in an intermediate variable)
2014-12-29 11:01:10 +01:00
4088fad6dd Cycles: Add asserts around BVH stack pushes
This way we're kind of safer to troubleshoot possible stack overflow issues.
2014-12-29 14:02:15 +05:00
40517283ca Cycles: Bump stack size for QBVH traversal code
Traversal now can push up to 2x of nodes to the stack, so need some tweaks
to the stack size.
2014-12-29 13:37:18 +05:00
9c4aba11c9 Cycles: Add some sanity check asserts in the traversal code
This way we'll be sure (in debug builds) that regular BVH traversal is not used
for QBVH tree (could happen because of mismatch of logic in kernel and render).
2014-12-29 13:35:31 +05:00
0a76be81b7 cleanup: redundant call to BKE_object_apply_mat4 2014-12-29 19:34:40 +11:00
ba9453f46f Cycles: Disable QBVH on 32bit systems all together
The reason for this is that we don't sue SSE optimization for 32bit platforms
because of T36316.

Things to look into:

- Nail the root of the issue of that report
- Implement non-SSE traversal code for QBVH
2014-12-29 13:23:44 +05:00
c79c48cc93 Fix T40930: Add a new option to select faces by smooth/flat shading.
Org code by robschia (Roberto Schiavone), first review by campbellbarton (Campbell Barton),
final review and minor changes by mont29 (Bastien Montagne).

Reviewers: cambellbarton, mont29

Subscribers: mont29, campbellbarton

Maniphest Tasks: T40930

Differential Revision: https://developer.blender.org/D638
2014-12-28 19:08:43 +01:00
58ea1639da Cleanup: no need for hacks here, RNA allows for real read-only props, and if you define
a getter func, it won't rely on any DNA member either...
2014-12-28 18:30:33 +01:00
870941c87a Fix leak in cycles-bake 2014-12-28 16:00:08 +11:00
cadcb12292 Fix leak in select-similar regions 2014-12-28 16:00:08 +11:00
9686d3005c Fix buffer overrun calculating unique names 2014-12-28 16:00:08 +11:00
00197a668b BLI_string_utf8: add BLI_strncpy_utf8_rlen 2014-12-28 16:00:08 +11:00
e182d43d3e cleanup: avoid ref-counting None for a new matrix 2014-12-28 15:13:01 +11:00
b11a2f7075 Cycles: Mark visibility TODO as resolved 2014-12-27 23:38:29 +05:00
91bbaaa271 Cycles: Fix visibility check for instanced nodes
The issue is that only instance node contains proper visibility flags,
nodes from instanced BVH are not correct.
2014-12-27 23:33:50 +05:00
2b226d9578 Fix a very stupid memleak in own bpy_app_translations.c code...
Safe for 2.73.
2014-12-27 17:24:39 +01:00
155bb058f4 GPencil UI: Color swatches for both Stroke and Fill colors are now shown
The layers list and the Dopesheet channels now show color swatches for both the
stroke and fill colours now. This is useful when you've got layers that only
use either/or.

* Currently, these only get shown if the relevant opacity setting is high enough
  for that aspect to contribute to the result.

* The sizing of these items could do with some more tweaking (especially in the
  Dopesheet), as these may now be too small to accurately see and/or interact with.

* There are some potential issues when using near-gray (or actually, colours similar
  to the list backgrounds, but that issue exists in other areas of Blender anyway.


(NOTE: At this stage, these changes are still experimental, and not for 2.73 yet)
2014-12-28 03:05:11 +13:00
4ab5883766 Experimental fix for "random large dots" bug when using a stylus
Since I don't have a (pressure sensitive) tablet handy, I can't really test this
out, but apparently there is a bug which currently exists with the following description:
  "Small Dots, when you do just one click a single GP dot is created, it´s fine but don't recognize the pen pressure, always the maximum value of thickness, and
    It´s so easy create dots accidentally (even when you use the eraser, this dots appear spontaneously) and you start to have big screen-size-constant dots beside of you fine lines."

This commit just shuffles around the order of things a bit so that some of the misfiring
events might get skipped instead.
2014-12-28 03:05:10 +13:00
49052c61f8 Restoring all the whitespace! 2014-12-28 03:05:09 +13:00
01c04333f5 Fix T43034: beautify-fill leaves zero area tri's 2014-12-27 16:47:42 +11:00
8d7b2d69cf cleanup: redundant tri-normal calculation 2014-12-27 16:36:31 +11:00
5ea243bbec cleanup: knife tools, use generic sort function 2014-12-27 12:37:11 +11:00
b6aa936a8b Fix typo in angle commit, noticed by Kevin Dietrich, thanks! 2014-12-27 00:10:53 +01:00
eb2e4577f4 Only add a fill brush to default .blend if there isn't one already. For
some reason this happened twice here.

Likely candidate for 2.73 final
2014-12-27 00:08:58 +01:00
c7c10e5e28 Brush Texture Angle Goodies:
This commit includes a few things:

* It moves the Rake and Random flags from the brush to the MTex.
* The first change allows mask textures to have independent rake
support.
* Random rotation now has an angle value that controls the width of the
effect from the rake or default angle
* Rake and Random are now supported together.
2014-12-26 23:51:27 +01:00
e0cf86a9e2 Fix T43010 regression in material setting.
Caused by own fix for another display case.

Shoud be safe for 2.73 final.
2014-12-26 20:06:56 +01:00
julianeisel
fd47202043 GPencil: Picky whitespace cleanup 2014-12-26 20:00:52 +01:00
3253ed9e26 Put editor initialization before python.
Initially it was moved to allow setting keymaps of python defined menus
in C but looks like it breaks macro definition in python.

Thanks to Julian for tracking this down. It should fix T42485
2014-12-26 19:14:01 +01:00
julianeisel
6339ba1ee2 Fix T42977: Weights failed to display in Wireframe mode when using Face Select
D948, reviewed by @mont29 (thanks for that)
2014-12-26 16:53:40 +01:00
julianeisel
da78d2d742 GPencil: Use a different brush cursor for eraser
D783 with minor edits to increase contrast
2014-12-26 16:38:51 +01:00
cf178f71ac Fix T42641, Graphical fragments showing on Blender 2.71 and higher when baking.
Safe for 2.73...

This revert rB9b0ab890676790bb1e8e77797629b889ea66f69e - needed to set that threshold to a small
negative value to remove the last artefacts reported in T39735, but now I could not reproduce
any with the previous 0.0f value, so restoring it for the time being.

If this 'shadowed neighbor face' case re-appears, we can always choose a value in-between, like -1e-18f...
2014-12-26 13:00:36 +01:00
2b595579e3 Fix T43013: Flip with bridge aligned loops 2014-12-26 20:22:21 +11:00
836ea4b70f Fix T43019: Child of objectes used by duplis are visible in Cycles
Seems the parent check didn't go deep enough and only checked single parent.
Now it checks the chain of parents which seems to be correct but requires
much more intense testing.
2014-12-26 13:36:45 +05:00
53ec177b7f optimize interp_weights_poly_v2, v3
use line_point_factor instead of length between vertices.
2014-12-26 08:46:48 +11:00
f84defa9c0 optimize interp_weights_poly_v2, v3
halve sqrtf calls per per polygon corner.
2014-12-26 08:46:48 +11:00
445e50fd1e cleanup: use cross_tri_v2 when area isn't needed. 2014-12-26 08:46:48 +11:00
cd095aae13 Cycles: Distance optimization for QBVH
This commit implements heuristic which allows to skip nodes pushed to the stack
from intersection if distance to them is larger than the distance to the current
intersection.

This should solve speed regression which i didn't notice in the original QBVH
commit (which could have because i had WIP version of this patch applied in my
local branch).

From quick tests speed seems to be much closer to what is was with regular BVH.

There's still some possible code cleanup, but they'll need a bit of assembly
code check and now i want to make it so artists can happily use Cycles over the
holidays.
2014-12-25 22:40:02 +05:00
30e3aa1561 SCons: Don't regenerate icons if not changes
This is rather a handbook example how NOT to do things in SCons, ideally
it should be official SCons target so all the dependencies and source file
modification stops being our worry. Especially since for CMake we already
do have an app to do generate all the data.

I don't have time to clean this up now but this constant icons regeneration
just pisses me off atm.
2014-12-25 19:17:30 +05:00
c1f54bcdcc OSX: revive GHOST_HACK_getFirstFile cause it breaks things on older OSX versions.
Dunno exactly why this was done earlier, but propose not to remove code not understood.
2014-12-25 15:12:56 +01:00
3e034831de Refactor 'immediate search' feature
Currently, code just checks whether a text-edited button uses a given icon (VIEWZOOM) to decide to apply changes on each typed char.

This patch adds a propper button flag (UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA flag (PROP_TEXTEDIT_UPDATE) for that.
It's also now usable not only for text buttons, but also for example for num buttons when in 'text edit' mode, etc.

It also fixes an actual bug, which is for text properties, in 'immediate' mode, hitting escape would not restore org value, because `ui_apply_but_TEX()` would set its orgstr to NULL on first call (giving it to `but->rename_orig` instead of copying it).

Note no change in behavior is expected from user POV.
Update for addons using that 'VIEWZOOM' icon 'feature' will follow (if any).

Reviewers: campbellbarton

Reviewed By: campbellbarton

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D938
2014-12-25 12:55:29 +01:00
5f3dc592c8 Revert QBVH switch, after discussion with Sergey. 2014-12-25 12:18:51 +01:00
7bb29c5528 Fix T42938: image.save_render sometimes saved the wrong pass
Stupid mistake with non0initialized image user.

Safe for final 2.73 release branch.
2014-12-25 15:45:22 +05:00
9e57babd8d Cycles: Fix really bad bug with shadow rays on non-SSE CPUs
basically shadow rays were totally broken and most of the time did not record
any intersections, leading to really ad rendering artifacts.

This commit makes it so regardless of enabled optimization level render result
would be the same.
2014-12-25 14:30:05 +05:00
fe06ec82a9 Cycles: Workaround CUDA 6.5.16 error after watertight commit
This issue doesn't happen with 6.5.12 and there's slight piece of hope it'll be
fixed in next toolkit releases..

For now we're forcing CUDA to not inline ray precalculation. This could lead to
some speed regression, but wouldn't expect it to be huge -- this code does not
run that often comparing to actual triangle intersection.
2014-12-25 14:15:37 +05:00
010f3ee438 Cycles: Fix compilation error on non-SSE2 architectures 2014-12-25 14:11:37 +05:00
ee36e75b85 Cleanup: Fix Cycles Apache header.
This was already mixed a bit, but the dot belongs there.
2014-12-25 02:50:24 +01:00
4ab821c675 Cleanup: Typo fixes for comments. 2014-12-25 02:42:06 +01:00
6e7c2d2e43 Cycles: Expose QBVH on/off switch to the UI.
We might remove this again in the future, but for testing purposes
during the release cycle, this will be useful.

The setting defaults to QBVH, and can be found in the Performance panel.
2014-12-25 02:19:14 +01:00
deb06c457d Cycles: Correction for node tail copy on packing BVH
This is harmless for now because tail of the node is zero in there, but better
to fix it early so in the case of extending BVH nodes this code doesn't give
issues.
2014-12-25 02:50:49 +05:00
0feba652f7 Cycles: Enable QBVH optimization structure for SSE2 CPUs
This commit enables QBVH optimization structure automatically if rendering
with CPU and SSE2 support is detected.

This brings render time of agent shot back to the speed it used to be before
the watertight intersections commit, single koro and sponza scenes are about
7% faster here.
2014-12-25 02:50:49 +05:00
03f28553ff Cycles: Implement QBVH tree traversal
This commit implements traversal for QBVH tree, which is based on the old loop
code for traversal itself and Embree for node intersection.

This commit also does some changes to the loop inspired by Embree:

- Visibility flags are only checked for primitives.

  Doing visibility check for every node cost quite reasonable amount of time
  and in most cases those checks are true-positive.

  Other idea here would be to do visibility checks for leaf nodes only, but
  this would need to be investigated further.

- For minimum hair width we extend all the nodes' bounding boxes.

  Again doing curve visibility check is quite costly for each of the nodes and
  those checks returns truth for most of the hierarchy anyway.

There are number of possible optimization still, but current state is good
enough in terms it makes rendering faster a little bit after recent watertight
commit.

Currently QBVH is only implemented for CPU with SSE2 support at least. All
other devices would need to be supported later (if that'd make sense from
performance point of view).

The code is enabled for compilation in kernel. but blender wouldn't use it
still.
2014-12-25 02:50:49 +05:00
788fb8321a Cycles: Store proper empty boundbox for missing child nodes in QBVH
The idea is to make sure those childs would never be intersected with a ray
in order to make it so kernel never worries about number of child nodes.
2014-12-25 02:50:49 +05:00
30b12b1b27 Cycles: Code cleanup, de-duplicate definition of FEATURE
Previously every BVH traversal file was defining macro to check which features
should be compiled in, now this macro is defined in the parent header.
2014-12-25 02:50:49 +05:00
0476e2c87a Cycles: Rework BVH functions calls a little bit
Basic idea is to allow multiple implementation per feature-set, meaning this
commit tries to make it easier to hook new algorithms for BVH traversal.
2014-12-25 02:50:49 +05:00
ab8d9c4b88 Cycles: Add some utility functions and structures
Most of them are not currently used but are essential for the further work.

- CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i

- Added templatedversions of min4, max4 which are handy to use with register
  variables.

- Added util_swap function which gets arguments by pointers.
  So hopefully it'll be a portable version of std::swap.
2014-12-25 02:50:49 +05:00
f770bc4757 Cycles: Implement watertight ray/triangle intersection
Using this paper: Sven Woop, Watertight Ray/Triangle Intersection

  http://jcgt.org/published/0002/01/05/paper.pdf

This change is expected to address quite reasonable amount of reports from the
bug tracker, plus it might help reducing the noise in some scenes.

Unfortunately, it's currently about 7% slower than the previous solution with
pre-computed triangle plane equations, but maybe with some smart tweaks to the
code (tests reshuffle, using SIMD in a nice way or so) we can avoid the speed
regression.

But perhaps smartest thing to do here would be to change single triangle / ray
intersection with multiple triangles / ray intersections. That's how Embree does
this and it's watertight single ray intersection is not any faster that this.

Currently only triangle intersection is modified accordingly to the paper, in
the future we would also want to modify the node / ray intersection.

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

Differential Revision: https://developer.blender.org/D819
2014-12-25 02:50:49 +05:00
57d235d9f4 Cycles: Optimize storage of QBVH node by one float4
The idea is to store visibility flags for leaf nodes only since visibility check
for inner nodes costs too much for QBVH hence it is not optimal to perform.

Leaf QBVH nodes have plenty of space to store all sort of flags, so we can make
nodes one element smaller, saving noticeable amount of memory.
2014-12-25 02:50:49 +05:00
a888b8beaf Cycles; Code cleanup, make it more obvious what #endif belongs to 2014-12-25 02:50:49 +05:00
144096faad Cycles: Make it more clear offsets in BVH construction
Previously offsets were calculated based on the BVH node size,
which is wrong and real PITA in cases when some extra data is
to be added into (or removed from) the node.

Now use offsets which are not calculated form the node size.
2014-12-25 02:50:49 +05:00
f27d87d300 Cycles: Replace magic constant in the code with actual node size 2014-12-25 02:50:49 +05:00
f4a959f734 Cycles: Avoid over-allocation in packing BVH instances
This solves quite an over-allocation in BVH instances packing code,
unfortunately, it's not a magic bullet to solve memory bump caused
by the recent QBVH changes.

For that we'll likely need to decouple storage for leaf and inner
nodes. However, it's not really clear for now if it's something
important since that'd still be just a fraction of memory comparing
to all the hi-res textures.
2014-12-25 02:50:49 +05:00
8cfac731a5 Cycles: Implement refit_nodes for QBVH
Title says it all, quite straightforward implementation.

Would only mention that there's a bit of code duplication around packing node
into pack.nodes. Trying to de-duplicate it ends up in quite hairy code (like
functions with loads of arguments some of which could be NULL in certain
circumstances etc..). Leaving solving this duplication for later.
2014-12-25 02:50:49 +05:00
fe4905288d Cycles: Use proper node counter to allocate QBVH nodes
Before all the nodes were counted and allocated, leading to situations when
bunch of allocated memory is not used because reasonable amount of nodes are
simply ignored.
2014-12-25 02:50:49 +05:00
345ed4dd10 Cycles: Don't do node visibility check in subsurface and volume traversal
Visibility flags are set to all visibility anyway, So there was no reason
to perform that test.

TODO: We need to investigate if having primitive intersection functions
which doesn't do visibility check gives any speedup here as well.
2014-12-25 02:50:49 +05:00
f4df3ec05a Cycles: Move triangle intersection functions into own file
This way extending intersection routines with some pre-calculation step wouldn't
explode the single file size, hopefully keeping them all in a nice maintainable
state.
2014-12-25 02:50:48 +05:00
43421e9c53 Cycles: Optimize vector math node without links to single values. 2014-12-24 22:45:08 +01:00
julianeisel
76b4fad6db Fix T42879: File Browser - disable selecting ".." entry (Parent Directory) 2014-12-24 19:51:42 +01:00
julianeisel
703bb0f62d Ref T42873: Print "Camera Pano" for panoramic camera view onto viewport 2014-12-24 19:35:12 +01:00
9d230298f1 Master branch is now alpha cycle of 2.74 release 2014-12-24 20:33:14 +05:00
607c45ae6b Fix T42997: Support RGBA output for HuffYUV
More like a feature request but was simple to support.
2014-12-24 18:54:38 +05:00
0fcf9b2672 Fix rna paint update callbacks assuming meshes 2014-12-24 14:51:35 +11:00
273fa0a4ef Blender 2.73 release candidate commit
This commit contains:

- Subversion bump to 2.73
- Release cycle is set to "rc"
- Submodules are pointed to appropriate tag now
  (addons contrib just points to the latest contrib repo)
- New shiny splash screen!
2014-12-23 20:42:01 +05:00
e483a21ce6 Fix T42994: Own recent regression in fix for T42945 (rB5cc199e49581),
side/front/top ortho views would no more adapt their snapping unit to zoom factor.

This code would need slightly more refactor actually, but this will be for after release!
2014-12-23 16:12:17 +01:00
20aed660f5 Add missing keymap for paint curve 2014-12-23 20:01:47 +11:00
35f153cdc3 Fix T42928: Drag-drop of generated files to compo reloads them, loosing edits
Origins of this issue goes back to T33402, where compo wasn't sure what kind
of image it is working with (compo should know if it's multilayer or regular
image).

Now we only reload images when dar-dropping from outside of blender.
2014-12-23 10:56:30 +05:00
646a96bf8e Fix T42952: Curve modifier not taken into account when curve is created from mesh
Curve and array modifiers requires curve path to be evaluated, dependency graph
will make sure that curve eval would create such a path, but if curve was already
evaluated we might miss path.

So what we do now is: if path was not calculated for target curve we tag it for
update.
2014-12-22 19:05:56 +05:00
f78490182e partial revert ab6417aa9f was too strict 2014-12-22 13:26:35 +01:00
abf39fa31f Quick fix for UI themes, by meta-androcto (Brendon Murphy), thanks. 2014-12-22 09:57:56 +01:00
cd4fedb285 Fix T42966: Py_Initialize: Unable to get the locale encoding
This only happened for SCons builds and caused by pure human stupidnes.
2014-12-22 13:43:23 +05:00
julianeisel
59a0c11ecc GPencil: Correction to rB071ec918f4cd
* correct API convention: in rB071ec918f4cd gp_draw_data drew mulitple data blocks, I added gp_draw_data_all which now calles gp_draw_data multiple times (if needed). This follows our normal convention, e.g. see UI_panel_category_draw_all
* Draw scene data first, users may expect it like this

Points raised by @aligorith, thanks for this!
2014-12-21 15:48:30 +01:00
1fe7b84c73 Fix T42973: Render viewport not updating when switching materials in Outliner
For now, do as RNA material update functions - tag object for update too.
2014-12-21 12:40:02 +01:00
julianeisel
071ec918f4 Fix T42961: GPencil - Refactor object/scene data behaviour
D937 with minor edits (whitespace only)

@aligorith, I double checked everything runs smoothly, blame me if I missed something ;). Sorry for just taking the initiative and committing without talking to you, but I wasn't able to catch you the last days. This should be fixed before the release IMHO, but I don't think it's important enough to be committed during BCon5, so sorry again, but hopefully everything is okay :)
2014-12-20 16:18:18 +01:00
c2e56a5267 RNA Object.matrix_local: Add a big warning this matrix is only relative to parent object.
So 'advanced' parenting like e.g. bones or vertices need further processing
to get a real parent-relative matrix...
2014-12-20 14:16:06 +01:00
296a92f5f3 Fix T42972: fcurve lasso select crash 2014-12-20 13:48:36 +01:00
93c4ba7b70 Force phony targets to build (even if file exists)
This is a convenience makefile only,
files if they exist by accident shouldn't ever be used.
2014-12-20 02:15:14 +01:00
7a04c7f6d0 Ensure no integer overflow happens in SuperLU solver on memory allocation
x
2014-12-20 00:23:42 +05:00
3b639b8b3d Minor cleanup to previous commit 2014-12-19 14:43:29 +01:00
3e0ff35b4b Fix for bad file name string matching in point caches, leading to
deletion of baked caches.

This happens when objects use file names with matching prefixes:

"CubeX"   -> not baked
"CubeXYZ" -> baked

The first objects cache should be discarded up to the current frame on
file load, but the second should be left intact. But because the cache
file names for both use the same prefix as well (based on hex name
representation) they both match the "CubeX" name and get discarded.
Adding the underscore terminator solves this issue, because it is never
part of the hex file name string.

WARNING: this solution does not work with custom names for point caches.
This feature is pretty much broken, users have to ensure their names
are unique themselves. Due to the possibility of underscores in names
and the ambiguity of point cache suffixes there is no reliable way to
encode filenames in that case.
2014-12-19 13:34:50 +01:00
ef5c036d1c Fix T42543 projection painting fails when faces are perpendicular to screen.
This is UV barycentric interpolation failing for triangles where vertices are
colinear in screen space. To fix this, we detect this early on so we do the
interpolation on edges instead of triangles.

Such triangles will never be painted on unless we have occlusion and culling
off (since, arguably they are self occluded and almost back-facing).

The code still does not fill the whole area but this can be checked separately.
2014-12-19 12:27:29 +01:00
76ccc1d26b Fix reversed args in function call (float, bool vs. bool, float).
Note 'same' values are kept for now, even though it was probably meant the
other way around, it's safer to keep current behavior for now.
2014-12-19 10:15:10 +01:00
5cc199e495 Fix T42945: rv3d->gridview was not set correctly in view3d_draw_objects.
This fixes both transform snapping in persp views, and 'snap cursor to grid' feature.

Was only really visible with Imperial units.
2014-12-19 10:09:17 +01:00
5e67779d80 Code cleanup: include directory for scons
This directory does not exist even.
2014-12-19 13:43:52 +05:00
27b58f0eb2 Fix mathutils docstring typos. 2014-12-19 00:43:41 +09:00
de0b9f34d7 Flood fill in projection painting does not do bounds checking anymore.
It should now fill the whole mesh with color even if parts of it are
outside the screen - still need to be in fron of the camera though.

Thanks @Campbell for the trick :)
2014-12-18 16:28:43 +01:00
85f6fc501c Fix T42943: Crash with multiple calls to rna_info.BuildRNAInfo()
Thanks to @nesse for the fix
2014-12-18 14:31:33 +01:00
f0f1c7995b PyAPI: disallow assigning members to 'bpy.ops' 2014-12-18 13:52:31 +01:00
9f61350a05 Sequener: Move waveform-draw option into view menu
also simplify preview/sequencer checks
2014-12-18 13:47:40 +01:00
d4aaa4f9b6 cleanup: use const for smallhash & minor edits 2014-12-18 13:12:25 +01:00
c1eec5582a Fix/workaround T42944: Crash adding a shortcut in properties space 2014-12-18 12:49:48 +01:00
8627d65951 Correction to previous render border commit
Was using wrong bitfield check.
2014-12-18 14:43:08 +05:00
20006e4a67 Cycles: Do some logging when motion is detected in the scene 2014-12-18 14:40:14 +05:00
2bdd44c87a Correction to set border from render image view
It did not fully support cases when setting border from a cropped render result
and it's not totally clear how it should behave. So for now just do nothing and
inform users about this.
2014-12-18 13:24:21 +05:00
0c5eb88451 Quiet warning (harmless) 2014-12-18 02:15:42 +01:00
0ae4d7d405 Fix for GPU_materials_free accessing NULL pointer 2014-12-18 02:14:51 +01:00
3da1a75b74 correct recent cleanup for id-property types 2014-12-18 02:06:57 +01:00
b3b9e08423 Sequencer: Select sideof failed for strips touching the playhead 2014-12-17 23:11:41 +01:00
3820d44979 Cycles: Add missing entries in the Integrator constructor and some updates
to the XML API.

(Changes from the standalone repo)
2014-12-17 22:28:33 +01:00
cd4d5dcb46 Fix T42932: Drag&Drop of groups from the outliner was using undefined
event->mval.

Calculating from event->x/y like object drag/drop does works. Also fixed
a missing notifier of the object instancing operator.
2014-12-17 13:50:31 +01:00
a56e31c89c Fix triangulating concave quads
Resulting triangles could be pointing in opposing directions.
2014-12-17 11:34:16 +01:00
dc2617130b Fix: Never write previews for undo steps.
This may eat quite q bit of mem in the end (though nothing critical),
and icons (material ones e.g.) often ended up out of sync after undo.
2014-12-17 10:23:34 +01:00
b04d2f99f2 Fix T42927: Triangulate-beauty fails on quads
Regressions since 2.69.
2014-12-17 10:09:47 +01:00
15bde0dbea Docs: comments (hash table & beauty fill) 2014-12-17 09:58:23 +01:00
3e61478b1b Fix T42917 shadow maps not working on ATIs.
This is yet another issue with framebuffers. There are two issues: We
need the framebuffer fully bound to check for completeness and when we
bind a depth texture as frame buffer we need to disable read/write.
2014-12-16 21:52:55 +01:00
1b2fc74792 Fix typo in VBO 2014-12-16 20:20:41 +01:00
72330b97a2 Fix nasty typo in CPP RNA that would break on int or bool dynarrays... 2014-12-16 16:57:41 +01:00
1549fea999 Fix T42888: Separate and Combine HSV distorts the hue value
These nodes were assuming sRGB input/output which is for sure wrong for the
shader pipeline which works in the linear space.

So now conversion to/from linear space happens in these nodes which makes them
making sence in the shader context but which might change look and feel of
existing scenes.
2014-12-16 20:06:25 +05:00
137f557246 Remove NULL checking variable after using it. 2014-12-16 12:09:33 +01:00
72341537e8 Fix T42864: Knife-project fails with 'cut-through'
Removing edge-hit-doubles could incorrectly de-duplicate intersections between different edges.

Gave noticeable errors cutting through geometry that overlapped exactly.
2014-12-15 21:17:10 +01:00
76f50cd17a Fix for clip proxies builder reloading original footage frames
This isn't needed if the source is the image sequence.
2014-12-15 22:20:06 +05:00
f51b583ea0 Improve tip for simple deform origin 2014-12-15 16:10:17 +01:00
db0e2e7347 Fix T42864 (partial): knife-project included uncut backfaces
When knife-project ran with cut-through disabled,
it would still try to select faces behind the cut.

Now check if the faces are obscured.
2014-12-15 15:10:49 +01:00
2329b58fd3 Fix T42864 (partial): Knife-project had too-low precision 2014-12-15 15:10:49 +01:00
090ab750b3 Fix missing UI ID messages and/or I18N contexts for MovieClip/Mask/Palette/PaintCurve ID types. 2014-12-15 11:53:35 +01:00
c167ac1556 Tracking: Fix wrong logic in tracks synchronization
There was some stupidness in the way how tracks are synchronized from the job
to actual DNA data leading to all sort of weird and wonderful failures again.
2014-12-15 14:39:59 +05:00
06ea819c0d Tracking: Avoid possible treading issue reading the frame to sync 2014-12-15 14:34:47 +05:00
ca25fe98fc Tracking: Fix possible race condition accessing the tracks
Writing to the tracks was already inside the lock section, but
reading was not. This could have lead to race condition leading
to all sorts of weird and wonderful artifacts.
2014-12-15 14:31:19 +05:00
Severin
ae6f62c4e2 IME fix: Quit two assert failures
We could now also remove the win->ime_data assert in wm_window_IME_end,
but think it's better to leave it for further development.
2014-12-14 18:51:14 +01:00
c1d3532d2c Fix for idproperty comparison
comparing arrays had flipped logic
2014-12-14 18:24:13 +01:00
17253bec06 Fix T42892: UV pixel snap with negative values 2014-12-14 12:36:32 +01:00
9c81833430 Fix T42885: We still had a few wrong doc in mathutils about methods returning
instance of self while actually returning None...
2014-12-13 14:07:46 +01:00
d6beaad01c Fix T42875 GLSL display not correct in vertex array mode.
GLSL used a global variable to store the enabled vertex attributes which
were not set for vertex arrays after the VBO refactor.
2014-12-12 17:59:06 +01:00
28a0e1dae5 Fix T42883: ID-Prop arrays longer than 'shot' fail 2014-12-12 16:25:32 +01:00
fbd25174d1 Amend to previous 'append warning' commit.
Actually, append/link *is* converted/updated, issue here is IPO-to-FCurves
code is not called from our do_version code, but later, directly from BKE_blender's
setup_app_data. This is bad but not easily fixed it seems, so for now
keep a warning in this case.

thanks Sergey for the headup.
2014-12-12 12:38:54 +01:00
a6343696c1 Fix T42882: Now warn user when trying to append/link from older blender files.
Since we do not make any conversion in this case, worth warning user about
potential issues!
2014-12-12 12:13:30 +01:00
cea086dd97 cleanup: disallow NULL arg to uvedit_aspect
also some typo's
2014-12-12 11:18:03 +01:00
19eb700fef Fix blenderplayer compilation (tm) 2014-12-11 20:34:53 +01:00
f1ddf99580 Fix T42859 smart UV unwrap does not support aspect correction.
Can be considered TODO but it's not bad to support either. Also added
RNA api to get aspect ratio of assigned UV image - returns aspect
corrected image dimensions so needs adjustments for uv editing.
2014-12-11 19:46:35 +01:00
2309def874 Fix crash when changing worlds with world background active.
Freeing the preview will free the original gpu material so NULL that out
on copy.
2014-12-11 14:43:15 +01:00
754bdbe4b4 Cycles: Fix more wrong usages of RNA_id_pointer_create
Title says it all, just be more careful in the future.
2014-12-11 17:11:23 +05:00
cb7cf523e5 Fix T42829: Cycles crash rendering when file is saved to specific location
The issue was caused by the way how RNA pointer was created for the bMain:
namely Cycles was using RNA_id_pointer_create to create the pointer, which
would then try to refine the poniter based on the ID type.

This is just wrong and worked so far just because of co-incident, with the
file path from the bug report first letters in the ID name happened to be
NT which corresponds to NodeTree, and for sure refining such pointer will
fail.

Simple solution -- use proper way to create RNA pointer for non-ID block.
2014-12-11 16:55:10 +05:00
1999b5a814 Fix ping-pong actions when using the Action Actuator. 2014-12-11 00:05:11 -08:00
2617d37034 Libmv: Reshuffle CMake and SCons configuration files
The main idea is to share as much code between cases when feature-full built
is done and only logging is needed, so all the defines and include directories
are guaranteed to be the same.

This would hopefully make it so MinGW compilation is all happy about Cycles
logging for both CMake and SCons.
2014-12-11 11:58:03 +05:00
julianeisel
c71c7f0e0b Correction for non-Windows SCons compiling fix after IME Merge
As discussed in rB983c71931b1886d4, we should print a warning in case of building on non-Windows and WITH_BF_IME enabled. We also terminate build in this case, so the warning isn't scrolled away. Was worked out together with @sergey.
2014-12-11 00:22:17 +01:00
1e02a5ff43 Fix for object_utils.object_data_add: Now supports None obdata for
creating empties.

The documentation says None is a valid argument for obdata (making
empties), but this would cause an exception. Now obdata is only used
when it is defined. An optional name argument can be passed to override
obdata.name as well.
2014-12-10 17:22:26 +01:00
d7e4944e5b UI: add Shift-Drag to multiselect expanded enum items too.
Differential Revision: https://developer.blender.org/D928
2014-12-10 17:04:36 +01:00
aaa02bd490 startup.blend, update movie-tracking layout T41660
Layout by @sebastian_k, now includes 3D view.
2014-12-10 16:49:00 +01:00
bce0dc8cf7 cleanup: comment unused defines 2014-12-10 15:55:40 +01:00
d9ddc99a27 Fix T42184: Normal not displayed correctly in Material Viewport
There was a differences between how Cycles and BI treats Normal shader:

- Different normal direction assumption
- Different policy about vector normalization

Previous idea of trying to use single function and flip the output if
needed becomes more tricky, so i've just added new GLSL function which
corresponds to how Cycles deals with the Normal shader.
2014-12-10 19:12:54 +05:00
d68521df7b Cycles: Fix difference between SVM and OSL implementation of Normal node
SVM was normalizing the input normal, OSL did not. This lead to render
result differences across this shading systems.
2014-12-10 19:07:50 +05:00
668ffcd6e9 Fix for wrong flip of Normal node Dot output for new shading system
It was wrong to use invert(), we need to multiply by -1 instead.
2014-12-10 18:50:30 +05:00
01bda15832 Fix T42472: Undoing/Redoing repeated transform operator gives wrong final matrix on objects with no geom data.
This hack should not be needed here, quoting Sergey, the actual issue comes from BKE_object_handle_update_ex,
which is calling BKE_object_where_is_calc_ex when it shouldn't.

Propper fix is depsgraph refactor topic, though.
2014-12-10 13:57:16 +01:00
7366283c01 Fix T42818: Cycles SSS passes are incorrect for SSS size of 0
This was caused by some internal optimization which evaluated SSS with
size of zero as BSDF but used different ID so the evaluation result
didn't appear in regular diffuse pass.

This lead to situation when SSS data was nowhere stored if the
size was zero.

Now SSS with zero size and close-to-zero sizes will be handled in the
same way from the passes point of view.
2014-12-10 17:28:44 +05:00
602250d9fe Fix T42748: Crash in subsurf, threaded access
Allocating the iterator from a BLI_memarena wasn't threadsafe.
Change the API to use stack memory for iterators.

Thanks to @mont29 for finding exact cause of the bug.
2014-12-10 11:16:42 +01:00
47788b5e68 Switch to numpy 1.9 for windows platform 2014-12-10 13:50:51 +05:00
1807dcf619 Fix numpy installation on windows+cmake
The was caused by numpy never unpackign because of no
dpependnecy of any targets from the unpacked numpy.

Tried making it so blender target dpeends on it, but for
some reason it didn't work. For now added dedicated target
for unpacked numpy. A bit dirty but much better than just
totally failing.
2014-12-10 13:45:45 +05:00
8555595d17 Fixes for compilation with msvc
MSVC doesn't like caling macro argument f when using float values
in the macro, it simply replaces the f in the float value with the
argument..

CMake compilation still fails because of 77785ce708, numpy is never
getting unpacked.
2014-12-10 13:39:24 +05:00
9783d9297c cleanup: pep8 2014-12-09 21:49:46 +01:00
117a7e3545 Sequencer: optionally show strip offsets
was disabled in recent sequencer refactor, enable with view menu option.
2014-12-09 21:42:25 +01:00
17f0a01a56 Correct last commit checking knife edges 2014-12-09 20:57:37 +01:00
e77b25fabb Cycles: Code cleanup, typo 2014-12-10 00:08:33 +05:00
6fb1e1680b Knife: cuts along existing edges are now selected
This means cuts along existing edges don't have gaps in the selection.

Fixes T42616
2014-12-09 19:51:08 +01:00
2efc3211ab Knife: rename vert & edge 'draw' to 'is_cut'
More logical for checking if the edge is a cut into the mesh.
2014-12-09 17:24:19 +01:00
4d9f2f7e86 Knife: fix edge aligned cuts, could add redundant verts 2014-12-09 17:23:10 +01:00
d5abe8419d Smallhash: add support for iterating value pointers
also add reinsert function
2014-12-09 17:18:05 +01:00
233c650d55 Gooseberry request, circle select for graph editor 2014-12-09 16:54:15 +01:00
491839b3c8 Fix T42857: Inconsistency between cache line visibility and ability to change frame from image space 2014-12-09 20:34:28 +05:00
781db5f8a6 Knife: test if an edge is on the face boundary
Was checking if an edges midpoint was inside the face,
giving random results (point-inside for an edge location).
2014-12-09 15:57:59 +01:00
171a6bb5dc Fix T42488: Knife (selected_only + occlude) failed 2014-12-09 15:51:58 +01:00
8fe336ce7e Fix T4284: Drawing modified curves crashes 2014-12-09 14:38:32 +01:00
ebee593f26 Fix bug reported by kopias on irc, crash when attempting to set canvas
with a non-mesh object selected
2014-12-09 14:36:24 +01:00
59f1585d02 Fix T42175: Modifiers don't render in sculpt mode using multires
Modifier stack should ignore sculpt restrictions when creating derived render.
2014-12-09 17:21:02 +05:00
a5c3de2e49 Fix T42630: Triangulate returns invalid face-map
Triangulate with beautify caused a bug when there were existing edges
could make the bmesh-operator return an invalid face-map.

Now the beauty is calculated on the 2d-tri's resulting from polyfill,
its simpler and faster.
2014-12-09 13:08:28 +01:00
6076bedec0 Cleanup: remove scanfill define for polyfill code
also rename vars which were previously used for scanfill.
2014-12-09 12:19:26 +01:00
83cbcefac8 Add edgehash remove, clear functions, Heap clear
Edgehash was missing removal functions (remove, popkey, clear),
since it wasn't needed so far, but is based on same code as ghash which has them.

also add heap clear() method so we can reuse heaps.

(needed for upcoming fix).
2014-12-09 00:32:20 +01:00
55812e3acd Cleanup: simplify heap popmin 2014-12-09 00:13:35 +01:00
03760fed0d Cleanup: remove unused pointer in Heap 2014-12-09 00:02:50 +01:00
ab6417aa9f Fix Mesh Objects with missing textures or wrong texture path now import without texture 2014-12-08 19:57:50 +01:00
8545fb516e Fix T42824: Proxy bone custom-shape lost on undo 2014-12-08 16:46:42 +01:00
252bfc6f65 Fix T42838: Make dupli's real use_hierarchy fails
Regression since the dupli-object refactor.
2014-12-08 16:15:53 +01:00
7b6c9d23cf Cycles: Fix compilation error with MinGW and logging enabled 2014-12-08 19:37:41 +05:00
c07f6c02b3 Docs: reference the new manual 2014-12-08 11:18:58 +01:00
3e7e97f127 BMesh: ensure iterator macros assign to valid types
note, this is for C++ code which expects a cast, (will be added later)
also add a macro for nop-expressions (EXPR_NOP),
when we never want an expression to be evaluated, but it should still be valid.
2014-12-08 10:54:56 +01:00
690345a826 Cleanup: spelling 2014-12-08 09:46:21 +01:00
7ba2b37a8a Cleanup: remove unused operator-type member 2014-12-08 09:45:47 +01:00
julianeisel
b88e700df4 Cleanup: Minor edits to widget emboss code
* Rename "emboss" to "widget_emboss"
* Remove duplicated UI_GetThemeColor4ubv function

I made sure version bump and Save User Settings are working correctly ;P
2014-12-08 00:38:36 +01:00
julianeisel
983c71931b Fix non-Windows SCons compiling error after IME merge 2014-12-07 23:57:51 +01:00
Severin
12e5a32557 Forgot to add new files in recent IME commit
Sorry, my bad :/
2014-12-07 18:23:02 +01:00
fe4d0c234e Bugfix T42774: BSurface addon doesn't work on new builds
It turns out that several important modelling addons depend on the assumption
that Grease Pencil data gets created on the active object instead of on scene
level. This commit adds a toggle for setting whether new Grease Pencil data
is created on scene or object level.

These work as follows:
* "Scene" = The behaviour originally introduced as part of the GPencil_EditStrokes
  changes. New strokes are added to the scene instead of the active object, making
  it easier to manage things when working with Grease Pencil in general.
* "Object" = The previous behaviour (from 2.50 to 2.72), where new strokes are added
  to the active object. This is now being reintroduced to soften the transition
  for addons out there which have been doing this in a lazy/lax way so far.


Now, what may be slightly confusing are the "fallback" measures in place:
* "Scene" - To ensure that loading old files goes ok without needing a version patch,
   if the active object has GPencil data, that will be used in place of the scene's
   own GPencil data.
* "Object" - If there was no active object at the time of creating strokes
  (for instance, if you delete the active object immediately before drawing),
  GPencil data gets attached to the current scene instead.

Since some tweaks may still be needed here, I've decided to bump the subversion
number so that we have a reference point when doing version patches.
2014-12-08 02:42:45 +13:00
e67fd7a2cb Correct defines for binreloc
After recent moving path functions to appdir.c

patch T42826: by ldo (Lawrence D'Oliveiro)
2014-12-07 13:53:42 +01:00
Severin
e81d077c85 Input Method Editor (IME) support for text buttons
Original patch by @random (D765) with some minor work done by @campbell
and me.

At this place, I'd like call out a number of people who were involved and
deserve a big "Thank you!":
* At the first place @randon who developed and submitted the patch
* The Blendercn community which helped a lot with testing - espacially
* @yuzukyo, @leon_cheung and @kjym3
* @campbellbarton, @mont29 and @sergey for their help and advises during
* review
* @ton who realized the importance of this early on and asked me for
* reviewing

We are still not finished, as this is only the first part of the
implementaion, but there's more to come!
2014-12-07 00:58:17 +01:00
06515475b9 CMake: remove redundant include dir 2014-12-06 13:39:46 +01:00
81ae71fcd3 Fix crash in RE_AcquiredResultGet32 on debug builds introduced yesterday 2014-12-06 12:30:59 +01:00
6e8a8a72a3 OSX: change previous commit to not only make animation-player window frontmost but whole process 2014-12-06 12:13:28 +01:00
036f4e7a38 Cleanup: style from my previous commit 2014-12-06 03:48:41 -05:00
c077f5fa08 Fix T42789: support 3Dconnexion wireless devices
SpaceMouse Wireless
SpaceMouse Pro Wireless

Device info is from user reports. I don’t yet have the new devices, so
these are untested but likely to work :D
2014-12-06 02:48:51 -05:00
c8995ecc83 Fix inbetween mousemove event getting detected in hotkey buttons. 2014-12-06 02:28:05 +01:00
871cf70144 Fix playercompile after ecc03c8ed 2014-12-05 18:51:19 +01:00
825d6adef5 OSX: make sure window of new blender instance is front when playing animation 2014-12-05 18:42:10 +01:00
0493879401 Cycles: Report error via the new engine API
This way CUDA errors are visible in the image info line,
which makes things to behave the same across viewport and
final rendering.

That's right, we've got error reported via reports and info
line now. This is based on the feedback from our gooseberry
team.
2014-12-05 22:15:09 +05:00
ecc03c8ed0 Render API: Add RenderEngine.error_set() function
This function sets an error message which would be displayed after
rendering is over and info space lost the link to the engine.
2014-12-05 22:15:05 +05:00
2b4eeb79cd Cycles: Report error to the blender using report API
This way when something goes wrong in Cycles (for example out of VRAM, timelimit
launching the kernel etc) we'll have a nice report in the Info space header.

Sure it'll be nice to have mention of error in the image editor's information
line, but that's for the future.

This fixes T42747: "CUDA error" appears only momentarily, then disappears
2014-12-05 22:15:04 +05:00
bd0b9ed0c0 Cycles: Add dedicated Progress::set_error() call
Currently it acts the same as set_cancel(), but this way we're able to
distinguish situations when rendering was aborted by user demand (for
example pressing Esc in standalone renderer) or if something went horribly
wrong (for example out of VRAM error).
2014-12-05 22:15:04 +05:00
716890e864 Cycles: Early output from Scene::device_update when device error occurs
This way for example we wouldn't wait a fortune while BVH is building after
GPU run out of memory when loading images just to see the render failure
message.
2014-12-05 22:15:04 +05:00
0b67102bd6 Cycles: Code cleanup, whitespace 2014-12-05 22:15:04 +05:00
e1e984e437 Fix T42807, variance shadow map broken afterFBO changes.
This code was a bit do-it-yourself instead of relying on the API. Should
be OK now.
2014-12-05 16:01:18 +01:00
e54d571176 Amendment to previous commit: Add an option to scene strips to disable GPencil
On second thought, it is probably still worthwhile to be able to disable GPencil
drawing on strips. By default, GPencil strokes are still shown by default now,
but they can be turned off using this option if it turns out that they are
getting in the way (e.g. a director/animator make some planning notes in the shot
at an earlier stage which are hidden for normal display now, but are still there
popping up sproadically during the animatic).
2014-12-05 16:39:49 +13:00
3673a03226 Grease Pencil sketches get included when doing OpenGL previews for scene strips in sequencer
After double checking the sequencer code, there doesn't seem to be any reason to
exclude these from the sequencer previews. This makes it possible to use the
sequencer to non-destructively chain together difference Grease Pencil animated
shots together without having to render each image sequence first, allowing for
a smoother workflow.

Just in case the initial assumption isn't entirely correct, I've put in place
an extra arg to the relevant functions which can be hooked up to a suitable
option on the scene strip later to turn this on/off as needed.
2014-12-05 15:47:23 +13:00
844909b294 Fix for typo + memory leak 2014-12-05 14:15:46 +13:00
e93990dfc5 Bugfix T42697: Hiding/unhiding NLA strip doesn't update the 3D Viewport
The Toggle Muting operator was missing code to tag the animation to get recalculated.

This was also missing from a few other operators too, including Snap, and
Add/Paste FModifiers .
2014-12-05 14:14:50 +13:00
abab4f19e6 Fix scons+mingw64 compiling - Ensure WITH_BF_CYCLES_LOGGING is defined and turned off 2014-12-05 13:13:34 +13:00
030b694c7a To make Strokes Edit Mode a bit more "solid", Tab key can be used to toggle out of it 2014-12-05 12:12:03 +13:00
d87ff752af Selectmouse-drag now works to move GPencil verts 2014-12-05 12:12:03 +13:00
cf7bdb42ac BGE VideoTexture: refresh() on ImageFFmpeg should have no effect.
ImageFFmpeg objects will not refresh properly because the image
file is closed immediately after creation. Therefore refresh()
should have no effect on them.
This was causing problems with ImageMix using ImageFFmpeg as
sources: refreshing the ImageMix object is required to update
the mix but it has the side effect of refreshing the underlying
sources, hence the need to skip refresh on fixed images.
2014-12-04 23:55:53 +01:00
4275 changed files with 339296 additions and 189445 deletions

1
.gitignore vendored
View File

@@ -22,6 +22,7 @@ Desktop.ini
# commonly used paths in blender
/blender.bin
/user-config.py
/BUILD_NOTES.txt
# local patches
/*.patch

4
.gitmodules vendored
View File

@@ -10,7 +10,3 @@
path = release/datafiles/locale
url = ../blender-translations.git
ignore = all
[submodule "scons"]
path = scons
url = ../scons.git
ignore = all

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,11 @@ ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
endif
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@@ -65,7 +70,7 @@ ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
endif
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_bpy
BUILD_DIR:=$(BUILD_DIR)_headless
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
endif
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
@@ -76,18 +81,20 @@ 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
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -113,23 +120,23 @@ endif
# -----------------------------------------------------------------------------
# Build Blender
all:
all: FORCE
@echo
@echo Configuring Blender ...
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
# if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# $(CMAKE_CONFIG); \
# fi
# # 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)
# # 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
@@ -142,13 +149,13 @@ bpy: all
# -----------------------------------------------------------------------------
# Configuration (save some cd'ing around)
config:
config: FORCE
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# Help for build targets
help:
help: FORCE
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@@ -171,7 +178,7 @@ help:
@echo ""
@echo "Package Targets"
@echo " * package_debian - build a debian package"
@echo " * package_pacman - build an arch linux pacmanpackage"
@echo " * package_pacman - build an arch linux pacman package"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@@ -201,6 +208,12 @@ help:
@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 +223,18 @@ help:
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
# -----------------------------------------------------------------------------
# Packages
#
package_debian:
package_debian: FORCE
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
package_pacman:
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg --asroot
package_pacman: FORCE
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
package_archive:
package_archive: FORCE
make -C "$(BUILD_DIR)" -s package_archive
@echo archive in "$(BUILD_DIR)/release"
@@ -228,35 +242,35 @@ package_archive:
# -----------------------------------------------------------------------------
# Tests
#
test:
test: FORCE
cd $(BUILD_DIR) ; ctest . --output-on-failure
# run pep8 check check on scripts we distribute.
test_pep8:
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:
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:
python3 tests/check_deprecated.py
test_deprecated: FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c:
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:
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 +280,18 @@ test_style_c_qtc:
@echo "written: test_style.tasks"
test_style_osl:
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:
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 +303,13 @@ test_style_osl_qtc:
# Project Files
#
project_qtcreator:
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:
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:
project_eclipse: FORCE
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
@@ -303,51 +317,51 @@ project_eclipse:
# Static Checking
#
check_cppcheck:
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:
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:
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:
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:
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:
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:
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:
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 +370,13 @@ check_spelling_c_qtc:
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl:
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:
check_descriptions: FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
@@ -370,14 +384,14 @@ check_descriptions:
# Utilities
#
tgz:
tgz: FORCE
./build_files/utils/build_tgz.sh
icons:
icons: FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
update:
update: FORCE
if [ -d "../lib" ]; then \
svn update ../lib/* ; \
fi
@@ -390,24 +404,24 @@ update:
#
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_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:
doc_doxy: FORCE
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna:
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:
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:
@python3 -c \
help_features: FORCE
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
@@ -417,7 +431,9 @@ help_features:
if w.startswith('WITH_')]))" | uniq
clean:
clean: FORCE
$(MAKE) -C "$(BUILD_DIR)" clean
.PHONY: all
FORCE:

1323
SConstruct

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,143 @@
# ######## Global feature set settings ########
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
# Detect which libc we'll be linking against.
# Some of the paths will depend on this
if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
message(STATUS "Building in GLibc-2.19 environment")
set(GLIBC "2.19")
set(MULTILIB "/x86_64-linux-gnu")
elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
message(STATUS "Building in GLibc-2.19 environment")
set(GLIBC "2.19")
set(MULTILIB "/i386-linux-gnu")
elseif (EXISTS "/lib/libc-2.11.3.so")
message(STATUS "Building in GLibc-2.11 environment")
set(GLIBC "2.11")
set(MULTILIB "")
else()
message(FATAL_ERROR "Unknown build environment")
endif()
# Default to only build Blender, not the player
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
# ######## Linux-specific build options ########
# Options which are specific to Linux-only platforms
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
# ######## Official release-specific build options ########
# Options which are specific to Linux release builds only
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
set(WITH_SYSTEM_GLEW OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP_STATIC ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL_NUMPY ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
# ######## Release environment specific settings ########
# All the hardcoded libraru paths and such
# LLVM libraries
set(LLVM_VERSION "3.4" CACHE STRING "" FORCE)
set(LLVM_ROOT_DIR "/opt/lib/llvm-${LLVM_VERSION}" CACHE STRING "" FORCE)
set(LLVM_STATIC ON CACHE BOOL "" FORCE)
# BOOST libraries
set(BOOST_ROOT "/opt/lib/boost" CACHE STRING "" FORCE)
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
# FFmpeg libraries
set(FFMPEG "/opt/lib/ffmpeg" CACHE STRING "" FORCE)
set(FFMPEG_LIBRARIES
avdevice avformat avcodec avutil avfilter swscale swresample
/usr/lib${MULTILIB}/libxvidcore.a
/usr/lib${MULTILIB}/libx264.a
/usr/lib${MULTILIB}/libmp3lame.a
/usr/lib${MULTILIB}/libvpx.a
/usr/lib${MULTILIB}/libvorbis.a
/usr/lib${MULTILIB}/libogg.a
/usr/lib${MULTILIB}/libvorbisenc.a
/usr/lib${MULTILIB}/libtheora.a
/usr/lib${MULTILIB}/libschroedinger-1.0.a
/usr/lib${MULTILIB}/liborc-0.4.a
CACHE STRING "" FORCE
)
# SndFile libraries
set(SNDFILE_LIBRARY "/usr/lib/libsndfile.a;/usr/lib/libFLAC.a" CACHE STRING "" FORCE)
# OpenAL libraries
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include" CACHE STRING "" FORCE)
set(OPENAL_LIBRARY
${OPENAL_ROOT_DIR}/lib/libopenal.a
${OPENAL_ROOT_DIR}/lib/libcommon.a
CACHE STRING "" FORCE
)
# OpenCollada libraries
set(OPENCOLLADA_UTF_LIBRARY "" CACHE STRING "" FORCE)
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(PCRE_LIBRARY "/usr/lib${MULTILIB}/libpcre.a" CACHE STRING "" FORCE)
set(XML2_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(XML2_LIBRARY "/usr/lib${MULTILIB}/libxml2.a" CACHE STRING "" FORCE)
# OpenColorIO libraries
set(OPENCOLORIO_ROOT_DIR "/opt/lib/ocio" CACHE STRING "" FORCE)
set(OPENCOLORIO_OPENCOLORIO_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libOpenColorIO.a" CACHE STRING "" FORCE)
set(OPENCOLORIO_TINYXML_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libtinyxml.a" CACHE STRING "" FORCE)
set(OPENCOLORIO_YAML-CPP_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libyaml-cpp.a" CACHE STRING "" FORCE)
# OpenImageIO
if(GLIBC EQUAL "2.19")
set(OPENIMAGEIO_LIBRARY
/opt/lib/oiio/lib/libOpenImageIO.a
/opt/lib/oiio/lib/libOpenImageIO_Util.a
/usr/lib${MULTILIB}/libwebp.a
/usr/lib${MULTILIB}/liblzma.a
/usr/lib${MULTILIB}/libjbig.a
CACHE STRING "" FORCE
)
endif()
# OpenSubdiv libraries
set(OPENSUBDIV_ROOT_DIR "/opt/lib/opensubdiv" CACHE STRING "" FORCE)
set(OPENSUBDIV_OSDCPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdCPU.a" CACHE STRING "" FORCE)
set(OPENSUBDIV_OSDGPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdGPU.a" CACHE STRING "" FORCE)
# OpenEXR libraries
set(OPENEXR_ROOT_DIR "/opt/lib/openexr" CACHE STRING "" FORCE)
set(OPENEXR_HALF_LIBRARY "/opt/lib/openexr/lib/libHalf.a" CACHE STRING "" FORCE)
set(OPENEXR_IEX_LIBRARY "/opt/lib/openexr/lib/libIex.a" CACHE STRING "" FORCE)
set(OPENEXR_ILMIMF_LIBRARY "/opt/lib/openexr/lib/libIlmImf.a" CACHE STRING "" FORCE)
set(OPENEXR_ILMTHREAD_LIBRARY "/opt/lib/openexr/lib/libIlmThread.a" CACHE STRING "" FORCE)
set(OPENEXR_IMATH_LIBRARY "/opt/lib/openexr/lib/libImath.a" CACHE STRING "" FORCE)
# JeMalloc library
set(JEMALLOC_LIBRARY "/opt/lib/jemalloc/lib/libjemalloc.a" CACHE STRING "" FORCE)
# Space navigation
set(SPACENAV_ROOT_DIR "/opt/lib/libspnav" CACHE STRING "" FORCE)
# Force some system libraries to be static
set(FFTW3_LIBRARY "/usr/lib${MULTILIB}/libfftw3.a" CACHE STRING "" FORCE)
set(JPEG_LIBRARY "/usr/lib${MULTILIB}/libjpeg.a" CACHE STRING "" FORCE)
set(PNG_LIBRARY "/usr/lib${MULTILIB}/libpng.a" CACHE STRING "" FORCE)
set(TIFF_LIBRARY "/usr/lib${MULTILIB}/libtiff.a" CACHE STRING "" FORCE)
set(ZLIB_LIBRARY "/usr/lib${MULTILIB}/libz.a" CACHE STRING "" FORCE)
# OpenVDB
set(OPENVDB_LIBRARY
/opt/lib/openvdb/lib/libopenvdb.a
/opt/lib/blosc/lib/libblosc.a
CACHE BOOL "" FORCE
)
# Additional linking libraries
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++" CACHE STRING "" FORCE)

View File

@@ -0,0 +1,12 @@
# This is applied as an ovveride on top of blender_linux.config
# Disables all the areas which are not needed for the player.
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)

View File

@@ -1,5 +0,0 @@
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
BF_NUMJOBS = 1
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']

View File

@@ -1,5 +0,0 @@
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
BF_NUMJOBS = 1
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']

View File

@@ -1,169 +0,0 @@
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
BF_NUMJOBS = 4
WITHOUT_BF_OVERWRITE_INSTALL = True
# Python configuration
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = True
WITH_BF_STATICOPENCOLLADA=True
BF_OPENCOLLADA = '/opt/lib/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADASaxFrameworkLoader.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
BF_PCRE_LIB = ''
BF_EXPAT_LIB = ''
# FFMPEG configuration
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
BF_FFMPEG = '/opt/lib/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
'/usr/lib/liborc-0.4.a'
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
WITH_BF_FREETYPE_STATIC = False
WITH_BF_OPENEXR = True
BF_OPENEXR = '/opt/lib/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = True
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
WITH_BF_STATICJPEG = True
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
WITH_BF_PNG = True
WITH_BF_STATICPNG = True
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = True
WITH_BF_OPENMP = True
WITH_BF_STATICOPENMP = True
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7/libgomp.a'
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Blender player (would be enabled in it's own config)
WITH_BF_PLAYER = False
# Use jemalloc memory manager
WITH_BF_JEMALLOC = True
WITH_BF_STATICJEMALLOC = True
BF_JEMALLOC = '/opt/lib/jemalloc'
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
# Use 3d mouse library
WITH_BF_3DMOUSE = True
WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/opt/lib/libspnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
# FFT
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
# JACK
WITH_BF_JACK = True
WITH_BF_JACK_DYNLOAD = True
# Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
WITH_BF_OIIO = True
WITH_BF_STATICOIIO = True
BF_OIIO = '/opt/lib/oiio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = False
BF_OSL = '/opt/lib/osl'
BF_OSL_INC = '${BF_OSL}/include'
# note oslexec would passed via program linkflags, which is needed to
# make llvm happy with osl_allocate_closure_component
BF_OSL_LIB = 'oslcomp oslexec oslquery'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
WITH_BF_STATICLLVM = False
BF_LLVM = '/opt/lib/llvm-3.4.2'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
# Color management
WITH_BF_OCIO = True
WITH_BF_STATICOCIO = True
BF_OCIO = '/opt/lib/ocio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
WITH_BF_STATICBOOST = True
BF_BOOST = '/opt/lib/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
${BF_BOOST_LIBPATH}/libboost_thread.a'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
# Ocean Simulation
WITH_BF_OCEANSIM = True
# Compilation and optimization
BF_DEBUG = False
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
PLATFORM_LINKFLAGS = ['-lrt']
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']

View File

@@ -1,169 +0,0 @@
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
BF_NUMJOBS = 4
WITHOUT_BF_OVERWRITE_INSTALL = True
# Python configuration
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = True
WITH_BF_STATICOPENCOLLADA=True
BF_OPENCOLLADA = '/opt/lib/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADASaxFrameworkLoader.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
BF_PCRE_LIB = ''
BF_EXPAT_LIB = ''
# FFMPEG configuration
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
BF_FFMPEG = '/opt/lib/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
'/usr/lib/liborc-0.4.a'
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
WITH_BF_FREETYPE_STATIC = False
WITH_BF_OPENEXR = True
BF_OPENEXR = '/opt/lib/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = True
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
WITH_BF_STATICJPEG = True
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
WITH_BF_PNG = True
WITH_BF_STATICPNG = True
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = True
WITH_BF_OPENMP = True
WITH_BF_STATICOPENMP = True
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.a'
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Blender player (would be enabled in it's own config)
WITH_BF_PLAYER = False
# Use jemalloc memory manager
WITH_BF_JEMALLOC = True
WITH_BF_STATICJEMALLOC = True
BF_JEMALLOC = '/opt/lib/jemalloc'
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
# Use 3d mouse library
WITH_BF_3DMOUSE = True
WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/opt/lib/libspnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
# FFT
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
# JACK
WITH_BF_JACK = True
WITH_BF_JACK_DYNLOAD = True
# Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
WITH_BF_OIIO = True
WITH_BF_STATICOIIO = True
BF_OIIO = '/opt/lib/oiio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = False
BF_OSL = '/opt/lib/osl'
BF_OSL_INC = '${BF_OSL}/include'
# note oslexec would passed via program linkflags, which is needed to
# make llvm happy with osl_allocate_closure_component
BF_OSL_LIB = 'oslcomp oslexec oslquery'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
WITH_BF_STATICLLVM = False
BF_LLVM = '/opt/lib/llvm-3.4.2'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
# Color management
WITH_BF_OCIO = True
WITH_BF_STATICOCIO = True
BF_OCIO = '/opt/lib/ocio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
WITH_BF_STATICBOOST = True
BF_BOOST = '/opt/lib/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
${BF_BOOST_LIBPATH}/libboost_thread.a'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
# Ocean Simulation
WITH_BF_OCEANSIM = True
# Compilation and optimization
BF_DEBUG = False
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
PLATFORM_LINKFLAGS = ['-lrt']
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']

View File

@@ -1,7 +0,0 @@
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
WITH_BF_CYCLES_CUDA_BINARIES = True
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !

View File

@@ -1,5 +0,0 @@
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
WITH_BF_CYCLES_CUDA_BINARIES = True

View File

@@ -1,126 +0,0 @@
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
BF_NUMJOBS = 4
# Python configuration
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = False
# FFMPEG configuration
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
BF_FFMPEG = '/opt/lib/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
'/usr/lib/liborc-0.4.a'
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
WITH_BF_FREETYPE_STATIC = False
WITH_BF_OPENEXR = True
BF_OPENEXR = '/opt/lib/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = True
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
WITH_BF_STATICJPEG = True
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_PNG = True
WITH_BF_STATICPNG = True
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True
WITH_BF_STATICOPENMP = True
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7/libgomp.a'
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Do not build blender when building blenderplayer
WITH_BF_NOBLENDER = True
WITH_BF_PLAYER = True
# Use jemalloc memory manager
WITH_BF_JEMALLOC = True
WITH_BF_STATICJEMALLOC = True
BF_JEMALLOC = '/opt/lib/jemalloc'
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
# Use 3d mouse library
WITH_BF_3DMOUSE = True
WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/opt/lib/libspnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
# Color management
WITH_BF_OCIO = True
WITH_BF_STATICOCIO = True
BF_OCIO = '/opt/lib/ocio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
WITH_BF_STATICBOOST = True
BF_BOOST = '/opt/lib/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
${BF_BOOST_LIBPATH}/libboost_thread.a'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
# JACK
WITH_BF_JACK = True
WITH_BF_JACK_DYNLOAD = True
# Motion Tracking
WITH_BF_LIBMV = False
# Ocean Simulation
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
WITH_BF_OCEANSIM = True
# Compilation and optimization
BF_DEBUG = False
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
PLATFORM_LINKFLAGS = ['-lrt']

View File

@@ -1,126 +0,0 @@
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
BF_NUMJOBS = 4
# Python configuration
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
# OpenCollada configuration
WITH_BF_COLLADA = False
# FFMPEG configuration
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
BF_FFMPEG = '/opt/lib/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
'/usr/lib/liborc-0.4.a'
# Don't depend on system's libstdc++
WITH_BF_STATICCXX = True
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
WITH_BF_FREETYPE_STATIC = False
WITH_BF_OPENEXR = True
BF_OPENEXR = '/opt/lib/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
WITH_BF_STATICOPENEXR = True
WITH_BF_TIFF = True
WITH_BF_STATICTIFF = True
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
WITH_BF_JPEG = True
WITH_BF_STATICJPEG = True
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
WITH_BF_STATICLIBSAMPLERATE = True
WITH_BF_PNG = True
WITH_BF_STATICPNG = True
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True
WITH_BF_STATICOPENMP = True
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.a'
WITH_BF_GAMEENGINE = True
WITH_BF_BULLET = True
# Do not build blender when building blenderplayer
WITH_BF_NOBLENDER = True
WITH_BF_PLAYER = True
# Use jemalloc memory manager
WITH_BF_JEMALLOC = True
WITH_BF_STATICJEMALLOC = True
BF_JEMALLOC = '/opt/lib/jemalloc'
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
# Use 3d mouse library
WITH_BF_3DMOUSE = True
WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/opt/lib/libspnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
# Color management
WITH_BF_OCIO = True
WITH_BF_STATICOCIO = True
BF_OCIO = '/opt/lib/ocio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
WITH_BF_STATICBOOST = True
BF_BOOST = '/opt/lib/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
${BF_BOOST_LIBPATH}/libboost_thread.a'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
# JACK
WITH_BF_JACK = True
WITH_BF_JACK_DYNLOAD = True
# Motion Tracking
WITH_BF_LIBMV = False
# Ocean Simulation
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
WITH_BF_OCEANSIM = True
# Compilation and optimization
BF_DEBUG = False
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
PLATFORM_LINKFLAGS = ['-lrt']

View File

@@ -4,10 +4,10 @@
# <pep8 compliant>
# List of the branches being built automatically overnight
NIGHT_SCHEDULE_BRANCHES=[None, "gooseberry"]
NIGHT_SCHEDULE_BRANCHES = [None]
# List of the branches available for force build
FORCE_SCHEDULE_BRANCHES=["master", "gooseberry", "experimental-build"]
FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
"""
Stock Twisted directory lister doesn't provide any information about last file
@@ -17,6 +17,7 @@ modification time, we hack the class a bit in order to have such functionaliity
from buildbot.status.web.base import DirectoryLister
def get_files_and_directories(self, directory):
from twisted.web.static import (getTypeAndEncoding,
formatFileSize)
@@ -86,17 +87,17 @@ c['change_source'] = GitPoller(
# CODEBASES
#
# Allow to controll separately things like branches for each repo and submodules.
# Allow to control separately things like branches for each repo and submodules.
all_repositories = {
r'git://git.blender.org/blender.git': 'blender',
r'git://git.blender.org/blender-translations.git': 'blender-translations',
r'git://git.blender.org/blender-addons.git': 'blender-addons',
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
r'git://git.blender.org/scons.git': 'scons',
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
}
def codebaseGenerator(chdict):
return all_repositories[chdict['repository']]
@@ -112,6 +113,7 @@ from buildbot.schedulers import timed, forcesched
c['schedulers'] = []
def schedule_force_build(name):
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
builderNames=[name],
@@ -126,7 +128,6 @@ def schedule_force_build(name):
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons"),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
forcesched.CodebaseParameter(hide=True, codebase="scons"),
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
properties=[]))
@@ -142,8 +143,7 @@ def schedule_build(name, hour, minute=0):
"blender-translations": {"repository": "", "branch": "master"},
"blender-addons": {"repository": "", "branch": "master"},
"blender-addons-contrib": {"repository": "", "branch": "master"},
"scons": {"repository": "", "branch": "master"},
"lib svn": {"repository": "", "branch": "master"}},
"lib svn": {"repository": "", "branch": "trunk"}},
branch=current_branch,
builderNames=[name],
hour=hour,
@@ -264,8 +264,7 @@ def generic_builder(id, libdir='', branch='', rsync=False):
for submodule in ('blender-translations',
'blender-addons',
'blender-addons-contrib',
'scons'):
'blender-addons-contrib'):
f.addStep(git_submodule_step(submodule))
f.addStep(git_step(branch))
@@ -279,11 +278,6 @@ def generic_builder(id, libdir='', branch='', rsync=False):
descriptionDone='packaged'))
if rsync:
f.addStep(rsync_step(id, branch, rsync_script))
elif id.find('cmake') != -1:
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
masterdest=filename,
maxsize=150 * 1024 * 1024))
else:
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
@@ -296,24 +290,16 @@ def generic_builder(id, libdir='', branch='', rsync=False):
descriptionDone='unpacked'))
return f
# builders
# Builders
add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=5)
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin-9.x.universal', generic_builder, hour=5)
add_builder(c, 'linux_glibc211_i686_cmake', '', generic_builder, hour=1)
add_builder(c, 'linux_glibc211_x86_64_cmake', '', generic_builder, hour=2)
add_builder(c, 'linux_glibc219_i686_cmake', '', generic_builder, hour=3)
add_builder(c, 'linux_glibc219_x86_64_cmake', '', generic_builder, hour=4)
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder, hour=2)
# Multiview branch
add_builder(c, 'multiview_win64_scons', 'win64', generic_builder, 'multiview', hour=4)
add_builder(c, 'multiview_win32_scons', 'windows', generic_builder, 'multiview', hour=5)
add_builder(c, 'win64_cmake_vc2015', 'win64_vc14', generic_builder, hour=5)
# STATUS TARGETS
#

View File

@@ -37,6 +37,7 @@ def strip_extension(filename):
return filename
# extract platform from package name
def get_platform(filename):
# name is blender-version-platform.extension. we want to get the
@@ -64,10 +65,11 @@ def get_platform(filename):
return '-'.join(platform_tokens)
def get_branch(filename):
tokens = filename.split("-")
branch = ""
for token in tokens:
if token == "blender":
return branch
@@ -93,7 +95,7 @@ if not os.path.exists(filename):
try:
z = zipfile.ZipFile(filename, "r")
except Exception, ex:
except Exception as ex:
sys.stderr.write('Failed to open zip file: %s\n' % str(ex))
sys.exit(1)
@@ -122,14 +124,16 @@ else:
directory = 'public_html/download'
try:
filename = os.path.join(directory, packagename)
zf = z.open(package)
f = file(os.path.join(directory, packagename), "wb")
f = file(filename, "wb")
shutil.copyfileobj(zf, f)
os.chmod(filename, 0644)
zf.close()
z.close()
except Exception, ex:
except Exception as ex:
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
sys.exit(1)
@@ -139,6 +143,6 @@ try:
if get_platform(f) == platform and get_branch(f) == branch:
if f != packagename:
os.remove(os.path.join(directory, f))
except Exception, ex:
except Exception as ex:
sys.stderr.write('Failed to remove old packages: %s\n' % str(ex))
sys.exit(1)

View File

@@ -31,160 +31,165 @@ if len(sys.argv) < 2:
builder = sys.argv[1]
# we run from build/ directory
blender_dir = '../blender.git'
blender_dir = os.path.join('..', 'blender.git')
def parse_header_file(filename, define):
import re
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
with open(filename, "r") as file:
for l in file:
match = regex.match(l)
if match:
return match.group(1)
return None
if 'cmake' in builder:
# cmake
# set build options
cmake_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
# Some fine-tuning configuration
blender_dir = os.path.join('..', blender_dir)
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
targets = ['blender']
if builder.endswith('mac_x86_64_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
elif builder.endswith('mac_i386_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=i386')
elif builder.endswith('mac_ppc_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
chroot_name = None # If not None command will be delegated to that chroot
cuda_chroot_name = None # If not None cuda compilationcommand will be delegated to that chroot
build_cubins = True # Whether to build Cycles CUDA kernels
bits = 64
if 'win64' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013 Win64"'])
elif 'win32' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013"'])
# Config file to be used (relative to blender's sources root)
cmake_config_file = "build_files/cmake/config/blender_full.cmake"
cmake_player_config_file = None
cmake_cuda_config_file = None
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
# configure and make
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
if retcode != 0:
sys.exit(retcode)
if 'win' in builder:
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
# Set build options.
cmake_options = []
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
cuda_cmake_options = []
if builder.startswith('mac'):
# Set up OSX architecture
if builder.endswith('x86_64_10_6_cmake'):
cmake_extra_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/bin/nvcc')
elif builder.startswith('win'):
if builder.startswith('win64'):
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
elif builder.startswith('win32'):
bits = 32
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
elif builder.startswith('linux'):
tokens = builder.split("_")
glibc = tokens[1]
if glibc == 'glibc219':
deb_name = "jessie"
elif glibc == 'glibc211':
deb_name = "squeeze"
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
targets = ['player', 'blender']
elif builder.endswith('i686_cmake'):
bits = 32
chroot_name = 'buildbot_' + deb_name + '_i686'
cuda_chroot_name = 'buildbot_' + deb_name + '_x86_64'
targets = ['player', 'blender', 'cuda']
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
# Prepare CMake options needed to configure cuda binaries compilation.
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%s" % ('ON' if build_cubins else 'OFF'))
if build_cubins or 'cuda' in targets:
if bits == 32:
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=OFF")
else:
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON")
# Only modify common cmake options if cuda doesn't require separate target.
if 'cuda' not in targets:
cmake_options += cuda_cmake_options
cmake_options.append("-DCMAKE_INSTALL_PREFIX=%s" % (install_dir))
cmake_options += cmake_extra_options
# Prepare chroot command prefix if needed
if chroot_name:
chroot_prefix = ['schroot', '-c', chroot_name, '--']
else:
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
sys.exit(retcode)
else:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
chroot_prefix = []
if cuda_chroot_name:
cuda_chroot_prefix = ['schroot', '-c', cuda_chroot_name, '--']
else:
cuda_chroot_prefix = chroot_prefix[:]
# scons
os.chdir(blender_dir)
scons_cmd = [python_bin, 'scons/scons.py']
scons_options = ['BF_FANCY=False']
# We're using the same rules as release builder, so tweak
# build and install dirs
build_dir = os.path.join('..', 'build', builder)
install_dir = os.path.join('..', 'install', builder)
# Clean install directory so we'll be sure there's no
# residual libs and files remained from the previous install.
# Make sure no garbage remained from the previous run
if os.path.isdir(install_dir):
shutil.rmtree(install_dir)
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(buildbot_dir, 'config')
for target in targets:
print("Building target %s" % (target))
# Construct build directory name based on the target
target_build_dir = build_dir
target_chroot_prefix = chroot_prefix[:]
if target != 'blender':
target_build_dir += '_' + target
target_name = 'install'
# Make sure build directory exists and enter it
if not os.path.isdir(target_build_dir):
os.mkdir(target_build_dir)
os.chdir(target_build_dir)
# Tweaking CMake options to respect the target
target_cmake_options = cmake_options[:]
if target == 'player':
target_cmake_options.append("-C" + os.path.join(blender_dir, cmake_player_config_file))
elif target == 'cuda':
target_cmake_options += cuda_cmake_options
target_chroot_prefix = cuda_chroot_prefix[:]
target_name = 'cycles_kernel_cuda'
# If cuda binaries are compiled as a separate target, make sure
# other targets don't compile cuda binaries.
if 'cuda' in targets and target != 'cuda':
target_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
# Configure the build
print("CMake options:")
print(target_cmake_options)
if os.path.exists('CMakeCache.txt'):
print("Removing CMake cache")
os.remove('CMakeCache.txt')
retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
if retcode != 0:
print('Condifuration FAILED!')
sys.exit(retcode)
if builder.find('linux') != -1:
configs = []
if builder.endswith('linux_glibc211_x86_64_scons'):
configs = ['user-config-player-glibc211-x86_64.py',
'user-config-cuda-glibc211-x86_64.py',
'user-config-glibc211-x86_64.py'
]
chroot_name = 'buildbot_squeeze_x86_64'
cuda_chroot = 'buildbot_squeeze_x86_64'
elif builder.endswith('linux_glibc211_i386_scons'):
configs = ['user-config-player-glibc211-i686.py',
'user-config-cuda-glibc211-i686.py',
'user-config-glibc211-i686.py']
chroot_name = 'buildbot_squeeze_i686'
if 'win32' in builder:
command = ['msbuild', 'INSTALL.vcxproj', '/Property:PlatformToolset=v120_xp', '/p:Configuration=Release']
elif 'win64' in builder:
command = ['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release']
else:
command = target_chroot_prefix + ['make', '-s', '-j2', target_name]
# use 64bit cuda toolkit, so there'll be no memory limit issues
cuda_chroot = 'buildbot_squeeze_x86_64'
print("Executing command:")
print(command)
retcode = subprocess.call(command)
# Compilation will happen inside of chroot environment
prog_scons_cmd = ['schroot', '-c', chroot_name, '--'] + scons_cmd
cuda_scons_cmd = ['schroot', '-c', cuda_chroot, '--'] + scons_cmd
if retcode != 0:
sys.exit(retcode)
common_options = ['BF_INSTALLDIR=' + install_dir] + scons_options
if builder.startswith('linux') and target == 'cuda':
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
kernels = os.path.join(target_build_dir, 'intern', 'cycles', 'kernel')
install_kernels = os.path.join(install_dir, blender_version, 'scripts', 'addons', 'cycles', 'lib')
os.mkdir(install_kernels)
print("Copying cuda binaries from %s to %s" % (kernels, install_kernels))
os.system('cp %s/*.cubin %s' % (kernels, install_kernels))
for config in configs:
config_fpath = os.path.join(config_dir, config)
scons_options = []
if config.find('player') != -1:
scons_options.append('BF_BUILDDIR=%s_player' % (build_dir))
else:
scons_options.append('BF_BUILDDIR=%s' % (build_dir))
scons_options += common_options
if config.find('player') != -1:
scons_options.append('blenderplayer')
cur_scons_cmd = prog_scons_cmd
elif config.find('cuda') != -1:
scons_options.append('cudakernels')
cur_scons_cmd = cuda_scons_cmd
if config.find('i686') != -1:
scons_options.append('BF_BITNESS=32')
elif config.find('x86_64') != -1:
scons_options.append('BF_BITNESS=64')
else:
scons_options.append('blender')
cur_scons_cmd = prog_scons_cmd
scons_options.append('BF_CONFIG=' + config_fpath)
retcode = subprocess.call(cur_scons_cmd + scons_options)
if retcode != 0:
print('Error building rules wuth config ' + config)
sys.exit(retcode)
sys.exit(0)
else:
if builder.find('win') != -1:
bitness = '32'
if builder.find('win64') != -1:
bitness = '64'
scons_options.append('BF_INSTALLDIR=' + install_dir)
scons_options.append('BF_BUILDDIR=' + build_dir)
scons_options.append('BF_BITNESS=' + bitness)
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
if builder.endswith('vc2013'):
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
scons_options.append('BF_NUMJOBS=1')
elif builder.find('mac') != -1:
if builder.find('x86_64') != -1:
config = 'user-config-mac-x86_64.py'
else:
config = 'user-config-mac-i386.py'
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
if builder.find('win') != -1:
if not os.path.exists(install_dir):
os.makedirs(install_dir)
if builder.endswith('vc2013'):
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
if builder.find('win64') == -1:
dlls_path = '..\\..\\..\\redist\\x86'
else:
dlls_path = '..\\..\\..\\redist\\amd64'
for dll in dlls:
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
print("Unknown building system")
sys.exit(1)

View File

@@ -36,150 +36,204 @@ builder = sys.argv[1]
# Never write branch if it is master.
branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
# scons does own packaging
if builder.find('scons') != -1:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
blender_dir = os.path.join('..', 'blender.git')
build_dir = os.path.join('..', 'build', builder)
install_dir = os.path.join('..', 'install', builder)
buildbot_upload_zip = os.path.abspath(os.path.join(os.path.dirname(install_dir), "buildbot_upload.zip"))
os.chdir('../blender.git')
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
upload_filename = None # Name of the archive to be uploaded
# (this is the name of archive which will appear on the
# download page)
upload_filepath = None # Filepath to be uploaded to the server
# (this folder will be packed)
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(buildbot_dir, 'config')
build_dir = os.path.join('..', 'build', builder)
install_dir = os.path.join('..', 'install', builder)
if builder.find('linux') != -1:
scons_options += ['WITH_BF_NOBLENDER=True', 'WITH_BF_PLAYER=False',
'BF_BUILDDIR=' + build_dir,
'BF_INSTALLDIR=' + install_dir,
'WITHOUT_BF_INSTALL=True']
def parse_header_file(filename, define):
import re
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
with open(filename, "r") as file:
for l in file:
match = regex.match(l)
if match:
return match.group(1)
return None
config = None
bits = None
if builder.endswith('linux_glibc211_x86_64_scons'):
config = 'user-config-glibc211-x86_64.py'
chroot_name = 'buildbot_squeeze_x86_64'
bits = 64
elif builder.endswith('linux_glibc211_i386_scons'):
config = 'user-config-glibc211-i686.py'
chroot_name = 'buildbot_squeeze_i686'
bits = 32
# Make sure install directory always exists
if not os.path.exists(install_dir):
os.makedirs(install_dir)
if config is not None:
config_fpath = os.path.join(config_dir, config)
scons_options.append('BF_CONFIG=' + config_fpath)
blender = os.path.join(install_dir, 'blender')
blenderplayer = os.path.join(install_dir, 'blenderplayer')
subprocess.call(['schroot', '-c', chroot_name, '--', 'strip', '--strip-all', blender, blenderplayer])
def create_tar_bz2(src, dest, package_name):
# One extra to remove leading os.sep when cleaning root for package_root
ln = len(src) + 1
flist = list()
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
mesalibs = os.path.join(extra, 'mesalibs' + str(bits) + '.tar.bz2')
software_gl = os.path.join(extra, 'blender-softwaregl')
# Create list of tuples containing file and archive name
for root, dirs, files in os.walk(src):
package_root = os.path.join(package_name, root[ln:])
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
os.system('tar -xpf %s -C %s' % (mesalibs, install_dir))
os.system('cp %s %s' % (software_gl, install_dir))
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
import tarfile
package = tarfile.open(dest, 'w:bz2')
for entry in flist:
package.add(entry[0], entry[1], recursive=False)
package.close()
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
if builder.find('win') != -1:
bitness = '32'
if builder.find('cmake') != -1:
# CMake
if 'win' in builder or 'mac' in builder:
os.chdir(build_dir)
if builder.find('win64') != -1:
bitness = '64'
scons_options.append('BF_INSTALLDIR=' + install_dir)
scons_options.append('BF_BUILDDIR=' + build_dir)
scons_options.append('BF_BITNESS=' + bitness)
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
if builder.endswith('vc2013'):
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')
elif builder.find('mac') != -1:
if builder.find('x86_64') != -1:
config = 'user-config-mac-x86_64.py'
else:
config = 'user-config-mac-i386.py'
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
#cmake
if 'win' in builder:
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
for f in files:
os.remove(f)
retcode = subprocess.call(['cpack', '-G','ZIP'])
retcode = subprocess.call(['cpack', '-G', 'ZIP'])
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
os.rename(result_file, "{}.zip".format(builder))
# TODO(sergey): Such magic usually happens in SCon's packaging but we don't have it
# in the CMake yet. For until then we do some magic here.
tokens = result_file.split('-')
blender_version = tokens[1].split('.')
blender_full_version = '.'.join(blender_version[0:2])
git_hash = tokens[2].split('.')[1]
platform = builder.split('_')[0]
if platform == 'mac':
# Special exception for OSX
platform = 'OSX-10.6-'
if builder.endswith('x86_64_10_6_cmake'):
platform += 'x86_64'
elif builder.endswith('i386_10_6_cmake'):
platform += 'i386'
elif builder.endswith('ppc_10_6_cmake'):
platform += 'ppc'
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
if branch != '':
builderified_name = branch + "-" + builderified_name
os.rename(result_file, "{}.zip".format(builderified_name))
# create zip file
try:
upload_zip = "buildbot_upload.zip"
if os.path.exists(upload_zip):
os.remove(upload_zip)
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write("{}.zip".format(builder))
if os.path.exists(buildbot_upload_zip):
os.remove(buildbot_upload_zip)
z = zipfile.ZipFile(buildbot_upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write("{}.zip".format(builderified_name))
z.close()
sys.exit(retcode)
except Exception, ex:
except Exception as ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)
elif builder.startswith('linux_'):
blender = os.path.join(install_dir, 'blender')
blenderplayer = os.path.join(install_dir, 'blenderplayer')
# clean release directory if it already exists
release_dir = 'release'
buildinfo_h = os.path.join(build_dir, "source", "creator", "buildinfo.h")
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
# Get version information
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
blender_hash = parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
blender_glibc = builder.split('_')[1]
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_squeeze_x86_64'
bits = 64
blender_arch = 'x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_squeeze_i686'
bits = 32
blender_arch = 'i686'
# Strip all unused symbols from the binaries
print("Stripping binaries...")
chroot_prefix = ['schroot', '-c', chroot_name, '--']
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender, blenderplayer])
print("Stripping python...")
py_target = os.path.join(install_dir, blender_version)
subprocess.call(chroot_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
# Copy all specific files which are too specific to be copied by
# the CMake rules themselves
print("Copying extra scripts and libs...")
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
mesalibs = os.path.join(extra, 'mesalibs' + str(bits) + '.tar.bz2')
software_gl = os.path.join(blender_dir, 'release', 'bin', 'blender-softwaregl')
icons = os.path.join(blender_dir, 'release', 'freedesktop', 'icons')
os.system('tar -xpf %s -C %s' % (mesalibs, install_dir))
os.system('cp %s %s' % (software_gl, install_dir))
os.system('cp -r %s %s' % (icons, install_dir))
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
# Construct archive name
package_name = 'blender-%s-%s-linux-%s-%s' % (blender_version,
blender_hash,
blender_glibc,
blender_arch)
if branch != '':
package_name = branch + "-" + package_name
upload_filename = package_name + ".tar.bz2"
print("Creating .tar.bz2 archive")
upload_filepath = install_dir + '.tar.bz2'
create_tar_bz2(install_dir, upload_filepath, package_name)
else:
print("Unknown building system")
sys.exit(1)
if upload_filepath is None:
# clean release directory if it already exists
release_dir = 'release'
if os.path.exists(release_dir):
for f in os.listdir(release_dir):
if os.path.isfile(os.path.join(release_dir, f)):
os.remove(os.path.join(release_dir, f))
# create release package
try:
subprocess.call(['make', 'package_archive'])
except Exception as ex:
sys.stderr.write('Make package release failed' + str(ex) + '\n')
sys.exit(1)
# find release directory, must exist this time
if not os.path.exists(release_dir):
sys.stderr.write("Failed to find release directory %r.\n" % release_dir)
sys.exit(1)
# find release package
file = None
filepath = None
if os.path.exists(release_dir):
for f in os.listdir(release_dir):
if os.path.isfile(os.path.join(release_dir, f)):
os.remove(os.path.join(release_dir, f))
rf = os.path.join(release_dir, f)
if os.path.isfile(rf) and f.startswith('blender'):
file = f
filepath = rf
# create release package
try:
subprocess.call(['make', 'package_archive'])
except Exception, ex:
sys.stderr.write('Make package release failed' + str(ex) + '\n')
sys.exit(1)
if not file:
sys.stderr.write("Failed to find release package.\n")
sys.exit(1)
# find release directory, must exist this time
if not os.path.exists(release_dir):
sys.stderr.write("Failed to find release directory %r.\n" % release_dir)
sys.exit(1)
# find release package
file = None
filepath = None
for f in os.listdir(release_dir):
rf = os.path.join(release_dir, f)
if os.path.isfile(rf) and f.startswith('blender'):
file = f
filepath = rf
if not file:
sys.stderr.write("Failed to find release package.\n")
sys.exit(1)
upload_filename = file
upload_filepath = filepath
# create zip file
try:
upload_zip = "buildbot_upload.zip"
upload_zip = os.path.join(buildbot_upload_zip)
if os.path.exists(upload_zip):
os.remove(upload_zip)
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write(filepath, arcname=file)
z.write(upload_filepath, arcname=upload_filename)
z.close()
except Exception, ex:
except Exception as ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)

View File

@@ -19,6 +19,7 @@
# <pep8 compliant>
import subprocess
import os
import sys
# get builder name
@@ -33,8 +34,26 @@ blender_dir = '../blender.git'
if "cmake" in builder:
# cmake
retcode = subprocess.call(['ctest', '.' '--output-on-failure'])
print("Automated tests are still DISABLED!")
sys.exit(0)
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
chroot_name = None
chroot_prefix = []
"""
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_squeeze_x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_squeeze_i686'
if chroot_name:
chroot_prefix = ['schroot', '-c', chroot_name, '--']
"""
os.chdir(build_dir)
retcode = subprocess.call(chroot_prefix + ['ctest', '--output-on-failure'])
sys.exit(retcode)
else:
# scons
pass
print("Unknown building system")
sys.exit(1)

View File

@@ -0,0 +1,113 @@
# - Try to find audaspace
# Once done, this will define
#
# AUDASPACE_FOUND - system has audaspace
# AUDASPACE_INCLUDE_DIRS - the audaspace include directories
# AUDASPACE_LIBRARIES - link these to use audaspace
# AUDASPACE_C_FOUND - system has audaspace's C binding
# AUDASPACE_C_INCLUDE_DIRS - the audaspace's C binding include directories
# AUDASPACE_C_LIBRARIES - link these to use audaspace's C binding
# AUDASPACE_PY_FOUND - system has audaspace's python binding
# AUDASPACE_PY_INCLUDE_DIRS - the audaspace's python binding include directories
# AUDASPACE_PY_LIBRARIES - link these to use audaspace's python binding
IF(NOT AUDASPACE_ROOT_DIR AND NOT $ENV{AUDASPACE_ROOT_DIR} STREQUAL "")
SET(AUDASPACE_ROOT_DIR $ENV{AUDASPACE_ROOT_DIR})
ENDIF()
SET(_audaspace_SEARCH_DIRS
${AUDASPACE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
# Use pkg-config to get hints about paths
FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(AUDASPACE_PKGCONF audaspace)
ENDIF(PKG_CONFIG_FOUND)
# Include dir
FIND_PATH(AUDASPACE_INCLUDE_DIR
NAMES ISound.h
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES include/audaspace
)
# Library
FIND_LIBRARY(AUDASPACE_LIBRARY
NAMES audaspace
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
PATH_SUFFIXES lib lib64
)
# Include dir
FIND_PATH(AUDASPACE_C_INCLUDE_DIR
NAMES AUD_Sound.h
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES include/audaspace
)
# Library
FIND_LIBRARY(AUDASPACE_C_LIBRARY
NAMES audaspace-c
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
PATH_SUFFIXES lib lib64
)
# Include dir
FIND_PATH(AUDASPACE_PY_INCLUDE_DIR
NAMES python/PyAPI.h
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES include/audaspace
)
# Library
FIND_LIBRARY(AUDASPACE_PY_LIBRARY
NAMES audaspace-py
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
PATH_SUFFIXES lib lib64
)
FIND_PACKAGE(PackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace DEFAULT_MSG AUDASPACE_LIBRARY AUDASPACE_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_C DEFAULT_MSG AUDASPACE_C_LIBRARY AUDASPACE_C_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_Py DEFAULT_MSG AUDASPACE_PY_LIBRARY AUDASPACE_PY_INCLUDE_DIR)
IF(AUDASPACE_FOUND)
SET(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
SET(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
ENDIF(AUDASPACE_FOUND)
IF(AUDASPACE_C_FOUND)
SET(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY})
SET(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR})
ENDIF(AUDASPACE_C_FOUND)
IF(AUDASPACE_PY_FOUND)
SET(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY})
SET(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR})
ENDIF(AUDASPACE_PY_FOUND)
MARK_AS_ADVANCED(
AUDASPACE_LIBRARY
AUDASPACE_LIBRARIES
AUDASPACE_INCLUDE_DIR
AUDASPACE_INCLUDE_DIRS
AUDASPACE_C_LIBRARY
AUDASPACE_C_LIBRARIES
AUDASPACE_C_INCLUDE_DIR
AUDASPACE_C_INCLUDE_DIRS
AUDASPACE_PY_LIBRARY
AUDASPACE_PY_LIBRARIES
AUDASPACE_PY_INCLUDE_DIR
AUDASPACE_PY_INCLUDE_DIRS
)

View File

@@ -0,0 +1,56 @@
# - Find Eigen3 library
# Find the native Eigen3 includes and library
# This module defines
# EIGEN3_INCLUDE_DIRS, where to find spnav.h, Set when
# EIGEN3_INCLUDE_DIR is found.
# EIGEN3_ROOT_DIR, The base directory to search for Eigen3.
# This can also be an environment variable.
# EIGEN3_FOUND, If false, do not try to use Eigen3.
#
#=============================================================================
# Copyright 2015 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 EIGEN3_ROOT_DIR was defined in the environment, use it.
IF(NOT EIGEN3_ROOT_DIR AND NOT $ENV{EIGEN3_ROOT_DIR} STREQUAL "")
SET(EIGEN3_ROOT_DIR $ENV{EIGEN3_ROOT_DIR})
ENDIF()
SET(_eigen3_SEARCH_DIRS
${EIGEN3_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(EIGEN3_INCLUDE_DIR
NAMES
# header has no '.h' suffix
Eigen/Eigen
HINTS
${_eigen3_SEARCH_DIRS}
PATH_SUFFIXES
include/eigen3
)
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
EIGEN3_INCLUDE_DIR)
IF(EIGEN3_FOUND)
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
ENDIF(EIGEN3_FOUND)
MARK_AS_ADVANCED(
EIGEN3_INCLUDE_DIR
)

View File

@@ -33,6 +33,7 @@ SET(_jemalloc_SEARCH_DIRS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/jemalloc
)
FIND_PATH(JEMALLOC_INCLUDE_DIR

View File

@@ -0,0 +1,96 @@
# - Find LLVM library
# Find the native LLVM includes and library
# This module defines
# LLVM_INCLUDE_DIRS, where to find LLVM.h, Set when LLVM_INCLUDE_DIR is found.
# LLVM_LIBRARIES, libraries to link against to use LLVM.
# LLVM_ROOT_DIR, The base directory to search for LLVM.
# This can also be an environment variable.
# LLVM_FOUND, If false, do not try to use LLVM.
#
# also defined, but not for general use are
# LLVM_LIBRARY, where to find the LLVM library.
#=============================================================================
# Copyright 2015 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(LLVM_ROOT_DIR)
if(DEFINED LLVM_VERSION)
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
else()
if(DEFINED LLVM_VERSION)
message(running llvm-config-${LLVM_VERSION})
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config)
endif()
endif()
if(NOT DEFINED LLVM_VERSION)
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
endif()
if(NOT LLVM_ROOT_DIR)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
endif()
if(NOT LLVM_LIBPATH)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
mark_as_advanced(LLVM_LIBPATH)
endif()
if(LLVM_STATIC)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
else()
find_library(LLVM_LIBRARY
NAMES
LLVM-${LLVM_VERSION}
LLVMAnalysis # check for the static library as a fall-back
PATHS ${LLVM_LIBPATH})
endif()
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
# way for LLVM_LIBRARY.
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
endif()
endif()
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG
LLVM_LIBRARY)
MARK_AS_ADVANCED(
LLVM_LIBRARY
)

View File

@@ -0,0 +1,68 @@
# - Find LZO library
# Find the native LZO includes and library
# This module defines
# LZO_INCLUDE_DIRS, where to find lzo1x.h, Set when
# LZO_INCLUDE_DIR is found.
# LZO_LIBRARIES, libraries to link against to use LZO.
# LZO_ROOT_DIR, The base directory to search for LZO.
# This can also be an environment variable.
# LZO_FOUND, If false, do not try to use LZO.
#
# also defined, but not for general use are
# LZO_LIBRARY, where to find the LZO library.
#=============================================================================
# Copyright 2015 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 LZO_ROOT_DIR was defined in the environment, use it.
IF(NOT LZO_ROOT_DIR AND NOT $ENV{LZO_ROOT_DIR} STREQUAL "")
SET(LZO_ROOT_DIR $ENV{LZO_ROOT_DIR})
ENDIF()
SET(_lzo_SEARCH_DIRS
${LZO_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
HINTS
${_lzo_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(LZO_LIBRARY
NAMES
lzo2
HINTS
${_lzo_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
LZO_LIBRARY LZO_INCLUDE_DIR)
IF(LZO_FOUND)
SET(LZO_LIBRARIES ${LZO_LIBRARY})
SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
ENDIF(LZO_FOUND)
MARK_AS_ADVANCED(
LZO_INCLUDE_DIR
LZO_LIBRARY
)

View File

@@ -51,6 +51,7 @@ SET(_openexr_SEARCH_DIRS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/openexr
)
FIND_PATH(OPENEXR_INCLUDE_DIR

View File

@@ -71,6 +71,7 @@ ENDIF()
MARK_AS_ADVANCED(
OPENGLES_EGL_INCLUDE_DIR
OPENGLES_EGL_LIBRARY
OPENGLES_LIBRARY
OPENGLES_INCLUDE_DIR
)

View File

@@ -7,6 +7,8 @@
# OPENIMAGEIO_ROOT_DIR, The base directory to search for OpenImageIO.
# This can also be an environment variable.
# OPENIMAGEIO_FOUND, If false, do not try to use OpenImageIO.
# OPENIMAGEIO_PUGIXML_FOUND, Indicates whether OIIO has biltin PuguXML parser.
# OPENIMAGEIO_IDIFF, full path to idiff application if found.
#
# also defined, but not for general use are
# OPENIMAGEIO_LIBRARY, where to find the OpenImageIO library.
@@ -54,6 +56,15 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
lib64 lib
)
FIND_FILE(OPENIMAGEIO_IDIFF
NAMES
idiff
HINTS
${OPENIMAGEIO_ROOT_DIR}
PATH_SUFFIXES
bin
)
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
@@ -63,11 +74,17 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
IF(OPENIMAGEIO_FOUND)
SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
ENDIF(OPENIMAGEIO_FOUND)
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
ENDIF()
ELSE()
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
OPENIMAGEIO_INCLUDE_DIR
OPENIMAGEIO_LIBRARY
OPENIMAGEIO_IDIFF
)
UNSET(_openimageio_SEARCH_DIRS)

View File

@@ -0,0 +1,98 @@
# - Find OpenShadingLanguage library
# Find the native OpenShadingLanguage includes and library
# This module defines
# OSL_INCLUDE_DIRS, where to find OSL headers, Set when
# OSL_INCLUDE_DIR is found.
# OSL_LIBRARIES, libraries to link against to use OSL.
# OSL_ROOT_DIR, the base directory to search for OSL.
# This can also be an environment variable.
# OSL_COMPILER, full path to OSL script compiler.
# OSL_FOUND, if false, do not try to use OSL.
# OSL_LIBRARY_VERSION_MAJOR, OSL_LIBRARY_VERSION_MINOR, the major
# and minor versions of OSL library if found.
#
#=============================================================================
# Copyright 2014 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 OSL_ROOT_DIR was defined in the environment, use it.
IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
SET(OSL_ROOT_DIR $ENV{OSL_ROOT_DIR})
ENDIF()
SET(_osl_FIND_COMPONENTS
oslcomp
oslexec
oslquery
)
SET(_osl_SEARCH_DIRS
${OSL_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/osl
)
FIND_PATH(OSL_INCLUDE_DIR
NAMES
OSL/oslversion.h
HINTS
${_osl_SEARCH_DIRS}
PATH_SUFFIXES
include
)
SET(_osl_LIBRARIES)
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
FIND_LIBRARY(OSL_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}
HINTS
${_osl_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
FIND_PROGRAM(OSL_COMPILER oslc
HINTS ${_osl_SEARCH_DIRS}
PATH_SUFFIXES bin)
# handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSL DEFAULT_MSG _osl_LIBRARIES OSL_INCLUDE_DIR OSL_COMPILER)
IF(OSL_FOUND)
SET(OSL_LIBRARIES ${_osl_LIBRARIES})
SET(OSL_INCLUDE_DIRS ${OSL_INCLUDE_DIR})
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MAJOR
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+[0-9]+.*$")
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MINOR
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+[0-9]+.*$")
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+([.0-9]+).*"
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
ENDIF(OSL_FOUND)
MARK_AS_ADVANCED(
OSL_INCLUDE_DIR
)
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
MARK_AS_ADVANCED(OSL_${UPPERCOMPONENT}_LIBRARY)
ENDFOREACH()

View File

@@ -0,0 +1,112 @@
# - Find OpenSubdiv library
# Find the native OpenSubdiv includes and library
# This module defines
# OPENSUBDIV_INCLUDE_DIRS, where to find OpenSubdiv headers, Set when
# OPENSUBDIV_INCLUDE_DIR is found.
# OPENSUBDIV_LIBRARIES, libraries to link against to use OpenSubdiv.
# OPENSUBDIV_ROOT_DIR, the base directory to search for OpenSubdiv.
# This can also be an environment variable.
# OPENSUBDIV_FOUND, if false, do not try to use OpenSubdiv.
#
# also defined, but not for general use are
# OPENSUBDIV_LIBRARY, where to find the OpenSubdiv library.
#=============================================================================
# Copyright 2013 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 OPENSUBDIV_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENSUBDIV_ROOT_DIR AND NOT $ENV{OPENSUBDIV_ROOT_DIR} STREQUAL "")
SET(OPENSUBDIV_ROOT_DIR $ENV{OPENSUBDIV_ROOT_DIR})
ENDIF()
SET(_opensubdiv_FIND_COMPONENTS
osdGPU
osdCPU
)
SET(_opensubdiv_SEARCH_DIRS
${OPENSUBDIV_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/opensubdiv
/opt/lib/osd # install_deps.sh
)
FIND_PATH(OPENSUBDIV_INCLUDE_DIR
NAMES
opensubdiv/osd/mesh.h
HINTS
${_opensubdiv_SEARCH_DIRS}
PATH_SUFFIXES
include
)
SET(_opensubdiv_LIBRARIES)
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
FIND_LIBRARY(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}
HINTS
${_opensubdiv_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
LIST(APPEND _opensubdiv_LIBRARIES "${OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
MACRO(OPENSUBDIV_CHECK_CONTROLLER
controller_include_file
variable_name)
IF(EXISTS "${OPENSUBDIV_INCLUDE_DIR}/opensubdiv/osd/${controller_include_file}")
SET(${variable_name} TRUE)
ELSE()
SET(${variable_name} FALSE)
ENDIF()
ENDMACRO()
# handle the QUIETLY and REQUIRED arguments and set OPENSUBDIV_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSubdiv DEFAULT_MSG
_opensubdiv_LIBRARIES OPENSUBDIV_INCLUDE_DIR)
IF(OPENSUBDIV_FOUND)
SET(OPENSUBDIV_LIBRARIES ${_opensubdiv_LIBRARIES})
SET(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
# Find available compute controllers.
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
SET(OPENSUBDIV_HAS_OPENMP TRUE)
ELSE()
SET(OPENSUBDIV_HAS_OPENMP FALSE)
ENDIF()
OPENSUBDIV_CHECK_CONTROLLER("tbbEvaluator.h" OPENSUBDIV_HAS_TBB)
OPENSUBDIV_CHECK_CONTROLLER("clEvaluator.h" OPENSUBDIV_HAS_OPENCL)
OPENSUBDIV_CHECK_CONTROLLER("cudaEvaluator.h" OPENSUBDIV_HAS_CUDA)
OPENSUBDIV_CHECK_CONTROLLER("glXFBEvaluator.h" OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
OPENSUBDIV_CHECK_CONTROLLER("glComputeEvaluator.h" OPENSUBDIV_HAS_GLSL_COMPUTE)
ENDIF(OPENSUBDIV_FOUND)
MARK_AS_ADVANCED(
OPENSUBDIV_INCLUDE_DIR
)
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
MARK_AS_ADVANCED(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY)
ENDFOREACH()

View File

@@ -0,0 +1,74 @@
# - Find OPENVDB library
# Find the native OPENVDB includes and library
# This module defines
# OPENVDB_INCLUDE_DIRS, where to find openvdb.h, Set when
# OPENVDB_INCLUDE_DIR is found.
# OPENVDB_LIBRARIES, libraries to link against to use OPENVDB.
# OPENVDB_ROOT_DIR, The base directory to search for OPENVDB.
# This can also be an environment variable.
# OPENVDB_FOUND, If false, do not try to use OPENVDB.
#
# also defined, but not for general use are
# OPENVDB_LIBRARY, where to find the OPENVDB library.
#=============================================================================
# Copyright 2015 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 OPENVDB_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENVDB_ROOT_DIR AND NOT $ENV{OPENVDB_ROOT_DIR} STREQUAL "")
SET(OPENVDB_ROOT_DIR $ENV{OPENVDB_ROOT_DIR})
ENDIF()
SET(_openvdb_SEARCH_DIRS
${OPENVDB_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/openvdb
/opt/lib/openvdb
)
FIND_PATH(OPENVDB_INCLUDE_DIR
NAMES
openvdb/openvdb.h
HINTS
${_openvdb_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(OPENVDB_LIBRARY
NAMES
openvdb
HINTS
${_openvdb_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set OPENVDB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENVDB DEFAULT_MSG
OPENVDB_LIBRARY OPENVDB_INCLUDE_DIR)
IF(OPENVDB_FOUND)
SET(OPENVDB_LIBRARIES ${OPENVDB_LIBRARY})
SET(OPENVDB_INCLUDE_DIRS ${OPENVDB_INCLUDE_DIR})
ENDIF(OPENVDB_FOUND)
MARK_AS_ADVANCED(
OPENVDB_INCLUDE_DIR
OPENVDB_LIBRARY
)
UNSET(_openvdb_SEARCH_DIRS)

View File

@@ -40,7 +40,6 @@ FIND_PATH(PCRE_INCLUDE_DIR pcre.h
${_pcre_SEARCH_DIRS}
PATH_SUFFIXES
include
include
)
FIND_LIBRARY(PCRE_LIBRARY

View File

@@ -0,0 +1,73 @@
# - Find PugiXML library
# Find the native PugiXML includes and library
# This module defines
# PUGIXML_INCLUDE_DIRS, where to find pugixml.hpp, Set when
# PugiXML is found.
# PUGIXML_LIBRARIES, libraries to link against to use PugiiXML.
# PUGIXML_ROOT_DIR, The base directory to search for PugiXML.
# This can also be an environment variable.
# PUGIXML_FOUND, If false, do not try to use PugiXML.
#
# also defined, but not for general use are
# PUGIXML_LIBRARY, where to find the PugiXML library.
#=============================================================================
# Copyright 2014 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 PUGIXML_ROOT_DIR was defined in the environment, use it.
IF(NOT PUGIXML_ROOT_DIR AND NOT $ENV{PUGIXML_ROOT_DIR} STREQUAL "")
SET(PUGIXML_ROOT_DIR $ENV{PUGIXML_ROOT_DIR})
ENDIF()
SET(_pugixml_SEARCH_DIRS
${PUGIXML_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/oiio
)
FIND_PATH(PUGIXML_INCLUDE_DIR
NAMES
pugixml.hpp
HINTS
${_pugixml_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(PUGIXML_LIBRARY
NAMES
pugixml
HINTS
${_pugixml_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
IF(PUGIXML_FOUND)
SET(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
SET(PUGIXML_INCLUDE_DIRS ${PUGIXML_INCLUDE_DIR})
ELSE()
SET(PUGIXML_PUGIXML_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
PUGIXML_INCLUDE_DIR
PUGIXML_LIBRARY
)

View File

@@ -14,6 +14,7 @@
# PYTHON_INCLUDE_CONFIG_DIRS
# PYTHON_LIBRARIES
# PYTHON_LIBPATH, Used for installation
# PYTHON_SITE_PACKAGES, Used for installation (as a Python module)
# PYTHON_LINKFLAGS
# PYTHON_ROOT_DIR, The base directory to search for Python.
# This can also be an environment variable.
@@ -37,7 +38,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
ENDIF()
SET(PYTHON_VERSION 3.4 CACHE STRING "Python Version (major and minor only)")
SET(PYTHON_VERSION 3.5 CACHE STRING "Python Version (major and minor only)")
MARK_AS_ADVANCED(PYTHON_VERSION)
@@ -65,6 +66,14 @@ IF(DEFINED PYTHON_LIBPATH)
SET(_IS_LIB_PATH_DEF ON)
ENDIF()
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
SET(_python_SEARCH_DIRS
${PYTHON_ROOT_DIR}
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/lib/python-${PYTHON_VERSION}"
)
# only search for the dirs if we havn't already
IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_LIB_PATH_DEF))
@@ -74,14 +83,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
"dm;dmu;du;d" # debug
)
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
SET(_python_SEARCH_DIRS
${PYTHON_ROOT_DIR}
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/lib/python-${PYTHON_VERSION}"
)
FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
#IF(CMAKE_BUILD_TYPE STREQUAL Debug)
@@ -146,6 +148,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
ENDIF()
IF(PYTHON_LIBRARY AND PYTHON_LIBPATH AND PYTHON_INCLUDE_DIR AND PYTHON_INCLUDE_CONFIG_DIR)
SET(_PYTHON_ABI_FLAGS "${_CURRENT_ABI_FLAGS}")
break()
ELSE()
# ensure we dont find values from 2 different ABI versions
@@ -168,7 +171,6 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
UNSET(_CURRENT_PATH)
UNSET(_python_ABI_FLAGS)
UNSET(_python_SEARCH_DIRS)
ENDIF()
UNSET(_IS_INC_DEF)
@@ -187,17 +189,41 @@ IF(PYTHONLIBSUNIX_FOUND)
SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
FIND_FILE(PYTHON_SITE_PACKAGES
NAMES
# debian specific
dist-packages
site-packages
HINTS
${PYTHON_LIBPATH}/python${PYTHON_VERSION}
)
# we need this for installation
# XXX No more valid with debian-like py3.4 packages...
# XXX No more valid with debian-like py3.5 packages...
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
# not used
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
# not required for build, just used when bundling Python.
FIND_PROGRAM(
PYTHON_EXECUTABLE
NAMES
"python${PYTHON_VERSION}${_PYTHON_ABI_FLAGS}"
"python${PYTHON_VERSION}"
"python"
HINTS
${_python_SEARCH_DIRS}
PATH_SUFFIXES bin
)
ENDIF()
UNSET(_PYTHON_VERSION_NO_DOTS)
UNSET(_PYTHON_ABI_FLAGS)
UNSET(_python_SEARCH_DIRS)
MARK_AS_ADVANCED(
PYTHON_INCLUDE_DIR
PYTHON_INCLUDE_CONFIG_DIR
PYTHON_LIBRARY
PYTHON_LIBPATH
PYTHON_SITE_PACKAGES
PYTHON_EXECUTABLE
)

View File

@@ -0,0 +1,72 @@
# - Find SDL library
# Find the native SDL includes and library
# This module defines
# SDL2_INCLUDE_DIRS, where to find SDL.h, Set when SDL2_INCLUDE_DIR is found.
# SDL2_LIBRARIES, libraries to link against to use SDL.
# SDL2_ROOT_DIR, The base directory to search for SDL.
# This can also be an environment variable.
# SDL2_FOUND, If false, do not try to use SDL.
#
# also defined, but not for general use are
# SDL2_LIBRARY, where to find the SDL library.
#=============================================================================
# Copyright 2015 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 SDL2_ROOT_DIR was defined in the environment, use it.
IF(NOT SDL2_ROOT_DIR AND NOT $ENV{SDL2_ROOT_DIR} STREQUAL "")
SET(SDL2_ROOT_DIR $ENV{SDL2_ROOT_DIR})
ENDIF()
SET(_sdl2_SEARCH_DIRS
${SDL2_ROOT_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(SDL2_INCLUDE_DIR
NAMES
SDL.h
HINTS
${_sdl2_SEARCH_DIRS}
PATH_SUFFIXES
include/SDL2 include
)
FIND_LIBRARY(SDL2_LIBRARY
NAMES
SDL2
HINTS
${_sdl2_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 DEFAULT_MSG
SDL2_LIBRARY SDL2_INCLUDE_DIR)
IF(SDL2_FOUND)
SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
ENDIF(SDL2_FOUND)
MARK_AS_ADVANCED(
SDL2_INCLUDE_DIR
SDL2_LIBRARY
)

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

@@ -12,7 +12,7 @@
#
#=============================================================================
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
if(WITH_GTESTS)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -20,8 +20,8 @@ macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
set(TEST_INC
${_current_include_directories}
${CMAKE_SOURCE_DIR}/tests/gtests
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
${CMAKE_SOURCE_DIR}/extern/glog/src
${CMAKE_SOURCE_DIR}/extern/gflags/src
${CMAKE_SOURCE_DIR}/extern/gtest/include
)
unset(_current_include_directories)
@@ -29,19 +29,33 @@ macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
add_executable(${NAME}_test ${SRC})
target_link_libraries(${NAME}_test
${EXTRA_LIBS}
${PLATFORM_LINKLIBS}
bf_testing_main
bf_intern_guardedalloc
extern_gtest
extern_glog)
# needed for glog
${PTHREADS_LIBRARIES}
extern_glog
extern_gflags)
set_target_properties(${NAME}_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
INCLUDE_DIRECTORIES "${TEST_INC}")
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
if(${DO_ADD_TEST})
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
endif()
endif()
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}")
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
endmacro()
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
endmacro()

View File

@@ -1,5 +1,10 @@
# This is called by cmake as an extermal process from
# This is called by cmake as an external process from
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
# Caller must define:
# SOURCE_DIR
# Optional overrides:
# BUILD_DATE
# BUILD_TIME
# Extract working copy information for SOURCE_DIR into MY_XXX variables
# with a default in case anything fails, for example when using git-svn
@@ -9,132 +14,138 @@ set(MY_WC_COMMIT_TIMESTAMP 0)
# Guess if this is a git working copy and then look up the revision
if(EXISTS ${SOURCE_DIR}/.git)
# The FindGit.cmake module is part of the standard distribution
include(FindGit)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
if(MY_WC_BRANCH STREQUAL "HEAD")
# Detached HEAD, check whether commit hash is reachable
# in the master branch
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_BRANCH
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(MY_WC_BRANCH STREQUAL "HEAD")
# Detached HEAD, check whether commit hash is reachable
# in the master branch
execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}")
if(_git_contains_check STREQUAL "master")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git show-ref --tags -d
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_tag_hashes
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_head_hash
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(_git_tag_hashes MATCHES "${_git_head_hash}")
set(MY_WC_BRANCH "master")
endif()
unset(_git_tag_hashes)
unset(_git_head_hashs)
endif()
unset(_git_contains_check)
else()
execute_process(COMMAND git log HEAD..@{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_below_check
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_below_check STREQUAL "")
# If there're commits between HEAD and upstream this means
# that we're reset-ed to older revision. Use it's hash then.
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}")
if(_git_contains_check STREQUAL "master")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git show-ref --tags -d
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_tag_hashes
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_head_hash
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(_git_tag_hashes MATCHES "${_git_head_hash}")
set(MY_WC_BRANCH "master")
endif()
unset(_git_tag_hashes)
unset(_git_head_hashs)
endif()
unset(_git_contains_check)
else()
execute_process(COMMAND git log HEAD..@{u}
execute_process(COMMAND git rev-parse --short @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_below_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_below_check STREQUAL "")
# If there're commits between HEAD and upstream this means
# that we're reset-ed to older revision. Use it's hash then.
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(MY_WC_HASH STREQUAL "")
# Local branch, not set to upstream.
# Well, let's use HEAD for now
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(COMMAND git rev-parse --short @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(MY_WC_HASH STREQUAL "")
# Local branch, not set to upstream.
# Well, let's use HEAD for now
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
unset(_git_below_check)
endif()
execute_process(COMMAND git log -1 --format=%ct
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git diff-index --name-only HEAD --
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_changed_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_changed_files STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else()
# Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}..
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_unpushed_log
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_unpushed_log STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
endif()
unset(_git_unpushed_log)
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
unset(_git_changed_files)
unset(_git_below_check)
endif()
execute_process(COMMAND git log -1 --format=%ct
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
# May fail in rare cases
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
set(MY_WC_COMMIT_TIMESTAMP 0)
endif()
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git diff-index --name-only HEAD --
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_changed_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_changed_files STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else()
# Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}..
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_unpushed_log
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_unpushed_log STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
endif()
unset(_git_unpushed_log)
endif()
unset(_git_changed_files)
endif()
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
# but BUILD_DATE and BUILD_TIME are platform dependent
if(UNIX)
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(WIN32)
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT BUILD_DATE)
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_TIME)
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
elseif(WIN32)
if(NOT BUILD_DATE)
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_TIME)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
# Write a file with the BUILD_HASH define

View File

@@ -28,13 +28,17 @@ if not sys.version.startswith("3"):
sys.version.partition(" ")[0])
sys.exit(1)
from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
from cmake_consistency_check_config import (
IGNORE,
UTF8_CHECK,
SOURCE_DIR,
BUILD_DIR,
)
import os
from os.path import join, dirname, normpath, splitext
print("Scanning:", SOURCE_DIR)
global_h = set()
global_c = set()
global_refs = {}
@@ -134,6 +138,7 @@ def cmake_get_src(f):
if found:
cmake_base = dirname(f)
cmake_base_bin = os.path.join(BUILD_DIR, os.path.relpath(cmake_base, SOURCE_DIR))
while it is not None:
i += 1
@@ -154,6 +159,8 @@ def cmake_get_src(f):
# replace dirs
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
l = l.strip('"')
if not l:
pass
@@ -187,17 +194,22 @@ def cmake_get_src(f):
pass
elif new_file.endswith(".osl"): # open shading language
pass
elif new_file.endswith(".glsl"):
pass
else:
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
elif context_name == "INC":
if os.path.isdir(new_file):
if new_file.startswith(BUILD_DIR):
# assume generated path
pass
elif os.path.isdir(new_file):
new_path_rel = os.path.relpath(new_file, cmake_base)
if new_path_rel != l:
print("overly relative path:\n %s:%d\n %s\n %s" % (f, i, l, new_path_rel))
## Save time. just replace the line
# # Save time. just replace the line
# replace_line(f, i - 1, new_path_rel)
else:
@@ -228,84 +240,99 @@ def cmake_get_src(f):
filen.close()
for cmake in source_list(SOURCE_DIR, is_cmake):
cmake_get_src(cmake)
def is_ignore(f):
for ig in IGNORE:
def is_ignore(f, ignore_used):
for index, ig in enumerate(IGNORE):
if ig in f:
ignore_used[index] = True
return True
return False
# First do stupid check, do these files exist?
print("\nChecking for missing references:")
is_err = False
errs = []
for f in (global_h | global_c):
if f.endswith("dna.c"):
continue
def main():
if not os.path.exists(f):
refs = global_refs[f]
if refs:
for cf, i in refs:
errs.append((cf, i))
else:
raise Exception("CMake referenecs missing, internal error, aborting!")
is_err = True
print("Scanning:", SOURCE_DIR)
errs.sort()
errs.reverse()
for cf, i in errs:
print("%s:%d" % (cf, i))
# Write a 'sed' script, useful if we get a lot of these
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
for cmake in source_list(SOURCE_DIR, is_cmake):
cmake_get_src(cmake)
# First do stupid check, do these files exist?
print("\nChecking for missing references:")
is_err = False
errs = []
for f in (global_h | global_c):
if f.startswith(BUILD_DIR):
continue
if not os.path.exists(f):
refs = global_refs[f]
if refs:
for cf, i in refs:
errs.append((cf, i))
else:
raise Exception("CMake referenecs missing, internal error, aborting!")
is_err = True
errs.sort()
errs.reverse()
for cf, i in errs:
print("%s:%d" % (cf, i))
# Write a 'sed' script, useful if we get a lot of these
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
if is_err:
raise Exception("CMake referenecs missing files, aborting!")
del is_err
del errs
ignore_used = [False] * len(IGNORE)
# now check on files not accounted for.
print("\nC/C++ Files CMake doesnt know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
if not is_ignore(cf, ignore_used):
if cf not in global_c:
print("missing_c: ", cf)
# check if automake builds a corrasponding .o file.
'''
if cf in global_c:
out1 = os.path.splitext(cf)[0] + ".o"
out2 = os.path.splitext(cf)[0] + ".Po"
out2_dir, out2_file = out2 = os.path.split(out2)
out2 = os.path.join(out2_dir, ".deps", out2_file)
if not os.path.exists(out1) and not os.path.exists(out2):
print("bad_c: ", cf)
'''
print("\nC/C++ Headers CMake doesnt know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
if not is_ignore(hf, ignore_used):
if hf not in global_h:
print("missing_h: ", hf)
if UTF8_CHECK:
# test encoding
import traceback
for files in (global_c, global_h):
for f in sorted(files):
if os.path.exists(f):
# ignore outside of our source tree
if "extern" not in f:
i = 1
try:
for l in open(f, "r", encoding="utf8"):
i += 1
except UnicodeDecodeError:
print("Non utf8: %s:%d" % (f, i))
if i > 1:
traceback.print_exc()
# Check ignores aren't stale
print("\nCheck for unused 'IGNORE' paths...")
for index, ig in enumerate(IGNORE):
if not ignore_used[index]:
print("unused ignore: %r" % ig)
if is_err:
raise Exception("CMake referenecs missing files, aborting!")
del is_err
del errs
# now check on files not accounted for.
print("\nC/C++ Files CMake doesnt know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
if not is_ignore(cf):
if cf not in global_c:
print("missing_c: ", cf)
# check if automake builds a corrasponding .o file.
'''
if cf in global_c:
out1 = os.path.splitext(cf)[0] + ".o"
out2 = os.path.splitext(cf)[0] + ".Po"
out2_dir, out2_file = out2 = os.path.split(out2)
out2 = os.path.join(out2_dir, ".deps", out2_file)
if not os.path.exists(out1) and not os.path.exists(out2):
print("bad_c: ", cf)
'''
print("\nC/C++ Headers CMake doesnt know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
if not is_ignore(hf):
if hf not in global_h:
print("missing_h: ", hf)
if UTF8_CHECK:
# test encoding
import traceback
for files in (global_c, global_h):
for f in sorted(files):
if os.path.exists(f):
# ignore outside of our source tree
if "extern" not in f:
i = 1
try:
for l in open(f, "r", encoding="utf8"):
i += 1
except:
print("Non utf8: %s:%d" % (f, i))
if i > 1:
traceback.print_exc()
if __name__ == "__main__":
main()

View File

@@ -3,16 +3,9 @@ import os
IGNORE = (
"/test/",
"/tests/gtests/",
"/BSP_GhostTest/",
"/release/",
"/xembed/",
"/TerraplayNetwork/",
"/ik_glut_test/",
# specific source files
"extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
"extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
"extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
@@ -21,31 +14,8 @@ IGNORE = (
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
"extern/eltopo/common/meshes/ObjLoader.cpp",
"extern/eltopo/common/meshes/meshloader.cpp",
"extern/eltopo/common/openglutils.cpp",
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
"source/blender/imbuf/intern/imbuf_cocoa.m",
"extern/recastnavigation/Recast/Source/RecastLog.cpp",
"extern/recastnavigation/Recast/Source/RecastTimer.cpp",
"intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
"intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
"intern/cycles/render/film_response.cpp",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_2.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_3.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_4.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_d.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_3.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_4.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_9.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_d.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_3.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_4.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_d.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_2.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_3.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_4.cc",
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_d.cc",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
@@ -55,22 +25,17 @@ IGNORE = (
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
"extern/eltopo/common/meshes/Edge.hpp",
"extern/eltopo/common/meshes/ObjLoader.hpp",
"extern/eltopo/common/meshes/TriangleIndex.hpp",
"extern/eltopo/common/meshes/meshloader.h",
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h",
"extern/recastnavigation/Recast/Include/RecastLog.h",
"extern/recastnavigation/Recast/Include/RecastTimer.h",
"extern/carve/include/carve/config.h",
"extern/carve/include/carve/random/random.h",
"extern/carve/patches/files/config.h",
"extern/carve/patches/files/random.h",
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
"intern/cycles/render/film_response.h",
"extern/carve/include/carve/config.h",
"extern/carve/include/carve/external/boost/random.hpp",
"extern/carve/patches/files/config.h",
"extern/carve/patches/files/random.hpp",
)
UTF8_CHECK = True
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
# doesn't have to exist, just use as reference
BUILD_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(SOURCE_DIR, "..", "build"))))

View File

@@ -29,18 +29,27 @@ Example linux usage
Windows not supported so far
"""
from project_info import (SIMPLE_PROJECTFILE,
SOURCE_DIR,
CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
# is_py,
cmake_advanced_info,
cmake_compiler_defines,
project_name_get,
)
import sys
# until we have arg parsing
import project_info
if not project_info.init(sys.argv[-1]):
sys.exit(1)
from project_info import (
SIMPLE_PROJECTFILE,
SOURCE_DIR,
CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
# is_py,
cmake_advanced_info,
cmake_compiler_defines,
cmake_cache_var,
project_name_get,
)
import os
@@ -48,6 +57,8 @@ from os.path import join, dirname, normpath, relpath, exists
def create_nb_project_main():
from xml.sax.saxutils import escape
files = list(source_list(SOURCE_DIR, filename_check=is_project_file))
files_rel = [relpath(f, start=PROJECT_DIR) for f in files]
files_rel.sort()
@@ -70,6 +81,9 @@ def create_nb_project_main():
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get()
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
make_exe_basename = os.path.basename(make_exe)
# --------------- NB spesific
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
defines += [cdef.replace("#define", "").strip() for cdef in cmake_compiler_defines()]
@@ -130,9 +144,9 @@ def create_nb_project_main():
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<configurationDescriptor version="94">\n')
f.write('<configurationDescriptor version="95">\n')
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
f.write(' <df name="0" root="%s">\n' % SOURCE_DIR) # base_root_rel
f.write(' <df root="%s" name="0">\n' % SOURCE_DIR) # base_root_rel
# write files!
files_rel_local = [normpath(relpath(join(CMAKE_DIR, path), SOURCE_DIR)) for path in files_rel]
@@ -184,16 +198,27 @@ def create_nb_project_main():
f.write(' <toolsSet>\n')
f.write(' <compilerSet>default</compilerSet>\n')
f.write(' <dependencyChecking>false</dependencyChecking>\n')
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
f.write(' </toolsSet>\n')
f.write(' <dependencyChecking>false</dependencyChecking>\n')
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
f.write(' <codeAssistance>\n')
f.write(' </codeAssistance>\n')
f.write(' <makefileType>\n')
f.write(' <makeTool>\n')
f.write(' <buildCommandWorkingDir>.</buildCommandWorkingDir>\n')
f.write(' <buildCommand>${MAKE} -f Makefile</buildCommand>\n')
f.write(' <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>\n')
if make_exe_basename == "ninja":
build_cmd = "ninja"
clean_cmd = "ninja -t clean"
else:
build_cmd = "${MAKE} -f Makefile"
clean_cmd = "${MAKE} -f Makefile clean"
f.write(' <buildCommand>%s</buildCommand>\n' % escape(build_cmd))
f.write(' <cleanCommand>%s</cleanCommand>\n' % escape(clean_cmd))
f.write(' <executablePath>./bin/blender</executablePath>\n')
del build_cmd, clean_cmd
def write_toolinfo():
f.write(' <incDir>\n')
@@ -202,7 +227,7 @@ def create_nb_project_main():
f.write(' </incDir>\n')
f.write(' <preprocessorList>\n')
for cdef in defines:
f.write(' <Elem>%s</Elem>\n' % cdef)
f.write(' <Elem>%s</Elem>\n' % escape(cdef))
f.write(' </preprocessorList>\n')
f.write(' <cTool>\n')
@@ -220,10 +245,11 @@ def create_nb_project_main():
f.write(' \n')
for path in files_rel_local:
is_c = path.endswith(".c")
f.write(' <item path="%s"\n' % path)
f.write(' ex="false"\n')
f.write(' tool="1"\n')
f.write(' flavor2="0">\n')
f.write(' tool="%d"\n' % (0 if is_c else 1))
f.write(' flavor2="%d">\n' % (3 if is_c else 0))
f.write(' </item>\n')
f.write(' <runprofile version="9">\n')

View File

@@ -22,29 +22,16 @@
# <pep8 compliant>
"""
r"""
Example Linux usage:
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py --build-dir ~/blender-git/cmake
Example Win32 usage:
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
example linux usage
python .~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py --build-dir c:\blender_dev\cmake_build
"""
from project_info import (SIMPLE_PROJECTFILE,
SOURCE_DIR,
# CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
is_py,
cmake_advanced_info,
cmake_compiler_defines,
project_name_get,
)
import os
import sys
def quote_define(define):
@@ -54,7 +41,20 @@ def quote_define(define):
return define
def create_qtc_project_main():
def create_qtc_project_main(name):
from project_info import (
SIMPLE_PROJECTFILE,
SOURCE_DIR,
# CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
cmake_advanced_info,
cmake_compiler_defines,
project_name_get,
)
files = list(source_list(SOURCE_DIR, filename_check=is_project_file))
files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files]
files_rel.sort()
@@ -62,19 +62,20 @@ def create_qtc_project_main():
# --- qtcreator specific, simple format
if SIMPLE_PROJECTFILE:
# --- qtcreator specific, simple format
PROJECT_NAME = "Blender"
with open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w') as f:
PROJECT_NAME = name or "Blender"
FILE_NAME = PROJECT_NAME.lower()
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w') as f:
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f:
f.write("\n".join(sorted(list(set(os.path.dirname(f)
for f in files_rel if is_c_header(f))))))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME)
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
if not os.path.exists(qtc_cfg):
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS HERE!\n")
@@ -89,11 +90,8 @@ def create_qtc_project_main():
for f in files_rel if is_c_header(f)))
includes.sort()
if 0:
PROJECT_NAME = "Blender"
else:
# be tricky, get the project name from CMake if we can!
PROJECT_NAME = project_name_get()
# be tricky, get the project name from CMake if we can!
PROJECT_NAME = name or project_name_get()
FILE_NAME = PROJECT_NAME.lower()
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
@@ -117,7 +115,7 @@ def create_qtc_project_main():
f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
if os.name != "nt":
defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
@@ -125,17 +123,23 @@ def create_qtc_project_main():
# --- end
def create_qtc_project_python():
def create_qtc_project_python(name):
from project_info import (
SOURCE_DIR,
# CMAKE_DIR,
PROJECT_DIR,
source_list,
is_py,
project_name_get,
)
files = list(source_list(SOURCE_DIR, filename_check=is_py))
files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files]
files_rel.sort()
# --- qtcreator specific, simple format
if 0:
PROJECT_NAME = "Blender_Python"
else:
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get() + "_Python"
# be tricky, get the project name from git if we can!
PROJECT_NAME = (name or project_name_get()) + "_Python"
FILE_NAME = PROJECT_NAME.lower()
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
@@ -153,9 +157,43 @@ def create_qtc_project_python():
print("Python project file written to: %r" % qtc_prj)
def argparse_create():
import argparse
parser = argparse.ArgumentParser(
description="This script generates Qt Creator project files for Blender",
)
parser.add_argument(
"-n", "--name",
dest="name",
metavar='NAME', type=str,
help="Override default project name (\"Blender\")",
required=False,
)
parser.add_argument(
"-b", "--build-dir",
dest="build_dir",
metavar='BUILD_DIR', type=str,
help="Specify the build path (or fallback to the $PWD)",
required=False,
)
return parser
def main():
create_qtc_project_main()
create_qtc_project_python()
parser = argparse_create()
args = parser.parse_args()
name = args.name
import project_info
if not project_info.init(args.build_dir):
return
create_qtc_project_main(name)
create_qtc_project_python(name)
if __name__ == "__main__":

View File

@@ -32,7 +32,6 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
"blender/intern/opennl",
]
CHECKER_BIN = "python2"

View File

@@ -32,7 +32,6 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
"blender/intern/opennl",
]
CHECKER_BIN = "cppcheck"

View File

@@ -25,7 +25,6 @@
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
"blender/intern/opennl",
]
CHECKER_BIN = "smatch"

View File

@@ -25,7 +25,6 @@
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
"blender/intern/opennl",
]
CHECKER_BIN = "sparse"

View File

@@ -25,7 +25,6 @@
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
"blender/intern/opennl",
]
CHECKER_BIN = "splint"

View File

@@ -1,5 +1,4 @@
# turn everything OFF except for python which defaults to ON
# and is needed for the UI
# Turn everything ON thats expected for an official release builds.
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
@@ -11,8 +10,10 @@ set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
@@ -25,7 +26,6 @@ set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_REDCODE ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
@@ -42,7 +42,8 @@ set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
set(WITH_OPENNL ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE)
@@ -52,11 +53,24 @@ set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependent options
if(UNIX AND NOT APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
endif()
if(APPLE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
elseif(WIN32)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
if(NOT CMAKE_COMPILER_IS_GNUCC)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
else()
# MinGW exceptions
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
endif()
elseif(APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
endif()

View File

@@ -14,8 +14,10 @@ set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
@@ -28,7 +30,6 @@ set(WITH_IMAGE_FRAMESERVER OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENEXR OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENJPEG OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_REDCODE OFF CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
@@ -46,8 +47,7 @@ set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
set(WITH_OPENNL OFF CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)

View File

@@ -31,3 +31,4 @@ set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)

File diff suppressed because it is too large Load Diff

View File

@@ -21,13 +21,14 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
set(MY_WC_HASH "unknown")
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
include(FindGit)
find_package(Git)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short @{u}
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
endif()
endif()
set(BUILD_REV ${MY_WC_HASH})
@@ -36,7 +37,8 @@ unset(MY_WC_HASH)
# Force Package Name
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# RPM packages
@@ -65,13 +67,14 @@ if(WIN32)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
set(CPACK_WIX_TEMPLATE ${LIBDIR}/package/installer_wix/WIX.template)
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
@@ -111,3 +114,9 @@ elseif(UNIX)
"tar.bz2")
endif()
unset(MAJOR_VERSION)
unset(MINOR_VERSION)
unset(PATCH_VERSION)
unset(BUILD_REV)

View File

@@ -23,11 +23,9 @@
# <pep8 compliant>
"""
Example Win32 usage:
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
Module for accessing project file data for Blender.
Example Linux usage:
python ~/blenderSVN/blender/build_files/cmake/cmake_qtcreator_project.py ~/blenderSVN/cmake
Before use, call init(cmake_build_dir).
"""
__all__ = (
@@ -42,6 +40,7 @@ __all__ = (
"cmake_advanced_info",
"cmake_compiler_defines",
"project_name_get"
"init",
)
@@ -61,19 +60,26 @@ SOURCE_DIR = abspath(SOURCE_DIR)
SIMPLE_PROJECTFILE = False
# get cmake path
CMAKE_DIR = sys.argv[-1]
if not exists(join(CMAKE_DIR, "CMakeCache.txt")):
CMAKE_DIR = os.getcwd()
if not exists(join(CMAKE_DIR, "CMakeCache.txt")):
print("CMakeCache.txt not found in %r or %r\n Pass CMake build dir as an argument, or run from that dir, aborting" % (CMAKE_DIR, os.getcwd()))
sys.exit(1)
# must initialize from 'init'
CMAKE_DIR = None
# could be either.
# PROJECT_DIR = SOURCE_DIR
PROJECT_DIR = CMAKE_DIR
def init(cmake_path):
global CMAKE_DIR, PROJECT_DIR
# get cmake path
cmake_path = cmake_path or ""
if (not cmake_path) or (not exists(join(cmake_path, "CMakeCache.txt"))):
cmake_path = os.getcwd()
if not exists(join(cmake_path, "CMakeCache.txt")):
print("CMakeCache.txt not found in %r or %r\n"
" Pass CMake build dir as an argument, or run from that dir, aborting" %
(cmake_path, os.getcwd()))
return False
PROJECT_DIR = CMAKE_DIR = cmake_path
return True
def source_list(path, filename_check=None):
@@ -130,7 +136,7 @@ def is_project_file(filename):
def cmake_advanced_info():
""" Extracr includes and defines from cmake.
""" Extract includes and defines from cmake.
"""
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")

View File

@@ -59,14 +59,21 @@ def is_c_any(filename):
CMAKE_DIR = "."
def cmake_cache_var(var):
cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"))
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
cache_file.close()
def cmake_cache_var_iter():
import re
re_cache = re.compile(r'([A-Za-z0-9_\-]+)?:?([A-Za-z0-9_\-]+)?=(.*)$')
with open(join(CMAKE_DIR, "CMakeCache.txt"), 'r', encoding='utf-8') as cache_file:
for l in cache_file:
match = re_cache.match(l.strip())
if match is not None:
var, type_, val = match.groups()
yield (var, type_ or "", val)
for l in lines:
if l.split(":")[0] == var:
return l.split("=", 1)[-1]
def cmake_cache_var(var):
for var_iter, type_iter, value_iter in cmake_cache_var_iter():
if var == var_iter:
return value_iter
return None

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# <pep8 compliant>

View File

@@ -12,9 +12,9 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen
# map the version a -> 1
# not to be confused with blender's internal subversions
if [ "$blender_version_char" ]; then
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
else
blender_version_full=${blender_version}
blender_version_full=${blender_version}
fi
blender_ver_string=$blender_version+git$blender_version_full
@@ -60,7 +60,7 @@ package() {
cd $srcdir/build
make DESTDIR="$pkgdir" install
python -m compileall \
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
$pkgdir/usr/share/blender/$blender_version/scripts/addons
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
$pkgdir/usr/share/blender/$blender_version/scripts/addons
}

View File

@@ -1,50 +0,0 @@
import os
import platform
def FindPython():
all_abi_flags = ['m', 'mu', '']
python = "/usr"
abi_flags = "m" # Most common for linux distros
version = "3.4"
_arch = platform.uname()[4] + "-linux-gnu"
# Determine ABI flags used on this system
include = os.path.join(python, "include")
for cur_flags in all_abi_flags:
inc = os.path.join(include, "python" + version + cur_flags, "Python.h")
if os.path.exists(inc):
abi_flags = cur_flags
break
# Find config.h. In some distros, such as ubuntu 12.10 they are not in standard include dir.
incconf = os.path.join(include, _arch, "python" + version + cur_flags)
if not os.path.exists(os.path.join(incconf, "pyconfig.h")):
incconf = ''
# Determine whether python is in /usr/lib or /usr/lib64
lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py")
lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py")
if os.path.exists(lib32):
libpath = "${BF_PYTHON}/lib"
elif os.path.exists(lib64):
libpath = "${BF_PYTHON}/lib64"
else:
# roll back to default value
libpath = "${BF_PYTHON}/lib"
libpath_arch = libpath
_libpath_arch = os.path.join(python, "lib", _arch) # No lib64 stuff with recent deb-like distro afaik...
_libs = ["libpython" + version + abi_flags + ext for ext in (".so", ".a")]
for l in _libs:
if not os.path.exists(os.path.join(libpath, l)) and os.path.exists(os.path.join(_libpath_arch, l)):
libpath_arch = os.path.join(libpath, _arch)
break
return {"PYTHON": python,
"VERSION": version,
"LIBPATH": libpath,
"LIBPATH_ARCH": libpath_arch,
"ABI_FLAGS": abi_flags,
"CONFIG": incconf}

View File

@@ -1,42 +0,0 @@
def FindSharedPtr(conf):
"""
Detect shared_ptr availability
"""
found = False
namespace = None
header = None
if conf.CheckCXXHeader("memory"):
# Finding the memory header doesn't mean that shared_ptr is in std
# namespace.
#
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
# order to support this, we do an extra check to see which namespace
# should be used.
if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
print("-- Found shared_ptr in std namespace using <memory> header.")
namespace = 'std'
header = 'memory'
elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
print("-- Found shared_ptr in std::tr1 namespace using <memory> header..")
namespace = 'std::tr1'
header = 'memory'
if not namespace and conf.CheckCXXHeader("tr1/memory"):
# Further, gcc defines shared_ptr in std::tr1 namespace and
# <tr1/memory> is to be included for this. And what makes things
# even more tricky is that gcc does have <memory> header, so
# all the checks above wouldn't find shared_ptr.
if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"):
print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..")
namespace = 'std::tr1'
header = 'tr1/memory'
if not namespace:
print("-- Unable to find shared_ptrred_map>.")
conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header
conf.env['SHARED_PTR_NAMESPACE'] = namespace
conf.env['SHARED_PTR_HEADER'] = header

View File

@@ -1,38 +0,0 @@
def FindUnorderedMap(conf):
"""
Detect unordered_map availability
"""
namespace = None
header = None
if conf.CheckCXXHeader("unordered_map"):
# Even so we've found unordered_map header file it doesn't
# mean unordered_map and unordered_set will be declared in
# std namespace.
#
# Namely, MSVC 2008 have unordered_map header which declares
# unordered_map class in std::tr1 namespace. In order to support
# this, we do extra check to see which exactly namespace is
# to be used.
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
print("-- Found unordered_map/set in std namespace.")
namespace = 'std'
header = 'unordered_map'
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
print("-- Found unordered_map/set in std::tr1 namespace.")
namespace = 'std::tr1'
header = 'unordered_map'
else:
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
elif conf.CheckCXXHeader("tr1/unordered_map"):
print("-- Found unordered_map/set in std::tr1 namespace.")
namespace = 'std::tr1'
header = 'tr1/unordered_map'
else:
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header
conf.env['UNORDERED_MAP_NAMESPACE'] = namespace
conf.env['UNORDERED_MAP_HEADER'] = header

View File

@@ -1,263 +0,0 @@
import commands
#############################################################################
################### Compiler & architecture settings ##################
#############################################################################
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
MACOSX_SDK='' # set an sdk name like '10.7' or leave empty for automatic choosing highest available
MACOSX_DEPLOYMENT_TARGET = '10.6'
# gcc always defaults to the system standard compiler linked by a shim or symlink
CC = 'gcc'
CXX = 'g++'
LCGDIR = '#../lib/darwin-9.x.universal'
LIBDIR = '${LCGDIR}'
#############################################################################
################### Dependency settings ##################
#############################################################################
# enable ffmpeg support
WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR + '/ffmpeg'
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
#bz2 is a standard osx dynlib
BF_PYTHON_VERSION = '3.4'
WITH_OSX_STATICPYTHON = True
# python 3.4 uses precompiled libraries in bf svn /lib by default
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
WITH_BF_STATICOPENAL = False
BF_OPENAL_INC = '${BF_OPENAL}/include' # only headers from libdir needed for proper use of framework !!!!
#BF_OPENAL_LIB = 'openal'
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
# we use simply jack framework
WITH_BF_JACK = True
BF_JACK = '/Library/Frameworks/Jackmp.framework'
BF_JACK_INC = '${BF_JACK}/headers'
#BF_JACK_LIB = 'jack' # not used due framework
BF_JACK_LIBPATH = '${BF_JACK}'
WITH_BF_SNDFILE = True
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'sndfile FLAC ogg vorbis vorbisenc'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored in ffmpeg dir
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL2' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '${LCGDIR}/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
#BF_ZLIB_INC = '${BF_ZLIB}/include' # don't use this, it breaks -isysroot ${MACOSX_SDK}
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = True
WITH_BF_ICONV = True
BF_ICONV = '/usr'
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = True
BF_OPENGL_LIB = 'GL GLU'
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
#OpenCollada flags
WITH_BF_COLLADA = True
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa'
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
BF_PCRE = LIBDIR + '/opencollada'
BF_PCRE_LIB = 'pcre'
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
#BF_EXPAT = '/usr'
#BF_EXPAT_LIB = 'expat'
#BF_EXPAT_LIBPATH = '/usr/lib'
# Cycles
WITH_BF_CYCLES = True
#OSL
WITH_BF_CYCLES_OSL = True
BF_OSL = LIBDIR + '/osl'
BF_OSL_INC = '${BF_OSL}/include'
# note oslexec would passed via program linkflags, which is needed to
# make llvm happy with osl_allocate_closure_component
#BF_OSL_LIB = 'oslcomp oslquery'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
BF_LLVM = LIBDIR + '/llvm'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMObject'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_OCIO = True
BF_OCIO = LIBDIR + '/opencolorio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB = 'OpenColorIO tinyxml yaml-cpp'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
BF_BOOST = LIBDIR + '/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt'
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mt'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
#Freestyle
WITH_BF_FREESTYLE = True
#OpenMP ( will be checked for compiler support and turned off eventually )
WITH_BF_OPENMP = True
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = []
# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
WITH_BF_3DMOUSE = True
#############################################################################
################### various compile settings and flags ##################
#############################################################################
BF_QUIET = '1' # suppress verbose output
CFLAGS = []
CXXFLAGS = []
CCFLAGS = ['-pipe','-funsigned-char']
CPPFLAGS = []
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']
LLIBS = ['stdc++']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2']
CC_WARN = ['-Wall']
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
##FIX_STUBS_WARNINGS = -Wno-unused
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE = False
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g']
#############################################################################
################### Output directories ##################
#############################################################################
BF_BUILDDIR='../build/darwin'
BF_INSTALLDIR='../install/darwin'

View File

@@ -1,267 +0,0 @@
from FindPython import FindPython
py = FindPython()
BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
BF_PYTHON = py['PYTHON']
BF_PYTHON_LIBPATH = py['LIBPATH']
BF_PYTHON_LIBPATH_ARCH = py['LIBPATH_ARCH']
BF_PYTHON_CONFIG = py['CONFIG']
BF_PYTHON_VERSION = py['VERSION']
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS} ' + BF_PYTHON_CONFIG
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}' # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
BF_PYTHON_LIB_STATIC = '${BF_PYTHON_LIBPATH_ARCH}/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_JACK = False
BF_JACK = '/usr'
BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = False
WITH_BF_STATICSNDFILE = False
BF_SNDFILE = '/usr'
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
BF_SNDFILE_LIB = 'sndfile'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
BF_SNDFILE_LIB_STATIC = '${BF_SNDFILE}/lib/libsndfile.a ${BF_OGG}/lib/libvorbis.a ${BF_OGG}/lib/libFLAC.a ${BF_OGG}/lib/libvorbisenc.a ${BF_OGG}/lib/libogg.a'
WITH_BF_SDL = True
BF_SDL = '/usr' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = '/usr'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = True
BF_PNG = '/usr'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
WITH_BF_TIFF = True
BF_TIFF = '/usr'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
WITH_BF_ELTOPO = False
BF_LAPACK = '/usr'
BF_LAPACK_LIB = 'lapack3gf blas clapack'
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
#BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
WITH_BF_ICONV = False
BF_ICONV = "/usr"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
BF_FFMPEG = '/usr'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
#WITH_BF_STATICFFMPEG = True
#BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH/libavcodec.a ${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libavutil.a ${BF_FFMPEG_LIBPATH}/libavdevice.a'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = False
BF_OGG = '/usr'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = False
WITH_BF_STATICFFTW3 = False
BF_FFTW3 = '/usr'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
BF_FFTW3_LIB_STATIC = '${BF_FFTW3_LIBPATH}/libfftw3.a'
WITH_BF_REDCODE = False
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
# BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
WITH_BF_COLLADA = False
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = '/usr'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
BF_PCRE = ''
BF_PCRE_LIB = 'pcre'
BF_PCRE_LIBPATH = '/usr/lib'
BF_EXPAT = '/usr'
BF_EXPAT_LIB = 'expat'
BF_EXPAT_LIBPATH = '/usr/lib'
WITH_BF_JEMALLOC = False
WITH_BF_STATICJEMALLOC = False
BF_JEMALLOC = '/usr'
BF_JEMALLOC_INC = '${BF_JEMALLOC}/include'
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
BF_JEMALLOC_LIB = 'jemalloc'
BF_JEMALLOC_LIB_STATIC = '${BF_JEMALLOC_LIBPATH}/libjemalloc.a'
WITH_BF_OIIO = False
WITH_BF_STATICOIIO = False
BF_OIIO = '/usr'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_OCIO = False
WITH_BF_STATICOCIO = False
BF_OCIO = '/usr'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB = 'OpenColorIO yaml-cpp tinyxml'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
WITH_BF_STATICBOOST = False
BF_BOOST = '/usr'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a ' + \
'${BF_BOOST_LIBPATH}/libboost_thread.a'
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
WITH_BF_OPENMP = True
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
#SpaceNavigator and friends
WITH_BF_3DMOUSE = True
WITH_BF_STATIC3DMOUSE = False
BF_3DMOUSE = '/usr'
BF_3DMOUSE_INC = '${BF_3DMOUSE}/include'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
BF_3DMOUSE_LIB = 'spnav'
BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
#Freestyle
WITH_BF_FREESTYLE = True
##
CC = 'gcc'
CXX = 'g++'
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CXXFLAGS = []
CPPFLAGS = []
# g++ 4.6, only needed for bullet
CXXFLAGS += ['-fpermissive']
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
CC_WARN = ['-Wall']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
LLIBS = ['util', 'c', 'm', 'dl', 'pthread']
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR = '../build/linux'
BF_INSTALLDIR='../install/linux'
#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']

View File

@@ -1,216 +0,0 @@
LCGDIR = '#../lib/mingw32'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = True
BF_FFMPEG_LIB = 'avformat-55 avcodec-55 avdevice-55 avutil-52 swscale-2'
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = False
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'libsndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadGC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'liblibjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
WITH_BF_COLLADA = True
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
#Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_OCIO = True
BF_OCIO = LIBDIR + '/opencolorio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB = 'OpenColorIO'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
BF_BOOST = LIBDIR + '/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49 boost_regex-mgw46-mt-s-1_49 boost_system-mgw46-mt-s-1_49 boost_thread-mgw46-mt-s-1_49'
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
WITH_BF_OPENMP = True
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
#Freestyle
WITH_BF_FREESTYLE = True
##
CC = 'gcc'
CXX = 'g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = []
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
## DISABLED, causes linking errors!
## for re-distribution, so users dont need mingw installed
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
BF_PROFILE = False
BF_BUILDDIR = '..\\build\\win32-mingw'
BF_INSTALLDIR='..\\install\\win32-mingw'

View File

@@ -1,251 +0,0 @@
import subprocess
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if "18.00." in CL_STDERR:
VC_VERSION = '12.0'
LCGDIR = '#../lib/windows_vc12'
else:
import sys
print("Visual C version not supported {}\n".format(CL_STDERR))
sys.exit(1)
LIBDIR = '${LCGDIR}'
WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = True
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'libsndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadVC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'libtiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz_st'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
WITH_BF_ELTOPO = False
BF_LAPACK = LIBDIR + '/lapack'
BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_BINRELOC = False
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
WITH_BF_COLLADA = True
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
WITH_BF_OPENMP = True
#Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = True
BF_OSL = '${LIBDIR}/osl'
BF_OSL_INC = '${BF_OSL}/include'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_LIB_STATIC = '${BF_OSL_LIBPATH}/oslcomp.lib ${BF_OSL_LIBPATH}/oslexec.lib ${BF_OSL_LIBPATH}/oslquery.lib '
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
BF_LLVM = LIBDIR + '/llvm'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMObject LLVMRuntimeDyld LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
WITH_BF_OIIO = True
BF_OIIO = '${LIBDIR}/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
WITH_BF_STATICOIIO = True
WITH_BF_OCIO = True
BF_OCIO = '${LIBDIR}/opencolorio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/OpenColorIO.lib'
WITH_BF_STATICOCIO = True
WITH_BF_BOOST = True
BF_BOOST = '${LIBDIR}/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
CC = 'cl.exe'
CXX = 'cl.exe'
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
if VC_VERSION == '12.0':
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '/Ob2']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
# # Todo
# BF_PROFILE_CCFLAGS = ['-pg', '-g ']
# BF_PROFILE_LINKFLAGS = ['-pg']
# BF_PROFILE = False
BF_BSC=False
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win32-vc'
BF_INSTALLDIR='..\\install\\win32-vc'

View File

@@ -1,210 +0,0 @@
LCGDIR = '#../lib/mingw64'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = True
BF_FFMPEG_LIB = 'avformat.dll avcodec.dll avdevice.dll avutil.dll swscale.dll swresample.dll'
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = False
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'libsndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = '' # Part of MinGW-w64
BF_PTHREADS_INC = ''
BF_PTHREADS_LIB = ''
BF_PTHREADS_LIBPATH = ''
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_OCEANSIM = True
WITH_BF_PLAYER = True
WITH_BF_LIBMV = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
WITH_BF_COLLADA = True
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
#Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_OCIO = True
BF_OCIO = LIBDIR + '/opencolorio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIB = 'OpenColorIO'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
WITH_BF_BOOST = True
BF_BOOST = LIBDIR + '/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
WITH_BF_OPENMP = True
#Freestyle
WITH_BF_FREESTYLE = True
##
CC = 'gcc'
CXX = 'g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = [ '-fpermissive' ]
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
## DISABLED, causes linking errors!
## for re-distribution, so users dont need mingw installed
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
BF_PROFILE = False
BF_BUILDDIR = '..\\build\\win64-mingw'
BF_INSTALLDIR='..\\install\\win64-mingw'

View File

@@ -1,251 +0,0 @@
import subprocess
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if "18.00." in CL_STDERR:
VC_VERSION = '12.0'
LCGDIR = '#../lib/win64_vc12'
else:
import sys
print("Visual C version not supported {}\n".format(CL_STDERR))
sys.exit(1)
LIBDIR = '${LCGDIR}'
WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_SNDFILE = True
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'libsndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_JACK = False
BF_PTHREADS = LIBDIR + '/pthreads'
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadVC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'libtiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz_st'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
WITH_BF_ELTOPO = False
BF_LAPACK = LIBDIR + '/lapack'
BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_BINRELOC = False
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False
BF_QUICKTIME = LIBDIR + '/QTDevWin'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
WITH_BF_COLLADA = True
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
WITH_BF_OPENMP = True
#Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = True
BF_OSL = '${LIBDIR}/osl'
BF_OSL_INC = '${BF_OSL}/include'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_LIB_STATIC = '${BF_OSL_LIBPATH}/oslcomp.lib ${BF_OSL_LIBPATH}/oslexec.lib ${BF_OSL_LIBPATH}/oslquery.lib '
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
BF_LLVM = LIBDIR + '/llvm'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMObject LLVMRuntimeDyld LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
WITH_BF_OIIO = True
BF_OIIO = '${LIBDIR}/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
WITH_BF_STATICOIIO = True
WITH_BF_OCIO = True
BF_OCIO = '${LIBDIR}/opencolorio'
BF_OCIO_INC = '${BF_OCIO}/include'
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/OpenColorIO.lib'
WITH_BF_STATICOCIO = True
WITH_BF_BOOST = True
BF_BOOST = '${LIBDIR}/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
# No need to manually specify SSE/SSE2 on x64 systems.
BF_RAYOPTIMIZATION_SSE_FLAGS = ['']
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
CC = 'cl.exe'
CXX = 'cl.exe'
CFLAGS = []
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
# We want to support Vista level ABI for x64
if VC_VERSION == '12.0':
CCFLAGS.append('/D_WIN32_WINNT=0x600')
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '/Ob2']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win64-vc'
BF_INSTALLDIR='..\\install\\win64-vc'

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
def disable(self):
self.HEADER = ''
self.OKBLUE = ''
self.OKGREEN = ''
self.WARNING = ''
self.FAIL = ''
self.ENDC = ''

View File

@@ -1,895 +0,0 @@
import os
import os.path
import SCons.Options
import SCons.Variables
try:
import subprocess
except ImportError:
pass
import string
import shutil
import sys
Variables = SCons.Variables
BoolVariable = SCons.Variables.BoolVariable
def get_command_output(*popenargs, **kwargs):
if hasattr(subprocess, "check_output"):
return subprocess.check_output(*popenargs, **kwargs)
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise subprocess.CalledProcessError(retcode, cmd)
return output
def get_version():
import re
fname = os.path.join(os.path.dirname(__file__), "..", "..", "..", "source", "blender", "blenkernel", "BKE_blender.h")
ver_base = None
ver_char = None
ver_cycle = None
re_ver = re.compile("^#\s*define\s+BLENDER_VERSION\s+([0-9]+)")
re_ver_char = re.compile("^#\s*define\s+BLENDER_VERSION_CHAR\s*(\S*)") # optional arg
re_ver_cycle = re.compile("^#\s*define\s+BLENDER_VERSION_CYCLE\s*(\S*)") # optional arg
for l in open(fname, "r"):
match = re_ver.match(l)
if match:
ver = int(match.group(1))
ver_base = "%d.%d" % (ver / 100, ver % 100)
match = re_ver_char.match(l)
if match:
ver_char = match.group(1)
if ver_char == "BLENDER_CHAR_VERSION":
ver_char = ""
match = re_ver_cycle.match(l)
if match:
ver_cycle = match.group(1)
if ver_cycle == "BLENDER_CYCLE_VERSION":
ver_cycle = ""
if (ver_base is not None) and (ver_char is not None) and (ver_cycle is not None):
# eg '2.56a-beta'
if ver_cycle != "release":
ver_display = "%s%s-%s" % (ver_base, ver_char, ver_cycle)
else:
ver_display = "%s%s" % (ver_base, ver_char)
return ver_base, ver_display, ver_cycle
raise Exception("%s: missing version string" % fname)
def get_hash():
try:
build_hash = get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
except OSError:
build_hash = None
print("WARNING: could not use git to retrieve current Blender repository hash...")
except subprocess.CalledProcessError as e:
build_hash = None
print("WARNING: git errored while retrieving current Blender repository hash (%d)..." % e.returncode)
if build_hash == '' or build_hash == None:
build_hash = 'UNKNOWN'
return build_hash
def checkEndian():
return sys.byteorder
# This is used in creating the local config directories
VERSION, VERSION_DISPLAY, VERSION_RELEASE_CYCLE = get_version()
HASH = get_hash()
ENDIAN = checkEndian()
def print_arguments(args, bc):
if len(args):
for k,v in args.iteritems():
if type(v)==list:
v = ' '.join(v)
print '\t'+bc.OKBLUE+k+bc.ENDC+' = '+bc.OKGREEN + v + bc.ENDC
else:
print '\t'+bc.WARNING+'No command-line arguments given'+bc.ENDC
def validate_arguments(args, bc):
opts_list = [
'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC',
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
'WITH_BF_DDS', 'WITH_BF_CINEON', 'WITH_BF_HDR',
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC', 'BF_FFMPEG_DLL',
'WITH_BF_STATICFFMPEG', 'BF_FFMPEG_LIB_STATIC',
'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
'WITH_BF_FRAMESERVER',
'WITH_BF_COMPOSITOR',
'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH', 'WITH_BF_STATICJPEG', 'BF_JPEG_LIB_STATIC',
'WITH_BF_OPENJPEG', 'BF_OPENJPEG', 'BF_OPENJPEG_INC', 'BF_OPENJPEG_LIB', 'BF_OPENJPEG_LIBPATH',
'WITH_BF_REDCODE', 'BF_REDCODE', 'BF_REDCODE_INC', 'BF_REDCODE_LIB', 'BF_REDCODE_LIBPATH',
'WITH_BF_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH', 'WITH_BF_STATICPNG', 'BF_PNG_LIB_STATIC',
'WITH_BF_TIFF', 'BF_TIFF', 'BF_TIFF_INC', 'BF_TIFF_LIB', 'BF_TIFF_LIBPATH', 'WITH_BF_STATICTIFF', 'BF_TIFF_LIB_STATIC',
'WITH_BF_ZLIB', 'BF_ZLIB', 'BF_ZLIB_INC', 'BF_ZLIB_LIB', 'BF_ZLIB_LIBPATH', 'WITH_BF_STATICZLIB', 'BF_ZLIB_LIB_STATIC',
'WITH_BF_INTERNATIONAL',
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
'WITH_BF_GAMEENGINE',
'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
# 'WITH_BF_ELTOPO', # now only available in a branch
'BF_LAPACK', 'BF_LAPACK_LIB', 'BF_LAPACK_LIBPATH', 'BF_LAPACK_LIB_STATIC',
'BF_WINTAB', 'BF_WINTAB_INC',
'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'BF_FREETYPE_LIB_STATIC', 'WITH_BF_FREETYPE_STATIC',
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
'WITH_BF_EGL', 'WITH_BF_GLEW_ES', 'BF_GLEW_INC', 'WITH_BF_GL_PROFILE_CORE', 'WITH_BF_GL_PROFILE_COMPAT', 'WITH_BF_GL_PROFILE_ES20',
'WITH_BF_GLEW_MX', 'WITH_BF_GL_EGL', 'WITH_BF_GL_ANGLE',
'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
'WITH_BF_STATICOPENCOLLADA', 'BF_OPENCOLLADA_LIB_STATIC',
'WITH_BF_PLAYER',
'WITH_BF_NOBLENDER',
'WITH_BF_BINRELOC',
'WITH_BF_LZO', 'WITH_BF_LZMA',
'LCGDIR',
'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC',
'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
'WITHOUT_BF_INSTALL',
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK',
'WITH_BF_PYTHON_INSTALL_NUMPY', 'WITH_BF_PYTHON_INSTALL_REQUESTS',
'WITHOUT_BF_OVERWRITE_INSTALL',
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_BF_STATICOPENMP', 'BF_OPENMP_STATIC_STATIC',
'WITH_GHOST_SDL',
'WITH_GHOST_XDND',
'WITH_X11_XINPUT',
'WITH_X11_XF86VMODE',
'BF_GHOST_DEBUG',
'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
'BF_X264_CONFIG',
'BF_XVIDCORE_CONFIG',
'WITH_BF_DOCS',
'BF_NUMJOBS',
'BF_MSVS',
'WITH_BF_RAYOPTIMIZATION',
'BF_RAYOPTIMIZATION_SSE_FLAGS',
'WITH_BF_FLUID',
'WITH_BF_BOOLEAN',
'WITH_BF_REMESH',
'WITH_BF_OCEANSIM',
'WITH_BF_SMOKE',
'WITH_BF_CXX_GUARDEDALLOC',
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
'BUILDBOT_BRANCH',
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
'WITH_BF_OCIO', 'WITH_BF_STATICOCIO', 'BF_OCIO', 'BF_OCIO_INC', 'BF_OCIO_LIB', 'BF_OCIO_LIB_STATIC', 'BF_OCIO_LIBPATH',
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
'WITH_BF_LIBMV', 'WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS',
'WITH_BF_CYCLES_OSL', 'WITH_BF_STATICOSL', 'BF_OSL', 'BF_OSL_INC', 'BF_OSL_LIB', 'BF_OSL_LIBPATH', 'BF_OSL_LIB_STATIC', 'BF_OSL_COMPILER',
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS'
]
# Have options here that scons expects to be lists
opts_list_split = [
'BF_PYTHON_LINKFLAGS',
'BF_OPENGL_LINKFLAGS',
'BF_GL_DEFINITIONS',
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
'BGE_CXXFLAGS',
'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
'C_WARN', 'CC_WARN', 'CXX_WARN',
'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'C_COMPILER_ID',
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET',
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING'
]
arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE', 'BF_LINE_OVERWRITE',
'BF_BSC', 'BF_CONFIG',
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG',
'BF_UNIT_TEST', 'BF_BITNESS', 'MSVS_VERSION']
okdict = {}
for k,v in args.iteritems():
if (k in opts_list) or (k in arg_list):
okdict[k] = v
elif k in opts_list_split:
okdict[k] = v.split() # "" have already been stripped
else:
print '\t'+bc.WARNING+'Invalid argument: '+bc.ENDC+k+'='+v
return okdict
def print_targets(targs, bc):
if len(targs)>0:
for t in targs:
print '\t'+bc.OKBLUE+t+bc.ENDC
else:
print '\t'+bc.WARNING+'No targets given, using '+bc.ENDC+bc.OKGREEN+'default'+bc.ENDC
def validate_targets(targs, bc):
valid_list = ['.', 'blender', 'blenderstatic', 'blenderplayer', 'webplugin',
'blendernogame', 'blenderstaticnogame', 'blenderlite', 'release',
'everything', 'clean', 'install-bin', 'install', 'nsis','buildslave',
'cudakernels']
oklist = []
for t in targs:
if t in valid_list:
oklist.append(t)
else:
print '\t'+bc.WARNING+'Invalid target: '+bc.ENDC+t
return oklist
class OurSpawn:
def ourspawn(self, sh, escape, cmd, args, env):
newargs = " ".join(args[1:])
cmdline = cmd + " " + newargs
startupinfo = subprocess.STARTUPINFO()
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env=env)
data, err = proc.communicate()
rv = proc.wait()
if err:
print(err)
return rv
def SetupSpawn( env ):
buf = OurSpawn()
env['SPAWN'] = buf.ourspawn
def read_opts(env, cfg, args):
localopts = Variables.Variables(cfg, args)
localopts.AddVariables(
('LCGDIR', 'Location of SVN lib dir'),
('LIBDIR', 'Root dir of libs'),
(BoolVariable('WITH_BF_PYTHON', 'Compile with python', True)),
(BoolVariable('WITH_BF_PYTHON_SAFETY', 'Internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency)', False)),
(BoolVariable('WITH_BF_PYTHON_SECURITY', 'Disables execution of scripts within blend files by default', True)),
('BF_PYTHON', 'Base path for python', ''),
('BF_PYTHON_VERSION', 'Python version to use', ''),
('BF_PYTHON_INC', 'Include path for Python headers', ''),
('BF_PYTHON_BINARY', 'Path to the Python interpreter', ''),
('BF_PYTHON_LIB', 'Python library', ''),
('BF_PYTHON_LIBPATH_ARCH', 'Additional Python library under some linux flavors (arch-dependent)', ''),
('BF_PYTHON_DLL', 'Python dll - used on Windows only', ''),
('BF_PYTHON_LIB_STATIC', 'Python static libraries', ''),
('BF_PYTHON_LIBPATH', 'Library path', ''),
('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
(BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
(BoolVariable('WITH_OSX_STATICPYTHON', 'Staticly link to python', True)),
('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
(BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
(BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
(BoolVariable('WITH_BF_REMESH', 'Build with remesh modifier', True)),
(BoolVariable('WITH_BF_OCEANSIM', 'Build with ocean simulation', False)),
(BoolVariable('WITH_BF_SMOKE', 'Build with smoke simulation', True)),
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
('BF_OPENAL', 'Base path for OpenAL', ''),
('BF_OPENAL_INC', 'Include path for python headers', ''),
('BF_OPENAL_LIB', 'Path to OpenAL library', ''),
('BF_OPENAL_LIB_STATIC', 'Path to OpenAL static library', ''),
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
(BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
('BF_SDL', 'SDL base path', ''),
('BF_SDL_INC', 'SDL include path', ''),
('BF_SDL_LIB', 'SDL library', ''),
('BF_SDL_LIBPATH', 'SDL library path', ''),
(BoolVariable('WITH_BF_SDL_DYNLOAD', 'Enable runtime dynamic SDL libraries loading (works only on Linux)', False)),
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
('BF_JACK', 'jack base path', ''),
('BF_JACK_INC', 'jack include path', ''),
('BF_JACK_LIB', 'jack library', ''),
('BF_JACK_LIBPATH', 'jack library path', ''),
(BoolVariable('WITH_BF_JACK_DYNLOAD', 'Enable runtime dynamic Jack libraries loading (works only on Linux)', False)),
(BoolVariable('WITH_BF_SNDFILE', 'Enable sndfile support if true', True)),
('BF_SNDFILE', 'sndfile base path', ''),
('BF_SNDFILE_INC', 'sndfile include path', ''),
('BF_SNDFILE_LIB', 'sndfile library', ''),
('BF_SNDFILE_LIB_STATIC', 'Path to sndfile static library', ''),
('BF_SNDFILE_LIBPATH', 'sndfile library path', ''),
(BoolVariable('WITH_BF_STATICSNDFILE', 'Staticly link to sndfile', False)),
('BF_PTHREADS', 'Pthreads base path', ''),
('BF_PTHREADS_INC', 'Pthreads include path', ''),
('BF_PTHREADS_LIB', 'Pthreads library', ''),
('BF_PTHREADS_LIBPATH', 'Pthreads library path', ''),
(BoolVariable('WITH_BF_OPENEXR', 'Use OPENEXR if true', True)),
(BoolVariable('WITH_BF_STATICOPENEXR', 'Staticly link to OpenEXR', False)),
('BF_OPENEXR', 'OPENEXR base path', ''),
('BF_OPENEXR_INC', 'OPENEXR include path', ''),
('BF_OPENEXR_LIB', 'OPENEXR library', ''),
('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
(BoolVariable('WITH_BF_DDS', 'Support DDS image format if true', True)),
(BoolVariable('WITH_BF_CINEON', 'Support CINEON and DPX image formats if true', True)),
(BoolVariable('WITH_BF_HDR', 'Support HDR image formats if true', True)),
(BoolVariable('WITH_BF_FRAMESERVER', 'Support export to a frameserver', True)),
(BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
('BF_FFMPEG', 'FFMPEG base path', ''),
('BF_FFMPEG_LIB', 'FFMPEG library', ''),
('BF_FFMPEG_DLL', 'FFMPEG dll libraries to be installed', ''),
('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
('BF_FFMPEG_INC', 'FFMPEG includes', ''),
('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
(BoolVariable('WITH_BF_STATICFFMPEG', 'Use static FFMPEG if true', False)),
('BF_FFMPEG_LIB_STATIC', 'Static FFMPEG libraries', ''),
(BoolVariable('WITH_BF_OGG', 'Link OGG, THEORA, VORBIS with FFMPEG if true',
False)),
('BF_OGG', 'OGG base path', ''),
('BF_OGG_LIB', 'OGG library', ''),
(BoolVariable('WITH_BF_JPEG', 'Use JPEG if true', True)),
(BoolVariable('WITH_BF_STATICJPEG', 'Staticly link to JPEG', False)),
('BF_JPEG', 'JPEG base path', ''),
('BF_JPEG_INC', 'JPEG include path', ''),
('BF_JPEG_LIB', 'JPEG library', ''),
('BF_JPEG_LIBPATH', 'JPEG library path', ''),
('BF_JPEG_LIB_STATIC', 'JPEG static library', ''),
(BoolVariable('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', False)),
('BF_OPENJPEG', 'OPENJPEG base path', ''),
('BF_OPENJPEG_INC', 'OPENJPEG include path', ''),
('BF_OPENJPEG_LIB', 'OPENJPEG library', ''),
('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''),
(BoolVariable('WITH_BF_REDCODE', 'Use REDCODE if true', False)),
('BF_REDCODE', 'REDCODE base path', ''),
('BF_REDCODE_INC', 'REDCODE include path', ''),
('BF_REDCODE_LIB', 'REDCODE library', ''),
('BF_REDCODE_LIBPATH', 'REDCODE library path', ''),
(BoolVariable('WITH_BF_PNG', 'Use PNG if true', True)),
(BoolVariable('WITH_BF_STATICPNG', 'Staticly link to PNG', False)),
('BF_PNG', 'PNG base path', ''),
('BF_PNG_INC', 'PNG include path', ''),
('BF_PNG_LIB', 'PNG library', ''),
('BF_PNG_LIBPATH', 'PNG library path', ''),
('BF_PNG_LIB_STATIC', 'PNG static library', ''),
(BoolVariable('WITH_BF_TIFF', 'Use TIFF if true', True)),
(BoolVariable('WITH_BF_STATICTIFF', 'Staticly link to TIFF', False)),
('BF_TIFF', 'TIFF base path', ''),
('BF_TIFF_INC', 'TIFF include path', ''),
('BF_TIFF_LIB', 'TIFF library', ''),
('BF_TIFF_LIBPATH', 'TIFF library path', ''),
('BF_TIFF_LIB_STATIC', 'TIFF static library', ''),
(BoolVariable('WITH_BF_ZLIB', 'Use ZLib if true', True)),
(BoolVariable('WITH_BF_STATICZLIB', 'Staticly link to ZLib', False)),
('BF_ZLIB', 'ZLib base path', ''),
('BF_ZLIB_INC', 'ZLib include path', ''),
('BF_ZLIB_LIB', 'ZLib library', ''),
('BF_ZLIB_LIBPATH', 'ZLib library path', ''),
('BF_ZLIB_LIB_STATIC', 'ZLib static library', ''),
(BoolVariable('WITH_BF_INTERNATIONAL', 'Use Boost::locale if true', True)),
(BoolVariable('WITH_BF_ICONV', 'Use iconv if true', True)),
('BF_ICONV', 'iconv base path', ''),
('BF_ICONV_INC', 'iconv include path', ''),
('BF_ICONV_LIB', 'iconv library', ''),
('BF_ICONV_LIBPATH', 'iconv library path', ''),
(BoolVariable('WITH_BF_FREESTYLE', 'Compile with freestyle', True)),
(BoolVariable('WITH_BF_GAMEENGINE', 'Build with gameengine' , False)),
(BoolVariable('WITH_BF_BULLET', 'Use Bullet if true', True)),
# (BoolVariable('WITH_BF_ELTOPO', 'Use Eltopo collision library if true', False)), # this is now only available in a branch
('BF_LAPACK', 'LAPACK base path', ''),
('BF_LAPACK_LIB', 'LAPACK library', ''),
('BF_LAPACK_LIB_STATIC', 'LAPACK library', ''),
('BF_LAPACK_LIBPATH', 'LAPACK library path', ''),
(BoolVariable('WITH_BF_STATICLAPACK', 'Staticly link to LAPACK', False)),
('BF_BULLET', 'Bullet base dir', ''),
('BF_BULLET_INC', 'Bullet include path', ''),
('BF_BULLET_LIB', 'Bullet library', ''),
('BF_WINTAB', 'WinTab base dir', ''),
('BF_WINTAB_INC', 'WinTab include dir', ''),
('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
(BoolVariable('WITH_BF_STATICCXX', 'static link to stdc++', False)),
('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
('BF_FREETYPE', 'Freetype base path', ''),
('BF_FREETYPE_INC', 'Freetype include path', ''),
('BF_FREETYPE_LIB', 'Freetype library', ''),
('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
(BoolVariable('WITH_BF_FREETYPE_STATIC', 'Use Static Freetype if true', False)),
('BF_FREETYPE_LIB_STATIC', 'Static Freetype library', ''),
(BoolVariable('WITH_BF_OPENMP', 'Use OpenMP if true', False)),
(BoolVariable('WITH_BF_STATICOPENMP', 'Staticly link to OpenMP', False)),
('BF_OPENMP', 'Base path to OpenMP (used when cross-compiling with older versions of WinGW)', ''),
('BF_OPENMP_INC', 'Path to OpenMP includes (used when cross-compiling with older versions of WinGW)', ''),
('BF_OPENMP_LIBPATH', 'Path to OpenMP libraries (used when cross-compiling with older versions of WinGW)', ''),
(BoolVariable('WITH_GHOST_SDL', 'Enable building blender against SDL for windowing rather then the native APIs', False)),
(BoolVariable('WITH_X11_XINPUT', 'Enable X11 Xinput (tablet support and unicode input)', True)),
(BoolVariable('WITH_X11_XF86VMODE', 'Enable X11 video mode switching', True)),
('BF_OPENMP_LIB_STATIC', 'OpenMP static library', ''),
(BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
('BF_QUICKTIME', 'QuickTime base path', ''),
('BF_QUICKTIME_INC', 'QuickTime include path', ''),
('BF_QUICKTIME_LIB', 'QuickTime library', ''),
('BF_QUICKTIME_LIBPATH', 'QuickTime library path', ''),
(BoolVariable('WITH_BF_FFTW3', 'Use FFTW3 if true', False)),
('BF_FFTW3', 'FFTW3 base path', ''),
('BF_FFTW3_INC', 'FFTW3 include path', ''),
('BF_FFTW3_LIB', 'FFTW3 library', ''),
('BF_FFTW3_LIB_STATIC', 'FFTW3 static libraries', ''),
('BF_FFTW3_LIBPATH', 'FFTW3 library path', ''),
(BoolVariable('WITH_BF_STATICFFTW3', 'Staticly link to FFTW3', False)),
(BoolVariable('WITH_BF_STATICOPENGL', 'Use MESA if true', True)),
('BF_OPENGL', 'OpenGL base path', ''),
('BF_OPENGL_INC', 'OpenGL include path', ''),
('BF_OPENGL_LIB', 'OpenGL libraries', ''),
('BF_OPENGL_LIBPATH', 'OpenGL library path', ''),
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
(BoolVariable('WITH_BF_GLEW_MX', '', False)),
(BoolVariable('WITH_BF_GLEW_ES', '', False)),
(BoolVariable('WITH_BF_GL_EGL', '', False)),
(BoolVariable('WITH_BF_GL_PROFILE_COMPAT', '', True)),
(BoolVariable('WITH_BF_GL_PROFILE_CORE', '', False)),
(BoolVariable('WITH_BF_GL_PROFILE_ES20', '', False)),
(BoolVariable('WITH_BF_GL_ANGLE', '', False)),
('BF_GL_DEFINITIONS', '', []),
('BF_GLEW_INC', '', ''),
) # end of opts.AddVariables()
localopts.AddVariables(
(BoolVariable('WITH_BF_COLLADA', 'Build COLLADA import/export module if true', False)),
(BoolVariable('WITH_BF_STATICOPENCOLLADA', 'Staticly link to OpenCollada', False)),
('BF_COLLADA', 'COLLADA base path', ''),
('BF_COLLADA_INC', 'COLLADA include path', ''),
('BF_COLLADA_LIB', 'COLLADA library', ''),
('BF_OPENCOLLADA', 'OpenCollada base path', ''),
('BF_OPENCOLLADA_INC', 'OpenCollada base include path', ''),
('BF_OPENCOLLADA_LIB', 'OpenCollada library', ''),
('BF_OPENCOLLADA_LIBPATH', 'OpenCollada library path', ''),
('BF_PCRE', 'PCRE base path', ''),
('BF_PCRE_LIB', 'PCRE library', ''),
('BF_PCRE_LIBPATH', 'PCRE library path', ''),
('BF_EXPAT', 'Expat base path', ''),
('BF_EXPAT_LIB', 'Expat library', ''),
('BF_EXPAT_LIBPATH', 'Expat library path', ''),
('BF_OPENCOLLADA_LIB_STATIC', 'OpenCollada static library', ''),
(BoolVariable('WITH_BF_JEMALLOC', 'Use jemalloc if true', False)),
(BoolVariable('WITH_BF_STATICJEMALLOC', 'Staticly link to jemalloc', False)),
('BF_JEMALLOC', 'jemalloc base path', ''),
('BF_JEMALLOC_INC', 'jemalloc include path', ''),
('BF_JEMALLOC_LIB', 'jemalloc library', ''),
('BF_JEMALLOC_LIBPATH', 'jemalloc library path', ''),
('BF_JEMALLOC_LIB_STATIC', 'jemalloc static library', ''),
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
(BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
(BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
('BF_3DMOUSE', '3d mouse library base path', ''),
('BF_3DMOUSE_INC', '3d mouse library include path', ''),
('BF_3DMOUSE_LIB', '3d mouse library', ''),
('BF_3DMOUSE_LIBPATH', '3d mouse library path', ''),
('BF_3DMOUSE_LIB_STATIC', '3d mouse static library', ''),
('CFLAGS', 'C only flags', []),
('CCFLAGS', 'Generic C and C++ flags', []),
('CXXFLAGS', 'C++ only flags', []),
('BGE_CXXFLAGS', 'C++ only flags for BGE', []),
('CPPFLAGS', 'Defines', []),
('REL_CFLAGS', 'C only release flags', []),
('REL_CCFLAGS', 'Generic C and C++ release flags', []),
('REL_CXXFLAGS', 'C++ only release flags', []),
('C_WARN', 'C warning flags', []),
('CC_WARN', 'Generic C and C++ warning flags', []),
('CXX_WARN', 'C++ only warning flags', []),
('LLIBS', 'Platform libs', []),
('PLATFORM_LINKFLAGS', 'Platform linkflags', []),
('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
('MACOSX_SDK', 'Set OS X SDK', ''),
('XCODE_CUR_VER', 'Detect XCode version', ''),
('MACOSX_DEPLOYMENT_TARGET', 'Detect OS X target version', ''),
('C_COMPILER_ID', 'Detect the resolved compiler', ''),
(BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
('BF_PROFILE_CFLAGS', 'C only profiling flags', []),
('BF_PROFILE_CCFLAGS', 'C and C++ profiling flags', []),
('BF_PROFILE_CXXFLAGS', 'C++ only profiling flags', []),
('BF_PROFILE_LINKFLAGS', 'Profile linkflags', []),
(BoolVariable('BF_DEBUG', 'Add debug flags if true', False)),
('BF_DEBUG_CFLAGS', 'C only debug flags', []),
('BF_DEBUG_CCFLAGS', 'C and C++ debug flags', []),
('BF_DEBUG_CXXFLAGS', 'C++ only debug flags', []),
(BoolVariable('BF_BSC', 'Create .bsc files (msvc only)', False)),
('BF_BUILDDIR', 'Build dir', ''),
('BF_INSTALLDIR', 'Installation dir', ''),
('CC', 'C compiler to use', env['CC']),
('CXX', 'C++ compiler to use', env['CXX']),
(BoolVariable('BF_BUILDINFO', 'Buildtime in splash if true', True)),
(BoolVariable('BF_TWEAK_MODE', 'Enable tweak mode if true', False)),
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
(BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
(BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python numpy module', False)),
(BoolVariable('WITH_BF_PYTHON_INSTALL_REQUESTS', 'install Python requests module', False)),
(BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)),
(BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)),
(BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),
(BoolVariable('BF_QUIET', 'Enable silent output if true', True)),
(BoolVariable('BF_LINE_OVERWRITE', 'Enable overwriting of compile line in BF_QUIET mode if true', False)),
(BoolVariable('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', False)),
(BoolVariable('WITH_BF_LZO', 'Enable fast LZO pointcache compression', True)),
(BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
(BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
(BoolVariable('WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS', 'Enable fixed-size schur specializations', True)),
(BoolVariable('WITH_BF_COMPOSITOR', 'Enable the tile based nodal compositor', True)),
) # end of opts.AddOptions()
localopts.AddVariables(
('BF_X264_CONFIG', 'configuration flags for x264', ''),
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
# (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
('BF_MSVS', 'Generate MSVS project files and solution', False),
(BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),
(BoolVariable('BF_GHOST_DEBUG', 'Make GHOST print events and info to stdout. (very verbose)', False)),
(BoolVariable('WITH_BF_RAYOPTIMIZATION', 'Enable raytracer SSE/SIMD optimization.', False)),
('BF_RAYOPTIMIZATION_SSE_FLAGS', 'SSE flags', ''),
(BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)),
('BUILDBOT_BRANCH', 'Buildbot branch name', ''),
(BoolVariable('WITH_BF_CYCLES', 'Build with the Cycles engine', True)),
(BoolVariable('WITH_BF_CYCLES_CUDA_BINARIES', 'Build with precompiled CUDA binaries', False)),
(BoolVariable('WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'Build several render kernels at once (using BF_NUMJOBS)', False)),
('BF_CYCLES_CUDA_NVCC', 'CUDA nvcc compiler path', ''),
('BF_CYCLES_CUDA_ENV', 'preset environement nvcc will execute in', ''),
('BF_CYCLES_CUDA_BINARIES_ARCH', 'CUDA architectures to compile binaries for', []),
(BoolVariable('WITH_BF_CYCLES_DEBUG', 'Build Cycles engine with extra debugging capabilities', False)),
(BoolVariable('WITH_BF_CYCLES_LOGGING', 'Build Cycles engine with logging support', True)),
(BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
(BoolVariable('WITH_BF_STATICOIIO', 'Statically link to OpenImageIO', False)),
('BF_OIIO', 'OIIO root path', ''),
('BF_OIIO_INC', 'OIIO include path', ''),
('BF_OIIO_LIB', 'OIIO library', ''),
('BF_OIIO_LIBPATH', 'OIIO library path', ''),
('BF_OIIO_LIB_STATIC', 'OIIO static library', ''),
(BoolVariable('WITH_BF_OCIO', 'Build with OpenColorIO', False)),
(BoolVariable('WITH_BF_STATICOCIO', 'Staticly link to OpenColorIO', False)),
('BF_OCIO', 'OCIO root path', ''),
('BF_OCIO_INC', 'OCIO include path', ''),
('BF_OCIO_LIB', 'OCIO library', ''),
('BF_OCIO_LIBPATH', 'OCIO library path', ''),
('BF_OCIO_LIB_STATIC', 'OCIO static library', ''),
(BoolVariable('WITH_BF_BOOST', 'Build with Boost', False)),
(BoolVariable('WITH_BF_STATICBOOST', 'Staticly link to boost', False)),
('BF_BOOST', 'Boost root path', ''),
('BF_BOOST_INC', 'Boost include path', ''),
('BF_BOOST_LIB', 'Boost library', ''),
('BF_BOOST_LIB_INTERNATIONAL', 'Boost library', ''),
('BF_BOOST_LIBPATH', 'Boost library path', ''),
('BF_BOOST_LIB_STATIC', 'Boost static library', ''),
(BoolVariable('WITH_GHOST_XDND', 'Build with drag-n-drop support on Linux platforms using XDND protocol', True)),
(BoolVariable('WITH_BF_CYCLES_OSL', 'Build with OSL sypport in Cycles', False)),
(BoolVariable('WITH_BF_STATICOSL', 'Staticly link to OSL', False)),
('BF_OSL', 'OSL root path', ''),
('BF_OSL_INC', 'OSL include path', ''),
('BF_OSL_LIB', 'OSL library', ''),
('BF_OSL_LIBPATH', 'OSL library path', ''),
('BF_OSL_LIB_STATIC', 'OSL static library', ''),
('BF_OSL_COMPILER', 'OSL compiler', ''),
(BoolVariable('WITH_BF_LLVM', 'Build with LLVM sypport (required for OSL)', False)),
(BoolVariable('WITH_BF_STATICLLVM', 'Staticly link to LLVM', False)),
('BF_LLVM', 'LLVM root path', ''),
('BF_LLVM_LIB', 'LLVM library', ''),
('BF_LLVM_LIBPATH', 'LLVM library path', ''),
('BF_LLVM_LIB_STATIC', 'LLVM static library', ''),
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', '')
) # end of opts.AddOptions()
return localopts
def buildbot_zip(src, dest, package_name, extension):
import zipfile
ln = len(src)+1 # one extra to remove leading os.sep when cleaning root for package_root
flist = list()
# create list of tuples containing file and archive name
for root, dirs, files in os.walk(src):
package_root = os.path.join(package_name, root[ln:])
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
if extension == '.zip':
package = zipfile.ZipFile(dest, 'w', zipfile.ZIP_DEFLATED)
package.comment = package_name + ' is a zip-file containing the Blender software. Visit http://www.blender.org for more information.'
for entry in flist:
package.write(entry[0], entry[1])
package.close()
else:
import tarfile
package = tarfile.open(dest, 'w:bz2')
for entry in flist:
package.add(entry[0], entry[1], recursive=False)
package.close()
bb_zip_name = os.path.normpath(src + os.sep + '..' + os.sep + 'buildbot_upload.zip')
print("creating %s" % (bb_zip_name))
bb_zip = zipfile.ZipFile(bb_zip_name, 'w', zipfile.ZIP_DEFLATED)
print("writing %s to %s" % (dest, bb_zip_name))
bb_zip.write(dest, os.path.split(dest)[1])
bb_zip.close()
print("removing unneeded packed file %s (to keep install directory clean)" % (dest))
os.remove(dest)
print("done.")
def buildslave_print(target, source, env):
return "Running buildslave target"
def buildslave(target=None, source=None, env=None):
"""
Builder for buildbot integration. Used by buildslaves of http://builder.blender.org only.
"""
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin', 'win64-mingw'):
extension = '.zip'
else:
extension = '.tar.bz2'
if env['OURPLATFORM'] == 'win32-mingw':
platform = 'mingw32'
elif env['OURPLATFORM'] == 'win64-mingw':
platform = 'mingw64'
else:
platform = env['OURPLATFORM'].split('-')[0]
if platform == 'linux':
import platform
if "glibc27" in env['BF_INSTALLDIR']:
glibc = "glibc27"
elif "glibc211" in env['BF_INSTALLDIR']:
glibc = "glibc211"
bitness = platform.architecture()[0]
if bitness == '64bit':
platform = 'linux-' + glibc + '-x86_64'
elif bitness == '32bit':
platform = 'linux-' + glibc + '-i686'
if platform == 'darwin':
platform = 'OSX-' + env['MACOSX_DEPLOYMENT_TARGET'] + '-' + env['MACOSX_ARCHITECTURE']
branch = env['BUILDBOT_BRANCH']
outdir = os.path.abspath(env['BF_INSTALLDIR'])
package_name = 'blender-' + VERSION+'-'+HASH + '-' + platform
if branch != '':
package_name = branch + '-' + package_name
package_dir = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name)
package_archive = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name + extension)
try:
if os.path.exists(package_archive):
os.remove(package_archive)
if os.path.exists(package_dir):
shutil.rmtree(package_dir)
except Exception, ex:
sys.stderr.write('Failed to clean up old package files: ' + str(ex) + '\n')
return 1
buildbot_zip(outdir, package_archive, package_name, extension)
return 0
def NSIS_print(target, source, env):
return "Creating NSIS installer for Blender"
def NSIS_Installer(target=None, source=None, env=None):
print "="*35
if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
print "NSIS installer is only available on Windows."
exit()
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
bitness = '32'
elif env['OURPLATFORM'] in ('win64-vc', 'win64-mingw'):
bitness = '64'
start_dir = os.getcwd()
rel_dir = os.path.join(start_dir,'release','windows','installer')
install_base_dir = start_dir + os.sep
bf_installdir = os.path.join(os.getcwd(),env['BF_INSTALLDIR'])
bf_installdir = os.path.normpath(bf_installdir)
doneroot = False
rootdirconts = []
datafiles = ''
deldatafiles = ''
deldatadirs = ''
l = len(bf_installdir)
for dp,dn,df in os.walk(bf_installdir):
# install
if not doneroot:
for f in df:
rootdirconts.append(os.path.join(dp,f))
doneroot = True
else:
if len(df)>0:
datafiles += "\n" +r'SetOutPath $INSTDIR'+dp[l:]+"\n\n"
for f in df:
outfile = os.path.join(dp,f)
datafiles += ' File '+outfile + "\n"
# uninstall
deldir = dp[l+1:]
if len(deldir)>0:
deldatadirs = "RMDir $INSTDIR\\" + deldir + "\n" + deldatadirs
deldatadirs = "RMDir /r $INSTDIR\\" + deldir + "\\__pycache__\n" + deldatadirs
for f in df:
deldatafiles += 'Delete \"$INSTDIR\\' + os.path.join(deldir, f) + "\"\n"
#### change to suit install dir ####
inst_dir = install_base_dir + env['BF_INSTALLDIR']
os.chdir(rel_dir)
ns = open("00.sconsblender.nsi","r")
ns_cnt = str(ns.read())
ns.close()
# var replacements
ns_cnt = string.replace(ns_cnt, "[DISTDIR]", os.path.normpath(inst_dir+os.sep))
ns_cnt = string.replace(ns_cnt, "[VERSION]", VERSION_DISPLAY)
ns_cnt = string.replace(ns_cnt, "[SHORTVERSION]", VERSION)
ns_cnt = string.replace(ns_cnt, "[RELDIR]", os.path.normpath(rel_dir))
ns_cnt = string.replace(ns_cnt, "[BITNESS]", bitness)
# do root
rootlist = []
for rootitem in rootdirconts:
rootlist.append("File \"" + rootitem + "\"")
rootstring = string.join(rootlist, "\n ")
rootstring = rootstring
rootstring += "\n\n"
ns_cnt = string.replace(ns_cnt, "[ROOTDIRCONTS]", rootstring)
# do delete items
delrootlist = []
for rootitem in rootdirconts:
delrootlist.append("Delete $INSTDIR\\" + rootitem[l+1:])
delrootstring = string.join(delrootlist, "\n ")
delrootstring += "\n"
ns_cnt = string.replace(ns_cnt, "[DELROOTDIRCONTS]", delrootstring)
ns_cnt = string.replace(ns_cnt, "[DODATAFILES]", datafiles)
ns_cnt = string.replace(ns_cnt, "[DELDATAFILES]", deldatafiles)
ns_cnt = string.replace(ns_cnt, "[DELDATADIRS]", deldatadirs)
tmpnsi = os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+"00.blender_tmp.nsi")
new_nsis = open(tmpnsi, 'w')
new_nsis.write(ns_cnt)
new_nsis.close()
print "NSIS Installer script created"
os.chdir(start_dir)
print "Launching 'makensis'"
cmdline = "makensis " + "\""+tmpnsi+"\""
startupinfo = subprocess.STARTUPINFO()
#startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = True)
data, err = proc.communicate()
rv = proc.wait()
if rv != 0:
print
print data.strip().split("\n")[-1]
return rv
def cudakernels_print(target, source, env):
return "Running cudakernels target"
def cudakernels(target=None, source=None, env=None):
"""
Builder for cuda kernels compilation. Used by release build environment only
"""
# Currently nothing to do, everything is handled by a dependency resolver
pass
def check_environ():
problematic_envvars = ""
for i in os.environ:
try:
os.environ[i].decode('ascii')
except UnicodeDecodeError:
problematic_envvars = problematic_envvars + "%s = %s\n" % (i, os.environ[i])
if len(problematic_envvars)>0:
print("================\n\n")
print("@@ ABORTING BUILD @@\n")
print("PROBLEM DETECTED WITH ENVIRONMENT")
print("---------------------------------\n\n")
print("A problem with one or more environment variable was found")
print("Their value contain non-ascii characters. Check the below")
print("list and override them locally to be ASCII-clean by doing")
print("'set VARNAME=cleanvalue' on the command-line prior to")
print("starting the build process:\n")
print(problematic_envvars)
return False
else:
return True

View File

@@ -1,184 +0,0 @@
"""SCons.Tool.gcc
Tool-specific initialization for MinGW (http://www.mingw.org/)
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/mingw.py 4043 2009/02/23 09:06:45 scons"
import os
import os.path
import string
import SCons.Action
import SCons.Builder
import SCons.Defaults
import SCons.Tool
import SCons.Util
# This is what we search for to find mingw:
prefixes = SCons.Util.Split("""
mingw32-
i386-mingw32msvc-
i486-mingw32msvc-
i586-mingw32msvc-
i686-mingw32msvc-
i686-pc-mingw32-
""")
def find(env):
for prefix in prefixes:
# First search in the SCons path and then the OS path:
if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
return prefix
return ''
def shlib_generator(target, source, env, for_signature):
cmd = SCons.Util.CLVar(['$SHLINK'])
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
if dll: cmd.extend(['-o', dll])
cmd.extend(['$SOURCES', '$SHLINKFLAGS', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
insert_def = env.subst("$WINDOWS_INSERT_DEF")
if not insert_def in ['', '0', 0] and def_target: \
cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
return [cmd]
def shlib_emitter(target, source, env):
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
no_import_lib = env.get('no_import_lib', 0)
if not dll:
raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
if not no_import_lib and \
not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
# Append an import library to the list of targets.
target.append(env.ReplaceIxes(dll,
'SHLIBPREFIX', 'SHLIBSUFFIX',
'LIBPREFIX', 'LIBSUFFIX'))
# Append a def file target if there isn't already a def file target
# or a def file source. There is no option to disable def file
# target emitting, because I can't figure out why someone would ever
# want to turn it off.
def_source = env.FindIxes(source, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
if not def_source and not def_target:
target.append(env.ReplaceIxes(dll,
'SHLIBPREFIX', 'SHLIBSUFFIX',
'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX'))
return (target, source)
shlib_action = SCons.Action.Action(shlib_generator, generator=1)
res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
res_builder = SCons.Builder.Builder(action=res_action, suffix='.o',
source_scanner=SCons.Tool.SourceFileScanner)
SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
def generate(env):
mingw = find(env)
if mingw:
dir = os.path.dirname(mingw)
env.PrependENVPath('PATH', dir )
# Most of mingw is the same as gcc and friends...
gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas', 'm4']
for tool in gnu_tools:
SCons.Tool.Tool(tool)(env)
#... but a few things differ:
env['CC'] = mingw + 'gcc'
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
env['CXX'] = mingw + 'g++'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
env['SHLINKCOM'] = shlib_action
env['LDMODULECOM'] = shlib_action
env.Append(SHLIBEMITTER = [shlib_emitter])
env['RANLIB'] = mingw + 'ranlib'
env['LINK'] = mingw + 'gcc'
env['AS'] = mingw + 'as'
env['AR'] = mingw + 'ar'
env['WIN32DEFPREFIX'] = ''
env['WIN32DEFSUFFIX'] = '.def'
env['WINDOWSDEFPREFIX'] = '${WIN32DEFPREFIX}'
env['WINDOWSDEFSUFFIX'] = '${WIN32DEFSUFFIX}'
env['SHOBJSUFFIX'] = '.o'
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
env['RC'] = mingw + 'windres'
env['RCFLAGS'] = SCons.Util.CLVar('')
env['RCINCFLAGS'] = '$( ${_concat(RCINCPREFIX, CPPPATH, RCINCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
env['RCINCPREFIX'] = '--include-dir '
env['RCINCSUFFIX'] = ''
env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
env['BUILDERS']['RES'] = res_builder
# Some setting from the platform also have to be overridden:
env['OBJPREFIX'] = ''
env['OBJSUFFIX'] = '.o'
env['LIBPREFIX'] = 'lib'
env['LIBSUFFIX'] = '.a'
env['SHOBJPREFIX'] = '$OBJPREFIX'
env['SHOBJSUFFIX'] = '$OBJSUFFIX'
env['PROGPREFIX'] = ''
env['PROGSUFFIX'] = '.exe'
env['LIBPREFIX'] = ''
env['LIBSUFFIX'] = '.lib'
env['SHLIBPREFIX'] = ''
env['SHLIBSUFFIX'] = '.dll'
env['LIBPREFIXES'] = [ '$LIBPREFIX' ]
env['LIBSUFFIXES'] = [ '$LIBSUFFIX' ]
def exists(env):
return find(env)
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=4 shiftwidth=4:

View File

@@ -1,353 +0,0 @@
"""tools.mstoolkit
Tool-specific initialization for Microsoft Visual C/C++ Toolkit Commandline
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2004 John Connors
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
import os.path
import re
import string
import types
import SCons.Action
import SCons.Builder
import SCons.Errors
import SCons.Platform.win32
import SCons.Tool
import SCons.Util
import SCons.Warnings
CSuffixes = ['.c', '.C']
CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
def get_msvctoolkit_paths():
"""Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
three environment variables that should be set in order to execute
the MSVC .NET tools properly, if the information wasn't available
from the registry."""
MSToolkitDir = None
paths = {}
exe_path = ''
lib_path = ''
include_path = ''
# First, we get the shell folder for this user:
if not SCons.Util.can_read_reg:
raise SCons.Errors.InternalError, "No Windows registry module was found"
# look for toolkit
if os.environ.has_key('VCToolkitInstallDir'):
MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
else:
# last resort -- default install location
MSToolkitDir = r'C:\Program Files\Microsoft Visual C++ Toolkit 2003'
# look for platform sdk
if os.environ.has_key('MSSdk'):
PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
else:
try:
PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
PlatformSDKDir = str(PlatformSDKDir)
except SCons.Util.RegError:
raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
# look for DX Sdk (expecting DX9)
# dxsdk docs have a directory key, look for it, extract path
#dxsdkdocs = ""
DXsdkDir = ""
#try:
# dxsdkdocs = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\DirectX SDK\DX9SDK Doc Path')
#except SCons.Util.RegError:
# raise SCons.Errors.InternalError, "The DXSDK directory was not found in the registry."
if os.environ.has_key('DXSDK_DIR'):
DXsdkDir = os.path.normpath(os.environ['DXSDK_DIR'])
#DXsdkDir = os.path.split(dxsdkdocs[0])[0]
DXsdkDir = os.path.split(DXsdkDir)[0]
include_path = r'%s\include;%s\include;%s\include' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
lib_path = r'%s\lib;%s\lib;%s\lib' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
return (include_path, lib_path, exe_path, PlatformSDKDir)
def validate_vars(env):
"""Validate the PDB, PCH, and PCHSTOP construction variables."""
if env.has_key('PCH') and env['PCH']:
if not env.has_key('PCHSTOP'):
raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
if not SCons.Util.is_String(env['PCHSTOP']):
raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
def pch_emitter(target, source, env):
"""Sets up the PDB dependencies for a pch file, and adds the object
file target."""
validate_vars(env)
pch = None
obj = None
for t in target:
if SCons.Util.splitext(str(t))[1] == '.pch':
pch = t
if SCons.Util.splitext(str(t))[1] == '.obj':
obj = t
if not obj:
obj = SCons.Util.splitext(str(pch))[0]+'.obj'
target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target)
env.Precious(env['PDB'])
return (target, source)
def object_emitter(target, source, env, parent_emitter):
"""Sets up the PDB and PCH dependencies for an object file."""
validate_vars(env)
parent_emitter(target, source, env)
if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target)
env.Precious(env['PDB'])
if env.has_key('PCH') and env['PCH']:
env.Depends(target, env['PCH'])
return (target, source)
def static_object_emitter(target, source, env):
return object_emitter(target, source, env,
SCons.Defaults.StaticObjectEmitter)
def shared_object_emitter(target, source, env):
return object_emitter(target, source, env,
SCons.Defaults.SharedObjectEmitter)
pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
def pdbGenerator(env, target, source, for_signature):
if target and env.has_key('PDB') and env['PDB']:
return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
'/DEBUG']
def win32ShlinkTargets(target, source, env, for_signature):
listCmd = []
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature))
return listCmd
def win32ShlinkSources(target, source, env, for_signature):
listCmd = []
deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
for src in source:
if src == deffile:
# Treat this source as a .def file.
listCmd.append("/def:%s" % src.get_string(for_signature))
else:
# Just treat it as a generic source file.
listCmd.append(src)
return listCmd
def win32LibEmitter(target, source, env):
# SCons.Tool.msvc.validate_vars(env)
dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX")
no_import_lib = env.get('no_import_lib', 0)
if not dll:
raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
if env.get("WIN32_INSERT_DEF", 0) and \
not env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX"):
# append a def file to the list of sources
source.append(env.ReplaceIxes(dll,
"SHLIBPREFIX", "SHLIBSUFFIX",
"WIN32DEFPREFIX", "WIN32DEFSUFFIX"))
if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target)
env.Precious(env['PDB'])
if not no_import_lib and \
not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
# Append an import library to the list of targets.
target.append(env.ReplaceIxes(dll,
"SHLIBPREFIX", "SHLIBSUFFIX",
"LIBPREFIX", "LIBSUFFIX"))
# and .exp file is created if there are exports from a DLL
target.append(env.ReplaceIxes(dll,
"SHLIBPREFIX", "SHLIBSUFFIX",
"WIN32EXPPREFIX", "WIN32EXPSUFFIX"))
return (target, source)
def prog_emitter(target, source, env):
#SCons.Tool.msvc.validate_vars(env)
if env.has_key('PDB') and env['PDB']:
env.SideEffect(env['PDB'], target)
env.Precious(env['PDB'])
return (target,source)
def RegServerFunc(target, source, env):
if env.has_key('register') and env['register']:
ret = regServerAction([target[0]], [source[0]], env)
if ret:
raise SCons.Errors.UserError, "Unable to register %s" % target[0]
else:
print "Registered %s sucessfully" % target[0]
return ret
return 0
regServerAction = SCons.Action.Action("$REGSVRCOM")
regServerCheck = SCons.Action.Action(RegServerFunc, None)
shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')
compositeLinkAction = shlibLinkAction + regServerCheck
def generate(env):
"""Add Builders and construction variables for MSVC++ to an Environment."""
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
for suffix in CSuffixes:
static_obj.add_action(suffix, SCons.Defaults.CAction)
shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
for suffix in CXXSuffixes:
static_obj.add_action(suffix, SCons.Defaults.CXXAction)
shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)
SCons.Tool.createStaticLibBuilder(env)
SCons.Tool.createSharedLibBuilder(env)
SCons.Tool.createProgBuilder(env)
env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s"%File(PDB)) or ""}'])
env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo$TARGET $CCPCHFLAGS $CCPDBFLAGS'
env['CC'] = 'cl'
env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
env['CCCOM'] = '$CC $CCFLAGS $CCCOMFLAGS'
env['SHCC'] = '$CC'
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CCCOMFLAGS'
env['CXX'] = '$CC'
env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)')
env['CXXCOM'] = '$CXX $CXXFLAGS $CCCOMFLAGS'
env['SHCXX'] = '$CXX'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS'
env['CPPDEFPREFIX'] = '/D'
env['CPPDEFSUFFIX'] = ''
env['INCPREFIX'] = '/I'
env['INCSUFFIX'] = ''
env['OBJEMITTER'] = static_object_emitter
env['SHOBJEMITTER'] = shared_object_emitter
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
env['RC'] = 'rc'
env['RCFLAGS'] = SCons.Util.CLVar('')
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
CScan = env.get_scanner('.c')
if CScan:
CScan.add_skey('.rc')
env['BUILDERS']['RES'] = res_builder
include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths()
env.PrependENVPath('INCLUDE', include_path)
env.PrependENVPath('LIB', lib_path)
env.PrependENVPath('PATH', exe_path)
env['ENV']['CPU'] = 'i386'
env['ENV']['MSSDK'] = sdk_path
env['ENV']['BkOffice'] = sdk_path
env['ENV']['Basemake'] = sdk_path + "\\Include\\BKOffice.Mak"
env['ENV']['INETSDK'] = sdk_path
env['ENV']['MSSDK'] = sdk_path
env['ENV']['MSTOOLS'] = sdk_path
env['ENV']['TARGETOS'] = 'WINNT'
env['ENV']['APPVER'] = '5.0'
env['CFILESUFFIX'] = '.c'
env['CXXFILESUFFIX'] = '.cc'
env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS'
env['BUILDERS']['PCH'] = pch_builder
env['AR'] = 'lib.exe' #'"' +sdk_path + '\\bin\\Win64\\lib.exe"'
env['ARFLAGS'] = SCons.Util.CLVar('/nologo')
env['ARCOM'] = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
env['SHLINK'] = '$LINK'
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll')
env['_SHLINK_TARGETS'] = win32ShlinkTargets
env['_SHLINK_SOURCES'] = win32ShlinkSources
env['SHLINKCOM'] = compositeLinkAction
env['SHLIBEMITTER']= win32LibEmitter
env['LINK'] = 'link.exe' #'"' +sdk_path + '\\bin\\Win64\\' + 'link.exe"'
env['LINKFLAGS'] = SCons.Util.CLVar('/nologo')
env['_PDB'] = pdbGenerator
env["TEMPFILE"] = SCons.Platform.win32.TempFileMunge
env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $SOURCES")}'
env['PROGEMITTER'] = prog_emitter
env['LIBDIRPREFIX']='/LIBPATH:'
env['LIBDIRSUFFIX']=''
env['LIBLINKPREFIX']=''
env['LIBLINKSUFFIX']='$LIBSUFFIX'
env['WIN32DEFPREFIX'] = ''
env['WIN32DEFSUFFIX'] = '.def'
env['WIN32_INSERT_DEF'] = 0
env['WIN32EXPPREFIX'] = ''
env['WIN32EXPSUFFIX'] = '.exp'
env['REGSVRACTION'] = regServerCheck
env['REGSVR'] = os.path.join(SCons.Platform.win32.get_system_root(),'System32','regsvr32')
env['REGSVRFLAGS'] = '/s '
env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS $TARGET'
def exists(env):
return env.Detect('cl')

View File

@@ -25,7 +25,16 @@ TARBALL="blender-$VERSION.tar.gz"
cd "$blender_srcdir"
# not so nice, but works
FILTER_FILES_PY="import os, sys; [print(l[:-1]) for l in sys.stdin.readlines() if os.path.isfile(l[:-1])]"
FILTER_FILES_PY=\
"import os, sys; "\
"[print(l[:-1]) for l in sys.stdin.readlines() "\
"if os.path.isfile(l[:-1]) "\
"if os.path.basename(l[:-1]) not in {"\
"'.gitignore', "\
"'.gitmodules', "\
"'.arcconfig', "\
"}"\
"]"
# Build master list
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."

View File

@@ -1,104 +0,0 @@
Blender CMake build system
============================
Contents
---------------
1. Introduction
2. Obtaining CMake
3. Building Blender
4. Generic Setup
5. Configuring the build after SVN updates
1. Introduction
---------------
This document describes general usage of the new CMake scripts. The
inner workings will be described in blender-cmake-dev.txt (TODO).
2. Obtaining CMake
------------------
CMake for can either be downloaded using your favorite package manager
or is also available from the CMake website at http://www.cmake.org
The website also contains some documentation on CMake usage but I found
the man page alone pretty helpful.
3. Building Blender
-------------------
Building Blender requires obtaining a compiler, library dependencies,
and correct setup depending on the system. For details on how to set
up a build on various operating systems, see the wiki documentation:
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender
4. Generic Setup
----------------
CMake allows one to generate the build project files and binary objects
outside the source tree which can be pretty handy in working and experimenting
with different Blender configurations (Audio/NoAudio, GameEngine/NoGameEngine etc.)
while maintaining a clean source tree. It also makes it possible to generate files
for different build systems on the same source tree. This also has benefits for
general SVN management for the developer as patches and submit logs are much cleaner.
Create a directory outside the blender source tree where you would like to build
Blender (from now on called $BLENDERBUILD). On the commandline you can then run
the cmake command to generate your initial build files. First just run 'cmake' which
will inform you what the available generators are. Thn you can run
'cmake -G generator $BLENDERSOURCE' to generate the build files. Here is an example
of all this for Xcode:
% mkdir $BLENDERBUILD
% cd $BLENDERBUILD
% cmake
...
...
--version [file] = Show program name/version banner and exit.
Generators
The following generators are available on this platform:
KDevelop3 = Generates KDevelop 3 project files.
Unix Makefiles = Generates standard UNIX makefiles.
Xcode = Generate XCode project files.
% cmake -G Xcode $BLENDERSOURCE
...
...
-- Configuring blender
-- Configuring blenderplayer
-- Configuring done
-- Generating done
-- Build files have been written to: $BLENDERBUILD
This will generate the build files with default values. Specific features can
be enabled or disabled by running the ccmake "GUI" from $BLENDERBUILD as follows:
% ccmake $BLENDERSOURCE
A number of options appear which can be changed depending on your needs and
available dependencies (e.g. setting WITH_OPENEXR to OFF will disable support
for OpenEXR). It will also allow you to override default and detected paths
(e.g. Python directories) and compile and link flags. When you are satisfied
used ccmake to re-configure the build files and exit.
It is also possible to use the commandline of 'cmake' to override certain
of these settings.
5. Configuring the build after SVN updates
------------------------------------------
The $BLENDERBUILD directory maintains a file called CMakeCache.txt which
remembers the initial run's settings for subsequent generation runs. After
SVN updates that contain changes to the build system, rebuilding Blender will
automatically invoke CMake to regenerate the CMakeCache.txt and other files
as needed.
/Jacques Beaurain (jbinto)

View File

@@ -1,192 +0,0 @@
Internals of Blenders SCons scripts
===================================
Scope
------
This document describes the architecture of the SCons scripts for
Blender. An overview of available functionality and how to modify,
extend and maintain the system.
Audience
--------
This document is for developers who need to modify the system,
ie. add or remove new libraries, add new arguments for SCons, etc.
Files and their meaning
-----------------------
The main entry point for the build system is the SConstruct-file in
$BLENDERHOME. This file creates the first BlenderEnvironment to work
with, reads in options, and sets up some directory structures. Further
it defines some targets.
Platform-specific configurations are in $BLENDERHOME/config. The
filenames have the form (platform)-config.py, where platform one of:
* darwin
* linux
* win32-mingw
* win32-vc
The user can override options by creating a file
$BLENDERHOME/user-config.py. It can have any option from
(platform)-config.py. Options in this file will override the platform
defaults.
Much of the actual functionality can be found in the python scripts
in the directory $BLENDERHOME/tools, with Blender.py defining the
bulk of the functionality. btools.py has some helper functions, and
bcolors.py is for the terminal colors. mstoolkit.py and crossmingw.py
are modules which set up SCons for the MS VC++ 2003 toolkit and
the cross-compile toolset for compiling Windows binaries on Linux
respectively. Note: the cross-compile doesn't work yet for Blender,
but is added in preparation for having it work in the distant future.
BlenderEnvironment
------------------
The module Blender.py implements a BlenderEnvironment class, derived
from the SConsEnvironment of SCons. This is done to wrap some often
used functionality. The BlenderEnvironment offers two important
wrappers: BlenderProg() and BlenderLib(). The first one is used to
specify a binary to be built, the second one is used to specify what
static library is built from given sources.
Build a static library called "somelib". The system handles library
pre- and suffixes automatically, you don't need to bother yourself
with these details:
env = BlenderEnvironment(ENV = os.environ) # create an environment
env.BlenderLib(libname="somelib", sources=['list.c','with.c','sources.c'],
includes=['/list/with/include/paths', '.', '..'],
defines=['LIST_WITH', 'CPP_DEFINES', 'TO_USE'],
libtype=['blender', 'common'] # this is a list with libtypes. Normally you don't
# need to specify this, but if you encounter linking
# problems you may need this
priority=[10, 20] # Priorities, list as long as libtype, priority per type
compileflags=['/O2'] # List of compile flags needed for this particular library.
# used only in rare cases, like SOLID, qhull and Bullet
)
There should be no need to ever add an extra BlenderProg to the
existing ones in SConstruct, see that file for its use, and Blender.py
for its implementation.
The new system works so that using these wrappers, has all libraries
(and programs) register with a central repository. This means that
adding a new library is as easy as just creating the new SConscript
and making sure that it gets called properly. Linking and such will
then be handled automatically.
If you want that adding new source files for a certain library
is handled automatically, you can use the Glob() function from
the BlenderEnvironment to create lists of needed files. See
$BLENDERHOME/source/blender/src/SConscript for an example. Keep in
mind that this will add any new file that complies to the rule given
to the Glob() function. There are a few (external) libraries with
which this can't be used, because it'd take files that shouldn't be
compiled, and create subsequentially problems during the linking stage
(like SOLID, qhull, Bullet).
Linking order and priorities
----------------------------
As shown above, you can give a library a priority in a certain
group. If you need to make sure that a Blender library is linked
before or after another one, you can give it a priority. To debug
the priorities us BF_PRIORITYLIST=1 on the command-line while running
a build.
% scons BF_PRIORITYLIST=1
This will give a list with values suggested by the system. Make
changes to all SConscripts in question to reflect or change the
values given by this command. ALWAYS check this after adding a new
internal, external library or core library, and make sure there are
sane values. You can use large and negative numbers to test with,
but after you've got a working linking order, do change the system
to reflect BF_PRIORITYLIST values.
Also, if you find that a library needs to be given multiple times to
the linker, you can do that by giving a python list with the names
of the available library types. They are currently:
B.possible_types = ['core', 'common', 'blender', 'intern',
'international', 'game', 'game2',
'player', 'player2', 'system']
More groups can be added, but that should be carefully considered,
as it may lead to large-scale changes. The current amount of libraries
should suffice.
The central repository is utilised in the SConstruct in two
ways. Firstly, it is used to determine the order of all static
libraries to link into the main Blender executable. Secondly, it
is used to keep track of all built binaries and their location,
so that they can be properly copied to BF_INSTALLDIR.
The libraries can be fetched in their priority order with
create_blender_liblist from Blender.py, see the SConstruct on how
it is used.
The program repository is the global list program_list from
Blender.py. See SConstruct for its usage.
Adding a new option and libraries
---------------------------------
Lets say we want to add WITH_BF_NEWLIB, which will
enable or disable a new feature library with sources in
$BLENDERHOME/source/blender/newlib. This 'newlib' needs external
headers from a 3rd party library '3rdparty'. For this we want to
add a set of options BF_3RDPARTY, BF_3RDPARTY_INC, BF_3RDPARTY_LIB,
BF_3RDPARTY_LIBPATH:
1) Add all mentiond options to all (platform)-config.py
files. WITH_BF_NEWLIB is a boolean option ('true', 'false'),
the rest are strings with paths and library names. See the
OpenEXR options for example.
2) Add all options to the argument checking function
validate_arguments() in btools.py. See again OpenEXR options
for example.
3) Add all options to the option reading function read_opts()
in btools.py. See again OpenEXR options for example. All default
values can be empty, as the actual default values are in the
(platform)-config.py files.
4) Add BF_3RDPARTY_LIB to the function setup_syslibs()
and BF_3RDPARTY_LIBPATH to the function setup_staticlibs()
in Blender.py
At this stage we have prepared all option setting and linking needs,
but we still need to add in the compiling of the 'newlib'.
5) Create a SConscript in $BLENDERHOME/source/blender/newlib. Look
at ie. $BLENDERHOME/source/blender/src/SConscript for
template. The new SConscript will register the new library
like so:
env.BlenderLib(libname='newlib', sources=sourcefiles, includes=incs) # the rest of the arguments get defaults = empty lists and values
6) Edit $BLENDERHOME/source/blender/SConscript with the following
addition:
if env['WITH_BF_NEWLIB'] == 1:
SConscript(['newlib/SConscript'])
After this you can see if this works by trying to build:
% scons WITH_BF_NEWLIB=1 # build with newlib
% scons WITH_BF_NEWLIB=0 # disable newlib
This is all what should be needed. Changing the library name doesn't
need changes elsewhere in the system, as it is handled automatically
with the central library repository.
Enjoy the new system!!
/Nathan Letwory (jesterKing)

View File

@@ -1,230 +0,0 @@
Blenders SCons build scripts
============================
Introduction
------------
Since the beginning of 2004 Blender has had the SCons system as a
build option. SCons is a Python-based, accurate build system. The
scripts that were implemented in the first iteration worked, but
the system grew quickly into such a state that maintaining it became
a nightmare, and adding new features was just horrible, leading to
many hacks without much sense in the overall structure.
The rewrite has been waiting for a long time. Jonathan Jacobs provided
a first overhaul of the scripts, which I used in the first phase of
the rewrite. To make the system as maintainable as possible I made
some radical changes, but thanks go to Jonathan for providing me
with the patch to get started.
This document describes the usage of the new SCons scripts. The
inner workings are described in scons-dev.txt.
Building Blender
----------------
To build Blender with the SCons scripts you need a full Python
install, version 2.4 or later (http://www.python.org). We already provide
a scons-local installation, which can be found in the scons/ subdirectory.
This document uses the scons-local installation for its examples.
Check from the page
http://www.blender.org/development/building-blender/getting-dependencies/
that you have all dependencies needed for building Blender. Note that for
windows many of these dependencies already come in the lib/windows module
from CVS.
In the base directory of the sources (from now on called $BLENDERHOME)
you'll see a file named SConstruct. This is the entry point for the
SCons build system. In a terminal, change to this directory. To just
build, start the SCons entry script on Windows (will be used for the remainder
of this document):
% python scons\scons.py
On a Unix-compatible system it would be
% python ./scons/scons.py
This will start the build process with default values. Depending
on your platform you may see color in your output (non-Windows
machines). In the the beginning an overview of targets and arguments
from the command-line is given, then all libraries and binaries to
build are configured.
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to
finally copy all needed files to get a proper setup. The BF_DOCDIR is
used to generate Blender Python documentation files to. These
variables have default values for every platform in
$BLENDERHOME/config/(platform)-config.py. After the build successfully
completes, you can find everything you need in BF_INSTALLDIR.
If you want to create the installer package of Blender on Windows you'll
need to install nullsoft scriptable install system from http://nsis.sf.net.
As an extra dependency, you need the MoreInfo plugin too. The creation of
the installer is tied into the build process and can be triggered with:
% python scons\scons.py nsis
Configuring the build
---------------------
The default values for your platform can be found in the directory
$BLENDERHOME/config. Your platform specific defaults are in
(platform)-config.py, where platform is one of:
- linux, for machines running Linux
- win32-vc, for Windows machines, compiling with a Microsoft compiler
- win32-mingw, for Windows machines, compiling with the MingW compiler
- darwin, for OS X machines
(TBD: add cygwin, solaris and freebsd support)
These files you will normally not change. If you need to override
a default value, make a file called $BLENDERHOME/user-config.py, and copy
settings from the config/(platform)-config.py that you want to change. Don't
copy the entire file (unless explicitely stated in the configuration file),
because you may not get updated options you don't change yourself, which may
result in build errors.
You can use BF_CONFIG argument to override the default user-config.py
check. This is just like the user-config.py, but just with another name:
% python scons\scons.py BF_CONFIG=myownsettings
If you want to quickly test a new setting, you can give the option
also on the command-line:
% python scons\scons.py BF_BUILDDIR=../mybuilddir WITH_BF_OPENEXR=0
This command sets the build directory to BF_BUILDDIR and disables
OpenEXR support.
If you need to know what can be set through the command-line, run
scons with -h:
% python scons\scons.py -h
This command will print a long list with settable options and what
every option means. Many of the default values will be empty, and
from a fresh checkout without a user-config.py the actual values
are the defaults as per $BLENDERHOME/config/(platform)-config.py
(unless you have overridden any of them in your
$BLENDERHOME/user-config.py).
NOTE: The best way to avoid confusion is the
copy $BLENDERHOME/config/(platform)-config.py to
$BLENDERHOME/user-config.py. You should NEVER have to modify
$BLENDERHOME/config/(platform)-config.py
Configuring the output
----------------------
This rewrite features a cleaner output during the build process. If
you need to see the full command-line for compiles, then you can
change that behaviour. Also the use of colors can be changed:
% python scons\scons.py BF_FANCY=0
This will disable the use of colors.
% python scons\scons.py BF_QUIET=0
This will give the old, noisy output. Every command-line per
compile is printed out in its full glory. This is very useful when
debugging problems with compiling, because you can see what the
included paths are, what defines are given on the command-line,
what compiler switches are used, etc.
Compiling Only Some Libraries
-----------------------------
Our implementation now has support for specifying a list of libraries that are
exclusively compiled, ignoring all other libraries. This is invoked
with the BF_QUICK arguments; for example:
% python scons\scons.py BF_QUICK=src,bf_blenkernel
Note that this not the same as passing a list of folders as in the
makefile's "quicky" command. In Scons, all of Blender's code modules
are in their own static library; this corresponds to one-lib-per-folder
in some cases (especially in blender/source/blender).
To obtain a list of the libraries, simple fire up scons and CTRL-C out once
it finishes configuring (and printing to the console) the library list.
Compiling Libraries With Debug Profiling
----------------------------------------
Scons has support for specifying a list of libraries that are compiled
with debug profiling enabled. This is implemented in two commands:
BF_QUICKDEBUG which is a command-line argument and BF_DEBUG_LIBS, which goes
in your user-config.py
BF_QUICKDEBUG is similar to BF_QUICK:
% python scons\scons.py BF_QUICKDEBUG=src,bf_blenkernel,some-other-lib
To use BF_DEBUG_LIBS, put something like the following in you user-config.py:
BF_DEBUG_LIBS = ['bf_blenlib', 'src', 'some_lib']
For instructions on how to find the names of the libraries (folders) you
wish to use, see the above section. Note that the command BF_DEBUG
(see below) will override these settings and compile ALL of Blender with
debug symbols. Also note that BF_QUICKDEBUG and BF_DEBUG_LIBS are combined;
for example, setting BF_QUICKDEBUG won't overwrite the contents of BF_DEBUG_LIBS.
Supported toolset
-----------------
WINDOWS
* msvc, this is a full install of Microsoft Visual C++. You'll
likely have the .NET Framework SDK, Platform SDK and DX9 SDK
installed * mstoolkit, this is the free MS VC++ 2003 Toolkit. You
need to verify you have also the SDKs installed as mentioned
for msvc. * mingw, this is a minimal MingW install. TBD: write
proper instructions on getting needed packages.
On Windows with all of the three toolset installed you need to
specify what toolset to use
% python scons\scons.py BF_TOOLSET=msvc
% python scons\scons.py BF_TOOLSET=mingw
LINUX and OS X
Currently only the default toolsets are supported for these platforms,
so nothing special needs to be told to SCons when building. The
defaults should work fine in most cases.
Examples
--------
Build Blender with the defaults:
% python scons\scons.py
Build Blender, but disable OpenEXR support:
% python scons\scons.py WITH_BF_OPENEXR=0
Build Blender, enable debug symbols:
% python scons\scons.py BF_DEBUG=1
Build Blender, install to different directory:
% python scons\scons.py BF_INSTALLDIR=../myown/installdir
Build Blender in ../myown/builddir and install to ../myown/installdir:
% python scons\scons.py BF_BUILDDIR=../myown/builddir BF_INSTALLDIR=../myown/installdir
Clean BF_BUILDDIR:
% python scons\scons.py clean
/Nathan Letwory (jesterKing)

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,10 @@
*
*/
/** \defgroup curve_fit Curve Fitting Library
* \ingroup extern
*/
/** \defgroup bullet Bullet Physics Library
* \ingroup extern
* \see \ref bulletdoc

View File

@@ -10,26 +10,14 @@
* \ingroup intern
*/
/** \defgroup boolop boolop
* \ingroup intern
*/
/** \defgroup ctr container
* \ingroup intern
*/
/** \defgroup decimation decimation
* \ingroup intern
*/
/** \defgroup elbeem elbeem
* \ingroup intern
*/
/** \defgroup bsp bsp
* \ingroup intern
*/
/** \defgroup iksolver iksolver
* \ingroup intern
*/
@@ -50,7 +38,7 @@
* \ingroup intern
*/
/** \defgroup opennl opennl
/** \defgroup eigen eigen
* \ingroup intern
*/

View File

@@ -7,7 +7,7 @@
* These pages document the source code of blender.
*
* \subsection implinks Important Links
* - <a href="http://projects.blender.org">projects.blender.org</a> with <a href="http://projects.blender.org/tracker/index.php?group_id=9&atid=498">bug tracker</a>
* - <a href="http://developer.blender.org">developer.blender.org</a> with bug tracker.
* - <a href="http://wiki.blender.org/index.php/Dev:Contents">Development documents</a> on our wiki.
*
* \subsection blother Other

View File

@@ -11,7 +11,6 @@
/** \defgroup bmesh BMesh
* \ingroup blender
*/
/** \defgroup texture Texturing */
/** \defgroup compositor Compositing */
/** \defgroup python Python
@@ -93,36 +92,48 @@
/* ================================ */
/** \defgroup blender blender */
/** \defgroup blender Blender */
/** \defgroup blf blenfont
/** \defgroup blt BlenTranslation
* \ingroup blender
*/
/** \defgroup bke blenkernel
/** \defgroup blf BlenFont
* \ingroup blender
*/
/** \defgroup bli blenlib
/** \defgroup bke BlenKernel
* \ingroup blender
*/
/** \defgroup nodes nodes
/** \defgroup bli BlenLib
* \ingroup blender
*/
/** \defgroup cmpnodes cmpnodes
/** \defgroup depsgraph Dependency Graph
* \ingroup blender
*/
/** \defgroup bph Physics
* \ingroup blender
*/
/** \defgroup nodes Nodes
* \ingroup blender
*/
/** \defgroup cmpnodes Nodes (Compositor)
* \ingroup nodes
*/
/** \defgroup shdnodes shdnodes
/** \defgroup shdnodes Nodes (Shader)
* \ingroup nodes
*/
/** \defgroup texnodes texnodes
/** \defgroup texnodes Nodes (Texture)
* \ingroup nodes
*/
/** \defgroup modifiers modifiers
/** \defgroup modifiers Object Modifiers
* \ingroup blender
*/
@@ -132,29 +143,29 @@
* \ingroup blender
*/
/** \defgroup ikplugin ikplugin
/** \defgroup ikplugin IK Plugin
* \ingroup blender
*/
/** \defgroup DNA sDNA
/** \defgroup DNA Struct DNA (File Format)
* \ingroup blender data
*/
/** \defgroup RNA RNA
/** \defgroup RNA RNA (Data API)
* \ingroup blender data
*/
/** \defgroup blenloader .blend read and write functions
/** \defgroup blenloader Blend file IO
* \ingroup blender data
* \todo check if \ref blo and \ref blenloader groups can be
* merged in docs.
*/
/** \defgroup quicktime quicktime
/** \defgroup quicktime QuickTime
* \ingroup blender
/** \defgroup gui GUI */
/** \defgroup wm windowmanager
/** \defgroup wm Window Manager
* \ingroup blender gui
*/
@@ -314,7 +325,7 @@
* \ingroup gui
*/
/** \defgroup externformats external formats */
/** \defgroup externformats External Formats */
/** \defgroup collada COLLADA
* \ingroup externformats
@@ -324,7 +335,7 @@
* \ingroup externformats
*/
/** \defgroup imbuf IMage Buffer
/** \defgroup imbuf Image Buffer (ImBuf)
* \ingroup blender
*/

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# ##### BEGIN GPL LICENSE BLOCK #####
#

View File

@@ -1,6 +1,7 @@
"""
Basic Sound Playback
++++++++++++++++++++
This script shows how to use the classes: :class:`Device`, :class:`Factory` and
:class:`Handle`.
"""

View File

@@ -20,15 +20,15 @@ constraint_type = 2
physics_id_1 = object_1.getPhysicsId()
physics_id_2 = object_2.getPhysicsId()
# Use bottom right edge of Object1 for hinge position
# use bottom right edge of Object1 for hinge position
edge_position_x = 1.0
edge_position_y = 0.0
edge_position_z = -1.0
# use Object1 y axis for angle to point hinge
# rotate the pivot z axis about 90 degrees
edge_angle_x = 0.0
edge_angle_y = 1.0
edge_angle_z = 0.0
edge_angle_y = 0.0
edge_angle_z = 90.0
# create an edge constraint
constraints.createConstraint(physics_id_1, physics_id_2,

View File

@@ -1,9 +1,10 @@
"""
Texture Replacement
+++++++++++++++++++
Example of how to replace a texture in game with an external image.
createTexture() and removeTexture() are to be called from a module Python
Controller.
``createTexture()`` and ``removeTexture()`` are to be called from a
module Python Controller.
"""
from bge import logic
from bge import texture

View File

@@ -1,7 +1,8 @@
"""
Basic Video Playback
++++++++++++++++++++
Example of how to replace a texture in game with a video. It needs to run everyframe
Example of how to replace a texture in game with a video. It needs to run
everyframe.
"""
import bge
from bge import texture

View File

@@ -1,6 +1,7 @@
"""
Basic Handler Example
+++++++++++++++++++++
This script shows the most simple example of adding a handler.
"""

View File

@@ -3,6 +3,7 @@ Intro
-----
.. warning::
Most of this object should only be useful if you actually manipulate i18n stuff from Python.
If you are a regular addon, you should only bother about :const:`contexts` member,
and the :func:`register`/:func:`unregister` functions! The :func:`pgettext` family of functions
@@ -12,12 +13,12 @@ Intro
| ``{locale: {msg_key: msg_translation, ...}, ...}``
| where:
* locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
- locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
a lang+variant code (e.g. ``sr@latin``), or a full code (e.g. ``uz_UZ@cyrilic``).
* msg_key is a tuple (context, org message) - use, as much as possible, the predefined :const:`contexts`.
* msg_translation is the translated message in given language!
- msg_key is a tuple (context, org message) - use, as much as possible, the predefined :const:`contexts`.
- msg_translation is the translated message in given language!
Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``register()`` function, and \n"
Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``register()`` function, and
``bpy.app.translations.unregister(__name__)`` in your ``unregister()`` one.
The ``Manage UI translations`` addon has several functions to help you collect strings to translate, and

View File

@@ -7,11 +7,18 @@ act on specified rather than the selected or active data, or to execute an
operator in the different part of the user interface.
The context overrides are passed as a dictionary, with keys matching the context
member names in bpy.context. For example to override bpy.context.active_object,
you would pass {'active_object': object}.
member names in bpy.context.
For example to override ``bpy.context.active_object``,
you would pass ``{'active_object': object}``.
.. note::
You will nearly always want to use a copy of the actual current context as basis
(otherwise, you'll have to find and gather all needed data yourself).
"""
# remove all objects in scene rather than the selected ones
import bpy
override = {'selected_bases': list(bpy.context.scene.object_bases)}
override = bpy.context.copy()
override['selected_bases'] = list(bpy.context.scene.object_bases)
bpy.ops.object.delete(override)

View File

@@ -1,16 +1,19 @@
"""
.. _operator-execution_context:
Execution Context
-----------------
When calling an operator you may want to pass the execution context.
This determines the context thats given to the operator to run in, and weather
invoke() is called or execute().
This determines the context that is given for the operator to run in, and whether
invoke() is called or only execute().
'EXEC_DEFAULT' is used by default but you may want the operator to take user
interaction with 'INVOKE_DEFAULT'.
'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
call invoke() if existing.
The execution context is as a non keyword, string argument in:
The execution context is one of:
('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',

View File

@@ -3,21 +3,21 @@ Calling Operators
-----------------
Provides python access to calling operators, this includes operators written in
C, Python or Macros.
C, Python or macros.
Only keyword arguments can be used to pass operator properties.
Operators don't have return values as you might expect, instead they return a
set() which is made up of: {'RUNNING_MODAL', 'CANCELLED', 'FINISHED',
'PASS_THROUGH'}.
Common return values are {'FINISHED'} and {'CANCELLED'}.
Operators don't have return values as you might expect,
instead they return a set() which is made up of:
``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
Calling an operator in the wrong context will raise a RuntimeError,
Calling an operator in the wrong context will raise a ``RuntimeError``,
there is a poll() method to avoid this problem.
Note that the operator ID (bl_idname) in this example is 'mesh.subdivide',
'bpy.ops' is just the access path for python.
Note that the operator ID (bl_idname) in this example is ``mesh.subdivide``,
``bpy.ops`` is just the access path for python.
Keywords and Positional Arguments
@@ -32,9 +32,9 @@ There are 3 optional positional arguments (documented in detail below).
bpy.ops.test.operator(override_context, execution_context, undo)
* override_context - dict type
* execution_context - string (enum)
* undo - boolean
- override_context - ``dict`` type.
- execution_context - ``str`` (enum).
- undo - ``bool`` type.
Each of these arguments is optional, but must be given in the order above.

View File

@@ -3,7 +3,7 @@ PropertyGroup Example
+++++++++++++++++++++
PropertyGroups can be used for collecting custom settings into one value
to avoid many indervidual settings mixed in together.
to avoid many individual settings mixed in together.
"""
import bpy

View File

@@ -20,7 +20,7 @@ bpy.types.Scene.my_settings = \
bpy.props.CollectionProperty(type=SceneSettingItem)
# Assume an armature object selected
print("Adding 3 values!")
print("Adding 2 values!")
my_item = bpy.context.scene.my_settings.add()
my_item.name = "Spam"

View File

@@ -48,9 +48,9 @@ bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array,
# Note: the getter/setter callback must use integer identifiers!
test_items = [
("RED", "Red", "", 1),
("GREEN", "Red", "", 2),
("BLUE", "Red", "", 3),
("YELLOW", "Red", "", 4),
("GREEN", "Green", "", 2),
("BLUE", "Blue", "", 3),
("YELLOW", "Yellow", "", 4),
]

View File

@@ -6,7 +6,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
:class:`Bone` and :class:`PoseBone`.
These properties can be animated, accessed by the user interface and python
like blenders existing properties.
like Blender's existing properties.
"""
import bpy

View File

@@ -8,7 +8,8 @@ bl_info = {
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Object"}
"category": "Object",
}
import bpy

Some files were not shown because too many files have changed in this diff Show More