Campbell Barton [Thu, 20 Sep 2018 01:21:34 +0000 (11:21 +1000)]
3D View: point-on-plane from screen location utility
Campbell Barton [Thu, 20 Sep 2018 00:06:59 +0000 (10:06 +1000)]
Cleanup: style
Wybren van Keulen [Wed, 19 Sep 2018 08:55:49 +0000 (10:55 +0200)]
Fix T53745: Alembic exported with vertex colors not readable by other software.
Most other software expects to read indexed vertex colors, so write indices
along with the colors as we already do for UVs.
Differential Revision: https://developer.blender.org/D3704
Sergey Sharybin [Wed, 19 Sep 2018 16:41:43 +0000 (18:41 +0200)]
Cycles: Cleanup, double semicolon
Brecht Van Lommel [Wed, 19 Sep 2018 15:48:11 +0000 (17:48 +0200)]
Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3700
Ray Molenkamp [Wed, 19 Sep 2018 16:16:46 +0000 (10:16 -0600)]
make.bat: fix build error when there are spaces in the path to svn/git/cmake
Brecht Van Lommel [Wed, 19 Sep 2018 14:04:11 +0000 (16:04 +0200)]
Fix wrong CUDA version warning in cmake.
Fix suggested by Dalai.
mano-wii [Wed, 19 Sep 2018 12:04:55 +0000 (09:04 -0300)]
Fix possible misuse of `BLI_strncpy`.
Same issue as rB39f7c8256d58.
Bastien Montagne [Wed, 19 Sep 2018 09:11:39 +0000 (11:11 +0200)]
Fix unused var in case Alembic is not enabled, in own previous commit.
Sorry for the noise...
Bastien Montagne [Wed, 19 Sep 2018 09:08:27 +0000 (11:08 +0200)]
Mesh Sequence Cash: do not *always* report as depending on time!
mano-wii [Wed, 19 Sep 2018 02:11:59 +0000 (23:11 -0300)]
Fix unreported: Undo of texts pasted in the Text Editor misses one character.
Caused by commit rB28c34ae7e2d6
Unlike `strncpy`, `BLI_strncpy` ensures the last character is '\0'.
Campbell Barton [Wed, 19 Sep 2018 02:05:58 +0000 (12:05 +1000)]
BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
Campbell Barton [Wed, 19 Sep 2018 02:04:34 +0000 (12:04 +1000)]
Cleanup: trailing space
Bastien Montagne [Tue, 18 Sep 2018 12:30:06 +0000 (14:30 +0200)]
Fix T56833: "zoom to cursor" in Clip editor not handling aspect ratio.
Trivial fix, just using same code as in Image editor...
Sergey Sharybin [Tue, 18 Sep 2018 09:10:49 +0000 (11:10 +0200)]
Close OpenEXR thread pool on exit
This partially solves ASAN report about unfreed memory. There is still
something in the report, need to have a closer look with debug version
of OpenEXE library.
Ray Molenkamp [Tue, 18 Sep 2018 00:06:02 +0000 (18:06 -0600)]
FIX: linker error with a 'make deps' library set and opencollada enabled.
PCRE_LIBRARIES was not being set if the pcre library was found but not the headers.
Ray Molenkamp [Mon, 17 Sep 2018 22:27:13 +0000 (16:27 -0600)]
Cycles: Fix usage of AVX2 intrinsics in AVX kernel
While building the AVX kernel, util_avxf.h/avxb.h were using some AVX2 intrinsics,
these were never called, so it wasn't a run-time issue, but the intrinsics headers
on centos excluded the AVX2 prototypes when building the AVX kernel causing build errors.
This commit cleans up the improper usage of the AVX2 intrinsics and provides AVX
fallback implementations for future use.
Differential Revision: https://developer.blender.org/D3696
Ray Molenkamp [Mon, 17 Sep 2018 19:45:12 +0000 (13:45 -0600)]
build_files: bump python version in FindPythonLibsUnix.cmake to 3.7 now that all platforms have been updated
Ray Molenkamp [Mon, 17 Sep 2018 19:13:17 +0000 (13:13 -0600)]
build_environment: linux/python, help python find ffi.
we were building ffi, but python wasn't finding it.
Ray Molenkamp [Mon, 17 Sep 2018 17:58:13 +0000 (11:58 -0600)]
build_environment: ffi/linux force predictable lib path.
ffi stubbornly wants to put libs in lib64 even when you tell it not to on some linux distributions.
patch based on sed fix the gentoo guys did [1]
[1] https://bugs.gentoo.org/462814
Bastien Montagne [Mon, 17 Sep 2018 17:39:21 +0000 (19:39 +0200)]
Install_deps: workaround building bloody broken OpenEXR release.
Sergey Sharybin [Mon, 17 Sep 2018 16:07:22 +0000 (18:07 +0200)]
Cycles: Cleanup, remove dead code
Sergey Sharybin [Mon, 17 Sep 2018 16:05:32 +0000 (18:05 +0200)]
Cycles: Remove unused malformed function
This isn't really possible to do the shuffle which was attempted to do.
While it's possible to achieve expected behavior, the function needs to
be rewritten. Since it's not used anyway, it's simpler to remove it for
now.
Sergey Sharybin [Mon, 17 Sep 2018 16:02:01 +0000 (18:02 +0200)]
Cycles: Use proper mask for vectrorized boolean print
Ray Molenkamp [Mon, 17 Sep 2018 14:13:08 +0000 (08:13 -0600)]
build_environment: force a consistent libdir across Linux distributions.
on some distributions libs ended up in lib64 confusing the cmake builder.
Brecht Van Lommel [Mon, 17 Sep 2018 10:16:27 +0000 (12:16 +0200)]
Fix object selection with eyerdropper not respecting property poll function.
Bastien Montagne [Mon, 17 Sep 2018 08:22:00 +0000 (10:22 +0200)]
Fix T56811: Do not show cancel button for jobs when UI is locked.
Since that button is then totally useless and unusable...
Brecht Van Lommel [Fri, 14 Sep 2018 14:27:11 +0000 (16:27 +0200)]
Fix OpenColorIO link errors in some Linux builds.
The library can get installed in a lib/static subdirectory, so search there
as well now.
Bastien Montagne [Thu, 13 Sep 2018 14:05:59 +0000 (16:05 +0200)]
Fix building deps when OpenCV dev package is present.
Since we are not linking against OpenCV ourselves, that generated
linking errors later on (while building OSL e.g.).
Those 'open' libs link against way too many other libs... :/
Thanks to @intrah for initial report (T56785), and @LazyDodo for
suggested solution.
Campbell Barton [Thu, 13 Sep 2018 13:20:04 +0000 (23:20 +1000)]
WM: move mousemove out of internal undo function
This causes a feedback loop in 2.8x,
where gizmo redo caused fake mousemove that executed gizmo again.
Move the mousemove into the undo/redo operator.
Campbell Barton [Thu, 13 Sep 2018 10:10:56 +0000 (20:10 +1000)]
PyAPI: remove operator methods that leak memory
Campbell Barton [Thu, 13 Sep 2018 09:59:15 +0000 (19:59 +1000)]
PyAPI: use brief description for operator repr
Only include description in docstring.
Also avoid using op_get_rna.
Bastien Montagne [Thu, 13 Sep 2018 09:20:49 +0000 (11:20 +0200)]
Tentative fix for T56770: Crash after set language to Simplified Chinese.
That bug probably did not affect 2.7x, only 2.8 with COW copying IDs in
threads... But root of the issue is that underlying boost i18n lib does
not support well multi-threaded access. So simply forbid any translation
from non-main thread. This *may* be an annoying limit at some point, but
doubt it will be any issue currently.
Campbell Barton [Thu, 13 Sep 2018 08:16:06 +0000 (18:16 +1000)]
PyAPI: add API call to get an operators type
Getting the instance leaks memory and was only meant to be used for
generating docs.
Campbell Barton [Thu, 13 Sep 2018 07:47:56 +0000 (17:47 +1000)]
Cleanup: _bpy.ops utility to lookup an operator
Campbell Barton [Thu, 13 Sep 2018 07:06:07 +0000 (17:06 +1000)]
Cleanup: use PyImport_GetModuleDict
Replace direct access using PyThreadState_GET
Campbell Barton [Thu, 13 Sep 2018 06:33:34 +0000 (16:33 +1000)]
PyDoc: replace use of deprecated API call
Campbell Barton [Thu, 13 Sep 2018 06:20:02 +0000 (16:20 +1000)]
Cleanup: move 'make help_features' into own file
Campbell Barton [Thu, 13 Sep 2018 05:37:30 +0000 (15:37 +1000)]
PyDoc: disable ASAN exit code for doc building
Prevented docs from building on any minor issue when ASAN was enabled.
Campbell Barton [Wed, 12 Sep 2018 21:39:22 +0000 (07:39 +1000)]
Cleanup: GCC ignored qualifier warning
Bastien Montagne [Wed, 12 Sep 2018 16:31:14 +0000 (18:31 +0200)]
Fix T56662: Autocomplete for texture slot Crash (in console).
That pointer can be NULL, RNA default string handling does not support
that. (that whole uv_layer prop is quite nasty actually, since it does
not own that string, always borrows it from some other data :((( ).
Sergey Sharybin [Wed, 12 Sep 2018 10:21:04 +0000 (12:21 +0200)]
Cycles: Don't allocate Extra if BSDF allocation failed
Failed as in did not allocate due to possibly weight cutoff.
Tryign to allocated Extra storage for closure in such situation
will consfuse Cycles and cause crashes later one due to obscure
values in ShaderData.
Sergey Sharybin [Wed, 12 Sep 2018 09:00:38 +0000 (11:00 +0200)]
Cleanup: More correct terminology work
Matches threading API.
Campbell Barton [Wed, 12 Sep 2018 06:26:15 +0000 (16:26 +1000)]
CMake: add openjpeg 2x search paths
Wasn't finding the include path by on Linux.
Campbell Barton [Wed, 12 Sep 2018 05:48:00 +0000 (15:48 +1000)]
Cleanup: remove alpha_check variable from DNA
Just pass as an argument.
Brecht Van Lommel [Thu, 30 Aug 2018 12:20:19 +0000 (14:20 +0200)]
Build: require OpenJPEG 2.x minimum, remove bundled version.
* WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already
the case for macOS and Windows.
* This should not break existing Linx builds. If there is no new enough
OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG
will be disabled.
* install_deps.sh was updated with new package names, since distributions
put this version in a new package.
Differential Revision: https://developer.blender.org/D3663
Campbell Barton [Tue, 11 Sep 2018 07:30:05 +0000 (17:30 +1000)]
Cleanup: unused variables
Brecht Van Lommel [Mon, 10 Sep 2018 20:24:37 +0000 (22:24 +0200)]
Build: update for new macOS libraries.
Run "make update", or "svn update" in lib/darwin to get the matching
precompiled libraries.
Brecht Van Lommel [Mon, 10 Sep 2018 12:25:06 +0000 (14:25 +0200)]
Build Environment: updates for macOS.
Mainly this is following Linux to build own xml2/lzma/ssl/sqlite and linking
them all statically. This ensures the Python ssl module uses a recent openssl
version rather than a very old one shipped with macOS.
Campbell Barton [Tue, 11 Sep 2018 05:00:50 +0000 (15:00 +1000)]
Correct own error in recent transform orientation changes
Campbell Barton [Tue, 11 Sep 2018 00:56:08 +0000 (10:56 +1000)]
UI: split theme draw style into separate field
Was using UI_BLOCK_LOOP to control draw style,
this meant we couldn't use popup theme colors for cases
where it the interface has the same purpose as a popup but happens
not to use this flag.
Brecht Van Lommel [Mon, 10 Sep 2018 16:49:47 +0000 (18:49 +0200)]
Fix Cycles principled BSDF black with transmission and IOR 1.0.
Bastien Montagne [Sat, 8 Sep 2018 13:29:39 +0000 (15:29 +0200)]
Fix T56720: Lattice: crash on setting points_u/v/w from python.
One need to check that there is something to free, before trying to free it...
Campbell Barton [Fri, 7 Sep 2018 19:59:28 +0000 (05:59 +1000)]
Cleanup: move area API into own function
Bastien Montagne [Fri, 7 Sep 2018 18:39:42 +0000 (20:39 +0200)]
Install_deps: fix llvm/clang ARCH package names.
Issue raised in T56540, thanks.
Also tried to re-enable using fedora's llvm/clang packages, would hope
and assume old issue here is fixed.
Bastien Montagne [Fri, 7 Sep 2018 18:31:50 +0000 (20:31 +0200)]
Install_deps: Fix wrong URL for ILMBase/OpenEXR source archives.
They also went to github...
Bastien Montagne [Fri, 7 Sep 2018 18:20:09 +0000 (20:20 +0200)]
Install_deps: Fix building python on fedora 28
Looks like libffi is now a dependency of python as well...
Done it for the other distro as well, just in case. ;)
Campbell Barton [Fri, 7 Sep 2018 01:24:37 +0000 (11:24 +1000)]
Fix normal transform orientation calculation
When using the 'normal' orientation, the normal would be ignored
if the plane couldn't be calculated.
Now use only the normal if the plane is zero length,
this was already done, just not in all cases.
Brecht Van Lommel [Thu, 6 Sep 2018 18:09:13 +0000 (20:09 +0200)]
Cleanup: fix compiler warning.
Brecht Van Lommel [Thu, 6 Sep 2018 18:06:23 +0000 (20:06 +0200)]
Fix T56704: black / NaN values in Cycles normal pass.
Brecht Van Lommel [Thu, 6 Sep 2018 15:32:05 +0000 (17:32 +0200)]
Fix T56698: saving render result from compositing as EXR is empty.
Bastien Montagne [Wed, 5 Sep 2018 15:11:03 +0000 (17:11 +0200)]
Update install_deps.sh to latest libs.
Tested with Debian Testing, might need some adjustements for other
distributions...
Also removed last patches we used here, we shall not need any anymore!
Sergey Sharybin [Thu, 6 Sep 2018 08:39:25 +0000 (10:39 +0200)]
Compositor: Always use AA on masks
In a real world it is very weird to disable AA on a mask,
it will give ugly looking result. For some fast preview
passes (like in the node preview) the system can decide
to disable AA without asking user to do anything.
One thing we can consider doing is to remove Feather
option as well. If real compo becomes measurably slower
in cases when mask has no real feather, we can disable
feather internally, without user input. Disabling
feather in the interface is like making things faster
but giving a wrong result, which doesn't sound that
helpful either.
Reviewers: brecht
Reviewed By: brecht
Subscribers: hype, sebastian_k
Differential Revision: https://developer.blender.org/D3677
Campbell Barton [Thu, 6 Sep 2018 04:41:36 +0000 (14:41 +1000)]
Fix ruler angle arc displaying past endpoints
Mai Lavelle [Thu, 6 Sep 2018 04:23:50 +0000 (00:23 -0400)]
Cycles: Allow cancel during displacement of meshes
Sergey Sharybin [Wed, 5 Sep 2018 13:56:50 +0000 (15:56 +0200)]
CCG: Remove number of layers from key
The issue there was that number of layers did not include normals,
while element size counts bytes used by normals. This sounds very
fragile and dangerous to work further. Also, one value can easily
be delivered from another, so it is redundancy going on here.
Possible difference now is that multires subdivision will copy
normals to a higher levels. Shouldn't be big of a problem, since
leaving old normals and updating coordinates is not correct either.
Campbell Barton [Wed, 5 Sep 2018 04:56:29 +0000 (14:56 +1000)]
Cleanup: replace doxy @ with backslash
The rest of Blender uses backslashes.
Campbell Barton [Wed, 5 Sep 2018 04:46:54 +0000 (14:46 +1000)]
Cleanup: style
Ray Molenkamp [Wed, 5 Sep 2018 04:31:10 +0000 (14:31 +1000)]
Fix T54152: --env-system-scripts fails on win32
Campbell Barton [Wed, 5 Sep 2018 01:56:31 +0000 (11:56 +1000)]
Fix VSE cut both-sides option
Was ignoring the option, using the mouse in all cases.
D3671 by @ISS w/ edits.
Ray Molenkamp [Tue, 4 Sep 2018 22:58:41 +0000 (16:58 -0600)]
cycles: Fix x86 build error.
WITH_CYCLES_CUDA_BINARIES was set as a regular variable causing it to be overwritten by the release.cmake settings.
Campbell Barton [Tue, 4 Sep 2018 07:33:12 +0000 (17:33 +1000)]
Cleanup: use const arg for BLI_rect inside check
Campbell Barton [Tue, 4 Sep 2018 05:23:39 +0000 (15:23 +1000)]
UI: cleanup tooltip bounds clamping
Wasn't properly clamping on the window minimum.
Bastien Montagne [Mon, 3 Sep 2018 15:32:46 +0000 (17:32 +0200)]
ClosthCollision: fully avoid computing BVHTree when we have no collision objects to test against.
Followup to rBc6bbe6c5aac29, much more elegant solution to the problem. ;)
Brecht Van Lommel [Mon, 3 Sep 2018 14:49:08 +0000 (16:49 +0200)]
Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
Bastien Montagne [Mon, 3 Sep 2018 13:30:33 +0000 (15:30 +0200)]
Fix (unreported) potentially giant memory leak in Cloth collision solver.
Not freeing its BVHTree in case there were no collision objects,
could quickly lead to hundreds of MB of memleak!
Alex Fuller [Mon, 3 Sep 2018 09:11:45 +0000 (11:11 +0200)]
Fix Cycles half float pragma for strict OpenCL compilers (like ROCm).
Differential Revision: https://developer.blender.org/D3669
Campbell Barton [Mon, 3 Sep 2018 02:38:19 +0000 (12:38 +1000)]
PyAPI: add optional imports to expression eval API
Avoids having to use `__import__` to access modules.
Campbell Barton [Sun, 2 Sep 2018 09:34:36 +0000 (19:34 +1000)]
Cleanup: move keymap helpers into own file
Campbell Barton [Sun, 2 Sep 2018 08:51:31 +0000 (18:51 +1000)]
Cleanup: comment blocks
Sergey Sharybin [Fri, 31 Aug 2018 15:05:51 +0000 (17:05 +0200)]
Buildbot: Usable PIE
Makes it impossible to run from GUI on certain platforms, see T56628.
Monique Dewanchand [Fri, 31 Aug 2018 13:00:38 +0000 (15:00 +0200)]
Python: Enable MASS unit in FloatProperty
MASS unit was already implemented for the C api. Only making sure it is
accessible in the python api. Also added 'CAMERA' to the documentation as a valid option.
Sergey Sharybin [Fri, 31 Aug 2018 10:41:23 +0000 (12:41 +0200)]
Remove CCGDM from PBVH
The statement that PBVH needs to keep track of CCGDM is wrong, PBVH itself
does not care about CCGDM at all, and it's weird for it to carry on this
beast so others can access.
Even more, nobody will actually caring about CCGDM itself, all the usages
were checking whether there is CCGDM or not. This is as good as simply
checking PBVH type.
Tested with an original report T53551 and everything is still stable.
Brecht Van Lommel [Fri, 31 Aug 2018 10:32:12 +0000 (12:32 +0200)]
Fix T56618: crash in release builds when GHOST asserts.
WITH_ASSERT_ABORT was not disabled for release builds. In most cases asserts
are disabled in release builds, but not always.
This also changes the buildbot to use blender_release.cmake instead of
blender_full.cmake, the only effective difference should be WITH_ASSERT_ABORT.
Brecht Van Lommel [Fri, 31 Aug 2018 10:39:16 +0000 (12:39 +0200)]
Fix T56618: crash when typing certain characters on Linux.
Sergey Sharybin [Fri, 31 Aug 2018 10:28:12 +0000 (12:28 +0200)]
Cycles: Cleanup, use explicit comparison with NULL
Sergey Sharybin [Fri, 31 Aug 2018 10:14:36 +0000 (12:14 +0200)]
Fix T56626: Cycles ambient occlusion only local : crash
Was caused by missing NULL pointer check in BVH8.
Campbell Barton [Fri, 31 Aug 2018 04:51:59 +0000 (14:51 +1000)]
PyAPI: replace checks for invalid input w/ assert
Was returning -1 as a bool argument,
in this case the caller needs to ensure non-null args.
Campbell Barton [Fri, 31 Aug 2018 04:21:32 +0000 (14:21 +1000)]
C/Python API: Add PyC_RunString_AsIntPtr
Utility to get an int or pointer from a Python expression.
Campbell Barton [Fri, 31 Aug 2018 03:36:14 +0000 (13:36 +1000)]
Cleanup: rename WM_keymap_find -> WM_keymap_ensure
Sergey Sharybin [Thu, 30 Aug 2018 15:34:11 +0000 (17:34 +0200)]
Cycles: Cleanup, whitespace after keyword
Sergey Sharybin [Thu, 30 Aug 2018 12:09:14 +0000 (14:09 +0200)]
Buildbot: Correction to previous commit
Sergey Sharybin [Thu, 30 Aug 2018 12:07:48 +0000 (14:07 +0200)]
Buildbot: Attempt to fix glibc-2.19 compilation
It is likely to be retired, but for until then lets ensure it works.
Sergey Sharybin [Thu, 30 Aug 2018 10:50:36 +0000 (12:50 +0200)]
Cycles: Fix detection of CPU brand string on 32 bit platforms
The assembler template was backing up and restoring ebx, which is
fair enough. However, this did not prevent compiler for putting
result variables to ebx. This was causing data corruption.
In order to prevent this easiest solution is to list ebx in clobbers
for the assembly.
Brecht Van Lommel [Thu, 30 Aug 2018 10:21:57 +0000 (12:21 +0200)]
Fix T56612: crash in Cycles viewport render update, after recent changes.
BVH8 refitting code had a bug.
Brecht Van Lommel [Thu, 30 Aug 2018 10:19:27 +0000 (12:19 +0200)]
Fix T56610: crash saving images with python API.
Brecht Van Lommel [Thu, 30 Aug 2018 10:09:47 +0000 (12:09 +0200)]
Cleanup: license header formatting.
Sergey Sharybin [Thu, 30 Aug 2018 08:21:51 +0000 (10:21 +0200)]
Build environment: Tweak to harvasting script
The idea is to make find_package() to succeed without any
extra tips given. For this, we need header files to be
harvasted.
Sergey Sharybin [Thu, 30 Aug 2018 08:00:23 +0000 (10:00 +0200)]
Buildbot: Get rid of OpenJPEG 2 hack
Also clarified some options and decisions.
Sergey Sharybin [Thu, 30 Aug 2018 07:55:40 +0000 (09:55 +0200)]
CMake: Automatically detect OpenJPEG 2 libraries
There is chance that on a system with both versions installed this
*might* cause some issues. Such system will be pain to support out
of the box anyway.
This change allows to use precompiled libraries without extra
modifications in the config.