blender.git
14 months agoAlembic: speed up export of packed UV islands.
Cédric Paille [Thu, 28 Jun 2018 12:55:16 +0000 (14:55 +0200)]
Alembic: speed up export of packed UV islands.

Differential Revision: https://developer.blender.org/D3510

14 months agoFix T55662: Crash on text autocomplete
Campbell Barton [Thu, 28 Jun 2018 09:09:09 +0000 (11:09 +0200)]
Fix T55662: Crash on text autocomplete

Regression from undo system upgrade.

14 months agoCMake: enable WITH_ASSERT_ABORT by default
Campbell Barton [Thu, 28 Jun 2018 08:48:06 +0000 (10:48 +0200)]
CMake: enable WITH_ASSERT_ABORT by default

Assert from BLI_assert by default in debug builds
(instead of just printing a warning).

Some developers ignored this, causing errors for others.
Better debug builds cause hard error so code isn't ignored.

Disabling is still useful when bisecting or testing outdated code.

14 months agoUI: use two dot ellipses
Campbell Barton [Thu, 28 Jun 2018 08:45:39 +0000 (10:45 +0200)]
UI: use two dot ellipses

Use less space for sign used when we don't have enough.

14 months agoCleanup: use f-strings
Campbell Barton [Thu, 28 Jun 2018 06:30:54 +0000 (08:30 +0200)]
Cleanup: use f-strings

14 months agoFix Cycles tests build on macOS.
Brecht Van Lommel [Sat, 23 Jun 2018 21:30:38 +0000 (23:30 +0200)]
Fix Cycles tests build on macOS.

14 months agoCleanup: style
Campbell Barton [Wed, 27 Jun 2018 20:32:52 +0000 (22:32 +0200)]
Cleanup: style

14 months agoCleanup: pep8 function indentation
Campbell Barton [Tue, 26 Jun 2018 17:41:37 +0000 (19:41 +0200)]
Cleanup: pep8 function indentation

14 months agoUI: Add/Update bad tooltips
Aaron Carlisle [Tue, 26 Jun 2018 16:29:11 +0000 (12:29 -0400)]
UI: Add/Update bad tooltips

Part of T51061

14 months agoFix bug in DNA_struct_elem_find when checking the first field
Sybren A. Stüvel [Tue, 26 Jun 2018 15:35:04 +0000 (17:35 +0200)]
Fix bug in DNA_struct_elem_find when checking the first field

find_elem(olddata=NULL) doesn't work reliably for existence checks; it will
return NULL both when the field is found at offset 0 and when it is not
found at all.

14 months agoRevert "Turned off clang warnings in third party includes."
Stefan Werner [Tue, 26 Jun 2018 08:26:56 +0000 (10:26 +0200)]
Revert "Turned off clang warnings in third party includes."

This reverts commit d53093953f8f3b58600cb19020ecbe0b5f254b52.

14 months agoPyAPI: add ImBuf.copy
Campbell Barton [Tue, 26 Jun 2018 07:30:18 +0000 (09:30 +0200)]
PyAPI: add ImBuf.copy

DD348 by @kilon w/ edits.

14 months agoPyAPI: move deep-copy args check to py_capi_utils
Campbell Barton [Tue, 26 Jun 2018 07:26:52 +0000 (09:26 +0200)]
PyAPI: move deep-copy args check to py_capi_utils

14 months agoCycles: Fix wrong row count for World MIS CDF calculation
Lukas Stockner [Tue, 26 Jun 2018 03:34:30 +0000 (05:34 +0200)]
Cycles: Fix wrong row count for World MIS CDF calculation

14 months agoTurned off clang warnings in third party includes.
Stefan Werner [Mon, 25 Jun 2018 21:02:01 +0000 (23:02 +0200)]
Turned off clang warnings in third party includes.

The latest clang compiler (at least the one in Xcode 9.4.1) warns about the register keyword and macro expansions using defined().
Since these warnings come from third party code, we can't address them directly in Blender. Silencing them via #pramgas will
at least keep the warnings during a build down to the ones that are relevant to Blender code.

14 months agoCleanup: Nuke most of G.main from GPU code.
Bastien Montagne [Mon, 25 Jun 2018 10:32:48 +0000 (12:32 +0200)]
Cleanup: Nuke most of G.main from GPU code.

14 months agoCleanup: Few more validation of G_MAIN usages...
Bastien Montagne [Mon, 25 Jun 2018 10:02:20 +0000 (12:02 +0200)]
Cleanup: Few more validation of G_MAIN usages...

14 months agoAdd back header needed win32
Campbell Barton [Mon, 25 Jun 2018 07:46:03 +0000 (09:46 +0200)]
Add back header needed win32

14 months agoCMake: correct remove_strict_cxx_flags_file
Campbell Barton [Mon, 25 Jun 2018 05:30:00 +0000 (07:30 +0200)]
CMake: correct remove_strict_cxx_flags_file

Was still using C-flags.

14 months agoCycles: change AO node color default to 1.0.
Brecht Van Lommel [Sun, 24 Jun 2018 10:24:30 +0000 (12:24 +0200)]
Cycles: change AO node color default to 1.0.

14 months agoCleanup: move UI context menus into own file
Campbell Barton [Sun, 24 Jun 2018 08:01:13 +0000 (10:01 +0200)]
Cleanup: move UI context menus into own file

14 months agoUI: alternate fix for empty context menu
Campbell Barton [Sat, 23 Jun 2018 08:31:10 +0000 (10:31 +0200)]
UI: alternate fix for empty context menu

block and layout could be NULL and checking this everywhere
wasn't practical.

Instead of lazy initializing, add UI_popup_menu_end_or_cancel
which cancels empty popup menus.

14 months agoCMake: Make language explicit for per-file strict flags removal
Sergey Sharybin [Fri, 22 Jun 2018 12:40:00 +0000 (14:40 +0200)]
CMake: Make language explicit for per-file strict flags removal

14 months agoCMake: Cleanup, add_cc_flag -> add_c_flag
Sergey Sharybin [Fri, 22 Jun 2018 12:29:13 +0000 (14:29 +0200)]
CMake: Cleanup, add_cc_flag -> add_c_flag

14 months agoCMake: Cleanup, rename CC_REMOVE_STRICT_FLAGS to C_REMOVE_STRICT_FLAGS
Sergey Sharybin [Fri, 22 Jun 2018 12:17:55 +0000 (14:17 +0200)]
CMake: Cleanup, rename CC_REMOVE_STRICT_FLAGS to C_REMOVE_STRICT_FLAGS

14 months agoCMake: Tweaks to removal of strict flags
Sergey Sharybin [Fri, 22 Jun 2018 12:07:55 +0000 (14:07 +0200)]
CMake: Tweaks to removal of strict flags

Silences the following strict flags from external libraries:

- -Wclass-memaccess
- -Wswitch
- -Wtype-limits
- -Wint-in-bool-context

Needed to tweak macro a bit, since the old logic was wrong:
we can not use CXX flags for C compiler, need way more strict
separation between what goes where.

14 months agoCleanup: rename 3D cursor calculation vars
Campbell Barton [Fri, 22 Jun 2018 10:55:15 +0000 (12:55 +0200)]
Cleanup: rename 3D cursor calculation vars

14 months agoCleanup: remove last G.main from RNA.
Bastien Montagne [Fri, 22 Jun 2018 10:35:41 +0000 (12:35 +0200)]
Cleanup: remove last G.main from RNA.

Again, we cannot actually get rid of G_MAIN global access here, so in
most case just 'marked' them as valid, and added assert checks to ensure
we do only work with IDs in G_MAIN in those cases.

14 months agoTweak new BKE_id_is_in_global_main to accept NULL pointer (and consider them as valid).
Bastien Montagne [Fri, 22 Jun 2018 10:26:45 +0000 (12:26 +0200)]
Tweak new BKE_id_is_in_global_main to accept NULL pointer (and consider them as valid).

14 months agoCleanup: get rid of last G.main's in bpy area.
Bastien Montagne [Fri, 22 Jun 2018 09:37:47 +0000 (11:37 +0200)]
Cleanup: get rid of last G.main's in bpy area.

Essentially 'validating' them as G_MAIN, and adding some asserts in
dubious places, that handled IDs are actually in G_MAIN.

14 months agoBKE_library: Add func to check an ID is actually in G_MAIN database.
Bastien Montagne [Fri, 22 Jun 2018 09:37:08 +0000 (11:37 +0200)]
BKE_library: Add func to check an ID is actually in G_MAIN database.

14 months agoEdit Mode: Bevel Op: Offset Soft Max to 100
Aaron Carlisle [Thu, 21 Jun 2018 17:46:11 +0000 (13:46 -0400)]
Edit Mode: Bevel Op: Offset Soft Max to 100

This is consistent with the modifier

14 months agoFix T55568: second click event ignored
Campbell Barton [Thu, 21 Jun 2018 17:26:21 +0000 (19:26 +0200)]
Fix T55568: second click event ignored

14 months agoRevert "Fix T55568: second click event ignored"
Campbell Barton [Thu, 21 Jun 2018 17:24:50 +0000 (19:24 +0200)]
Revert "Fix T55568: second click event ignored"

This reverts commit 52aa963f0ef1b6f4abba6653e9a441dee234127a.

Fixed for keyboards, broke mouse buttons.

14 months agoUI: don't show empty button context menu
Campbell Barton [Thu, 21 Jun 2018 14:33:27 +0000 (16:33 +0200)]
UI: don't show empty button context menu

14 months agoFix Cycles incorrect versioning for automatic sample world resolution.
Brecht Van Lommel [Thu, 21 Jun 2018 13:25:29 +0000 (15:25 +0200)]
Fix Cycles incorrect versioning for automatic sample world resolution.

14 months agoUI: preference for developer extras
Campbell Barton [Thu, 21 Jun 2018 12:54:21 +0000 (14:54 +0200)]
UI: preference for developer extras

Currently only used for "Edit Source" feature.

14 months agoFix T55568: second click event ignored
Campbell Barton [Thu, 21 Jun 2018 08:58:03 +0000 (10:58 +0200)]
Fix T55568: second click event ignored

Double-click handling caused the second click to be ignored
for keymaps that only handle click.

14 months agoFix Cycles CUDA render errors with CUDA 9.2.
Brecht Van Lommel [Thu, 21 Jun 2018 09:29:09 +0000 (11:29 +0200)]
Fix Cycles CUDA render errors with CUDA 9.2.

Work around what might be a compiler bug.

14 months agoFix T55564: Cycles OpenCL build error on some scenes.
Brecht Van Lommel [Thu, 21 Jun 2018 09:18:51 +0000 (11:18 +0200)]
Fix T55564: Cycles OpenCL build error on some scenes.

14 months agoFix T55491: Double click fail in menu popups
Campbell Barton [Thu, 21 Jun 2018 07:50:24 +0000 (09:50 +0200)]
Fix T55491: Double click fail in menu popups

14 months agoWM: don't make LMB a special case for double click
Campbell Barton [Thu, 21 Jun 2018 07:49:30 +0000 (09:49 +0200)]
WM: don't make LMB a special case for double click

14 months agoCleanup: naming (make it clear vars are squared)
Campbell Barton [Wed, 20 Jun 2018 13:58:46 +0000 (15:58 +0200)]
Cleanup: naming (make it clear vars are squared)

14 months agoScreen: split ED_area_actionzone_find_xy
Campbell Barton [Wed, 20 Jun 2018 13:32:46 +0000 (15:32 +0200)]
Screen: split ED_area_actionzone_find_xy

Add ED_area_actionzone_refresh_xy which can tag redraw
find no longer changes changes to the action zone.

14 months agoCleanup: rename is_in_area_actionzone
Campbell Barton [Wed, 20 Jun 2018 11:52:56 +0000 (13:52 +0200)]
Cleanup: rename is_in_area_actionzone

14 months agoCleanup: quiet warning
Campbell Barton [Wed, 20 Jun 2018 11:55:16 +0000 (13:55 +0200)]
Cleanup: quiet warning

14 months agoCleanup: remove some G.main from BKE's node.c
Bastien Montagne [Wed, 20 Jun 2018 10:16:16 +0000 (12:16 +0200)]
Cleanup: remove some G.main from BKE's node.c

Validate some cases using G_MAIN instead (I don't think we want to work
on any other Main than G.main one when registering/unregistering nodes
etc.).

And when freeing, all ID not in Main shall now be tagged accordingly, so
we *should* not need to do that stupi search over all ntrees in G.main
to check wether we have to free it ourself or not!

14 months agoUI: only show "Edit Translations" when addon used
Campbell Barton [Wed, 20 Jun 2018 08:45:03 +0000 (10:45 +0200)]
UI: only show "Edit Translations" when addon used

14 months agoFinal cleanup of G.mains in render area.
Bastien Montagne [Tue, 19 Jun 2018 17:25:06 +0000 (19:25 +0200)]
Final cleanup of G.mains in render area.

14 months agoCycles: Fixed crash when the camera was inside 16 volumes or more. It still won't...
Stefan Werner [Tue, 19 Jun 2018 14:34:15 +0000 (16:34 +0200)]
Cycles: Fixed crash when the camera was inside 16 volumes or more. It still won't render those volumes correctly, but at least the crash is addressed.

14 months agoFix (unreported) passing CDLayer 'ID' instead of bitflag to a cdlayer mask!
Bastien Montagne [Tue, 19 Jun 2018 14:25:24 +0000 (16:25 +0200)]
Fix (unreported) passing CDLayer 'ID' instead of bitflag to a cdlayer mask!

Probably harmless, since I bet CD_ORIGINDEX is nearly always generated,
but still...

14 months agoFix T55528: Cycles AO node should default to 1 if radius is 0.
Brecht Van Lommel [Tue, 19 Jun 2018 09:44:23 +0000 (11:44 +0200)]
Fix T55528: Cycles AO node should default to 1 if radius is 0.

14 months agoCleanup DM generation code for ProjPaint.
Bastien Montagne [Tue, 19 Jun 2018 08:48:37 +0000 (10:48 +0200)]
Cleanup DM generation code for ProjPaint.

Two branches were actually doing essentially the same thing here, no
need to artificially complicate things. ;)

14 months agoFix (unreported) unauthorized relesing of derived_final DM in paint projection code.
Bastien Montagne [Tue, 19 Jun 2018 08:43:54 +0000 (10:43 +0200)]
Fix (unreported) unauthorized relesing of derived_final DM in paint projection code.

NEVER free yourself DM returned by mesh_get_derived_final(), it's always
to one assigned to ob->derived_final!

14 months agoVertex Paint: set sculpt object mode immediately
Campbell Barton [Tue, 19 Jun 2018 06:35:41 +0000 (08:35 +0200)]
Vertex Paint: set sculpt object mode immediately

SculptSession.mode_type wasn't initialized until painting,
making it unreliable for checks in other parts of the code.

Also remove unnecessary initialization,
matching sculpt mode more closely.

14 months agoeditorconfig: correct C/C++ using space
Campbell Barton [Tue, 19 Jun 2018 05:48:12 +0000 (07:48 +0200)]
editorconfig: correct C/C++ using space

14 months agomake.bat: Fix msvc-2017 detection.
Ray Molenkamp [Mon, 18 Jun 2018 19:39:12 +0000 (13:39 -0600)]
make.bat: Fix msvc-2017 detection.

D3485 by @manung

Differential Revision: https://developer.blender.org/D3485

14 months agoeditorconfig: add rst
Campbell Barton [Mon, 18 Jun 2018 16:53:49 +0000 (18:53 +0200)]
editorconfig: add rst

14 months agoeditorconfig: add line length, glsl
Campbell Barton [Mon, 18 Jun 2018 16:21:35 +0000 (18:21 +0200)]
editorconfig: add line length, glsl

14 months agoAdd .editorconfig file
Campbell Barton [Mon, 18 Jun 2018 16:09:45 +0000 (18:09 +0200)]
Add .editorconfig file

This is a fairly well supported file-type configuration
for indentation and trailing space stripping.

See editorconfig.org for details.

14 months agoFix T55503: File browser filter not working correctly.
Bastien Montagne [Mon, 18 Jun 2018 10:26:47 +0000 (12:26 +0200)]
Fix T55503: File browser filter not working correctly.

There were two issues here, introduced by rB66aa4af836:
* Forgot to change length of some filter_glob var deep in filebrowser code.
* Truncating filter_glob in general can be dangerous, generating
unexpected patterns.

Last point was the root of the issue here, truncating to 63 chars string
left last group as 'match everything' `*` pattern.

To fix that to some extent, added a new BLI_path_extension_glob_validate
helper to BLI_path_util, which ensures we do not have last
wildcards-only group in our pattern, when there are more than one group.

14 months agoRNA: disable animation for file output options
Campbell Barton [Mon, 18 Jun 2018 05:31:21 +0000 (07:31 +0200)]
RNA: disable animation for file output options

15 months agoCleanup: trailing space cmake, make.bat
Campbell Barton [Sun, 17 Jun 2018 18:18:09 +0000 (20:18 +0200)]
Cleanup: trailing space cmake, make.bat

15 months agoCleanup: trailing space in CMake files
Campbell Barton [Sun, 17 Jun 2018 18:15:24 +0000 (20:15 +0200)]
Cleanup: trailing space in CMake files

15 months agoPython: Allow untrusted py-drivers to run limited expressions
Campbell Barton [Sun, 17 Jun 2018 17:51:05 +0000 (19:51 +0200)]
Python: Allow untrusted py-drivers to run limited expressions

Limit to a restricted set of built-ins, as well as the math module.
Also restrict of op-codes, disallowing imports and attribute access.

This allows most math expressions to run
without any performance cost once the initial check is done.

See: D1862 for details.

15 months agoCleanup: trailing space for remaining source/
Campbell Barton [Sun, 17 Jun 2018 15:06:28 +0000 (17:06 +0200)]
Cleanup: trailing space for remaining source/

15 months agoCleanup: trailing space for blenloader
Campbell Barton [Sun, 17 Jun 2018 15:06:07 +0000 (17:06 +0200)]
Cleanup: trailing space for blenloader

15 months agoCleanup: trailing space for blenkernel
Campbell Barton [Sun, 17 Jun 2018 15:05:51 +0000 (17:05 +0200)]
Cleanup: trailing space for blenkernel

15 months agoCleanup: trailing space for compositor
Campbell Barton [Sun, 17 Jun 2018 15:05:29 +0000 (17:05 +0200)]
Cleanup: trailing space for compositor

15 months agoCleanup: trailing space for freestyle
Campbell Barton [Sun, 17 Jun 2018 15:05:14 +0000 (17:05 +0200)]
Cleanup: trailing space for freestyle

15 months agoCleanup: trailing space for imbuf module
Campbell Barton [Sun, 17 Jun 2018 15:04:54 +0000 (17:04 +0200)]
Cleanup: trailing space for imbuf module

15 months agoCleanup: trailing space for modifiers
Campbell Barton [Sun, 17 Jun 2018 15:04:27 +0000 (17:04 +0200)]
Cleanup: trailing space for modifiers

15 months agoCleanup: trailing space for DNA headers
Campbell Barton [Sun, 17 Jun 2018 15:04:09 +0000 (17:04 +0200)]
Cleanup: trailing space for DNA headers

15 months agoCleanup: trailing space in source/gameengine/
Campbell Barton [Sun, 17 Jun 2018 15:01:43 +0000 (17:01 +0200)]
Cleanup: trailing space in source/gameengine/

15 months agoCleanup: trailing space for BLI
Campbell Barton [Sun, 17 Jun 2018 14:32:54 +0000 (16:32 +0200)]
Cleanup: trailing space for BLI

15 months agoCleanup: remove unused BLI_rebase_path
Campbell Barton [Sun, 17 Jun 2018 14:26:47 +0000 (16:26 +0200)]
Cleanup: remove unused BLI_rebase_path

15 months agoCleanup: BLI path extension API
Campbell Barton [Sun, 17 Jun 2018 14:13:24 +0000 (16:13 +0200)]
Cleanup: BLI path extension API

Use BLI_path_extension_* prefix.

15 months agoBLI_path: add string size debug define
Campbell Barton [Sun, 17 Jun 2018 13:35:00 +0000 (15:35 +0200)]
BLI_path: add string size debug define

Off by default, only for debugging.

15 months agoCMake: add missing headers
Campbell Barton [Sun, 17 Jun 2018 09:56:20 +0000 (11:56 +0200)]
CMake: add missing headers

15 months agoCleanup: use clamp_* from BLI_math (replace macro)
Campbell Barton [Sun, 17 Jun 2018 09:50:56 +0000 (11:50 +0200)]
Cleanup: use clamp_* from BLI_math (replace macro)

15 months agomake.bat: Fix `make showhashes` not working.
Ray Molenkamp [Sat, 16 Jun 2018 18:29:38 +0000 (12:29 -0600)]
make.bat: Fix `make showhashes` not working.

broke in recent refactor.

15 months agoFix T55427: Removing Vertex Group used by Data Transfer Modifier results in crash.
Bastien Montagne [Sat, 16 Jun 2018 14:19:53 +0000 (16:19 +0200)]
Fix T55427: Removing Vertex Group used by Data Transfer Modifier results in crash.

Only fixing crash, proper handling (a.k.a remapping) of all
possible cases here, for all possible data layers, is rather involved...

15 months agoUI: refactor drag-toggle for other button types
Campbell Barton [Sat, 16 Jun 2018 14:04:26 +0000 (16:04 +0200)]
UI: refactor drag-toggle for other button types

15 months agoUI: minor changes from 2.8
Campbell Barton [Sat, 16 Jun 2018 13:44:13 +0000 (15:44 +0200)]
UI: minor changes from 2.8

- Option to skip multi-data edits.
- Open hold buttons on drag.
- Utility function to set default value.

15 months agoCycles Cleanup: Remove unneccessary color management call
Lukas Stockner [Sat, 16 Jun 2018 11:47:49 +0000 (13:47 +0200)]
Cycles Cleanup: Remove unneccessary color management call

15 months agoCycles: change Ambient Occlusion shader to output colors.
Lukas Stockner [Fri, 15 Jun 2018 09:03:29 +0000 (11:03 +0200)]
Cycles: change Ambient Occlusion shader to output colors.

This means the shader can now be used for procedural texturing. New
settings on the node are Samples, Inside, Local Only and Distance.

Original patch by Lukas with further changes by Brecht.

Differential Revision: https://developer.blender.org/D3479

15 months agoWM: suppress drag events if motion is handled
Campbell Barton [Fri, 15 Jun 2018 17:09:43 +0000 (19:09 +0200)]
WM: suppress drag events if motion is handled

15 months agoCleanup: some more G.main removal.
Bastien Montagne [Fri, 15 Jun 2018 15:42:17 +0000 (17:42 +0200)]
Cleanup: some more G.main removal.

We are really starting to scratch the last bits here...

15 months agoCleanup: validate G.main's in creator code.
Bastien Montagne [Fri, 15 Jun 2018 15:36:44 +0000 (17:36 +0200)]
Cleanup: validate G.main's in creator code.

Using G_MAIN here is valid!

15 months agoCleanup: some more G.main removal/validation...
Bastien Montagne [Fri, 15 Jun 2018 15:21:07 +0000 (17:21 +0200)]
Cleanup: some more G.main removal/validation...

15 months agoFix more Cycles CUDA errors after recent changes.
Brecht Van Lommel [Fri, 15 Jun 2018 13:58:48 +0000 (15:58 +0200)]
Fix more Cycles CUDA errors after recent changes.

15 months agoFix T55490, intersect two triangles fails.
Howard Trickey [Fri, 15 Jun 2018 12:48:45 +0000 (08:48 -0400)]
Fix T55490, intersect two triangles fails.

Need to use the 'use_partial_connect' option in island connect,
so changed signatures of various functions to pass that into and
then down from BM_mesh_intersect (making true for intersect, false
for boolean).
Then fix bm_face_split_edgenet_partial_connect to work when
input edges are not necessarily wire, but at least not in the
face they are being connected in. That caused generalization
of core BM_vert_separate_hflag_wire (which is only used in
this one place in all Blender).

15 months agoFix (unreported) Text Editor: scrollbar exiting early
Philipp Oeser [Fri, 15 Jun 2018 08:25:18 +0000 (10:25 +0200)]
Fix (unreported) Text Editor: scrollbar exiting early

caused by recent clickdrag changes

15 months agoFix Cycles CUDA error after recent changes.
Brecht Van Lommel [Fri, 15 Jun 2018 08:06:32 +0000 (10:06 +0200)]
Fix Cycles CUDA error after recent changes.

15 months agoWM: 2.8 screen compatibility
Campbell Barton [Fri, 15 Jun 2018 08:23:03 +0000 (10:23 +0200)]
WM: 2.8 screen compatibility

Without these minor changes loading files from 2.8 will crash.

Manually applied edits from 26786a2b87a08

15 months agoCycles: Query XYZ to/from Scene Linear conversion from OCIO instead of assuming sRGB
Lukas Stockner [Thu, 14 Jun 2018 15:48:19 +0000 (17:48 +0200)]
Cycles: Query XYZ to/from Scene Linear conversion from OCIO instead of assuming sRGB

I've limited it to just the RGB<->XYZ stuff for now, correct image handling is the next step.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3478

15 months agoCycles: Connect value inputs to Strength instead of Color when inserting an Emission...
Lukas Stockner [Thu, 14 Jun 2018 20:16:42 +0000 (22:16 +0200)]
Cycles: Connect value inputs to Strength instead of Color when inserting an Emission node

Same result, but saves an additional ConvertNode.

15 months agoCycles: Automatically detect HDRI resolution by default and use non-square sampling map
Lukas Stockner [Thu, 14 Jun 2018 14:18:34 +0000 (16:18 +0200)]
Cycles: Automatically detect HDRI resolution by default and use non-square sampling map

The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution.
If there are no Enviroment Textures, it just uses the old default.

Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size,
the manual UI option now halves the value to get the height.

A default aspect ratio of 2:1 makes sense since this is what most HDRIs use.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3477

15 months agoCleanup: remove last G.main's from Collada code.
Bastien Montagne [Thu, 14 Jun 2018 13:15:51 +0000 (15:15 +0200)]
Cleanup: remove last G.main's from Collada code.

15 months agoCleanup: Remove last G.main's from WM code.
Bastien Montagne [Thu, 14 Jun 2018 10:34:13 +0000 (12:34 +0200)]
Cleanup: Remove last G.main's from WM code.

Was mostly validating valid usages of G.main -> G_MAIN actually.