1
1

Compare commits

...

3045 Commits

Author SHA1 Message Date
ef2aecf2db Merge branch 'master' into GPencil_Editing_Stage3 2015-12-13 20:33:35 +13:00
cf8980559f Revert previous eraser tweak - It made using the mouse to erase too difficult 2015-12-13 20:29:47 +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
7fd36af698 GP Sculpt: Cleanup old comments and some debug prints 2015-12-13 13:04:33 +13:00
a72bbd9214 GPencil EditMode Keymap: Asterisk/Star Key on Numpad can be used to toggle Isolate Layers 2015-12-13 12:53:18 +13:00
23656a54fd GPencil Eraser: Some tweaks to eraser strength
Damping factors make the eraser too hard to use in general cases, so leaving as-is.
2015-12-13 12:46:37 +13:00
4213acedca Fix: Header help text was not defined for Grease Pencil "Poly" drawmode 2015-12-13 12:25:51 +13:00
34241fe6bb GPencil UI: Added a few extra icons for decoration 2015-12-13 12:21:44 +13:00
35db71ddb7 GPencil EditMode Keymap: Alt-C now activates the "Convert" tool for Grease Pencil (instead of the object-mode one) 2015-12-13 12:02:03 +13:00
4bbc2cc1b1 Code Cleanup: Remove code for old GP eraser 2015-12-13 12:01:31 +13: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
ced987b5b4 GPencil Eraser: Eraser is now pressure sensitive
Instead of immediately erasing points, the eraser now first reduces the thickness
of the stroke points before culling the ones that have become overly thin (and
cannot be rendered properly anyway as a result). It is also pressure sensitive now,
and has a linear falloff effect (i.e. points further away from the center of the
eraser circle get affected less). This should make it easier to use to eraser to
make fine adjustments to your sketches.

Notes:
* The eraser has been rewritten to use a new algorithm. Specifically, it now takes
  advantage of the stroke point deletion methods developed for the Delete operator
  instead of it's own buggy split-and-delete methods (which were only removing
  a single point from each stroke each time).

* In tests so far, it seems to allow a wider range of control over what gets erased
  and what doesn't. Pressing hard (or using a mouse) should still just erase everything
  with relative ease still.

* The way that this behaves could still do with some tweaking. In particular, care
  is needed when trying to use the eraser to "lighten up" tips of thin bunches of
  strokes (e.g. eyebrows/moustaches), as it still tends to gobble these up too much.
  We could probably do with some tool settings to control the eraser strength.
2015-12-13 03:23:37 +13:00
c61c312f97 Use material remapping for bmesh-boolean 2015-12-13 00:40:44 +11:00
d1a3223c76 Fix: Delete tagged GPencil stroke points now adjusts timing info
gp_stroke_delete_tagged_points() now adjusts timing data for stroke points
to ensure that all the timing info will be valid after creating the new
stroke segments (from splitting the original stroke).

Several other tools need to be modified to do this still (e.g. Copy and Duplicate)
2015-12-13 02:30:09 +13:00
c99dc5a1c1 GPencil: Code cleanup - Moved logic for removing selected/tagged points from strokes into a separate function 2015-12-13 00:45:19 +13: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
833268e2b8 Compile fix for changes from master 2015-12-12 17:52:52 +13:00
50fde02b42 Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
	source/blender/editors/transform/transform_manipulator.c
2015-12-12 17:43:00 +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
85bbf7e04f Code Cleanup: Move away from inlined math for the eraser tests 2015-12-12 12:26:53 +13: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
418b908309 Some code cleanup - Using proper types in more places 2015-12-12 01:27:04 +13: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
b3072b5617 Fix: Fixed incorrect tooltip
This tooltip was missed when was copying over the RNA stuff from my
earlier Pose Sculpting work (that much of these tools were based on)
2015-12-11 19:28:05 +13:00
fae7a8b97a GPencil Sculpt: Expose setting for toggling whether to invert the way the brush works
As in mesh sculptmode, there is now an Add/Subtract toggle to control whether the
brush applies the named effect or not  (e.g. Thickness = Thicker/Thinner, or
Pinch = Pinch/Inflate)
2015-12-11 19:25:50 +13: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
0175834112 Fix: Keep onion skinning toggles in sync
When toggling the per-layer onionskinning settings, the datablock-level
toggle (shown on the header) should also be updated. This only really
applies when there is/was a single layer with onionskinning.
2015-12-11 18:13:36 +13:00
1806db07e7 GPencil Eraser: Operates on all visible + editable layers instead of active only
The GPencil eraser now operates on all visible and editable layers, instead of
only operating on the active layer. There was really no reason why it needed to
only consider the active layer, as doing so only made it confusing for the user when
the strokes they were trying to erase wouldn't be affected. Besides, if you really
needed to restrict the eraser to working on a particular layer, you could just
lock all the others (which is now very easy with the new operators)
2015-12-11 17:29:48 +13:00
9afd9dc78e Fix: Save off GPencil eraser size earlier, to prevent it from being zeroed if something goes wrong (e.g. locked layers) in the meantime 2015-12-11 17:27:32 +13:00
ca8184c6cc Fix: Grease Pencil eraser would operate on strokes that were not valid for the current context
For example, if a GP datablock was shared between two different types of editors
(e.g. 3D and Sequencer Preview), even the non-valid (and invisible) strokes would
get affected.
2015-12-11 15:55:03 +13: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
5368505ef3 GPencil Layer Management: Lock/Unlock All + Isolate Layer
This commit introduces a few operators to make it easier to perform a few common
layer-manipulation operations. Some of these have been sorely needed for quite
a while now...

* Lock/Unlock All - Just as their names suggest, these operators will lock and unlock
  all layers in the GP datablock. This is a quick way to unlock all layers previously
  locked. These can be found in the new dropdown which replaces the old "Duplicate"
  below the +/- (for adding/removing layers); also featured in the dropdown are
  the "Duplicate Layers" operator, as well as the show/hide ones.

* Isolate Layer - This operator makes it easy to focus on just a single layer (e.g. the
  outlines for a particular character). The "star" button affects editability, while the
  "eye" below it toggles editability + visibility.

  If any layer is visible/unlocked, this operator will lock and/or hide all; otherwise,
  it will unlock/unhide all (to reverse the previous operation).
2015-12-10 19:11:19 +13: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
dda03a24b9 GPencil: On second thought, the status indicator doesn't need to be shown at all in the 3D View! 2015-12-07 18:47:21 +13:00
2167d521cc GPencil: Do not show "stroke editing" indicator when in "Only Render" mode in the 3D View 2015-12-07 18:46:45 +13: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
ca966644a8 3D View: Object name changes colour on frames with GP keyframes (if no other keyframes are present)
The colour used needs to be tweaked/changed (TH_TIME_GP_KEYFRAME would be ideal,
but since it's probably not initialised in many themes, we'll stick with
TH_CFRAME for now, even if it looks a bit rough)
2015-12-07 02:49:27 +13:00
1f93ec386b Fix: Stroke Placement options were not getting shown in the Sequencer 2015-12-07 02:28:46 +13:00
50111e83e7 GPencil UI: Spacing tweaks 2015-12-07 02:27:54 +13:00
2cdd34eb8c GPencil Drawing Usability: "Additive Drawing"
This commit adds a new option which will make it easier to use the Grease Pencil
drawing tools for animation. With the "Additive Drawing" option enabled in the
toolshelf (located alongside the "Continuous Drawing" toggle), the active frame's
strokes will be carried over/copied if you start drawing on an empty frame (i.e.
one without any keyframe already). This saves the effort of keeping a dopesshet
open, and to remember to duplicate the current frame before starting to draw the
next pose (or risk managing to draw the perfect pose, but without everything else).

Examples of cases where this comes in handy includes animating facial expressions
(when all outlines are on the same layer), or animating "growing" things (e.g. vines,
or concentric circles growing from a central point).

Note: Even without this option enabled, this is the default behaviour when using
the eraser on an "empty" frame. This makes it easier to do shots where you're just
changing parts of the facial expression, or if you're animating an "eraser" effect.

Note 2: The naming of this feature could do with some work. I struggled with several
alternative names for it, but this one seems the most useful about what it helps users
do. Suggestions welcome!
2015-12-07 02:21:29 +13:00
f501a4dd96 GPencil: Code Cleanup - Deduplicate code for adding a copy of the active frame (for editing) 2015-12-07 01:27:12 +13: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
80b1620cf3 GPencil: Moved Stroke Placement settings from GP datablock to tool settings
This commit moves the Stroke Placement settings from being a per-datablock
setting to being stored in tool settings instead. The main reason this was
done was to resolve a usability issue with the old way: in order to set this
setting, you had to first create a GP datablock to be able to see the settings!

Now, by having these as tool settings (as they should have been from the start),
they can be always visible (even when there isn't a datablock yet), meaning that
it will work as expected from the very first stroke.


Implementation Notes:
* There are separate Stroke Placement properties for the different editor types.
  e.g. 3D View, Sequencer Preview, Image Editor, and all other 2D Views

* I couldn't get the version patching code working (to port over placement settings
  from the GP datablock attached to the active scene), as this was causing crashes
  and other general weirdness when loading old files. The code to do this is there,
  but #if 0'ed out.
2015-12-06 03:46:15 +13: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
397f78f4be GPencil: Usability Tweaks to "Onion Skins" toggle on header
* The state of this toggle now reflects whether onion skinning is enabled on
  any layer, instead of just the active layer. This is handy if there's more than
  one GP datablock being shown in the scene, and you need to track down whether it's
  the current GP datablock that has a layer with this enabled

* Disabling the toggle now turns off onion skinning on ALL layers at the same time.
  This makes it much faster to turn off onion skinning if you've got it enabled
  on several layers and would now like to disable it (e.g. for a "clean" pass over
  the anim)

* Toggling this button still enables onion skinning for just the active layer,
  since that's the one you're most likely to want to see these for (i.e. the character
  outlines are on this layer, but some of the background elements are animated, and you
  don't really want to see those ghosted)
2015-12-04 02:28:57 +13: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
34d4c7c85f GPencil Dopesheet: Filtering option to only include GPencil layers related to the active scene
As requested by the Caminandes team, in the "Grease Pencil" mode of the dopesheet,
it is now possible to view only the Grease Pencil blocks+layers which come from the
active scene and/or the objects in that scene. This is useful when working with
multiple scenes, or when there are many other GPencil datablocks in the file for
various editors that aren't visible.

To use, enable the 'Active Only' toggle with the scene icon (located beside the
Summary toggle). By default, this is not enabled, so that backwards comptability
with old files is not affected (i.e. users are less likely to why they are no longer
able to see keyframes that would've previously been easily visible).
2015-12-03 21:59:24 +13: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
f4b8d2ef7a GPencil Dopesheet: Layers can now be filtered by name
This can be enabled using the "filter text" settings on the header (magnifying glass)
as in the other Dope Sheet modes.
2015-12-03 00:02:47 +13: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
aacd18a73d GPencil DopeSheet Mode: Code cleanup for anim filtering code in preparation for some new features
* Split out the code used to generate channels for a datablock out into its own method.
  This will be needed when we do some more useful filtering options

* Pass down dopesheet info
2015-12-02 19:31:33 +13:00
4f2a3437a3 Code cleanup: Minor formatting stuff 2015-12-02 18:55:14 +13: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
1b0f017a83 Merge branch 'master' into GPencil_Editing_Stage3 2015-11-25 23:43:55 +13: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
33b03e7c18 GP Sculpt: Attempted fix for bug with Grab brush where some points would randomly get left behind 2015-11-24 02:03:25 +13: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
59a9e4027a Fix: Initialise GP Sculpt settings when creating new scenes 2015-11-23 23:57:08 +13:00
47dd7d7133 Fix T46841: Thick lines w/ graph visible 2015-11-23 21:55:35 +11:00
6f6746fb01 Fix compile errors due to recent cleanups in master 2015-11-23 23:46:42 +13:00
e57fb9dae7 Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
	source/blender/makesrna/RNA_enum_types.h
	source/blender/makesrna/intern/rna_sculpt_paint.c
2015-11-23 23:15:57 +13: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
019a4ffcbe Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-11-21 00:01:46 +13: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
3e178d58c0 Fix: Transforming GP Keyframes in DopeSheet was no longer possible when in EditMode
This was a consequence of the hack used to ensure that the jump keyframes operator
could correctly use GP keyframes when in the timeline and action editors.
2015-11-18 19:43:11 +13: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
fcc58a6f94 Fix: GPencil snap cursor to selected wasn't working
Min-max weren't getting initialised correctly, causing this to fail.
2015-11-16 23:56:14 +13: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
163e434b32 GP Editing: Snapping Tools (Shift S)
This commit introduces the ability to snap GP points to the cursor/grid,
as well as snapping the cursor to GP points. Currently this functionality
is only available in the 3D view (since the cursor/grid settings are only
available in that view), where they are most needed.

Later, some of these operators can be extended to other editors on an
"as-needed" basis, based on finding some way of dealing with the lack
of 2D cursor in those views.

Coded during my recent travels :)
2015-11-15 19:41:27 +13: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
f9b7ae71ff Fix small compile error noted by Sybren 2015-11-14 01:20:19 +13: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
6cd2bfa3ff GPencil: Proper fix for proportional editing not working 2015-10-31 13:25:59 +13:00
a8b143ec78 Stop-Gap fix: Proportional editing was broken in new files for GPencil
Looks like my earlier commit wasn't quite right. For now, just reverting these
so that I can use this build for Siggraph; will look into a better fix later.

(The problem seems to be that the gp flag is getting auto-set too late - needs
to be done in initTransInfo() for the prop edit to take hold)
2015-10-31 12:51:35 +13: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
7743a2d839 Fix: GP Sculpt was no longer making copies of the current frame when being used non-modally 2015-10-29 14:36:07 +13:00
035bd2736a Ack! Compile fix for typo
Thanks pepeland for the fix ;)
2015-10-29 11:27:09 +13: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
b615ce637f GP EditMode: Tweaked poll callback for selection ops to work when the active layer is empty 2015-10-24 01:58:11 +13:00
0fb97b6b59 GPencil Dopesheet Mode: Copy and Paste for Keyframes works again
For the first time since the 2.4x series, the copy and paste functionality for
Grease Pencil keyframes finally works again. Not only that, but it's now been
upgraded to include some of the new goodness supported by the 2.7x keyframe
copy and paste tools.
2015-10-24 01:47:32 +13: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
34993bf97d GP Editing: Transform Manipulators can now be used to transform GP points 2015-10-23 16:30:28 +13:00
f49c833d00 Code Cleanup: Removed the need to set the "gpencil_strokes" property on transform ops when editing GP Strokes
Now that we've got a dedicated mode for this, we can now safely check this from
the context settings and set the relevant flags internally instead.
2015-10-23 16:02:35 +13:00
dcc538c95a GP Edit Menus: Tweaks + Missing Items
* Added entries for shrink-fatten, sculpt mode, sculpt brush, and proportional editing
* Made the Convert and Move to Layer op entries into menus to save users a click
2015-10-23 15:14:46 +13: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
0da05bb4dc GP EditMode: Simplify the way that this is handled
Now, instead of actually altering the ob->mode flag, we just make the
object mode setter operator (and the header) delegate to the appropriate
GPencil things to do their thing if they wish first.

As a result, we don't have to worry about version patching or issues with
changing selected/active objects.
2015-10-23 13:22:26 +13: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
9ee297c61e Merge branch 'master' into GPencil_Editing_Stage3 2015-10-23 00:27:13 +13:00
a171fb4e3c GP EditMode: Some more fixes for editmode handling to resolve some annoying corner cases
* Edit Strokes mode should only be available if there is actually a GP datablock
  and it is in editmode
* If exiting strokes editmode with the active object hidden, the flag would not get
  cleared, and it would appear that we were still in editmode.
2015-10-23 00:21:12 +13: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
7686a0ae9c GP Edit: Provide more direct quick access to sculpt brush via D+E pie
Added direct buttons to quickly change the sculpt brush when bringing up the
D+E pie menu for GP Stroke Sculpting. These are only included for the most
useflu of the brushes. All others are currently still visible via the
dropdown on the left (of the pie), though I'm considering removing that
to make things less confusing.
2015-10-18 04:08:51 +13:00
488e5616dd Missed this old comment in previous commit 2015-10-18 03:54:45 +13:00
b9029d698c GP Edit: "Change Layer" operator - Integrated into the D+W Pie Menu
Create a "Change Stroke" operator for GP Layers which can be used to change
between layers without needing to have the layers list open. This can be
accessed via the D+W pie menu by clicking on the dropdown beside the active
layer's name. Also, added the ability to delete the active layer from the menu too.
2015-10-18 03:52:32 +13:00
affd1eacb5 GP Editing: "Move to Layer" operator (MKEY)
This commit adds an operator which can be used to move the selected strokes
to another layer (including to a new layer).

Currently this can only move entire strokes. Later we can check on doing
partial strokes too (just like copy/paste can handle now).
2015-10-18 03:29:23 +13: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
422344d40a Merge branch 'master' into GPencil_Editing_Stage3 2015-10-17 15:41:45 +13: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
8a84465eab Code reshuffle: GP Sculpt brush customdata init is needed for exec() too 2015-10-17 03:22:05 +13:00
5fb8875f9b GP Sculpt: More robust checks for empty stroke buffer 2015-10-17 03:16:53 +13:00
16ef4da5e6 GP Sculpt: Clone Brush - "Use Falloff" = "Smudge"
When the "Use Falloff" option for the Clone brush is enabled, moving the mouse
after pasting some cloned strokes will now allow you to distort the points of
the pasted strokes with non-uniform weights. This can be used for creating
"distortion" effects (similar to using the push brush on these strokes afterwards).
This could be useful as a quick way to get lots of variation to a field of items.
2015-10-17 03:06:13 +13:00
1ec549886b Cleanup: use bools for v2d, minor ws edits 2015-10-17 01:01:57 +11:00
b1c162074d GP Sculpt: "Clone" Brush
Added a new brush which allows you to paste copies of whatever is on the clipboard
wherever you click. If after clicking you're not yet satisfied with where you clicked,
you can move the mouse to position the new strokes in an alternative place instead.

Future Todo's:
* Check whether this works in all views (especially 2d views)
* Fix version patching

* Remove/disable the UI options for brush size/strength, which currently have no use.
  Otherwise, we could experiment with allowing those to be used for a "smudging"
  effect, where the strength of the repositioning effect depends on the placement
  of the stroke points relative to the cursor.
2015-10-17 02:53:05 +13: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
ead5d92673 GP Editing: Expose the copy-paste buffer within the GPencil module, so more ops can use it 2015-10-16 14:31:00 +13:00
e04fd43d61 GP Sculpt: Adding some defines for some new brush types coming soon 2015-10-16 14:30:12 +13:00
a4720696f1 Code cleanups in preparation for next steps 2015-10-16 14:28:25 +13: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
5abaaf8311 Fix: Apply same fix from previous commit to the equivalent logic used for GP Sculpt editing 2015-10-11 03:07:22 +13:00
029a6c2383 Fix: The "transform strokes on unkeyed frame creates new frame" feature didn't work on the first frame
As a convenience feature, it is possible to jump to a frame without any existing
GP keyframe, and just use the transform tools to modify the stroke to create a new
keyframe on that frame. However, if the current frame was before the first GP keyframe,
the newly created keyframe would not work (if you scrub away), as it was getting
incorrectly added at the end of the list of keyframes, instead of in-order as expected.
2015-10-11 03:06:49 +13:00
b81f3246f8 Fix: When reloading files, stroke editmode was getting disabled
This commit should bring the logic here more into line with what's done for
the posemode toggle.

There's still some weirdness here when clicking on "Object Mode" vs "Edit Strokes"
(i.e. both will just always toggle!), and old files with GP EditMode won't get
the state synced with ob->mode yet.
2015-10-11 03:00:48 +13: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
7d9bbf1b78 Fixes for using tablet events in keymap
* Need to classify tablet events as being in the "mouse" category, or else attempts
  to add a new keymap item for this will fail by reverting to keyboard input

* Made event matching more restrictive - it will now trigger only on a tablet events
  for LEFTMOUSE events. The problem was that, even when hovering over the tablet
  and pressing a key, you'd still get an event with tablet data, which meant that
  that event would get wrongly caught and handled.
2015-10-11 01:42:11 +13: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
3d68c92f0a GP Sculpt: Tweak the keymaps again
* Added Ctrl-E-LMB and Shift-E-LMB to make it easier to start sculpt strokes
  to make it easier to use "invert" (and soon "smooth") with these brushes.

* Removed the Ctrl-E = Modal Sculpt keymapping, to avoid conflicts with the
  new additions. D+E+Sculpt still works though
2015-09-29 13:06:03 +13: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
d9af8e9b41 Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-09-29 02:21:02 +13:00
763bc0c905 GP Sculpt: Experimenting to make sculpt operator non-modal
Sometimes the modal nature of this operator made it cumbersome to operate.
This commit tries to make this better by making changes to the operator + keymap
so that:

* EKEY + LMB-drag (just like for drawing) = Do a single sculpt stroke
  (i.e. it starts immediately, and ends as soon as the stroke ends)

* CTRL + EKEY = Enter Sculpt Mode (as before). Can do multiple strokes this way
  without holding down any keys.

* DKEY + EKEY -> Sculpt = Enter Sculpt Mode (as before)


I'm still on the fence about the Ctrl+EKEY one. Perhaps it's too much of a hassle,
and we just drop this one?
2015-09-29 02:15:40 +13:00
64c96f15fe GP Sculpt: Assorted tweaks to investigate problems with Twist brush
* Some of the problems stem from inaccuracies/noise introduced by the 2D -> 3D
  conversion that takes place. For some reason, some verts randomly get offsets
  when reprojecting everything.

* Twist brush strength isn't 1.0 degree anymore

* It still doesn't work well though :(
2015-09-29 01:52:59 +13:00
558e33ca45 GPencil: Initialise default values for before/after onionskin colours
Newly created layers will now get a pair of default values for the before and after
onion skinning colours. These are currently hardcoded to a green and blue colour
(respectively). Also, "use colours" toggle will be enabled by default, so that these
colours will be applied as soon as you show the onionskins.
2015-09-29 00:49:30 +13: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
24201d81de Merge branch 'master' into GPencil_Editing_Stage3 2015-09-22 01:09:19 +12: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
4eeffd5ea9 GP EditMode: Fix for crash loading files saved with stroke editmode active 2015-09-21 01:41:48 +12: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
1877525960 GP Sculpt: Dampen down the timer speed on the Thickness brush to be more manageable 2015-09-20 02:03:13 +12:00
50b16fee19 GP Sculpt: Pinch brush also uses the timer now 2015-09-20 01:59:08 +12:00
6b1b0f78c0 GPencil EditMode: Some fixes to allow mode switcher to still work when there's no active object 2015-09-20 01:58:03 +12:00
56bd24c1a9 GPencil EditMode: Manually setting the editmode setting also syncs ob->mode now
Since this is for the RNA version, we only check if the datablock is being used
by the scene or active object (whereas the operator checks whether we're operating
in a 3D view).
2015-09-20 00:25:22 +12: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
61b6eb606c GPencil EditMode: Only sync editmode with ob->mode in 3D view 2015-09-19 19:39:21 +12:00
eb22dcea61 Code Cleanup: Move the editmode toggle operator to another file 2015-09-19 19:38:48 +12:00
3b1330396e GPencil Stroke Editing: Stroke Editmode now behaves like other editing modes for objects
You can now enter stroke editmode from the usual mode dropdown in the 3D View
header. While this isn't strictly correct (data-wise, GPencil datablocks can
belong to stuff other than the active object), for the most common use case
of usage in the 3D view, this is appropriate.

Notes:
* This still needs more careful checking to ensure correctness/consistency of
  behaviour in all edge cases (e.g. gpencil datablock in a different editor,
  or user manually changed the mode toggle, etc.)
2015-09-19 18:54:19 +12:00
95cf2fbc94 GPencil Stroke EditMode: Replace 3D view menus when in stroke editmode
After playing around with the current workflow the other day, it became clear
that the current editing workflow could still do with some tweaks to be more
convenient.

* To make it less confusing/ambiguous what "mode" we're in when editing
  Grease Pencil strokes, and also to provide another way of seeing all
  the available operators, the Select and "Edit" menus in the 3D View
  header now show Grease Pencil specific lists of operators now.

* Also, added a quick-access button to the header to toggle onion skinning.
  Even with the Pie Menu and the Properties Panel, the existing ways of
  quickly toggling this aren't good enough.


TODO:
* The "Mode Selector" is now the next target to tweak. As Strokes EditMode is not
  a per-object setting, but rather, per GPencil datablock, this will be quite hairy
  to hack around.
2015-09-19 17:38:46 +12: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
15b793bd84 GPencil Keymap: Pen Eraser can now be used for erasing strokes
Using the keymap support added in the previous commit, we can now map the
pen's eraser to trigger erasing.

Pen drawing support is not enabled though, since users who use a tablet as
their primary pointing device will want to be able to continue using it
for things like selection, grabbing manipulators, and sculpting/texture painting.
2015-09-19 11:49:47 +12:00
5b02f2a0a2 Added support for tablet pen and eraser events to be added to keymaps
Added two new event types that will fire only when using a stylus or its eraser.
The use case for this is to allow artists to be able to set up their keymaps
so that they can just draw and erase directly using their tablet without holding
down any keys.
2015-09-19 11:43:45 +12: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
f7250246d7 Merge branch 'master' into GPencil_Editing_Stage3 2015-09-16 02:47:51 +12:00
f32f83a619 GP Sculpt: Clamp size/strength changes made using the scrollwheel
It would be possible to get weird out of bounds sizes/strength values,
and then wonder why the brush wasn't working at all.
2015-09-16 02:45:33 +12:00
3b569ac921 Tweak to make rendering different GPencil shots via the sequencer feasible again
This hack ensures that world backgrounds get rendered in OpenGL previews
when using scene strips in the sequencer. Without this, we cannot use
the sequencer to chain up different GPencil shots for a non-destructive
workflow (where you don't have to render out image sequences first).
2015-09-16 02:39:49 +12: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
54fd4ec960 Compile fix for changes from master 2015-09-01 12:16:00 +12: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
cea946112d Merge branch 'master' into GPencil_Editing_Stage3 2015-08-26 02:45:00 +12: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
f6135894fe GP Sculpt: Thickness brush now uses the timer too 2015-08-17 02:24:36 +12:00
b5b0968ba9 GP Sculpt: Added timer which can be used to "accumulate" the brush effects if held
* This is currently only used for the "twist" brush. It is useful for making points
  rotate around the pivot point without needing to make constant movements to trigger
  updates (whcih is undesirable here, as that would alter the transforms).

* Currently this uses a hardcoded "rate" (i.e. repeat frequency). This will be addressed
  alongside other issues, such as extending this to other appropriate brush types.
2015-08-17 02:18:37 +12:00
0ca69dbcdd GP Sculpt Twist Brush - Some debugging tweaks to figure out why we're getting some weird behaviour 2015-08-17 01:53:17 +12: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
9941da0702 GPencil Sculpt: Initial implementation of Twist brush
This doesn't entirely work as expected yet (it perhaps needs the timer),
so more work is still needed.
2015-08-16 22:53:03 +12:00
73ffcb0754 GPencil Sculpt: Fix compilation errors in previous commit 2015-08-16 22:52:16 +12: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
352863b13f Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
	source/blender/editors/space_view3d/view3d_draw.c
2015-08-16 18:21:31 +12: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
c78569a1e6 Code Cleanup: Extract out screenspace to 3D logic for GP Sculpt 2015-08-10 01:02:01 +12:00
6726379ce3 GPencil Tablet Support: Eraser now works during Continuous Drawing
When continuous drawing is enabled, the eraser-end of the pen can be used to
erase strokes (as an alternative to RMB).

The keymap system still doesn't let us add such tablet events to the keymap
as actual events though, so we cannot just have a D+Eraser = Erase keymapping.
2015-08-10 00:19:27 +12: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
b91ba21185 GPencil: Don't draw onion skins during animation playback
* When playing back animations, onion skinning is temporarily disabled now
  so that the poses can be seen more clearly.

  - I've supposedly used the check which disables this for animation scrubbing,
    (I've tried both and checked the logic for each), but they don't seem to be
    working as advertised. So, for now, onionskins are still visible during scrubbing.

* Onion skinning is also disabled for rendering playblasts and for file previews/
  sequencer renders.
2015-08-08 17:44:11 +12: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
6cef173140 Merge branch 'master' into GPencil_Editing_Stage3
Conflicts:
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
	source/blender/blenloader/intern/versioning_270.c
2015-08-07 02:53:32 +12: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
a84c9f527c Merge branch 'master' into GPencil_Editing_Stage3 2015-07-25 22:50:00 +12: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
dc1d95e404 GP Sculpt: Experimental pie menu for sculptmode (D+E) 2015-07-25 03:10:44 +12: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
f24f72afb9 GP Sculpt: Improved header info string
* Now it shows what the name of the active brush
* Also added the hotkeys for adjusting the brush size/strength
2015-07-25 02:49:26 +12: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
2c178440e3 GP Sculpt: Sculpting on a frame without an existing key will create a new one
Just like with the transform tools, if you start trying to sculpt strokes on a frame
where no gpframe/drawings exist, a new gpframe will now be created. This makes it
easier to use the sculpt tools for animating, as all you need to do is to start
animating a sketch is to jump to a frame and start sculpting.

The grab tool in particular works quite well for this sort of workflow. It appears
to be particularly handy when doing breakdowns and/or straight-ahead animation, as
well as for doing smaller tweaks.
2015-07-25 02:00:22 +12: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
146b731d7c Merge branch 'master' into GPencil_Editing_Stage3 2015-07-24 15:09:16 +12:00
8d237503c5 Compile Fix: setenv() is not defined for mingw either 2015-07-24 15:08:43 +12:00
d1a8a15ff6 Merge branch 'master' into GPencil_Editing_Stage3 2015-07-24 14:26:46 +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
3148f82e27 GP Sculpt: Code cleanup for randomise brush 2015-07-23 13:08:09 +12:00
db065e2ef8 GP Sculpt: Allow randomise to offset points to either side of the line 2015-07-23 12:50:45 +12: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
dcbe481cfd GP Sculpt: More WIP work to try and get this randomise brush working
So it turns out that the screenspace-to-3d math is a lot more convoluted now
than would be initially obvious. The brush is now behaving a lot better now
in that it somewhat does what is expected. The results aren't really what we
really want yet, so some more experimentation is still needed.
2015-07-23 01:33:21 +12: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
6d5cfd1810 GP Sculpt: Buggy attempt at building a "randomise" brush
This currently just sends the points off screen. We need another approach.
2015-07-21 00:12:50 +12: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
d4d3a77a2a GP Sculpt: Collapse Edit/Sculpt panels by default
Now tha we have many more editing tools/options here now, it's better to keep
both of these collapsed, so that users have a greater chance of discovering
the existence of either/or. Furthermore, since the editing tools have been
available for a few releases now, users should be more familiar with what's on
offer there now
2015-07-17 02:25:04 +12: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
7c2557c3da GP Sculpt: Version patching code to set sensible defaults for sculpt brushes 2015-07-15 17:52:48 +12: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
a5ed00f20a GP Sculpt: Shift-F affects brush strength, and Ctrl-F affects brush size
These hotkeys do not work when the brush is being used...
2015-07-15 03:03:26 +12:00
bce968044f GP Sculpt: Dampen Pinch brush strength
By trial and error, it seems that dividing the influence by 5 makes this tool
more manageable.
2015-07-15 02:57:26 +12:00
32aff3021f GP Sculpt: Pinch brush can now be inverted using Ctrl (i.e. "Inflate")
Just like with the mesh sculpting tools, holding Ctrl can now be used to
apply the inverse transform when using the pinch brush. So, instead of
drawing the points towards the brush, Inflate will push them away.
2015-07-15 02:51:34 +12: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
74638921a6 GP Sculpt: Initial implementation of "Pinch" Brush
This brush draws all the points inwards towards the midpoint of the brush.
I'm not sure if this brush is really that useful or not, so I'll leave it
as-is for now.

Watch out for how strong you set the brush to be; even with 0.3, you can already
get some really strong/rapidly changing results.
2015-07-15 02:42:49 +12: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
df0fdc4178 GP Sculpt: Reduce maximum size of brushes to make the UI sliders more controllable 2015-07-11 17:46:31 +12:00
78c92d7080 GP Sculpt: Fix for random crashes - forgot to adjust array size when adding new brush types 2015-07-11 16:54:55 +12: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
49e304c155 GPencil Sculpt: "Push" Brush
This is similar to the grab brush in that it translates points according to
the strength of the brush. The difference however is that it is applied instead
to whatever points are under the brush as it travels, instead of only those
that were within the brush region initially.

Notes:
* The effect of this brush is more like a "smear" effect
* I got a crash initially, but haven't been able to reproduce. So, unless this
  crops up again, I'll consider that a one-off for now.
2015-07-11 01:39:43 +12:00
63d0a78624 GPencil Sculpt: Added defines for a bunch of new brush types to be added 2015-07-11 01:24:53 +12:00
0307ebe63b GPencil Sculpt: Improved tooltip for Grab brush 2015-07-11 01:24:34 +12:00
32c7b72ff2 GPencil Smooth Brush: Added "Affect Pressure" option
Use the "Affect Pressure" option to smooth out the pressure values of strokes,
in addition to smoothing the coordinates.
2015-07-11 01:24:15 +12: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
61d9bcb26f Merge branch 'master' into GPencil_Editing_Stage3 2015-07-11 00:22:48 +12:00
571a46f32b GP Sculpt: "Grab" Brush
This brush can be used to move clusters of points around, without needing to
select them first. Like the "Grab" brush in Sculpt Mode, this brush only operates
on the brush circle at the start of the grab operation. The strength of the effect
applied to each point is determined at the start of the stroke based on factors
such as how far away from the center of the brush the point lies, and the strength
of the brush.

(Yay! Worked first time!)
2015-07-11 00:15:04 +12: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
718912f512 GPencil Sculpt: Redraw the view on mousemove even if none of the strokes was affected
The active viewport needs to get redrawn, or else the brush circle will not move
when "selection mask" is enabled and the user is trying to paint over non-selected
areas.
2015-07-07 22:49:33 +12:00
7e99bab425 GPencil Sculpt: MMB can now be used for viewport manipulations while the sculpt operator is active 2015-07-07 22:45:26 +12: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
7e333b863c CMake support 2015-07-07 21:40:59 +12:00
85d3d4c96a GPencil Sculpt: Code Cleanup
* Removed inlined math in favour of mathlib functions
* Simplified arguments to some functions/callbacks by reusing passsed-in coords
  (as vectors/arrays instead of as separate values)
2015-07-07 21:40:33 +12:00
ec4f82f9ca GP Smooth Brush: Affect endpoints by a reduced amount instead of not at all
Endpoints can't be handled normally, as they tend to easily "shrink",
reducing the length of the stroke. However, we still want some smoothing
to take place, as it looks odd without anything happening.
2015-07-07 17:52:36 +12: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
6a0547b934 Merge branch 'master' into GPencil_Editing_Stage3 2015-07-07 02:48:56 +12:00
d6e48b41ff Code cleanup
* Remove all mention of the complicated way of implementing smoothing for now
* Disable debug print
2015-07-07 02:46:31 +12:00
043db44904 GP Stroke Sculpting: Initial implementation of a "Smooth" Brush
This commit introduces a basic "smooth" brush tool for sculpting Grease Pencil
strokes (i.e. for getting rid of wobbles or kinks in the stroke). The current
implementation is still quite rough (with quite a few points noted about how it
could be better).

Usage Notes:
* It is highly recommended to have the "Use Falloff" option enabled. Doing so
  allows you to have quite a bit more subtlety to how well you can control the
  effects of this brush (i.e. this option can be used to prevent the brush from
  "shrinking" the strokes too much, if you use the edge of the brush)

* A radius of 25 px, and strength = 0.5 are also good starting points


Implementation Notes:
* This currently only affects the stroke coordintes. Whether pressure values should
  be handled by this brush (with/without an option to turn this on/off), or whether
  it should be handled as a separate brush remains to be seen.

* This isn't exactly the most efficient implementation. It also suffers from the
  fact that because its effects are applied from the first point in the stroke
  to the last (and in a single pass), you can get unwanted accumulated smoothing
  effects.

* Currently all points in the neighbourhood are given equal priority. We could
  investigate different weighting schemes here.

* This is currently hardcoded to consider 2 points before and 2 points after the
  current one. This could be improved by offering control over how many on either
  side to consider...
2015-07-07 02:43:38 +12:00
17f17a7013 GP Stroke Sculpting: Fix bug with falloff calculation
Falloff calculation was incorrect as it could produce invalid values if the
distance to a point exceeeded the radius of the brush, resulting in "large
negative values".
2015-07-07 02:34:21 +12: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
8ae7128991 Merge branch 'master' into GPencil_Editing_Stage3 2015-06-30 12:29:53 +12: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
2013b63d29 Merge branch 'master' into GPencil_Editing_Stage3 2015-06-20 22:46:47 +12: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
e3654f1da5 Initial stub callbacks for grab brush 2015-06-13 12:18:07 +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
dfb9df8578 GPencil Sculpt: Tweaked how strength values are interpreted for thickness brushes to be more controllable 2015-06-13 01:16:21 +12: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
44e171c7f0 GPencil Sculpt: Improve header infotip 2015-06-08 13:26:05 +12:00
3e67c06bd3 GPencil Sculpt: Draw a '+' cursor when in sculptmode 2015-06-08 13:20:07 +12:00
98d42b7236 GPencil: Minimum-working-version of new Stroke Sculpting functionality
Usage:
* In Stroke Edit Mode, EKEY will start the modal brush operator, using the active
  brush (set via the Toolbar)
* LMB-click-drag to sculpt, release to stop.
* RMB/ESC to stop editing
* Scrollwheel to increase/decrease brush radius
* Shift-Scrollwheel to increase/decrease strength
* Hold Ctrl to invert the brush action

Notes:
* Currently only "Thickness" brush is implemented. This adjusts the stroke thickness
  as you "paint" the effect onto the stroke. (Recommended Strength: 0.093)
* Strength and radius are not correctly initialised yet (to be fixed soon)
2015-06-08 13:15:32 +12: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
786da62b4b Code cleanup - Formatting 2015-06-01 02:11:29 +12: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
70f84fe4c8 GPencil Editing UI: Move editing toggle to the main panel
In preparation for a brush-based editing tool, moved the Stroke EditMode toggle
to the main toolshelf panel so that the editing panel can be collapsed when only
the brush panel is needed.

Also, improved the tooltip here.
2015-05-31 12:24:47 +12: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
2642 changed files with 137955 additions and 90684 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

View File

@@ -47,13 +47,10 @@ endif()
cmake_minimum_required(VERSION 2.8)
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.0))
# keep until CMake-3.0 is min requirement
cmake_policy(SET CMP0043 OLD)
endif()
if(NOT EXECUTABLE_OUTPUT_PATH)
set(FIRST_RUN "TRUE")
set(FIRST_RUN TRUE)
else()
set(FIRST_RUN FALSE)
endif()
# this starts out unset
@@ -66,11 +63,21 @@ set(CMAKE_BUILD_TYPE_INIT "Release")
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
# global compile definitions since add_definitions() adds for all.
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG _DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.0))
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:Debug>:DEBUG;_DEBUG>
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:MinSizeRel>:NDEBUG>
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
)
else()
# keep until CMake-3.0 is min requirement
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG _DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
endif()
#-----------------------------------------------------------------------------
# Set policy
@@ -129,7 +136,7 @@ macro(option_defaults_init)
set(${_var} ON)
list(APPEND _init_vars "${_var}")
endforeach()
unset(_INC)
unset(_var)
endmacro()
# remove from namespace
@@ -157,25 +164,30 @@ option_defaults_init(
_init_SDL
_init_FFTW3
_init_GAMEENGINE
_init_OPENSUBDIV
)
# customize...
if(UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE)
# some of these libraries are problematic on Linux
# disable less important dependencies by default
set(_init_BUILDINFO OFF)
set(_init_CODEC_FFMPEG OFF)
set(_init_CYCLES_OSL OFF)
set(_init_IMAGE_OPENEXR OFF)
set(_init_IMAGE_REDCODE OFF)
set(_init_INPUT_NDOF OFF)
set(_init_JACK OFF)
set(_init_LIBMV_SCHUR_SPECIALIZATION OFF)
set(_init_OPENCOLLADA OFF)
set(_init_OPENCOLORIO OFF)
set(_init_SDL OFF)
set(_init_FFTW3 OFF)
set(_init_GAMEENGINE OFF)
set(_init_OPENSUBDIV OFF)
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
set(_init_INPUT_NDOF OFF)
set(_init_JACK OFF)
set(_init_OPENSUBDIV OFF)
endif()
@@ -197,7 +209,6 @@ option(WITH_PYTHON "Enable Embedded Python API (only disable for develop
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing.
mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option.
set(WITH_PYTHON_SECURITY ON CACHE BOOL "ON" FORCE) # temp force on.
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF)
mark_as_advanced(WITH_PYTHON_SAFETY)
@@ -221,7 +232,15 @@ mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_GAMEENGINE "Enable Game Engine" ${_init_GAMEENGINE})
option(WITH_PLAYER "Build Player" OFF)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
option(WITH_COMPOSITOR_WERROR "Treat warnings as errors in compositor code" OFF)
mark_as_advanced(WITH_COMPOSITOR_WERROR)
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
option(WITH_SUBSURF_WERROR "Treat warnings as errors in subsurf code" OFF)
mark_as_advanced(WITH_COMPOSITOR_WERROR)
# GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
@@ -239,9 +258,19 @@ option(WITH_HEADLESS "Build without graphical support (renderfarm, server m
mark_as_advanced(WITH_HEADLESS)
option(WITH_AUDASPACE "Build with blenders audio library (only disable if you know what you're doing!)" ON)
option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on the system (only enable if you know what you're doing!)" OFF)
mark_as_advanced(WITH_AUDASPACE)
mark_as_advanced(WITH_SYSTEM_AUDASPACE)
if(NOT WITH_AUDASPACE)
set(WITH_SYSTEM_AUDASPACE OFF)
endif()
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON)
if(UNIX AND NOT APPLE)
option(WITH_OPENMP_STATIC "Link OpenMP statically (only used by the release environment)" OFF)
mark_as_advanced(WITH_OPENMP_STATIC)
endif()
if(WITH_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
@@ -318,9 +347,11 @@ if(UNIX AND NOT APPLE)
endif()
# Camera/motion tracking
option(WITH_LIBMV "Enable libmv structure from motion library" ON)
option(WITH_LIBMV "Enable Libmv structure from motion library" ON)
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." ${_init_LIBMV_SCHUR_SPECIALIZATION})
option(WITH_LIBMV_WERROR "Treat warnings as errors in Libmv (and Blender's motion tracking) code")
mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
mark_as_advanced(WITH_LIBMV_WERROR)
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
@@ -331,7 +362,6 @@ if(WIN32)
endif()
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
option(WITH_OPENNL "Enable use of Open Numerical Library" ON)
if(UNIX AND NOT APPLE)
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
@@ -354,18 +384,20 @@ if(UNIX AND NOT APPLE)
endif()
# Cycles
option(WITH_CYCLES "Enable cycles Render Engine" ON)
option(WITH_CYCLES_STANDALONE "Build cycles standalone application" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build cycles standalone with GUI" OFF)
option(WITH_CYCLES "Enable Cycles Render Engine" ON)
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
option(WITH_CYCLES_CUDA_BINARIES "Build cycles CUDA binaries" OFF)
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 sm_50 sm_52 CACHE STRING "CUDA architectures to build binaries for")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_WERROR "Treat warnings as errors in Cycles code" OFF)
mark_as_advanced(WITH_CYCLES_LOGGING)
mark_as_advanced(WITH_CYCLES_DEBUG)
mark_as_advanced(WITH_CYCLES_WERROR)
# LLVM
option(WITH_LLVM "Use LLVM" OFF)
@@ -395,7 +427,6 @@ option(WITH_BOOST "Enable features depending on boost" ON)
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_TESTS_PERFORMANCE "Enable performance tests" OFF)
# Documentation
@@ -412,7 +443,6 @@ option(WITH_GL_EGL "Use the EGL OpenGL system library instead of th
option(WITH_GL_PROFILE_COMPAT "Support using the OpenGL 'compatibility' profile. (deprecated)" ON )
option(WITH_GL_PROFILE_CORE "Support using the OpenGL 3.2+ 'core' profile." OFF)
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
option(WITH_GPU_DEBUG "Create a debug OpenGL context (allows inserting custom messages and getting notifications for bad GL use)" OFF)
mark_as_advanced(
WITH_GLEW_MX
@@ -421,7 +451,6 @@ mark_as_advanced(
WITH_GL_PROFILE_COMPAT
WITH_GL_PROFILE_CORE
WITH_GL_PROFILE_ES20
WITH_GPU_DEBUG
)
if(WITH_GL_PROFILE_COMPAT)
@@ -449,6 +478,10 @@ endif()
option(WITH_CPP11 "Build with C++11 standard enabled, for development use only!" OFF)
mark_as_advanced(WITH_CPP11)
# Dependency graph
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
# avoid using again
option_defaults_clear()
@@ -487,7 +520,11 @@ if(APPLE)
endif()
execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
if(${MAC_SYS} MATCHES 14)
if(${MAC_SYS} MATCHES 15)
set(OSX_SYSTEM 10.11)
# throw an error here, older cmake cannot handle 2 digit subversion!
cmake_minimum_required(VERSION 3.0.0)
elseif(${MAC_SYS} MATCHES 14)
set(OSX_SYSTEM 10.10)
# throw an error here, older cmake cannot handle 2 digit subversion!
cmake_minimum_required(VERSION 3.0.0)
@@ -504,13 +541,11 @@ if(APPLE)
else()
set(OSX_SYSTEM unsupported)
endif()
message(STATUS "Detected system-version: " ${OSX_SYSTEM})
# workaround for incorrect cmake xcode lookup for developer previews - XCODE_VERSION does not take xcode-select path into accout
# but would always look into /Applications/Xcode.app while dev versions are named Xcode<version>-DP<preview_number>
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
message(STATUS "Xcode-bundle : " ${XCODE_BUNDLE})
if(${CMAKE_GENERATOR} MATCHES "Xcode")
@@ -538,8 +573,8 @@ if(APPLE)
string(SUBSTRING "${XCODE_VERS_BUILD_NR}" 6 3 XCODE_VERSION) # truncate away build-nr
unset(XCODE_VERS_BUILD_NR)
endif()
message(STATUS "Detected Xcode-version: " ${XCODE_VERSION})
message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
if(${XCODE_VERSION} VERSION_LESS 4.3)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE) # use guaranteed existing sdk
@@ -652,6 +687,13 @@ endif()
# auto enable openimageio for cycles
if(WITH_CYCLES)
set(WITH_OPENIMAGEIO ON)
# auto enable llvm for cycles_osl
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
endif()
else()
set(WITH_CYCLES_OSL OFF)
endif()
# auto enable openimageio linking dependencies
@@ -660,11 +702,6 @@ if(WITH_OPENIMAGEIO)
set(WITH_IMAGE_TIFF ON)
endif()
# auto enable llvm for cycles_osl
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
endif()
# don't store paths to libs for portable distribution
if(WITH_INSTALL_PORTABLE)
set(CMAKE_SKIP_BUILD_RPATH TRUE)
@@ -691,6 +728,34 @@ if(HAVE_STDBOOL_H)
add_definitions(-DHAVE_STDBOOL_H)
endif()
if(WITH_AUDASPACE)
if(WITH_SYSTEM_AUDASPACE)
set(AUDASPACE_DEFINITIONS
-DWITH_AUDASPACE
-DWITH_SYSTEM_AUDASPACE
"-DAUD_DEVICE_H=<AUD_Device.h>"
"-DAUD_SPECIAL_H=<AUD_Special.h>"
"-DAUD_SOUND_H=<AUD_Sound.h>"
"-DAUD_HANDLE_H=<AUD_Handle.h>"
"-DAUD_SEQUENCE_H=<AUD_Sequence.h>"
"-DAUD_TYPES_H=<AUD_Types.h>"
"-DAUD_PYTHON_H=<python/PyAPI.h>"
)
else()
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
set(AUDASPACE_DEFINITIONS
-DWITH_AUDASPACE
"-DAUD_DEVICE_H=<AUD_C-API.h>"
"-DAUD_SPECIAL_H=<AUD_C-API.h>"
"-DAUD_SOUND_H=<AUD_C-API.h>"
"-DAUD_HANDLE_H=<AUD_C-API.h>"
"-DAUD_SEQUENCE_H=<AUD_C-API.h>"
"-DAUD_TYPES_H=<AUD_Space.h>"
)
endif()
endif()
#-----------------------------------------------------------------------------
# Check for valid directories
# ... a partial checkout may cause this.
@@ -748,14 +813,14 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
# For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
# On Unix:
# cmake ../blender \
# -D PYTHON_VERSION=3.4 \
# -D PYTHON_INCLUDE_DIR=/opt/py34/include/python3.4d \
# -D PYTHON_LIBRARY=/opt/py34/lib/libpython3.4d.so
# -D PYTHON_VERSION=3.5 \
# -D PYTHON_INCLUDE_DIR=/opt/py35/include/python3.5d \
# -D PYTHON_LIBRARY=/opt/py35/lib/libpython3.5d.so
#
# On Macs:
# cmake ../blender \
# -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4 \
# -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/config \
# -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5 \
# -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config \
# -G Xcode
#
# When changing any of this remember to update the notes in doc/build_systems/cmake.txt
@@ -792,16 +857,20 @@ if(WITH_X11)
endif()
# ----------------------------------------------------------------------------
# Main Platform Checks
#
# - UNIX
# - WIN32
# - APPLE
if(UNIX AND NOT APPLE)
macro(find_package_wrapper)
if(WITH_STATIC_LIBS)
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
find_package(${ARGV})
if(WITH_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
unset(_cmake_find_library_suffixes_back)
find_package_static(${ARGV})
else()
find_package(${ARGV})
endif()
endmacro()
@@ -826,10 +895,10 @@ if(UNIX AND NOT APPLE)
# else values are set below for all platforms
if(WITH_PYTHON)
# No way to set py34. remove for now.
# No way to set py35, remove for now.
# find_package(PythonLibs)
# Use our own instead, since wothout py is such a rare case,
# Use our own instead, since without py is such a rare case,
# require this package
# XXX Linking errors with debian static python :/
# find_package_wrapper(PythonLibsUnix REQUIRED)
@@ -860,6 +929,13 @@ if(UNIX AND NOT APPLE)
endif()
# Audio IO
if(WITH_SYSTEM_AUDASPACE)
find_package_wrapper(Audaspace)
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
message(FATAL_ERROR "Audaspace external library not found!")
endif()
endif()
if(WITH_OPENAL)
find_package_wrapper(OpenAL)
if(NOT OPENAL_FOUND)
@@ -1060,9 +1136,9 @@ if(UNIX AND NOT APPLE)
endif()
if(WITH_LLVM)
find_package_wrapper(LLVM)
find_package_wrapper(LLVM)
if(NOT LLVM_FOUND)
if(NOT LLVM_FOUND)
set(WITH_LLVM OFF)
message(STATUS "LLVM not found")
endif()
@@ -1073,6 +1149,18 @@ if(UNIX AND NOT APPLE)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'")
endif()
if(WITH_OPENSUBDIV)
find_package_wrapper(OpenSubdiv)
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
if(NOT OPENSUBDIV_FOUND)
set(WITH_OPENSUBDIV OFF)
message(STATUS "OpenSubdiv not found")
endif()
endif()
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
@@ -1100,22 +1188,16 @@ if(UNIX AND NOT APPLE)
if(CMAKE_COMPILER_IS_GNUCC)
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "5.0")
# GCC5 uses gnu11, until we update, force c89
# though some c11 features can still be used.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
endif()
# use ld.gold linker if available, could make optional
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "GNU gold")
if("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
else ()
message(INFO "GNU gold linker isn't available, using the default system linker.")
endif ()
else()
message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif()
unset(LD_VERSION)
# CLang is the same as GCC for now.
@@ -1185,26 +1267,17 @@ elseif(WIN32)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
set(CMAKE_CXX_FLAGS "/nologo /J /Gd /EHsc /MP" CACHE STRING "MSVC MT C++ flags " FORCE)
set(CMAKE_C_FLAGS "/nologo /J /Gd /MP" CACHE STRING "MSVC MT C++ flags " FORCE)
if(CMAKE_CL_64)
set(CMAKE_CXX_FLAGS_DEBUG "/Od /RTC1 /MTd /Zi /MP" CACHE STRING "MSVC MT flags " FORCE)
else()
set(CMAKE_CXX_FLAGS_DEBUG "/Od /RTC1 /MTd /ZI /MP" CACHE STRING "MSVC MT flags " FORCE)
endif()
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /MT /MP" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /MT /MP" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi /MP" CACHE STRING "MSVC MT flags " FORCE)
if(CMAKE_CL_64)
set(CMAKE_C_FLAGS_DEBUG "/Od /RTC1 /MTd /Zi /MP" CACHE STRING "MSVC MT flags " FORCE)
else()
set(CMAKE_C_FLAGS_DEBUG "/Od /RTC1 /MTd /ZI /MP" CACHE STRING "MSVC MT flags " FORCE)
endif()
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT /MP" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /MT /MP" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi /MP" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
@@ -1218,13 +1291,22 @@ elseif(WIN32)
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
if(NOT DEFINED LIBDIR)
# Setup 64bit and 64bit windows systems
if(CMAKE_CL_64)
message(STATUS "64 bit compiler detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64_vc12)
set(LIBDIR_BASE "win64")
else()
message(STATUS "32 bit compiler detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows_vc12)
set(LIBDIR_BASE "windows")
endif()
if(MSVC_VERSION EQUAL 1900)
message(STATUS "Visual Studio 2015 detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
else()
message(STATUS "Visual Studio 2013 detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc12)
endif()
else()
message(STATUS using LIBDIR ${LIBDIR})
@@ -1370,7 +1452,7 @@ elseif(WIN32)
endif()
if(WITH_PYTHON)
set(PYTHON_VERSION 3.4) # CACHE STRING)
set(PYTHON_VERSION 3.5) # CACHE STRING)
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
@@ -1493,6 +1575,13 @@ elseif(WIN32)
)
endif()
if(WITH_OPENSUBDIV)
set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBPATH}/osdCPU.lib ${OPENSUBDIV_LIBPATH}/osdGPU.lib)
find_package(OpenSubdiv)
endif()
if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
@@ -1500,6 +1589,16 @@ elseif(WIN32)
set(SDL_LIBPATH ${SDL}/lib)
endif()
# Audio IO
if(WITH_SYSTEM_AUDASPACE)
set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
endif()
# used in many places so include globally, like OpenGL
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
@@ -1643,7 +1742,7 @@ elseif(WIN32)
if(WITH_PYTHON)
# normally cached but not since we include them with blender
set(PYTHON_VERSION 3.4) # CACHE STRING)
set(PYTHON_VERSION 3.5) # CACHE STRING)
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}mw.lib") # CACHE FILEPATH)
@@ -1819,6 +1918,17 @@ elseif(APPLE)
endif()
endif()
if(WITH_OPENSUBDIV)
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
find_library(OSL_LIB_UTIL NAMES osdutil PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSL_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSL_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
list(APPEND OPENSUBDIV_LIBRARIES ${OSL_LIB_UTIL} ${OSL_LIB_CPU} ${OSL_LIB_GPU})
endif()
if(WITH_JACK)
find_library(JACK_FRAMEWORK
NAMES jackmp
@@ -1837,19 +1947,19 @@ elseif(APPLE)
endif()
if(WITH_PYTHON)
# we use precompiled libraries for py 3.4 and up by default
set(PYTHON_VERSION 3.4)
# we use precompiled libraries for py 3.5 and up by default
set(PYTHON_VERSION 3.5)
if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
# set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
# set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
# module must be compiled against Python framework
set(PYTHON_INCLUDE_DIR "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/include/python${PYTHON_VERSION}m")
set(PYTHON_BINARY "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}")
set(PYTHON_EXECUTABLE "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}")
#set(PYTHON_LIBRARY python${PYTHON_VERSION})
set(PYTHON_LIBPATH "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
@@ -2211,9 +2321,14 @@ endif()
if(WITH_IMAGE_OPENJPEG)
if(WITH_SYSTEM_OPENJPEG)
# dealt with above
set(OPENJPEG_DEFINES "")
else()
set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
add_definitions(-DOPJ_STATIC)
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
# Special handling of Windows platform where openjpeg is always static.
if(WIN32)
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
endif()
@@ -2346,17 +2461,23 @@ if(WITH_GL_EGL)
list(APPEND GL_DEFINITIONS -DWITH_EGL)
endif()
if(WITH_GPU_DEBUG)
list(APPEND GL_DEFINITIONS -DWITH_GPU_DEBUG)
endif()
#-----------------------------------------------------------------------------
# Configure OpenMP.
if(WITH_OPENMP)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if(NOT WITH_OPENMP_STATIC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else()
# Typically avoid adding flags as defines but we can't
# ass OpenMP flags to the linker for static builds, meaning
# we can't add any OpenMP related flags to CFLAGS variables
# since they're passed to the linker as well.
add_definitions("${OpenMP_C_FLAGS}")
find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
endif()
else()
set(WITH_OPENMP OFF)
endif()
@@ -2468,9 +2589,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE -Werror=return-type)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_VLA -Werror=vla)
# system headers sometimes do this, disable for now, was: -Werror=strict-prototypes
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES -Wstrict-prototypes)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
@@ -2499,6 +2620,11 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
endif()
# versions before gcc4.8 include global name-space.
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.8")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_SHADOW -Wshadow)
endif()
# disable because it gives warnings for printf() & friends.
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)
@@ -2515,7 +2641,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE -Werror=return-type)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
@@ -2552,7 +2677,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
# strange, clang complains these are not supported, but then yses them.
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE -Werror=return-type)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
@@ -2667,6 +2791,12 @@ if(WITH_CPP11)
endif()
endif()
# Visual Studio has all standards it supports available by default
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Intel")
# Use C99 + GNU extensions, works with GCC, Clang, ICC
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
endif()
# Include warnings first, so its possible to disable them with user defined flags
# eg: -Wno-uninitialized
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
@@ -2756,25 +2886,29 @@ include(build_files/cmake/packaging.cmake)
# Print Final Configuration
if(FIRST_RUN)
set(_config_msg "\n* Blender Configuration *")
macro(info_cfg_option
_setting)
set(_msg " * ${_setting}")
set(_config_msg "\nBlender Configuration\n=====================")
function(info_cfg_option
_setting
)
set(_msg " - ${_setting}")
string(LENGTH "${_msg}" _len)
while("32" GREATER "${_len}")
set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1")
endwhile()
set(_config_msg "${_config_msg}\n${_msg}${${_setting}}")
endmacro()
set(_config_msg "${_config_msg}\n${_msg}${${_setting}}" PARENT_SCOPE)
endfunction()
macro(info_cfg_text
_text)
set(_config_msg "${_config_msg}\n\n ${_text}")
function(info_cfg_text
_text
)
endmacro()
set(_config_msg "${_config_msg}\n\n ${_text}" PARENT_SCOPE)
endfunction()
message(STATUS "C Compiler: \"${CMAKE_C_COMPILER_ID}\"")
message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
@@ -2853,14 +2987,10 @@ if(FIRST_RUN)
info_cfg_option(WITH_GL_PROFILE_COMPAT)
info_cfg_option(WITH_GL_PROFILE_CORE)
info_cfg_option(WITH_GL_PROFILE_ES20)
info_cfg_option(WITH_GPU_DEBUG)
if(WIN32)
info_cfg_option(WITH_GL_ANGLE)
endif()
info_cfg_text("Other:")
info_cfg_option(WITH_OPENNL)
# debug
message(STATUS "HAVE_STDBOOL_H = ${HAVE_STDBOOL_H}")

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
@@ -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 -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 )
endif
endif
@@ -115,14 +122,14 @@ endif
# Build Blender
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 ...
@@ -201,6 +208,12 @@ help: FORCE
@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,6 +223,7 @@ help: FORCE
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
# -----------------------------------------------------------------------------
# Packages
@@ -233,21 +247,21 @@ test: FORCE
# run pep8 check check on scripts we distribute.
test_pep8: FORCE
python3 tests/python/pep8.py > test_pep8.log 2>&1
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
test_cmake: FORCE
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
$(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: FORCE
python3 tests/check_deprecated.py
$(PYTHON) tests/check_deprecated.py
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" \
@@ -256,7 +270,7 @@ test_style_c: FORCE
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" \
@@ -268,7 +282,7 @@ test_style_c_qtc: FORCE
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"
@@ -277,7 +291,7 @@ test_style_osl: FORCE
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" \
@@ -290,10 +304,10 @@ test_style_osl_qtc: FORCE
#
project_qtcreator: FORCE
python3 build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_netbeans: FORCE
python3 build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
project_eclipse: FORCE
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
@@ -306,39 +320,39 @@ project_eclipse: FORCE
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: 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: 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: 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: 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: 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: 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" \
@@ -347,7 +361,7 @@ check_spelling_c: FORCE
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" \
@@ -358,7 +372,7 @@ check_spelling_c_qtc: FORCE
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"
@@ -404,10 +418,10 @@ doc_dna: FORCE
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: FORCE
python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
help_features: FORCE
@python3 -c \
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \

View File

@@ -331,7 +331,10 @@ if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '')
if env['MACOSX_SDK'] == '': # no set sdk, choosing best one found
if 'OS X 10.10' in MACOSX_SDK_CHECK:
if 'OS X 10.11' in MACOSX_SDK_CHECK:
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.11.sdk'
elif 'OS X 10.10' in MACOSX_SDK_CHECK:
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.10.sdk'
elif 'OS X 10.9' in MACOSX_SDK_CHECK:
@@ -470,6 +473,14 @@ if env['OURPLATFORM']=='darwin':
################### End Automatic configuration for OSX ##################
#############################################################################
if env['OURPLATFORM'] == 'linux' and not env['C_COMPILER_ID']:
command = ["%s"%env['CC'], "--version"]
line = btools.get_command_output(command)
if line.startswith('gcc'):
env['C_COMPILER_ID'] = 'gcc'
elif 'clang' in line[0]:
env['C_COMPILER_ID'] = 'clang'
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
@@ -487,6 +498,13 @@ if env['WITH_BF_CPP11']:
else:
env['CXXFLAGS'].append('-std=c++11')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
# Visual Studio has all standards it supports available by default
pass
else:
# Use C99 + GNU extensions, works with GCC, Clang, ICC
env['CFLAGS'].append('-std=gnu99')
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):
@@ -506,6 +524,10 @@ if env['WITH_BF_STATICCXX']:
else:
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
# audaspace is needed for the game engine
if not env['WITH_BF_AUDASPACE']:
env['WITH_BF_GAMEENGINE'] = False
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
if 'blenderplayer' in B.targets:
env['WITH_BF_PLAYER'] = True
@@ -532,13 +554,24 @@ else:
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
# TODO, make optional (as with CMake)
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CPPFLAGS'].append('-DWITH_AVI')
env['CPPFLAGS'].append('-DWITH_OPENNL')
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
# Audaspace
if env['WITH_BF_AUDASPACE']:
env['BF_AUDASPACE_C_INC'] = '#intern/audaspace/intern'
env['BF_AUDASPACE_PY_INC'] = '#intern/audaspace/intern'
env['BF_AUDASPACE_DEF'] = ['WITH_AUDASPACE']
env['BF_AUDASPACE_DEF'].append('AUD_DEVICE_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_SPECIAL_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_SOUND_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_HANDLE_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_SEQUENCE_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_TYPES_H="<AUD_Space.h>"')
# OpenGL
if env['WITH_BF_GL_PROFILE_COMPAT']:
@@ -758,11 +791,13 @@ if B.targets != ['cudakernels']:
data_to_c_simple("release/datafiles/preview_cycles.blend")
# --- glsl ---
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_geometry.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_color_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_basic_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_basic_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
@@ -781,6 +816,7 @@ if B.targets != ['cudakernels']:
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_vert.glsl")
data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
data_to_c_simple("intern/opensubdiv/gpu_shader_opensubd_display.glsl")
# --- blender ---
data_to_c_simple("release/datafiles/bfont.pfb")
@@ -1020,14 +1056,16 @@ if env['OURPLATFORM']!='darwin':
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel')
source=os.listdir('intern/cycles/kernel')
if '__pycache__' in source: source.remove('__pycache__')
source.remove('kernel.cpp')
source.remove('CMakeLists.txt')
source.remove('SConscript')
source.remove('svm')
source.remove('closure')
source.remove('geom')
source.remove('shaders')
source.remove('osl')
source.remove('split')
source=['intern/cycles/kernel/'+s for s in source]
source.append('intern/cycles/util/util_atomic.h')
source.append('intern/cycles/util/util_color.h')
source.append('intern/cycles/util/util_half.h')
source.append('intern/cycles/util/util_math.h')
@@ -1053,6 +1091,12 @@ if env['OURPLATFORM']!='darwin':
if '__pycache__' in source: source.remove('__pycache__')
source=['intern/cycles/kernel/geom/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
# split
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'split')
source=os.listdir('intern/cycles/kernel/split')
if '__pycache__' in source: source.remove('__pycache__')
source=['intern/cycles/kernel/split/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
# licenses
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
@@ -1284,6 +1328,15 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
# TODO(sergey): For unti we've got better way to deal with python binary
if env['WITH_BF_PYTHON']:
py_target = os.path.join(env['BF_INSTALLDIR'], VERSION, 'python', 'bin')
if env['BF_DEBUG']:
allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll'])
else:
allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll'])
if env['OURPLATFORM'] == 'win64-mingw':
dllsources = []

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@
set(LLVM_VERSION_MAJOR 3)
set(LLVM_VERSION_MINOR 1)
-set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}svn")
+set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

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})

View File

@@ -0,0 +1,102 @@
# ######## Global feature set settings ########
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
# 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/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
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/libpcre.a" CACHE STRING "" FORCE)
set(XML2_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(XML2_LIBRARY "/usr/lib/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)
# 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)
# Foce some system libraries to be static
set(FFTW3_LIBRARY "/usr/lib/libfftw3.a" CACHE STRING "" FORCE)
set(JPEG_LIBRARY "/usr/lib/libjpeg.a" CACHE STRING "" FORCE)
set(PNG_LIBRARY "/usr/lib/libpng.a" CACHE STRING "" FORCE)
set(TIFF_LIBRARY "/usr/lib/libtiff.a" CACHE STRING "" FORCE)
set(ZLIB_LIBRARY "/usr/lib/libz.a" CACHE STRING "" FORCE)
# Additional linking libraries
set(CMAKE_EXE_LINKER_FLAGS "-lrt" 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,176 +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'
BF_IS_NEW_OSL = False
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = BF_IS_NEW_OSL
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_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
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'
if BF_IS_NEW_OSL:
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.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']
if BF_IS_NEW_OSL:
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
else:
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']

View File

@@ -1,176 +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'
BF_IS_NEW_OSL = False
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = BF_IS_NEW_OSL
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_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
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'
if BF_IS_NEW_OSL:
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.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']
if BF_IS_NEW_OSL:
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
else:
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']

View File

@@ -1,5 +1,5 @@
CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
#CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
#CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64

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,7 +4,7 @@
# <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"]
@@ -282,11 +282,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',
@@ -303,14 +298,16 @@ def generic_builder(id, libdir='', branch='', rsync=False):
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, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
#add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
add_builder(c, 'linux_glibc211_i386_cmake', '', generic_builder, hour=1)
add_builder(c, 'linux_glibc211_x86_64_cmake', '', 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, '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, '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)

View File

@@ -124,10 +124,12 @@ 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()

View File

@@ -31,41 +31,125 @@ 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')
if 'cmake' in builder:
# cmake
# set build options
# 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']
chroot_name = None # If not None command will be delegated to that chroot
build_cubins = True # Whether to build Cycles CUDA kernels
remove_cache = False # Remove CMake cache to be sure config is totally up-to-date
remove_install_dir = False # Remove installation folder before building
# 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
# Set build options.
cmake_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
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')
if builder.startswith('mac'):
# Set up OSX architecture
if builder.endswith('x86_64_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
elif builder.endswith('i386_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=i386')
elif builder.endswith('ppc_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
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"'])
elif builder.startswith('win'):
install_dir = None
if builder.startswith('win64'):
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
elif builder.startswith('win32'):
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
build_cubins = False
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'])
elif builder.startswith('linux'):
remove_cache = True
remove_install_dir = True
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
# Currently unused
# cmake_cuda_config_file = "build_files/buildbot/config/blender_linux_cuda.cmake"
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_squeeze_x86_64'
build_cubins = True
targets = ['player', 'blender']
elif builder.endswith('i386_cmake'):
chroot_name = 'buildbot_squeeze_i686'
build_cubins = False
targets = ['player', 'blender']
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%d" % (build_cubins))
if install_dir:
cmake_options.append("-DCMAKE_INSTALL_PREFIX=%s" % (install_dir))
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
# 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)
chroot_prefix = []
# Make sure no garbage remained from the previous run
# (only do it if builder requested this)
if remove_install_dir:
if os.path.isdir(install_dir):
shutil.rmtree(install_dir)
for target in targets:
print("Building target %s" % (target))
# Construct build directory name based on the target
target_build_dir = build_dir
if target != 'blender':
target_build_dir += '_' + target
# 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.append("-C" + os.path.join(blender_dir, cmake_cuda_config_file))
# Configure the build
print("CMake options:")
print(target_cmake_options)
if remove_cache and os.path.exists('CMakeCache.txt'):
print("Removing CMake cache")
os.remove('CMakeCache.txt')
retcode = subprocess.call(chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
if retcode != 0:
print('Condifuration FAILED!')
sys.exit(retcode)
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 = chroot_prefix + ['make', '-s', '-j2', 'install']
print("Executing command:")
print(command)
retcode = subprocess.call(command)
if retcode != 0:
sys.exit(retcode)
else:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
# scons
os.chdir(blender_dir)
@@ -85,108 +169,14 @@ else:
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(buildbot_dir, 'config')
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 builder.find('mac') != -1:
if builder.find('x86_64') != -1:
config = 'user-config-mac-x86_64.py'
else:
config = 'user-config-mac-i386.py'
# use 64bit cuda toolkit, so there'll be no memory limit issues
cuda_chroot = 'buildbot_squeeze_x86_64'
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
# 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
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
common_options = ['BF_INSTALLDIR=' + install_dir] + scons_options
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))
elif config.find('cuda') != -1:
scons_options.append('BF_BUILDDIR=%s_cuda' % (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 with 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)
sys.exit(retcode)

View File

@@ -36,149 +36,211 @@ 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 ''
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"))
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)
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
# Make sure install directory always exists
if not os.path.exists(install_dir):
os.makedirs(install_dir)
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()
# 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])
import tarfile
package = tarfile.open(dest, 'w:bz2')
for entry in flist:
package.add(entry[0], entry[1], recursive=False)
package.close()
# 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'
os.chdir('../blender.git')
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
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']
if builder.find('mac') != -1:
if builder.find('x86_64') != -1:
config = 'user-config-mac-x86_64.py'
else:
config = 'user-config-mac-i386.py'
config = None
bits = None
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
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
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])
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')
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')))
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('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)
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
# CMake
if 'win' in builder:
os.chdir(build_dir)
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'])
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]
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 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.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('i386_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)
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 as 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 as ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')

View File

@@ -19,6 +19,7 @@
# <pep8 compliant>
import subprocess
import os
import sys
# get builder name
@@ -33,7 +34,24 @@ blender_dir = '../blender.git'
if "cmake" in builder:
# cmake
retcode = subprocess.call(['ctest', '.' '--output-on-failure'])
if "linux" in builder:
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('i386_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

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

@@ -59,7 +59,8 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
FIND_FILE(OPENIMAGEIO_IDIFF
NAMES
idiff
${OPENIMAGEIO_ROOT_DIR}
HINTS
${OPENIMAGEIO_ROOT_DIR}
PATH_SUFFIXES
bin
)

View File

@@ -0,0 +1,111 @@
# - 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
)
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

@@ -38,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)
@@ -66,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))
@@ -75,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)
@@ -147,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
@@ -169,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)
@@ -198,17 +199,31 @@ IF(PYTHONLIBSUNIX_FOUND)
)
# 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

@@ -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}
@@ -40,10 +40,20 @@ macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
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

@@ -10,9 +10,9 @@ 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)
find_package(Git)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
@@ -97,6 +97,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
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

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
@@ -193,13 +200,16 @@ def cmake_get_src(f):
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:
@@ -230,10 +240,6 @@ 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:
if ig in f:
@@ -241,73 +247,83 @@ def is_ignore(f):
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
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)
# 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)
'''
# 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)
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 UnicodeDecodeError:
print("Non utf8: %s:%d" % (f, i))
if i > 1:
traceback.print_exc()
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()
if __name__ == "__main__":
main()

View File

@@ -10,9 +10,6 @@ IGNORE = (
"/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",
@@ -74,3 +71,6 @@ IGNORE = (
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

@@ -40,6 +40,7 @@ from project_info import (
# is_py,
cmake_advanced_info,
cmake_compiler_defines,
cmake_cache_var,
project_name_get,
)
@@ -49,6 +50,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()
@@ -71,6 +74,10 @@ 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()]
@@ -131,9 +138,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]
@@ -185,16 +192,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')
@@ -203,7 +221,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')
@@ -221,10 +239,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

@@ -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)
@@ -42,7 +43,6 @@ 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_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE)
@@ -52,11 +52,18 @@ set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependant 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)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
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

@@ -16,6 +16,7 @@ set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES 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)
@@ -46,8 +47,6 @@ 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_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)

View File

@@ -48,7 +48,7 @@ macro(list_insert_before
unset(_index)
endmacro()
function (list_assert_duplicates
function(list_assert_duplicates
list_id
)
@@ -103,22 +103,49 @@ macro(file_list_suffix
endmacro()
if(UNIX AND NOT APPLE)
macro(find_package_static)
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
find_package(${ARGV})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
unset(_cmake_find_library_suffixes_back)
endmacro()
macro(find_library_static)
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
find_library(${ARGV})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
unset(_cmake_find_library_suffixes_back)
endmacro()
endif()
function(target_link_libraries_optimized
TARGET
LIBS
)
macro(target_link_libraries_optimized TARGET LIBS)
foreach(_LIB ${LIBS})
target_link_libraries(${TARGET} optimized "${_LIB}")
endforeach()
unset(_LIB)
endmacro()
endfunction()
function(target_link_libraries_debug
TARGET
LIBS
)
macro(target_link_libraries_debug TARGET LIBS)
foreach(_LIB ${LIBS})
target_link_libraries(${TARGET} debug "${_LIB}")
endforeach()
unset(_LIB)
endmacro()
endfunction()
function(target_link_libraries_decoupled
target
libraries_var
)
macro(target_link_libraries_decoupled target libraries_var)
if(NOT MSVC)
target_link_libraries(${target} ${${libraries_var}})
else()
@@ -127,14 +154,15 @@ macro(target_link_libraries_decoupled target libraries_var)
file_list_suffix(_libraries_debug "${${libraries_var}}" "_d")
target_link_libraries_debug(${target} "${_libraries_debug}")
target_link_libraries_optimized(${target} "${${libraries_var}}")
unset(_libraries_debug)
endif()
endmacro()
endfunction()
# Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
# use it instead of include_directories()
macro(blender_include_dirs
includes)
function(blender_include_dirs
includes
)
set(_ALL_INCS "")
foreach(_INC ${ARGV})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
@@ -145,13 +173,12 @@ macro(blender_include_dirs
##endif()
endforeach()
include_directories(${_ALL_INCS})
unset(_INC)
unset(_ABS_INC)
unset(_ALL_INCS)
endmacro()
endfunction()
function(blender_include_dirs_sys
includes
)
macro(blender_include_dirs_sys
includes)
set(_ALL_INCS "")
foreach(_INC ${ARGV})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
@@ -161,13 +188,11 @@ macro(blender_include_dirs_sys
##endif()
endforeach()
include_directories(SYSTEM ${_ALL_INCS})
unset(_INC)
unset(_ABS_INC)
unset(_ALL_INCS)
endmacro()
endfunction()
macro(blender_source_group
sources)
function(blender_source_group
sources
)
# Group by location on disk
source_group("Source Files" FILES CMakeLists.txt)
@@ -177,23 +202,23 @@ macro(blender_source_group
if((${_SRC_EXT} MATCHES ".h") OR
(${_SRC_EXT} MATCHES ".hpp") OR
(${_SRC_EXT} MATCHES ".hh"))
source_group("Header Files" FILES ${_SRC})
else()
source_group("Source Files" FILES ${_SRC})
endif()
endforeach()
unset(_SRC)
unset(_SRC_EXT)
endmacro()
set(GROUP_ID "Header Files")
else()
set(GROUP_ID "Source Files")
endif()
source_group("${GROUP_ID}" FILES ${_SRC})
endforeach()
endfunction()
# only MSVC uses SOURCE_GROUP
macro(blender_add_lib_nolist
function(blender_add_lib_nolist
name
sources
includes
includes_sys)
includes_sys
)
# message(STATUS "Configuring library ${name}")
@@ -213,22 +238,24 @@ macro(blender_add_lib_nolist
# Not for system includes because they can resolve to the same path
# list_assert_duplicates("${includes_sys}")
endmacro()
endfunction()
macro(blender_add_lib
function(blender_add_lib
name
sources
includes
includes_sys)
includes_sys
)
blender_add_lib_nolist(${name} "${sources}" "${includes}" "${includes_sys}")
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
endmacro()
endfunction()
macro(SETUP_LIBDIRS)
function(SETUP_LIBDIRS)
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -288,24 +315,27 @@ macro(SETUP_LIBDIRS)
if(WIN32 AND NOT UNIX)
link_directories(${PTHREADS_LIBPATH})
endif()
endmacro()
endfunction()
macro(setup_liblinks
target)
function(setup_liblinks
target
)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
target_link_libraries(${target}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY})
target_link_libraries(
${target}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY}
)
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -330,6 +360,9 @@ macro(setup_liblinks
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
target_link_libraries(${target} ${BULLET_LIBRARIES})
endif()
if(WITH_AUDASPACE AND WITH_SYSTEM_AUDASPACE)
target_link_libraries(${target} ${AUDASPACE_C_LIBRARIES} ${AUDASPACE_PY_LIBRARIES})
endif()
if(WITH_OPENAL)
target_link_libraries(${target} ${OPENAL_LIBRARY})
endif()
@@ -357,6 +390,16 @@ macro(setup_liblinks
if(WITH_OPENCOLORIO)
target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
endif()
if(WITH_OPENSUBDIV)
if(WIN32 AND NOT UNIX)
file_list_suffix(OPENSUBDIV_LIBRARIES_DEBUG "${OPENSUBDIV_LIBRARIES}" "_d")
target_link_libraries_debug(${target} "${OPENSUBDIV_LIBRARIES_DEBUG}")
target_link_libraries_optimized(${target} "${OPENSUBDIV_LIBRARIES}")
unset(OPENSUBDIV_LIBRARIES_DEBUG)
else()
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
endif()
endif()
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
endif()
@@ -402,11 +445,13 @@ macro(setup_liblinks
unset(EXPAT_LIB_DEBUG)
endif()
else()
target_link_libraries(${target}
${OPENCOLLADA_LIBRARIES}
${PCRE_LIBRARIES}
${XML2_LIBRARIES}
${EXPAT_LIB})
target_link_libraries(
${target}
${OPENCOLLADA_LIBRARIES}
${PCRE_LIBRARIES}
${XML2_LIBRARIES}
${EXPAT_LIB}
)
endif()
endif()
if(WITH_MEM_JEMALLOC)
@@ -424,6 +469,11 @@ macro(setup_liblinks
if(WIN32 AND NOT UNIX)
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
endif()
if(UNIX AND NOT APPLE)
if(WITH_OPENMP_STATIC)
target_link_libraries(${target} ${OpenMP_LIBRARIES})
endif()
endif()
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
@@ -436,9 +486,11 @@ macro(setup_liblinks
${BLENDER_GL_LIBRARIES})
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
endmacro()
endfunction()
function(SETUP_BLENDER_SORTED_LIBS)
macro(SETUP_BLENDER_SORTED_LIBS)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
list(APPEND BLENDER_LINK_LIBS
@@ -524,6 +576,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
bf_blenloader
bf_imbuf
bf_blenlib
bf_depsgraph
bf_intern_ghost
bf_intern_string
bf_avi
@@ -543,7 +596,6 @@ macro(SETUP_BLENDER_SORTED_LIBS)
ge_phys_bullet
bf_intern_smoke
extern_lzma
extern_colamd
ge_logic_ketsji
extern_recastnavigation
ge_logic
@@ -560,6 +612,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
ge_videotex
bf_dna
bf_blenfont
bf_blentranslation
bf_intern_audaspace
bf_intern_mikktspace
bf_intern_dualcon
@@ -572,6 +625,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
cycles_subd
bf_intern_raskter
bf_intern_opencolorio
bf_intern_eigen
extern_rangetree
extern_wcwidth
extern_libmv
@@ -643,10 +697,6 @@ macro(SETUP_BLENDER_SORTED_LIBS)
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
endif()
if(WITH_OPENNL)
list_insert_after(BLENDER_SORTED_LIBS "bf_render" "bf_intern_opennl")
endif()
if(WITH_BULLET)
list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
endif()
@@ -655,6 +705,10 @@ macro(SETUP_BLENDER_SORTED_LIBS)
list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
endif()
if(WITH_OPENSUBDIV)
list(APPEND BLENDER_SORTED_LIBS bf_intern_opensubdiv)
endif()
foreach(SORTLIB ${BLENDER_SORTED_LIBS})
set(REMLIB ${SORTLIB})
foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
@@ -673,14 +727,12 @@ macro(SETUP_BLENDER_SORTED_LIBS)
message(STATUS "Blender Skipping: (${REM_MSG})")
endif()
unset(SEARCHLIB)
unset(SORTLIB)
unset(REMLIB)
unset(REM_MSG)
set(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} PARENT_SCOPE)
# for top-level tests
set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
endmacro()
endfunction()
macro(TEST_SSE_SUPPORT
_sse_flags
@@ -902,19 +954,22 @@ endmacro()
# utility macro
macro(remove_cc_flag
flag)
_flag)
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
foreach(flag ${ARGV})
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endforeach()
unset(flag)
endmacro()
@@ -928,28 +983,34 @@ endmacro()
macro(remove_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
remove_cc_flag("-Wstrict-prototypes")
remove_cc_flag("-Wmissing-prototypes")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag("-Wunused-macros")
remove_cc_flag("-Wwrite-strings")
remove_cc_flag("-Wredundant-decls")
remove_cc_flag("-Wundef")
remove_cc_flag("-Wshadow")
remove_cc_flag("-Wdouble-promotion")
remove_cc_flag("-Wold-style-definition")
remove_cc_flag("-Werror=[^ ]+")
remove_cc_flag("-Werror")
remove_cc_flag(
"-Wstrict-prototypes"
"-Wmissing-prototypes"
"-Wmissing-format-attribute"
"-Wunused-local-typedefs"
"-Wunused-macros"
"-Wunused-parameter"
"-Wwrite-strings"
"-Wredundant-decls"
"-Wundef"
"-Wshadow"
"-Wdouble-promotion"
"-Wold-style-definition"
"-Werror=[^ ]+"
"-Werror"
)
# negate flags implied by '-Wall'
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag("-Wunused-variable")
remove_cc_flag("-Werror=[^ ]+")
remove_cc_flag("-Werror")
remove_cc_flag(
"-Wunused-parameter"
"-Wunused-variable"
"-Werror=[^ ]+"
"-Werror"
)
# negate flags implied by '-Wall'
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
@@ -963,11 +1024,15 @@ endmacro()
macro(remove_extra_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
remove_cc_flag("-Wunused-parameter")
remove_cc_flag(
"-Wunused-parameter"
)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag(
"-Wunused-parameter"
)
endif()
if(MSVC)
@@ -1003,37 +1068,39 @@ macro(remove_strict_flags_file
endmacro()
macro(ADD_CHECK_C_COMPILER_FLAG
function(ADD_CHECK_C_COMPILER_FLAG
_CFLAGS
_CACHE_VAR
_FLAG)
_FLAG
)
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}")
if(${_CACHE_VAR})
# message(STATUS "Using CFLAG: ${_FLAG}")
set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}")
set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE)
else()
message(STATUS "Unsupported CFLAG: ${_FLAG}")
endif()
endmacro()
endfunction()
macro(ADD_CHECK_CXX_COMPILER_FLAG
function(ADD_CHECK_CXX_COMPILER_FLAG
_CXXFLAGS
_CACHE_VAR
_FLAG)
_FLAG
)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}")
if(${_CACHE_VAR})
# message(STATUS "Using CXXFLAG: ${_FLAG}")
set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}")
set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE)
else()
message(STATUS "Unsupported CXXFLAG: ${_FLAG}")
endif()
endmacro()
endfunction()
function(get_blender_version)
# extracts header vars and defines them in the parent scope:
@@ -1183,7 +1250,7 @@ endmacro()
# pair of macros to allow libraries to be specify files to install, but to
# only install them at the end so the directories don't get cleared with
# the files in them. used by cycles to install addon.
macro(delayed_install
function(delayed_install
base
files
destination)
@@ -1196,8 +1263,7 @@ macro(delayed_install
endif()
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
endforeach()
unset(f)
endmacro()
endfunction()
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
# does not get expanded in calling but is preserved
@@ -1216,62 +1282,59 @@ function(delayed_do_install
list(GET destinations ${i} d)
install(FILES ${f} DESTINATION ${targetdir}/${d})
endforeach()
unset(f)
endif()
endfunction()
macro(data_to_c
file_from file_to
list_to_add)
function(data_to_c
file_from file_to
list_to_add
)
list(APPEND ${list_to_add} ${file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${file_to} PATH)
add_custom_command(
OUTPUT ${file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
COMMAND "$<TARGET_FILE:datatoc>" ${file_from} ${file_to}
DEPENDS ${file_from} datatoc)
set_source_files_properties(${file_to} PROPERTIES GENERATED TRUE)
unset(_file_to_path)
endmacro()
endfunction()
# same as above but generates the var name and output automatic.
macro(data_to_c_simple
file_from
list_to_add)
function(data_to_c_simple
file_from
list_to_add
)
# remove ../'s
get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH)
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${file_from}.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
add_custom_command(
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
DEPENDS ${_file_from} datatoc)
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
endmacro()
endfunction()
# macro for converting pixmap directory to a png and then a c file
macro(data_to_c_simple_icons
path_from
list_to_add
)
function(data_to_c_simple_icons
path_from
list_to_add
)
# Conversion steps
# path_from -> _file_from -> _file_to
@@ -1283,6 +1346,7 @@ macro(data_to_c_simple_icons
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${path_from}.png.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
@@ -1293,8 +1357,8 @@ macro(data_to_c_simple_icons
OUTPUT ${_file_from} ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
#COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc_icon ${_path_from_abs} ${_file_from}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
COMMAND "$<TARGET_FILE:datatoc_icon>" ${_path_from_abs} ${_file_from}
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
DEPENDS
${_icon_files}
datatoc_icon
@@ -1304,27 +1368,22 @@ macro(data_to_c_simple_icons
)
set_source_files_properties(${_file_from} ${_file_to} PROPERTIES GENERATED TRUE)
unset(_path_from_abs)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
unset(_icon_files)
endmacro()
endfunction()
# XXX Not used for now...
macro(svg_to_png
file_from
file_to
dpi
list_to_add)
function(svg_to_png
file_from
file_to
dpi
list_to_add
)
# remove ../'s
get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH)
get_filename_component(_file_to ${CMAKE_CURRENT_SOURCE_DIR}/${file_to} REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
find_program(INKSCAPE_EXE inkscape)
mark_as_advanced(INKSCAPE_EXE)
@@ -1347,15 +1406,12 @@ macro(svg_to_png
else()
message(WARNING "Inkscape not found, could not re-generate ${_file_to} from ${_file_from}!")
endif()
endfunction()
unset(_file_from)
unset(_file_to)
endmacro()
macro(msgfmt_simple
file_from
list_to_add)
function(msgfmt_simple
file_from
list_to_add
)
# remove ../'s
get_filename_component(_file_from_we ${file_from} NAME_WE)
@@ -1364,25 +1420,22 @@ macro(msgfmt_simple
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${_file_from_we}.mo REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
add_custom_command(
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/msgfmt ${_file_from} ${_file_to}
COMMAND "$<TARGET_FILE:msgfmt>" ${_file_from} ${_file_to}
DEPENDS msgfmt ${_file_from})
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
endfunction()
unset(_file_from_we)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
endmacro()
macro(find_python_package
package)
function(find_python_package
package
)
string(TOUPPER ${package} _upper_package)
@@ -1420,25 +1473,17 @@ macro(find_python_package
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
"WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_${_upper_package} OFF)
set(WITH_PYTHON_INSTALL_${_upper_package} OFF PARENT_SCOPE)
else()
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
endif()
unset(_PY_VER_SPLIT)
unset(_PY_VER_MAJOR)
endif()
unset(_upper_package)
endmacro()
endfunction()
# like Python's 'print(dir())'
macro(print_all_vars)
function(print_all_vars)
get_cmake_property(_vars VARIABLES)
foreach(_var ${_vars})
message("${_var}=${${_var}}")
endforeach()
unset(_vars)
unset(_var)
endmacro()
endfunction()

View File

@@ -21,10 +21,10 @@ 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
@@ -37,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
@@ -73,6 +74,7 @@ if(WIN32)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/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)
@@ -112,3 +114,9 @@ elseif(UNIX)
"tar.bz2")
endif()
unset(MAJOR_VERSION)
unset(MINOR_VERSION)
unset(PATCH_VERSION)
unset(BUILD_REV)

View File

@@ -130,7 +130,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

@@ -6,7 +6,7 @@ def FindPython():
python = "/usr"
abi_flags = "m" # Most common for linux distros
version = "3.4"
version = "3.5"
_arch = platform.uname()[4] + "-linux-gnu"

View File

@@ -26,10 +26,10 @@ 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'
BF_PYTHON_VERSION = '3.5'
WITH_OSX_STATICPYTHON = True
# python 3.4 uses precompiled libraries in bf svn /lib by default
# python 3.5 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}'
@@ -52,6 +52,8 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_AUDASPACE = True
# we use simply jack framework
WITH_BF_JACK = True
BF_JACK = '/Library/Frameworks/Jackmp.framework'
@@ -213,6 +215,12 @@ WITH_BF_FREESTYLE = True
#OpenMP ( will be checked for compiler support and turned off eventually )
WITH_BF_OPENMP = True
WITH_BF_OPENSUBDIV = False
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = []
@@ -240,7 +248,7 @@ 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']
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wvla', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
##FIX_STUBS_WARNINGS = -Wno-unused

View File

@@ -26,6 +26,8 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = '/usr'
BF_JACK_INC = '${BF_JACK}/include/jack'
@@ -206,7 +208,7 @@ 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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
WITH_BF_OPENMP = True
@@ -226,6 +228,14 @@ BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_OPENSUBDIV = False
WITH_BF_STATICOPENSUBDIV = False
BF_OPENSUBDIV = '/usr'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV_LIBPATH}/libosdGPU.a ${BF_OPENSUBDIV_LIBPATH}/libosdCPU.a'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
##
CC = 'gcc'
CXX = 'g++'
@@ -244,7 +254,7 @@ 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']
C_WARN = ['-Wno-char-subscripts', '-Wvla', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=vla', '-Werror=implicit-function-declaration', '-Werror=return-type']
CC_WARN = ['-Wall']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']

View File

@@ -2,7 +2,7 @@ LCGDIR = '#../lib/mingw32'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_VERSION = '3.5'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
@@ -23,6 +23,8 @@ 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_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
@@ -145,7 +147,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
@@ -166,6 +168,12 @@ BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_OPENSUBDIV = False
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
@@ -194,7 +202,7 @@ REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
C_WARN = ['-Wno-char-subscripts', '-Wvla', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]

View File

@@ -21,7 +21,7 @@ BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib sw
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_VERSION = '3.5'
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]}'
@@ -42,6 +42,8 @@ BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
@@ -208,6 +210,12 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_OPENSUBDIV = True
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'

View File

@@ -2,7 +2,7 @@ LCGDIR = '#../lib/mingw64'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_VERSION = '3.5'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
@@ -22,6 +22,8 @@ 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_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
@@ -144,7 +146,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
@@ -165,6 +167,12 @@ BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-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'
WITH_BF_OPENSUBDIV = False
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
@@ -189,7 +197,7 @@ REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
# NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
C_WARN = ['-Wno-char-subscripts', '-Wvla', '-Wstrict-prototypes']
CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]

View File

@@ -22,7 +22,7 @@ BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcod
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_VERSION = '3.5'
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]}'
@@ -55,6 +55,8 @@ BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_PTHREADS = LIBDIR + '/pthreads'
@@ -212,6 +214,12 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['']
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_OPENSUBDIV = True
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'

View File

@@ -242,6 +242,11 @@ def setup_staticlibs(lenv):
if lenv['WITH_BF_STATIC3DMOUSE']:
statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC'])
if lenv['WITH_BF_OPENSUBDIV']:
libincs += Split(lenv['BF_OPENSUBDIV_LIBPATH'])
if lenv['WITH_BF_STATICOPENSUBDIV']:
statlibs += Split(lenv['BF_OPENSUBDIV_LIB_STATIC'])
# setting this last so any overriding of manually libs could be handled
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
# We must remove any previous items defining this path, for same reason stated above!
@@ -344,6 +349,13 @@ def setup_syslibs(lenv):
if not lenv['WITH_BF_STATICPNG']:
syslibs += Split(lenv['BF_PNG_LIB'])
if lenv['WITH_BF_OPENSUBDIV']:
if not lenv['WITH_BF_STATICOPENSUBDIV']:
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
syslibs += [osdlib+'_d' for osdlib in Split(lenv['BF_OPENSUBDIV_LIB'])]
else:
syslibs += Split(lenv['BF_OPENSUBDIV_LIB'])
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
for syslib in create_blender_liblist(lenv, 'system'):
syslibs.append(os.path.basename(syslib))
@@ -372,7 +384,7 @@ def propose_priorities():
def creator(env):
sources = ['creator.c']# + Blender.buildinfo(env, "dynamic") + Blender.resources
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/depsgraph', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
defs = []
@@ -630,7 +642,7 @@ def WinPyBundle(target=None, source=None, env=None):
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.tar.gz'
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib')
py_target = os.path.join(py_target, VERSION, 'python')
def printexception(func,path,ex):
if os.path.exists(path): #do not report if path does not exist. eg on a fresh build.
print str(func) + ' failed on ' + str(path)
@@ -764,7 +776,7 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp -R %s/kernel/*.h %s/kernel/*.cl %s/kernel/*.cu %s/kernel/' % (croot, croot, croot, cinstalldir)
commands.getoutput(cmd)
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_math_fast.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/kernel/split %s/kernel/kernels %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_math_fast.h %s/util/util_transform.h %s/util/util_types.h %s/util/util_atomic.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
commands.getoutput(cmd)
cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir)
commands.getoutput(cmd)
@@ -784,6 +796,8 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/Resources/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
commands.getoutput(cmd)
cmd = 'cp -r %s/python/bin -d %s/%s.app/Contents/Resources/%s/python/'%(libdir,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
commands.getoutput(cmd)
@@ -843,6 +857,7 @@ def UnixPyBundle(target=None, source=None, env=None):
py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
py_target = env.subst( dir + '/python/' + target_lib + '/python'+env['BF_PYTHON_VERSION'] )
py_target_bin = env.subst(dir + '/python/bin')
# This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow.
if os.path.exists(py_target):
@@ -862,6 +877,11 @@ def UnixPyBundle(target=None, source=None, env=None):
except:
pass
# install the executable
run("rm -rf '%s'" % py_target_bin)
os.makedirs(py_target_bin)
run("cp '%s' '%s'" % (env.subst(env['BF_PYTHON_BINARY']), py_target_bin))
run("cp -R '%s' '%s'" % (py_src, os.path.dirname(py_target)))
run("rm -rf '%s/distutils'" % py_target)
run("rm -rf '%s/lib2to3'" % py_target)

View File

@@ -107,6 +107,7 @@ def print_arguments(args, bc):
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_AUDASPACE', 'BF_AUDASPACE_C_INC', 'BF_AUDASPACE_PY_INC', 'BF_AUDASPACE_DEF',
'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',
@@ -182,7 +183,8 @@ def validate_arguments(args, bc):
'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'
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS',
'WITH_BF_OPENSUBDIV', 'WITH_BF_STATICOPENSUBDIV', 'BF_OPENSUBDIV', 'BF_OPENSUBDIV_INC', 'BF_OPENSUBDIV_LIB', 'BF_OPENSUBDIV_LIBPATH', 'BF_OPENSUBDIV_LIB_STATIC'
]
# Have options here that scons expects to be lists
@@ -199,7 +201,7 @@ def validate_arguments(args, bc):
'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',
'WITH_BF_CPP11'
'WITH_BF_CPP11', 'WITH_BF_LEGACY_DEPSGRAPH',
]
@@ -297,6 +299,11 @@ def read_opts(env, cfg, args):
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
(BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
(BoolVariable('WITH_BF_AUDASPACE', 'Build with audaspace if true', True)),
('BF_AUDASPACE_C_INC', 'audaspace-c include path', ''),
('BF_AUDASPACE_PY_INC', 'audaspace-py include path', ''),
('BF_AUDASPACE_DEF', 'audaspace defines', ''),
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
('BF_SDL', 'SDL base path', ''),
('BF_SDL_INC', 'SDL include path', ''),
@@ -656,7 +663,17 @@ def read_opts(env, cfg, args):
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', ''),
(BoolVariable('WITH_BF_OPENSUBDIV', 'Build with OpenSubdiv library', False)),
(BoolVariable('WITH_BF_STATICOPENSUBDIV', 'Staticly link to OpenColorIO', False)),
('BF_OPENSUBDIV', 'OpenSubdiv root path', ''),
('BF_OPENSUBDIV_INC', 'OpenSubdiv include path', ''),
('BF_OPENSUBDIV_LIB', 'OpenSubdiv library', ''),
('BF_OPENSUBDIV_LIBPATH', 'OpenSubdiv library path', ''),
('BF_OPENSUBDIV_LIB_STATIC', 'OpenSubdiv static library', ''),
(BoolVariable('WITH_BF_CPP11', '"Build with C++11 standard enabled, for development use only!', False)),
(BoolVariable('WITH_BF_LEGACY_DEPSGRAPH', 'Build Blender with legacy dependency graph', True)),
) # end of opts.AddOptions()
return localopts

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)

File diff suppressed because it is too large Load Diff

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://developer.blender.org">developer.blender.org</a> with bug tracker
* - <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,6 +1,7 @@
"""
Basic Sound Playback
++++++++++++++++++++
This script shows how to use the classes: :class:`Device`, :class:`Factory` and
:class:`Handle`.
"""

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

@@ -7,8 +7,9 @@ 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}``.
"""
# remove all objects in scene rather than the selected ones

View File

@@ -1,6 +1,6 @@
"""
.. _operator-execution_context:
"""
Execution Context
-----------------

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

@@ -8,7 +8,8 @@ bl_info = {
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Object"}
"category": "Object",
}
import bpy

View File

@@ -1,6 +1,7 @@
"""
Submenus
++++++++
This menu demonstrates some different functions.
"""
import bpy

View File

@@ -1,6 +1,7 @@
"""
Extending Menus
+++++++++++++++
When creating menus for addons you can't reference menus in Blender's default
scripts.
Instead, the addon can add menu items to existing menus.

View File

@@ -1,6 +1,7 @@
"""
Basic Menu Example
++++++++++++++++++
Here is an example of a simple menu. Menus differ from panels in that they must
reference from a header, panel or another menu.

View File

@@ -7,10 +7,10 @@ for more flexible mesh editing from python see :mod:`bmesh`.
Blender stores 4 main arrays to define mesh geometry.
* :class:`Mesh.vertices` (3 points in space)
* :class:`Mesh.edges` (reference 2 vertices)
* :class:`Mesh.loops` (reference a single vertex and edge)
* :class:`Mesh.polygons`: (reference a range of loops)
- :class:`Mesh.vertices` (3 points in space)
- :class:`Mesh.edges` (reference 2 vertices)
- :class:`Mesh.loops` (reference a single vertex and edge)
- :class:`Mesh.polygons`: (reference a range of loops)
Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,

View File

@@ -1,6 +1,7 @@
"""
Poll Function
+++++++++++++++
The :class:`NodeTree.poll` function determines if a node tree is visible
in the given context (similar to how :class:`Panel.poll`
and :class:`Menu.poll` define visibility). If it returns False,

View File

@@ -1,6 +1,7 @@
"""
Basic Object Operations Example
+++++++++++++++++++++++++++++++
This script demonstrates basic operations on object like creating new
object, placing it into scene, selecting it and making it active.
"""

View File

@@ -1,6 +1,7 @@
"""
Invoke Function
+++++++++++++++
:class:`Operator.invoke` is used to initialize the operator from the context
at the moment the operator is called.
invoke() is typically used to assign properties which are then used by
@@ -31,7 +32,7 @@ class SimpleMouseOperator(bpy.types.Operator):
y = bpy.props.IntProperty()
def execute(self, context):
# rather then printing, use the report function,
# rather than printing, use the report function,
# this way the message appears in the header,
self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
return {'FINISHED'}

View File

@@ -4,7 +4,7 @@ Calling a File Selector
This example shows how an operator can use the file selector.
Notice the invoke function calls a window manager method and returns
RUNNING_MODAL, this means the file selector stays open and the operator does not
``{'RUNNING_MODAL'}``, this means the file selector stays open and the operator does not
exit immediately after invoke finishes.
The file selector runs the operator, calling :class:`Operator.execute` when the

View File

@@ -1,6 +1,7 @@
"""
Dialog Box
++++++++++
This operator uses its :class:`Operator.invoke` function to call a popup.
"""
import bpy

View File

@@ -1,6 +1,7 @@
"""
Custom Drawing
++++++++++++++
By default operator properties use an automatic user interface layout.
If you need more control you can create your own layout with a
:class:`Operator.draw` function.

View File

@@ -1,8 +1,9 @@
"""
Modal Execution
+++++++++++++++
This operator defines a :class:`Operator.modal` function which running,
handling events until it returns {'FINISHED'} or {'CANCELLED'}.
handling events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``.
Grab, Rotate, Scale and Fly-Mode are examples of modal operators.
They are especially useful for interactive tools,
@@ -10,9 +11,9 @@ your operator can have its own state where keys toggle options as the operator
runs.
:class:`Operator.invoke` is used to initialize the operator as being by
returning {'RUNNING_MODAL'}, initializing the modal loop.
returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
Notice __init__() and __del__() are declared.
Notice ``__init__()`` and ``__del__()`` are declared.
For other operator types they are not useful but for modal operators they will
be called before the :class:`Operator.invoke` and after the operator finishes.
"""

View File

@@ -1,6 +1,7 @@
"""
Basic Operator Example
++++++++++++++++++++++
This script shows simple operator which prints a message.
Since the operator only has an :class:`Operator.execute` function it takes no

View File

@@ -1,6 +1,7 @@
"""
Simple Object Panel
+++++++++++++++++++
This panel has a :class:`Panel.poll` and :class:`Panel.draw_header` function,
even though the contents is basic this closely resembles blenders panels.
"""

View File

@@ -1,6 +1,7 @@
"""
Basic Panel Example
+++++++++++++++++++
This script is a simple panel which will draw into the object properties
section.

View File

@@ -1,7 +1,8 @@
"""
Advanced UIList Example - Filtering and Reordering
++++++++++++++++++++++++++++++++++++++++++++++++++
This script is an extended version of the UIList subclass used to show vertex groups. It is not used 'as is',
This script is an extended version of the ``UIList`` subclass used to show vertex groups. It is not used 'as is',
because iterating over all vertices in a 'draw' function is a very bad idea for UI performances! However, it's a good
example of how to create/use filtering/reordering callbacks.
"""

View File

@@ -1,7 +1,7 @@
"""
Note that when keying data paths which contain nested properties this must be
done from the :class:`ID` subclass, in this case the :class:`Armature` rather
then the bone.
than the bone.
"""
import bpy

View File

@@ -0,0 +1,192 @@
# Draws an off-screen buffer and display it in the corner of the view.
import bpy
from bgl import *
class OffScreenDraw(bpy.types.Operator):
bl_idname = "view3d.offscreen_draw"
bl_label = "View3D Offscreen Draw"
_handle_calc = None
_handle_draw = None
is_enabled = False
# manage draw handler
@staticmethod
def draw_callback_px(self, context):
scene = context.scene
aspect_ratio = scene.render.resolution_x / scene.render.resolution_y
self._update_offscreen(context, self._offscreen)
self._opengl_draw(context, self._texture, aspect_ratio, 0.2)
@staticmethod
def handle_add(self, context):
OffScreenDraw._handle_draw = bpy.types.SpaceView3D.draw_handler_add(
self.draw_callback_px, (self, context),
'WINDOW', 'POST_PIXEL',
)
@staticmethod
def handle_remove():
if OffScreenDraw._handle_draw is not None:
bpy.types.SpaceView3D.draw_handler_remove(OffScreenDraw._handle_draw, 'WINDOW')
OffScreenDraw._handle_draw = None
# off-screen buffer
@staticmethod
def _setup_offscreen(context):
import gpu
scene = context.scene
aspect_ratio = scene.render.resolution_x / scene.render.resolution_y
try:
offscreen = gpu.offscreen.new(512, int(512 / aspect_ratio))
except Exception as e:
print(e)
offscreen = None
return offscreen
@staticmethod
def _update_offscreen(context, offscreen):
scene = context.scene
render = scene.render
camera = scene.camera
modelview_matrix = camera.matrix_world.inverted()
projection_matrix = camera.calc_matrix_camera(
render.resolution_x,
render.resolution_y,
render.pixel_aspect_x,
render.pixel_aspect_y,
)
offscreen.draw_view3d(
scene,
context.space_data,
context.region,
projection_matrix,
modelview_matrix,
)
@staticmethod
def _opengl_draw(context, texture, aspect_ratio, scale):
"""
OpenGL code to draw a rectangle in the viewport
"""
glDisable(GL_DEPTH_TEST)
# view setup
glMatrixMode(GL_PROJECTION)
glPushMatrix()
glLoadIdentity()
glMatrixMode(GL_MODELVIEW)
glPushMatrix()
glLoadIdentity()
glOrtho(-1, 1, -1, 1, -15, 15)
gluLookAt(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0)
act_tex = Buffer(GL_INT, 1)
glGetIntegerv(GL_TEXTURE_2D, act_tex)
viewport = Buffer(GL_INT, 4)
glGetIntegerv(GL_VIEWPORT, viewport)
width = int(scale * viewport[2])
height = int(width / aspect_ratio)
glViewport(viewport[0], viewport[1], width, height)
glScissor(viewport[0], viewport[1], width, height)
# draw routine
glEnable(GL_TEXTURE_2D)
glActiveTexture(GL_TEXTURE0)
glBindTexture(GL_TEXTURE_2D, texture)
texco = [(1, 1), (0, 1), (0, 0), (1, 0)]
verco = [(1.0, 1.0), (-1.0, 1.0), (-1.0, -1.0), (1.0, -1.0)]
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
glColor4f(1.0, 1.0, 1.0, 1.0)
glBegin(GL_QUADS)
for i in range(4):
glTexCoord3f(texco[i][0], texco[i][1], 0.0)
glVertex2f(verco[i][0], verco[i][1])
glEnd()
# restoring settings
glBindTexture(GL_TEXTURE_2D, act_tex[0])
glDisable(GL_TEXTURE_2D)
# reset view
glMatrixMode(GL_PROJECTION)
glPopMatrix()
glMatrixMode(GL_MODELVIEW)
glPopMatrix()
glViewport(viewport[0], viewport[1], viewport[2], viewport[3])
glScissor(viewport[0], viewport[1], viewport[2], viewport[3])
# operator functions
@classmethod
def poll(cls, context):
return context.area.type == 'VIEW_3D'
def modal(self, context, event):
if context.area:
context.area.tag_redraw()
return {'PASS_THROUGH'}
def invoke(self, context, event):
if OffScreenDraw.is_enabled:
self.cancel(context)
return {'FINISHED'}
else:
self._offscreen = OffScreenDraw._setup_offscreen(context)
if self._offscreen:
self._texture = self._offscreen.color_texture
else:
self.report({'ERROR'}, "Error initializing offscreen buffer. More details in the console")
return {'CANCELLED'}
OffScreenDraw.handle_add(self, context)
OffScreenDraw.is_enabled = True
if context.area:
context.area.tag_redraw()
context.window_manager.modal_handler_add(self)
return {'RUNNING_MODAL'}
def cancel(self, context):
OffScreenDraw.handle_remove()
OffScreenDraw.is_enabled = False
if context.area:
context.area.tag_redraw()
def register():
bpy.utils.register_class(OffScreenDraw)
def unregister():
bpy.utils.unregister_class(OffScreenDraw)
if __name__ == "__main__":
register()

View File

@@ -0,0 +1,47 @@
Application Data (bge.app)
==========================
Module to access application values that remain unchanged during runtime.
.. module:: bge.app
.. data:: version
The Blender/BGE version as a tuple of 3 ints, eg. (2, 75, 1).
.. note:: Version tuples can be compared simply with (in)equality symbols;
for example, ``(2, 74, 5) <= (2, 75, 0)`` returns True (lexical order).
:type: tuple of three ints
.. data:: version_string
The Blender/BGE version formatted as a string, eg. "2.75 (sub 1)".
:type: str
.. data:: version_char
The Blender/BGE version character (for minor releases).
:type: str
.. data:: has_texture_ffmpeg
True if the BGE has been built with FFmpeg support, enabling use of :class:`~bge.texture.ImageFFmpeg` and :class:`~bge.texture.VideoFFmpeg`.
:type: bool
.. data:: has_joystick
True if the BGE has been built with joystick support.
:type: bool
.. data:: has_physics
True if the BGE has been built with physics support.
:type: bool

View File

@@ -4,73 +4,77 @@ Physics Constraints (bge.constraints)
.. module:: bge.constraints
.. literalinclude:: ../examples/bge.constraints.py
:language: rest
:lines: 2-4
Examples
--------
.. include:: ../examples/bge.constraints.py
:start-line: 1
:end-line: 4
.. literalinclude:: ../examples/bge.constraints.py
:lines: 6-
.. function:: createConstraint(physicsid_1, physicsid_2, constraint_type, pivot_X, pivot_y, pivot_z, axis_x, axis_y, axis_z, flag)
Functions
---------
.. function:: createConstraint( \
physicsid_1, physicsid_2, constraint_type, \
pivot_x=0.0, pivot_y=0.0, pivot_z=0.0, \
axis_x=0.0, axis_y=0.0, axis_z=0.0, flag=0)
Creates a constraint.
:arg physicsid_1: the physics id of the first object in constraint
:type physicsid: int
:arg physicsid_1: The physics id of the first object in constraint.
:type physicsid_1: int
:arg physicsid_2: the physics id of the second object in constraint
:type physicsid2: int
:arg physicsid_2: The physics id of the second object in constraint.
:type physicsid_2: int
:arg constrainttype: the type of the constraint. The constraint types are:
:type constrainttype: int
- :class:`POINTTOPOINT_CONSTRAINT`
- :class:`LINEHINGE_CONSTRAINT`
- :class:`ANGULAR_CONSTRAINT`
- :class:`CONETWIST_CONSTRAINT`
- :class:`VEHICLE_CONSTRAINT`
- :class:`GENERIC_6DOF_CONSTRAINT`
:arg pivot_X: pivot X position
:type pivot_X: float (optional)
:arg constraint_type: The type of the constraint, see `Create Constraint Constants`_.
:arg pivot_Y: pivot Y position
:type pivot_Y: float (optional)
:type constraint_type: int
:arg pivot_Z: pivot Z position
:type pivot_Z: float (optional)
:arg pivot_x: Pivot X position. (optional)
:type pivot_x: float
:arg axis_X: X axis angle in degrees
:type axis_X: float (optional)
:arg pivot_y: Pivot Y position. (optional)
:type pivot_y: float
:arg axis_Y: Y axis angle in degrees
:type axis_Y: float (optional)
:arg pivot_z: Pivot Z position. (optional)
:type pivot_z: float
:arg axis_Z: Z axis angle in degrees
:type axis_Z: float (optional)
:arg axis_x: X axis angle in degrees. (optional)
:type axis_x: float
:arg flag: 128 to disable collision between linked bodies
:type flag: int (optional)
:arg axis_y: Y axis angle in degrees. (optional)
:type axis_y: float
:return: a constraint wrapper.
:rtype: :class:`bge.types.KX_ConstraintWrapper`
:arg axis_z: Z axis angle in degrees. (optional)
:type axis_z: float
.. attribute:: error
:arg flag: 128 to disable collision between linked bodies. (optional)
:type flag: int
Symbolic constant string that indicates error.
:return: A constraint wrapper.
:rtype: :class:`~bge.types.KX_ConstraintWrapper`
.. function:: exportBulletFile(filename)
export a .bullet file
Exports a file representing the dynamics world (usually using ``.bullet`` extension).
:arg filename: File name
:type filename: string
See `Bullet binary serialization <http://bulletphysics.org/mediawiki-1.5.8/index.php/Bullet_binary_serialization>`__.
:arg filename: File path.
:type filename: str
.. function:: getAppliedImpulse(constraintId)
:arg constraintId: The id of the constraint.
:type constraintId: int
:return: the most recent applied impulse.
:return: The most recent applied impulse.
:rtype: float
.. function:: getVehicleConstraint(constraintId)
@@ -78,16 +82,16 @@ Physics Constraints (bge.constraints)
:arg constraintId: The id of the vehicle constraint.
:type constraintId: int
:return: a vehicle constraint object.
:rtype: :class:`bge.types.KX_VehicleWrapper`
:return: A vehicle constraint object.
:rtype: :class:`~bge.types.KX_VehicleWrapper`
.. function:: getCharacter(gameobj)
:arg gameobj: The game object with the character physics.
:type gameobj: :class:`bge.types.KX_GameObject`
:type gameobj: :class:`~bge.types.KX_GameObject`
:return: character wrapper
:rtype: :class:`bge.types.KX_CharacterWrapper`
:return: Character wrapper.
:rtype: :class:`~bge.types.KX_CharacterWrapper`
.. function:: removeConstraint(constraintId)
@@ -141,23 +145,8 @@ Physics Constraints (bge.constraints)
Sets the debug mode.
Debug modes:
- :class:`DBG_NODEBUG`
- :class:`DBG_DRAWWIREFRAME`
- :class:`DBG_DRAWAABB`
- :class:`DBG_DRAWFREATURESTEXT`
- :class:`DBG_DRAWCONTACTPOINTS`
- :class:`DBG_NOHELPTEXT`
- :class:`DBG_DRAWTEXT`
- :class:`DBG_PROFILETIMINGS`
- :class:`DBG_ENABLESATCOMPARISION`
- :class:`DBG_DISABLEBULLETLCP`
- :class:`DBG_ENABLECCD`
- :class:`DBG_DRAWCONSTRAINTS`
- :class:`DBG_DRAWCONSTRAINTLIMITS`
- :class:`DBG_FASTWIREFRAME`
:arg mode: The new debug mode, see `Debug Mode Constants`_.
:arg mode: The new debug mode.
:type mode: int
.. function:: setGravity(x, y, z)
@@ -176,7 +165,8 @@ Physics Constraints (bge.constraints)
.. function:: setLinearAirDamping(damping)
.. note::
Not implemented.
Not implemented
Sets the linear air damping for rigidbodies.
@@ -236,144 +226,111 @@ Physics Constraints (bge.constraints)
.. function:: setUseEpa(epa)
Not implemented.
.. note::
Not implemented
Constants
+++++++++
.. attribute:: error
Symbolic constant string that indicates error.
:type: str
Debug Mode Constants
^^^^^^^^^^^^^^^^^^^^
Debug mode to be used with :func:`setDebugMode`.
.. data:: DBG_NODEBUG
.. note::
Debug mode to be used with function :class:`setDebugMode`
No debug.
.. data:: DBG_DRAWWIREFRAME
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw wireframe in debug.
.. data:: DBG_DRAWAABB
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw Axis Aligned Bounding Box in debug.
.. data:: DBG_DRAWFREATURESTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw freatures text in debug.
Draw features text in debug.
.. data:: DBG_DRAWCONTACTPOINTS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw contact points in debug.
.. data:: DBG_NOHELPTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Debug without help text.
.. data:: DBG_DRAWTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw text in debug.
.. data:: DBG_PROFILETIMINGS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw profile timings in debug.
.. data:: DBG_ENABLESATCOMPARISION
.. note::
Debug mode to be used with function :class:`setDebugMode`
Enable sat comparision in debug.
.. data:: DBG_DISABLEBULLETLCP
.. note::
Debug mode to be used with function :class:`setDebugMode`
Disable Bullet LCP.
.. data:: DBG_ENABLECCD
.. note::
Debug mode to be used with function :class:`setDebugMode`
Enable Continous Colision Detection in debug.
Enable Continous Collision Detection in debug.
.. data:: DBG_DRAWCONSTRAINTS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw constraints in debug.
.. data:: DBG_DRAWCONSTRAINTLIMITS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw constraint limits in debug.
.. data:: DBG_FASTWIREFRAME
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw a fast wireframe in debug.
.. data:: POINTTOPOINT_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
Create Constraint Constants
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Constraint type to be used with :func:`createConstraint`.
.. data:: POINTTOPOINT_CONSTRAINT
.. to do
.. data:: LINEHINGE_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: ANGULAR_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: CONETWIST_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: VEHICLE_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: GENERIC_6DOF_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do

View File

@@ -258,7 +258,8 @@ General functions
Sets the world gravity.
:type gravity: list [fx, fy, fz]
:arg gravity: gravity vector
:type gravity: Vector((fx, fy, fz))
.. function:: getSpectrum()
@@ -337,6 +338,28 @@ General functions
.. warning: Not implimented yet
.. function:: getAnimRecordFrame()
Gets the current frame number used for recording animations. This
number is incremented automatically by Blender when the "Record
animation" feature is turned on.
:rtype: int
.. function:: setAnimRecordFrame(framenr)
Sets the current frame number used for recording animations. This
number is automatically incremented by Blender when the "Record
animation" feature is turned on.
The frame number Must be non-negative, unless Blender has
:attr:`bpy.types.UserPreferencesEdit.use_negative_frames` enabled
in its user preferences. Only use non-negative numbers to be on
the safe side, unless you know what you are doing.
:arg framenr: The new frame number.
:type framenr: int
.. function:: getExitKey()
Gets the key used to exit the game engine
@@ -355,6 +378,76 @@ General functions
Render next frame (if Python has control)
**********************
Time related functions
**********************
.. function:: 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.
:rtype: double
.. function:: 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.
:rtype: double
.. function:: getRealTime()
Get the number of real (system-clock) seconds elapsed since the beginning
of the simulation.
:rtype: double
.. function:: 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.
:rtype: double
.. function:: 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.
:arg time_scale: The new time multiplier.
.. function:: 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.
:rtype: bool
.. function:: 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.
:arg use_external_clock: the new setting
.. function:: 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).
:arg new_time: the next value of the BGE clock (in second).
*****************
Utility functions
*****************
@@ -894,6 +987,8 @@ Various
2D Filter
---------
.. _Two-D-FilterActuator-mode:
.. data:: RAS_2DFILTER_BLUR
:value: 2
@@ -1288,5 +1383,3 @@ See :class:`bge.types.KX_StateActuator.operation`
Add bits to state mask
:value: 3
.. _Two-D-FilterActuator-mode:

View File

@@ -8,7 +8,8 @@ Intro
.. module:: bge.render
Example of using a :class:`bge.types.SCA_MouseSensor`, and two :class:`bge.types.KX_ObjectActuator` to implement MouseLook:
Example of using a :class:`bge.types.SCA_MouseSensor`,
and two :class:`bge.types.KX_ObjectActuator` to implement MouseLook:
.. note::
This can also be achieved with the :class:`bge.types.KX_MouseActuator`.
@@ -77,7 +78,9 @@ Constants
.. DATA:: VSYNC_ADAPTIVE
Enables adaptive vsync if supported. Adaptive vsync enables vsync if the framerate is above the monitors refresh rate. Otherwise, vsync is diabled if the framerate is too low.
Enables adaptive vsync if supported.
Adaptive vsync enables vsync if the framerate is above the monitors refresh rate.
Otherwise, vsync is diabled if the framerate is too low.
.. data:: LEFT_EYE
@@ -108,40 +111,55 @@ Functions
Set the width and height of the window (in pixels). This also works for fullscreen applications.
.. note:: Only works in the standalone player, not the Blender-embedded player.
:arg width: width in pixels
:type width: integer
:arg height: height in pixels
:type height: integer
.. function:: setFullScreen(enable)
Set whether or not the window should be fullscreen.
.. note:: Only works in the standalone player, not the Blender-embedded player.
:arg enable: ``True`` to set full screen, ``False`` to set windowed.
:type enable: bool
.. function:: getFullScreen()
Returns whether or not the window is fullscreen.
.. note:: Only works in the standalone player, not the Blender-embedded player; there it always returns False.
:rtype: bool
.. function:: getDisplayDimensions()
Get the actual display dimensions, in pixels, of the physical display (e.g., the monitor).
Get the display dimensions, in pixels, of the display (e.g., the
monitor). Can return the size of the entire view, so the
combination of all monitors; for example, ``(3840, 1080)`` for two
side-by-side 1080p monitors.
:type dimension: list [width,heigh]
:rtype: tuple (width, height)
.. function:: makeScreenshot(filename)
Writes an image file with the current displayed frame.
The image is written to *'filename'*. The path may be absolute (eg. "/home/foo/image") or relative when started with
"//" (eg. "//image"). Note that absolute paths are not portable between platforms.
If the filename contains a "#", it will be replaced by an incremental index so that screenshots can be taken multiple
times without overwriting the previous ones (eg. "image-#").
The image is written to *'filename'*.
The path may be absolute (eg. ``/home/foo/image``) or relative when started with
``//`` (eg. ``//image``). Note that absolute paths are not portable between platforms.
If the filename contains a ``#``,
it will be replaced by an incremental index so that screenshots can be taken multiple
times without overwriting the previous ones (eg. ``image-#``).
Settings for the image are taken from the render settings (file format and respective settings, gamma and colospace
conversion, etc). The image resolution matches the framebuffer, meaning, the window size and aspect ratio.
When running from the standalone player, instead of the embedded player, only PNG files are supported. Additional
color conversions are also not supported.
Settings for the image are taken from the render settings (file format and respective settings,
gamma and colospace conversion, etc).
The image resolution matches the framebuffer, meaning, the window size and aspect ratio.
When running from the standalone player, instead of the embedded player, only PNG files are supported.
Additional color conversions are also not supported.
:arg filename: path and name of the file to write
:type filename: string
@@ -149,13 +167,14 @@ Functions
.. function:: enableVisibility(visible)
Doesn't really do anything...
Deprecated; doesn't do anything.
.. function:: showMouse(visible)
Enables or disables the operating system mouse cursor.
:arg visible:
:type visible: boolean
@@ -163,15 +182,15 @@ Functions
Sets the mouse cursor position.
:arg x: X-coordinate in screen pixel coordinates.
:type x: integer
:arg y: Y-coordinate in screen pixel coordinates.
:type y: integer
.. function:: setBackgroundColor(rgba)
Sets the window background color. (Deprecated: use KX_WorldInfo.background_color)
:type rgba: list [r, g, b, a]
Deprecated and no longer functional. Use :py:meth:`bge.types.KX_WorldInfo.backgroundColor` instead.
.. function:: setEyeSeparation(eyesep)
@@ -215,6 +234,7 @@ Functions
Set the material mode to use for OpenGL rendering.
:arg mode: material mode
:type mode: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
.. note:: Changes will only affect newly created scenes.
@@ -231,14 +251,17 @@ Functions
Enables or disables a GLSL material setting.
:arg setting:
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
:arg enable:
:type enable: boolean
.. function:: getGLSLMaterialSetting(setting, enable)
.. function:: getGLSLMaterialSetting(setting)
Get the state of a GLSL material setting.
:arg setting:
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
:rtype: boolean
@@ -299,24 +322,28 @@ Functions
Show or hide the framerate.
:arg enable:
:type enable: boolean
.. function:: showProfile(enable)
Show or hide the profile.
:arg enable:
:type enable: boolean
.. function:: showProperties(enable)
Show or hide the debug properties.
:arg enable:
:type enable: boolean
.. function:: autoDebugList(enable)
Enable or disable auto adding debug properties to the debug list.
:arg enable:
:type enable: boolean
.. function:: clearDebugList()

File diff suppressed because it is too large Load Diff

View File

@@ -7,11 +7,66 @@ base class --- :class:`PyObjectPlus`
.. class:: KX_BlenderMaterial(PyObjectPlus)
KX_BlenderMaterial
This is the interface to materials in the game engine.
Materials define the render state to be applied to mesh objects.
The example below shows a simple GLSL shader setup allowing to dynamically mix two texture channels
in a material. All materials of the object executing this script should have two textures using
separate UV maps in the two first texture channels.
The code works for both Multitexture and GLSL rendering modes.
.. code-block:: python
from bge import logic
vertex_shader = """
void main(void)
{
// simple projection of the vertex position to view space
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// coordinate of the 1st texture channel
gl_TexCoord[0] = gl_MultiTexCoord0;
// coordinate of the 2nd texture channel
gl_TexCoord[1] = gl_MultiTexCoord1;
}
"""
fragment_shader ="""
uniform sampler2D texture_0;
uniform sampler2D texture_1;
uniform float factor;
void main(void)
{
vec4 color_0 = texture2D(texture_0, gl_TexCoord[0].st);
vec4 color_1 = texture2D(texture_1, gl_TexCoord[1].st);
gl_FragColor = mix(color_0, color_1, factor);
}
"""
object = logic.getCurrentController().owner
for mesh in object.meshes:
for material in mesh.materials:
shader = material.getShader()
if shader is not None:
if not shader.isValid():
shader.setSource(vertex_shader, fragment_shader, True)
# get the first texture channel of the material
shader.setSampler('texture_0', 0)
# get the second texture channel of the material
shader.setSampler('texture_1', 1)
# pass another uniform to the shader
shader.setUniform1f('factor', 0.3)
.. attribute:: shader
The materials shader.
The material's shader.
:type: :class:`BL_Shader`
@@ -34,39 +89,83 @@ base class --- :class:`PyObjectPlus`
:return: the material's shader
:rtype: :class:`BL_Shader`
.. attribute:: alpha
The material's alpha transparency.
:type: float between 0.0 and 1.0 inclusive
.. attribute:: hardness
How hard (sharp) the material's specular reflection is.
:type: integer between 1 and 511 inclusive
.. attribute:: emit
Amount of light to emit.
:type: float between 0.0 and 2.0 inclusive
.. attribute:: specularIntensity
How intense (bright) the material's specular reflection is.
:type: float between 0.0 and 1.0 inclusive
.. attribute:: diffuseIntensity
The material's amount of diffuse reflection.
:type: float between 0.0 and 1.0 inclusive
.. attribute:: specularColor
The material's specular color.
:type: :class:`mathutils.Color`
.. attribute:: diffuseColor
The material's diffuse color.
:type: :class:`mathutils.Color`
.. method:: setBlending(src, dest)
Set the pixel color arithmetic functions.
:arg src: Specifies how the red, green, blue, and alpha source blending factors are computed.
:type src: Value in...
:arg src: Specifies how the red, green, blue, and alpha source blending factors are computed, one of...
* :data:`~bgl.GL_ZERO`
* :data:`~bgl.GL_ONE`
* :data:`~bgl.GL_SRC_COLOR`
* :data:`~bgl.GL_ONE_MINUS_SRC_COLOR`
* :data:`~bgl.GL_DST_COLOR`
* :data:`~bgl.GL_ONE_MINUS_DST_COLOR`
* :data:`~bgl.GL_SRC_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_SRC_ALPHA`
* :data:`~bgl.GL_DST_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_DST_ALPHA`
* :data:`~bgl.GL_SRC_ALPHA_SATURATE`
:type src: int
* GL_ZERO,
* GL_ONE,
* GL_SRC_COLOR,
* GL_ONE_MINUS_SRC_COLOR,
* GL_DST_COLOR,
* GL_ONE_MINUS_DST_COLOR,
* GL_SRC_ALPHA,
* GL_ONE_MINUS_SRC_ALPHA,
* GL_DST_ALPHA,
* GL_ONE_MINUS_DST_ALPHA,
* GL_SRC_ALPHA_SATURATE
:arg dest: Specifies how the red, green, blue, and alpha destination blending factors are computed.
:type dest: Value in...
* GL_ZERO
* GL_ONE
* GL_SRC_COLOR
* GL_ONE_MINUS_SRC_COLOR
* GL_DST_COLOR
* GL_ONE_MINUS_DST_COLOR
* GL_SRC_ALPHA
* GL_ONE_MINUS_SRC_ALPHA
* GL_DST_ALPHA
* GL_ONE_MINUS_DST_ALPHA
* GL_SRC_ALPHA_SATURATE
:arg dest: Specifies how the red, green, blue, and alpha destination blending factors are computed, one of...
* :data:`~bgl.GL_ZERO`
* :data:`~bgl.GL_ONE`
* :data:`~bgl.GL_SRC_COLOR`
* :data:`~bgl.GL_ONE_MINUS_SRC_COLOR`
* :data:`~bgl.GL_DST_COLOR`
* :data:`~bgl.GL_ONE_MINUS_DST_COLOR`
* :data:`~bgl.GL_SRC_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_SRC_ALPHA`
* :data:`~bgl.GL_DST_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_DST_ALPHA`
* :data:`~bgl.GL_SRC_ALPHA_SATURATE`
:type dest: int
.. method:: getMaterialIndex()

View File

@@ -51,6 +51,18 @@ base class --- :class:`KX_GameObject`
:type: float
.. attribute:: shift_x
The camera's horizontal shift.
:type: float
.. attribute:: shift_y
The camera's vertical shift.
:type: float
.. attribute:: perspective
True if this camera has a perspective transform, False for an orthographic projection.

View File

@@ -25,7 +25,7 @@ base class --- :class:`PyObjectPlus`
The maximum number of jumps a character can perform before having to touch the ground. By default this is set to 1. 2 allows for a double jump, etc.
:type: int
:type: int in [0, 255], default 1
.. attribute:: jumpCount

View File

@@ -28,7 +28,8 @@ base class --- :class:`PyObjectPlus`
* Lowerlimit > Upperlimit -> axis is free
* Lowerlimit < Upperlimit -> axis it limited in that range
PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
For PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
axis = 3 is a constraint limit, with low/high limit value
* 3: X axis angle
@@ -37,7 +38,8 @@ base class --- :class:`PyObjectPlus`
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_CONE_TWIST_CONSTRAINT = 3:
For PHY_CONE_TWIST_CONSTRAINT = 4:
axis = 3..5 are constraint limits, high limit values
* 3: X axis angle
* 4: Y axis angle
@@ -48,7 +50,8 @@ base class --- :class:`PyObjectPlus`
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_GENERIC_6DOF_CONSTRAINT = 12:
For PHY_GENERIC_6DOF_CONSTRAINT = 12:
axis = 0..2 are constraint limits, with low/high limit value
* 0: X axis position
* 1: Y axis position
@@ -130,10 +133,11 @@ base class --- :class:`PyObjectPlus`
Returns the contraint type (read only)
:type: integer
- 1 = :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
- 2 = :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
- 3 = :class:`~bge.constraints.ANGULAR_CONSTRAINT`
- 4 = :class:`~bge.constraints.CONETWIST_CONSTRAINT`
- 11 = :class:`~bge.constraints.VEHICLE_CONSTRAINT`
- 12 = :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
- :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
- :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
- :class:`~bge.constraints.ANGULAR_CONSTRAINT`
- :class:`~bge.constraints.CONETWIST_CONSTRAINT`
- :class:`~bge.constraints.VEHICLE_CONSTRAINT`
- :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`

View File

@@ -7,6 +7,26 @@ base class --- :class:`KX_GameObject`
.. class:: KX_FontObject(KX_GameObject)
TODO.
A Font object.
.. code-block:: python
# Display a message about the exit key using a Font object.
import bge
co = bge.logic.getCurrentController()
font = co.owner
exit_key = bge.events.EventToString(bge.logic.getExitKey())
if exit_key.endswith("KEY"):
exit_key = exit_key[:-3]
font.text = "Press key '%s' to quit the game." % exit_key
.. attribute:: text
The text displayed by this Font object.
:type: string

View File

@@ -137,7 +137,30 @@ base class --- :class:`SCA_IObject`
.. note::
A value of 0.0 disables this option (rather then setting it stationary).
A value of 0.0 disables this option (rather than setting it stationary).
.. attribute:: angularVelocityMin
Enforces the object keeps rotating at a minimum velocity. A value of 0.0 disables this.
:type: non-negative float
.. note::
Applies to dynamic and rigid body objects only.
While objects are stationary the minimum velocity will not be applied.
.. attribute:: angularVelocityMax
Clamp the maximum angular velocity to prevent objects rotating beyond a set speed.
A value of 0.0 disables clamping; it does not stop rotation.
:type: non-negative float
.. note::
Applies to dynamic and rigid body objects only.
.. attribute:: localInertia
@@ -776,7 +799,7 @@ base class --- :class:`SCA_IObject`
:return: the first object hit or None if no object or object does not match prop
:rtype: :class:`KX_GameObject`
.. method:: rayCast(objto, objfrom, dist, prop, face, xray, poly)
.. method:: rayCast(objto, objfrom, dist, prop, face, xray, poly, mask)
Look from a point/object to another point/object and find first object hit within dist that matches prop.
if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None, None, None) if no hit.
@@ -828,6 +851,8 @@ base class --- :class:`SCA_IObject`
* 2: return value is a 5-tuple and the 5th element is a 2-tuple (u, v) with the UV mapping of the hit point or None if no hit, or the object doesn't use a mesh collision shape, or doesn't have a UV mapping.
:type poly: integer
:arg mask: collision mask: The collision mask (16 layers mapped to a 16-bit integer) is combined with each object's collision group, to hit only a subset of the objects in the scene. Only those objects for which ``collisionGroup & mask`` is true can be hit.
:type mask: bitfield
:return: (object, hitpoint, hitnormal) or (object, hitpoint, hitnormal, polygon) or (object, hitpoint, hitnormal, polygon, hituv).
* object, hitpoint and hitnormal are None if no hit.
@@ -949,6 +974,16 @@ base class --- :class:`SCA_IObject`
:return: The current frame of the action
:rtype: float
.. method:: getActionName(layer=0)
Gets the name of the current action playing in the supplied layer.
:arg layer: The layer that you want to get the action name from.
:type layer: integer
:return: The name of the current action
:rtype: string
.. method:: setActionFrame(frame, layer=0)
Set the current frame of the action playing in the supplied layer.

View File

@@ -1,65 +0,0 @@
KX_IpoActuator(SCA_IActuator)
=============================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_IpoActuator(SCA_IActuator)
IPO actuator activates an animation.
.. attribute:: frameStart
Start frame.
:type: float
.. attribute:: frameEnd
End frame.
:type: float
.. attribute:: propName
Use this property to define the Ipo position.
:type: string
.. attribute:: framePropName
Assign this property this action current frame number.
:type: string
.. attribute:: mode
Play mode for the ipo. Can be on of :ref:`these constants <ipo-actuator>`
:type: integer
.. attribute:: useIpoAsForce
Apply Ipo as a global or local force depending on the local option (dynamic objects only).
:type: boolean
.. attribute:: useIpoAdd
Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag.
:type: boolean
.. attribute:: useIpoLocal
Let the ipo acts in local coordinates, used in Force and Add mode.
:type: boolean
.. attribute:: useChildren
Update IPO on all children Objects as well.
:type: boolean

View File

@@ -25,6 +25,12 @@ base class --- :class:`PyObjectPlus`
:type: callable
.. attribute:: finished
The current status of the lib load.
:type: boolean
.. attribute:: progress
The current progress of the lib load as a normalized value from 0.0 to 1.0.

View File

@@ -51,7 +51,7 @@ base class --- :class:`SCA_IObject`
.. attribute:: materials
:type: list of :class:`KX_BlenderMaterial` or :class:`KX_PolygonMaterial` types
:type: list of :class:`KX_BlenderMaterial` type
.. attribute:: numPolygons

View File

@@ -23,7 +23,7 @@ base class --- :class:`SCA_IObject`
The material of the polygon.
:type: :class:`KX_PolygonMaterial` or :class:`KX_BlenderMaterial`
:type: :class:`KX_BlenderMaterial`
.. attribute:: texture_name
@@ -84,7 +84,7 @@ base class --- :class:`SCA_IObject`
.. method:: getMaterial()
:return: The polygon material
:rtype: :class:`KX_PolygonMaterial` or :class:`KX_BlenderMaterial`
:rtype: :class:`KX_BlenderMaterial`
.. method:: getTextureName()

View File

@@ -1,250 +0,0 @@
KX_PolygonMaterial(PyObjectPlus)
================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_PolygonMaterial(PyObjectPlus)
This is the interface to materials in the game engine.
Materials define the render state to be applied to mesh objects.
.. warning::
Some of the methods/variables are CObjects. If you mix these up, you will crash blender.
.. code-block:: python
from bge import logic
vertex_shader = """
void main(void)
{
// original vertex position, no changes
gl_Position = ftransform();
// coordinate of the 1st texture channel
gl_TexCoord[0] = gl_MultiTexCoord0;
// coordinate of the 2nd texture channel
gl_TexCoord[1] = gl_MultiTexCoord1;
}
"""
fragment_shader ="""
uniform sampler2D color_0;
uniform sampler2D color_1;
uniform float factor;
void main(void)
{
vec4 color_0 = texture2D(color_0, gl_TexCoord[0].st);
vec4 color_1 = texture2D(color_1, gl_TexCoord[1].st);
gl_FragColor = mix(color_0, color_1, factor);
}
"""
object = logic.getCurrentController().owner
object = cont.owner
for mesh in object.meshes:
for material in mesh.materials:
shader = material.getShader()
if shader != None:
if not shader.isValid():
shader.setSource(vertex_shader, fragment_shader, True)
# get the first texture channel of the material
shader.setSampler('color_0', 0)
# get the second texture channel of the material
shader.setSampler('color_1', 1)
# pass another uniform to the shader
shader.setUniform1f('factor', 0.3)
.. attribute:: texture
Texture name.
:type: string (read-only)
.. attribute:: gl_texture
OpenGL texture handle (eg for glBindTexture(GL_TEXTURE_2D, gl_texture).
:type: integer (read-only)
.. attribute:: material
Material name.
:type: string (read-only)
.. attribute:: tface
Texture face properties.
:type: CObject (read-only)
.. attribute:: tile
Texture is tiling.
:type: boolean
.. attribute:: tilexrep
Number of tile repetitions in x direction.
:type: integer
.. attribute:: tileyrep
Number of tile repetitions in y direction.
:type: integer
.. attribute:: drawingmode
Drawing mode for the material.
- 2 (drawingmode & 4) Textured
- 4 (drawingmode & 16) Light
- 14 (drawingmode & 16384) 3d Polygon Text.
:type: bitfield
.. attribute:: transparent
This material is transparent. All meshes with this
material will be rendered after non transparent meshes from back
to front.
:type: boolean
.. attribute:: zsort
Transparent polygons in meshes with this material will be sorted back to
front before rendering.
Non-Transparent polygons will be sorted front to back before rendering.
:type: boolean
.. attribute:: diffuse
The diffuse color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
:type: list [r, g, b]
.. attribute:: specular
The specular color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
:type: list [r, g, b]
.. attribute:: shininess
The shininess (specular exponent) of the material. 0.0 <= shininess <= 128.0.
:type: float
.. attribute:: specularity
The amount of specular of the material. 0.0 <= specularity <= 1.0.
:type: float
.. method:: updateTexture(tface, rasty)
Updates a realtime animation.
:arg tface: Texture face (eg mat.tface)
:type tface: CObject
:arg rasty: Rasterizer
:type rasty: CObject
.. method:: setTexture(tface)
Sets texture render state.
:arg tface: Texture face
:type tface: CObject
.. code-block:: python
mat.setTexture(mat.tface)
.. method:: activate(rasty, cachingInfo)
Sets material parameters for this object for rendering.
Material Parameters set:
#. Texture
#. Backface culling
#. Line drawing
#. Specular Colour
#. Shininess
#. Diffuse Colour
#. Polygon Offset.
:arg rasty: Rasterizer instance.
:type rasty: CObject
:arg cachingInfo: Material cache instance.
:type cachingInfo: CObject
.. method:: setCustomMaterial(material)
Sets the material state setup object.
Using this method, you can extend or completely replace the gameengine material
to do your own advanced multipass effects.
Use this method to register your material class. Instead of the normal material,
your class's activate method will be called just before rendering the mesh.
This should setup the texture, material, and any other state you would like.
It should return True to render the mesh, or False if you are finished. You should
clean up any state Blender does not set before returning False.
Activate Method Definition:
.. code-block:: python
def activate(self, rasty, cachingInfo, material):
:arg material: The material object.
:type material: instance
.. code-block:: python
class PyMaterial:
def __init__(self):
self.pass_no = -1
def activate(self, rasty, cachingInfo, material):
# Activate the material here.
#
# The activate method will be called until it returns False.
# Every time the activate method returns True the mesh will
# be rendered.
#
# rasty is a CObject for passing to material.updateTexture()
# and material.activate()
# cachingInfo is a CObject for passing to material.activate()
# material is the KX_PolygonMaterial instance this material
# was added to
# default material properties:
self.pass_no += 1
if self.pass_no == 0:
material.activate(rasty, cachingInfo)
# Return True to do this pass
return True
# clean up and return False to finish.
self.pass_no = -1
return False
# Create a new Python Material and pass it to the renderer.
mat.setCustomMaterial(PyMaterial())

View File

@@ -25,12 +25,6 @@ base class --- :class:`SCA_IObject`
:type: Vector((u, v))
.. attribute:: uvs
A list of all the texture coordinates of the vertex.
:type: list of Vector((u, v))
.. attribute:: normal
The normal of the vertex.
@@ -126,24 +120,18 @@ base class --- :class:`SCA_IObject`
:arg pos: the new position for this vertex in local coordinates.
.. method:: getUV(index=0)
.. method:: getUV()
Gets the UV (texture) coordinates of this vertex.
:arg index: the UV (texture) channel (optional).
:type index: integer
:return: this vertexes UV (texture) coordinates.
:rtype: Vector((u, v))
.. method:: setUV(uv, index=0)
.. method:: setUV(uv)
Sets the UV (texture) coordinates of this vertex.
:arg uv: the UV (texture) coordinate of this vertex.
:type uv: Vector((u, v))
:arg index: the UV (texture) channel (optional).
:type index: integer
:type: Vector((u, v))
.. method:: getUV2()
@@ -152,16 +140,14 @@ base class --- :class:`SCA_IObject`
:return: this vertexes UV (texture) coordinates.
:rtype: Vector((u, v))
.. deprecated:: use :meth:`getUV`
.. method:: setUV2(uv)
.. method:: setUV2(uv, unit)
Sets the 2nd UV (texture) coordinates of this vertex.
:arg uv: the 2nd (texture) UV coordinate of this vertex.
:type uv: Vector((u, v))
:type: Vector((u, v))
.. deprecated:: use :meth:`setUV`
:arg unit: optional argument, FLAT==1, SECOND_UV==2, defaults to SECOND_UV
:arg unit: integer
.. method:: getRGBA()

View File

@@ -1,4 +1,4 @@
KX_WordlInfo(PyObjectPlus)
KX_WorldInfo(PyObjectPlus)
=============================
.. module:: bge.types
@@ -7,7 +7,7 @@ base class --- :class:`PyObjectPlus`
.. class:: KX_WorldInfo(PyObjectPlus)
A wolrd object.
A world object.
.. code-block:: python
@@ -16,11 +16,7 @@ base class --- :class:`PyObjectPlus`
sce = bge.logic.getCurrentScene()
sce.world.mist_color = [1.0, 0.0, 0.0]
*********
Constants
*********
sce.world.mistColor = [1.0, 0.0, 0.0]
.. data:: KX_MIST_QUADRATIC
@@ -34,54 +30,50 @@ Constants
Type of inverse quadratic attenuation used to fade mist.
**********
Attributes
**********
.. attribute:: mist_enable
.. attribute:: mistEnable
Return the state of the mist.
:type: bool
.. attribute:: mist_start
.. attribute:: mistStart
The mist start point.
:type: float
.. attribute:: mist_distance
.. attribute:: mistDistance
The mist distance fom the start point to reach 100% mist.
:type: float
.. attribute:: mist_intensity
.. attribute:: mistIntensity
The mist intensity.
:type: float
.. attribute:: mist_type
.. attribute:: mistType
The type of mist - must be KX_MIST_QUADRATIC, KX_MIST_LINEAR or KX_MIST_INV_QUADRATIC
.. attribute:: mist_color
.. attribute:: mistColor
The color of the mist. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
Mist and background color sould always set to the same color.
:type: :class:`mathutils.Vector`
:type: :class:`mathutils.Color`
.. attribute:: background_color
.. attribute:: backgroundColor
The color of the background. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
Mist and background color sould always set to the same color.
:type: :class:`mathutils.Vector`
:type: :class:`mathutils.Color`
.. attribute:: ambient_color
.. attribute:: ambientColor
The color of the ambient light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
:type: :class:`mathutils.Vector`
:type: :class:`mathutils.Color`

View File

@@ -7,7 +7,7 @@ base class --- :class:`SCA_IActuator`
.. class:: SCA_2DFilterActuator(SCA_IActuator)
Create, enable and disable 2D filters
Create, enable and disable 2D filters.
The following properties don't have an immediate effect.
You must active the actuator to get the result.
@@ -29,7 +29,7 @@ base class --- :class:`SCA_IActuator`
.. attribute:: mode
Type of 2D filter, use one of :ref:`these constants <Two-D-FilterActuator-mode>`
Type of 2D filter, use one of :ref:`these constants <Two-D-FilterActuator-mode>`.
:type: integer

Some files were not shown because too many files have changed in this diff Show More