blender.git
4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 26 Jul 2017 21:35:44 +0000 (07:35 +1000)]
Merge branch 'master' into blender2.8

4 years agoCleanup: remove check for old GCC&PPC
Campbell Barton [Wed, 26 Jul 2017 21:28:29 +0000 (07:28 +1000)]
Cleanup: remove check for old GCC&PPC

4 years agoCleanup: Py3.7x warning
Campbell Barton [Wed, 26 Jul 2017 21:23:36 +0000 (07:23 +1000)]
Cleanup: Py3.7x warning

4 years agoMinor template code patch. (objectHitList =/= hitObjectList)
Aaron Carlisle [Wed, 26 Jul 2017 19:56:43 +0000 (15:56 -0400)]
Minor template code patch. (objectHitList =/= hitObjectList)

The Blender text editor's built in python template "Gamelogic" has a reference near the bottom to "objectHitList" as an alleged attribute to the KX_TouchSensor. This name is incorrect, it's correct name is "hitObjectList."

Attempting to access the suggested objectHitList returns error...
```
AttributeError: 'KX_TouchSensor' object has no attribute 'objectHitList'
```

The provided diff corrects this minor error.

Reviewers: kupoman, moguri, campbellbarton, Blendify

Reviewed By: Blendify

Tags: #game_engine, #game_python

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

4 years agoFix crash in recent changes to instancing
Campbell Barton [Wed, 26 Jul 2017 17:19:12 +0000 (03:19 +1000)]
Fix crash in recent changes to instancing

Registrable classes already handled their own instancing,
changes to enable instancing everywhere conflicted.

4 years agoLast commit broke WITH_PYTHON_SAFETY
Campbell Barton [Wed, 26 Jul 2017 16:12:40 +0000 (02:12 +1000)]
Last commit broke WITH_PYTHON_SAFETY

Re-enable BPY_id_release call with thats enabled.

4 years agoBPY_id_release was a nop, use RNA invalidate directly
Campbell Barton [Wed, 26 Jul 2017 16:04:53 +0000 (02:04 +1000)]
BPY_id_release was a nop, use RNA invalidate directly

4 years agoFix T52186: Crash on bevel
Sergey Sharybin [Wed, 26 Jul 2017 14:31:53 +0000 (16:31 +0200)]
Fix T52186: Crash on bevel

bContext is not always available in transform, so need to use explicit
scene and scene layer to create evaluation context from.

4 years agoCLeanup: Use utility function in BKE
Sergey Sharybin [Wed, 26 Jul 2017 14:29:43 +0000 (16:29 +0200)]
CLeanup: Use utility function in BKE

4 years agoDepsgraph: Add utility function to initialize evaluation context from scene and layer
Sergey Sharybin [Wed, 26 Jul 2017 14:27:15 +0000 (16:27 +0200)]
Depsgraph: Add utility function to initialize evaluation context from scene and layer

4 years agoCleanup, line wraps
Sergey Sharybin [Wed, 26 Jul 2017 14:21:43 +0000 (16:21 +0200)]
Cleanup, line wraps

4 years agoInitialize time for evaluation context when creating from bContext
Sergey Sharybin [Wed, 26 Jul 2017 14:20:51 +0000 (16:20 +0200)]
Initialize time for evaluation context when creating from bContext

4 years agoFix T52176: Bevel doesn't correctly work with default empty Vgroup.
Bastien Montagne [Wed, 26 Jul 2017 14:23:24 +0000 (16:23 +0200)]
Fix T52176: Bevel doesn't correctly work with default empty Vgroup.

`defvert_array_find_weight_safe()` was confusing 'invalid vgroup' and
'valid but totally empty vgroup' cases.

Note that this also affected at least ShrinkWrap and SimpleDeform
modifiers.

4 years agoPyAPI: Store PyInstances for ID's
Campbell Barton [Wed, 26 Jul 2017 13:49:20 +0000 (23:49 +1000)]
PyAPI: Store PyInstances for ID's

This means once an ID is created,
it will keep using the same PyObject instance.

This has some advantages:
- Avoids unnecessary re-creation of instances on UI poll / redraw.
- Accessing free'd ID's gives an exception instead of crashing.
  (long standing annoyance!, though this only applies to ID's
   and not yet other data that uses the ID's - vertices for eg).
- Allows using instance comparison (a little faster).

Note that the instances won't be kept between undo.

4 years agoPyAPI: Fix for instancing (Blender owns a reference)
Campbell Barton [Wed, 26 Jul 2017 13:05:00 +0000 (23:05 +1000)]
PyAPI: Fix for instancing (Blender owns a reference)

Also set newly created values to the instance pointer.

4 years agoManipulator: only check for highlight once
Campbell Barton [Wed, 26 Jul 2017 10:49:57 +0000 (20:49 +1000)]
Manipulator: only check for highlight once

Was doing 2x lookups which is OK for click-select
but this runs on mouse-move and can become slow.

May enable this again if highlighting logic changes.

Also scale hotspot by pixelsize.

4 years agoblenderplayer stub update
Campbell Barton [Wed, 26 Jul 2017 08:18:32 +0000 (18:18 +1000)]
blenderplayer stub update

4 years agoCleanup: typedef enums
Campbell Barton [Wed, 26 Jul 2017 08:00:26 +0000 (18:00 +1000)]
Cleanup: typedef enums

Manipulator enum types are easy to confuse, use typedefs.

4 years agoManipulator: refactor/fix selection logic
Campbell Barton [Tue, 25 Jul 2017 22:12:46 +0000 (08:12 +1000)]
Manipulator: refactor/fix selection logic

- Cleanup array access, move into functions.
- Store allocated size to avoid realloc's on every add/remove.
- Make select editable from Python.
- Rename select callback to select_refresh
  (collided with select boolean).
- Call select_refresh when de-selecting as well as selection.

4 years agoFaceMaps: add select flag
Campbell Barton [Tue, 25 Jul 2017 19:21:38 +0000 (05:21 +1000)]
FaceMaps: add select flag

For use by manipulators since they don't have their own persistent data
in the blend file.

4 years agoEevee: Fix post process with Ugly color.
Clément Foucault [Tue, 25 Jul 2017 20:07:15 +0000 (22:07 +0200)]
Eevee: Fix post process with Ugly color.

This was cause by some post process not always sampling the highest mipmap.
But if there is no need for mipmapping (i.e. no SSR) these levels will be undefined.
So forcing all Post FX shader to sample level 0 fix this.

4 years agoEevee: SSR: Add support for planar probes.
Clément Foucault [Tue, 25 Jul 2017 17:03:07 +0000 (19:03 +0200)]
Eevee: SSR: Add support for planar probes.

This add the possibility to use planar probe informations to create SSR.
This has 2 advantages:
- Tracing is less expensive since the hit is found much quicker.
- We have much less artifact due to missing information.

There is still area for improvement.

4 years agoWorkaround for crash drawing face-maps after undo
Campbell Barton [Tue, 25 Jul 2017 19:10:20 +0000 (05:10 +1000)]
Workaround for crash drawing face-maps after undo

4 years agoFix T52190: Depth picking fails
Campbell Barton [Tue, 25 Jul 2017 16:34:14 +0000 (02:34 +1000)]
Fix T52190: Depth picking fails

4 years agoDepsgraph: Support changing scene's render engine
Sergey Sharybin [Tue, 25 Jul 2017 13:11:51 +0000 (15:11 +0200)]
Depsgraph: Support changing scene's render engine

4 years agoDepsgraph: Make sure armature mode is properly changed in all copied versions
Sergey Sharybin [Tue, 25 Jul 2017 12:53:19 +0000 (14:53 +0200)]
Depsgraph: Make sure armature mode is properly changed in all copied versions

4 years agoDepsgraph: Initial support of pose mode for copy-on-write armature
Sergey Sharybin [Tue, 25 Jul 2017 12:37:08 +0000 (14:37 +0200)]
Depsgraph: Initial support of pose mode for copy-on-write armature

Some basic code, makes it possible to pose existing armature.

Probably still lots of corner cases to cover, but need to start somewhere.

4 years agoDepsgraph: Fix relations update when transform is done and there was no temporary...
Sergey Sharybin [Tue, 25 Jul 2017 12:30:43 +0000 (14:30 +0200)]
Depsgraph: Fix relations update when transform is done and there was no temporary constraints created

4 years agoCleanup: rename active to modal
Campbell Barton [Tue, 25 Jul 2017 12:22:12 +0000 (22:22 +1000)]
Cleanup: rename active to modal

This matches operators naming and should avoid confusion in future if we
want to use active as term for last-selected.

4 years agoDepsgraph: Remove unsued node flag
Sergey Sharybin [Tue, 25 Jul 2017 12:06:17 +0000 (14:06 +0200)]
Depsgraph: Remove unsued node flag

4 years agoManipulator: option to draw all while interacting
Campbell Barton [Tue, 25 Jul 2017 12:02:16 +0000 (22:02 +1000)]
Manipulator: option to draw all while interacting

4 years agoManipulator: support select-drag to tweak
Campbell Barton [Tue, 25 Jul 2017 11:34:20 +0000 (21:34 +1000)]
Manipulator: support select-drag to tweak

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 25 Jul 2017 10:53:10 +0000 (20:53 +1000)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: Skip user scripts w/ factory-startup
Campbell Barton [Tue, 25 Jul 2017 10:50:12 +0000 (20:50 +1000)]
PyAPI: Skip user scripts w/ factory-startup

Adds bpy.app.factory_startup,
used to check if user scripts should be loaded.

4 years agoManipulator: break after an event is handled
Campbell Barton [Tue, 25 Jul 2017 10:17:54 +0000 (20:17 +1000)]
Manipulator: break after an event is handled

Now works the same as other event handling functions.

4 years agoFix PyManipulators having keymaps registered twice
Campbell Barton [Tue, 25 Jul 2017 09:59:38 +0000 (19:59 +1000)]
Fix PyManipulators having keymaps registered twice

Manipulators which are registered before UI initialized would have their
keymaps initalized twice (duplicate keymap items).

4 years agoPython module test: Don't cfail the test when import failure happens in preset
Sergey Sharybin [Tue, 25 Jul 2017 09:38:33 +0000 (11:38 +0200)]
Python module test: Don't cfail the test when import failure happens in preset

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 25 Jul 2017 07:36:49 +0000 (17:36 +1000)]
Merge branch 'master' into blender2.8

4 years agoPyAPI: utility for creating register, unregister
Campbell Barton [Tue, 25 Jul 2017 07:34:34 +0000 (17:34 +1000)]
PyAPI: utility for creating register, unregister

This simplifies creation of register, unregister functions that
simply forward calls submodules.

4 years agoFix T51450: viewport render time keeps increasing after render is done.
Jeff Knox [Mon, 24 Jul 2017 23:35:33 +0000 (01:35 +0200)]
Fix T51450: viewport render time keeps increasing after render is done.

Reviewed By: brecht

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

4 years agoFix compositor Glare node with Simpler Star resulting in uneven rays.
Matheus de Sousa Faria [Mon, 24 Jul 2017 22:29:25 +0000 (00:29 +0200)]
Fix compositor Glare node with Simpler Star resulting in uneven rays.

Reviewed By: brecht

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

4 years agoFix crahs when doing preview from a scene withotu world
Sergey Sharybin [Mon, 24 Jul 2017 15:42:55 +0000 (17:42 +0200)]
Fix crahs when doing preview from a scene withotu world

4 years agoDepsgraph: Avoid assert failure in some harmless cases
Sergey Sharybin [Mon, 24 Jul 2017 15:41:29 +0000 (17:41 +0200)]
Depsgraph: Avoid assert failure in some harmless cases

4 years agoCleanup: trailing space
Campbell Barton [Mon, 24 Jul 2017 15:27:43 +0000 (01:27 +1000)]
Cleanup: trailing space

4 years agoCleanup: remove scons config
Campbell Barton [Mon, 24 Jul 2017 13:59:41 +0000 (23:59 +1000)]
Cleanup: remove scons config

4 years agoRevert "ransform: fix unreported bug: geometry hidden by clipping border (alt + b...
mano-wii [Mon, 24 Jul 2017 15:08:23 +0000 (12:08 -0300)]
Revert "ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces"

This reverts commit 7f09b55d01c248a741e967af597b7519f095983b.

4 years agoDepsgraph: Synchronize collection visibility after copy
Sergey Sharybin [Mon, 24 Jul 2017 15:03:53 +0000 (17:03 +0200)]
Depsgraph: Synchronize collection visibility after copy

BKE_scene_copy explicitly ignores visibility of "source" collections make all
collections visible. This is also tested by regression tests.

While it seems more logical to simply preserve all possible visibility flags
and overrides, don't feel like submitting to a behavior-changes without talking
to author of those guards first.

This commit fixes cycles material preview.

4 years agoFix compilation error of alembic test after recent eval_ctx changes
Sergey Sharybin [Mon, 24 Jul 2017 14:50:47 +0000 (16:50 +0200)]
Fix compilation error of alembic test after recent eval_ctx changes

4 years agoEevee: Silence printfs.
Clément Foucault [Mon, 24 Jul 2017 14:36:32 +0000 (16:36 +0200)]
Eevee: Silence printfs.

4 years agoDepsgraph: Fix typo in comment
Sergey Sharybin [Mon, 24 Jul 2017 14:32:07 +0000 (16:32 +0200)]
Depsgraph: Fix typo in comment

4 years agoDepsgraph: Fix crash when trying to create full copy of scene
Sergey Sharybin [Mon, 24 Jul 2017 14:10:59 +0000 (16:10 +0200)]
Depsgraph: Fix crash when trying to create full copy of scene

4 years agoDepsgraph: Textures and images are actually covered by depsgraph
Sergey Sharybin [Mon, 24 Jul 2017 13:54:57 +0000 (15:54 +0200)]
Depsgraph: Textures and images are actually covered by depsgraph

Might be missing relation links tho.

4 years agoDepsgraph: Avoid creating ID nodes for objects which are coming from collections...
Sergey Sharybin [Mon, 24 Jul 2017 13:39:31 +0000 (15:39 +0200)]
Depsgraph: Avoid creating ID nodes for objects which are coming from collections and not layers

If object is only listed in collection but not added to any of layers we shouldn't create
placeholder for it, because otherwise we'll leave lots of placeholder ID nodes.

Question: can we make this exception to be more reliable?

4 years agoDepsgraph: Be consistent about id type variable name
Sergey Sharybin [Mon, 24 Jul 2017 13:33:35 +0000 (15:33 +0200)]
Depsgraph: Be consistent about id type variable name

4 years agoDepsgraph: Cleanup, use utility function to clear lists
Sergey Sharybin [Mon, 24 Jul 2017 13:28:27 +0000 (15:28 +0200)]
Depsgraph: Cleanup, use utility function to clear lists

4 years agoDepsgraph: Ignore palettes from copy-on-write routines
Sergey Sharybin [Mon, 24 Jul 2017 13:12:36 +0000 (15:12 +0200)]
Depsgraph: Ignore palettes from copy-on-write routines

They are not covered by dependency graph.

4 years agoEevee: Fix crash when saving file with motion blur.
Clément Foucault [Mon, 24 Jul 2017 14:21:43 +0000 (16:21 +0200)]
Eevee: Fix crash when saving file with motion blur.

4 years agoransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not...
mano-wii [Mon, 24 Jul 2017 14:13:33 +0000 (11:13 -0300)]
ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces

The geometry behind the farther clip_plane is not bypassed

4 years agoEevee: Fix double buffer issue.
Clément Foucault [Mon, 24 Jul 2017 13:55:21 +0000 (15:55 +0200)]
Eevee: Fix double buffer issue.

4 years agoEevee: SSR: Refactor multiple rays. Plus other changes...
Clément Foucault [Mon, 24 Jul 2017 09:18:11 +0000 (11:18 +0200)]
Eevee: SSR: Refactor multiple rays. Plus other changes...

-Allow a maximum of 4 rays per trace pixel.
-Removes parameter Normalize: use normalization all the time now.
-Add firefly clamp slider.

4 years agoEevee: Make MinmaxZ compatible with textureArray
Clément Foucault [Sun, 23 Jul 2017 18:33:29 +0000 (20:33 +0200)]
Eevee: Make MinmaxZ compatible with textureArray

4 years agoEevee: Planar Reflection: Remove distance approximation.
Clément Foucault [Sun, 23 Jul 2017 12:03:27 +0000 (14:03 +0200)]
Eevee: Planar Reflection: Remove distance approximation.

This commit separate the depth texture into another texture array.
This remove the need to output radial depth into alpha.
Unfortunatly it's difficult to recover position from the non linear depth buffer when applying reflection without adding a bunch of stuff.
This is in preparation of SSR planar reflections.

4 years agoEevee: SSR: Add two hit option.
Clément Foucault [Sat, 22 Jul 2017 22:03:45 +0000 (00:03 +0200)]
Eevee: SSR: Add two hit option.

This option add another raytrace per pixel, clearing some noise.
But multiplying the raytrace cost.

4 years agoEevee: SSR: Fix Opengl Render.
Clément Foucault [Sat, 22 Jul 2017 18:36:34 +0000 (20:36 +0200)]
Eevee: SSR: Fix Opengl Render.

Add a constant number of 4 drawing loop to accumulate 4 "bounce" of light in SSRs.

4 years agoEevee: SSR: Fixed problem with un-initialized texture.
Clément Foucault [Sat, 22 Jul 2017 14:22:01 +0000 (16:22 +0200)]
Eevee: SSR: Fixed problem with un-initialized texture.

Also add another debug buffer and cleanup in effect_ssr_frag.glsl

4 years agoEevee: SSR: Small fixes
Clément Foucault [Mon, 24 Jul 2017 13:36:22 +0000 (15:36 +0200)]
Eevee: SSR: Small fixes

- Encode normals for other opaque bsdf so they are not rejected by the normal facing test.
- Early out non reflective surfaces.
- Add small offset to raytrace to avoid self intersection.
- Fix fallback probes not appearing.

4 years agoEevee: SSR: Add Weight Normalization option.
Clément Foucault [Sat, 22 Jul 2017 12:41:34 +0000 (14:41 +0200)]
Eevee: SSR: Add Weight Normalization option.

4 years agoEevee: SSR: Add View Facing fadeout.
Clément Foucault [Sat, 22 Jul 2017 12:39:35 +0000 (14:39 +0200)]
Eevee: SSR: Add View Facing fadeout.

Also make hit boolean depends on hit coord not on pdf.

4 years agoEevee: SSR: Add fullscreen raytrace option and Screen border factor.
Clément Foucault [Fri, 21 Jul 2017 23:13:33 +0000 (01:13 +0200)]
Eevee: SSR: Add fullscreen raytrace option and Screen border factor.

4 years agoEevee: SSR: Use noise to dither the stride banding.
Clément Foucault [Fri, 21 Jul 2017 22:22:39 +0000 (00:22 +0200)]
Eevee: SSR: Use noise to dither the stride banding.

4 years agoEevee: SSR: Add stride and thickness parameters.
Clément Foucault [Fri, 21 Jul 2017 21:48:48 +0000 (23:48 +0200)]
Eevee: SSR: Add stride and thickness parameters.

Also polished the raytracing algorithm.

4 years agoEevee: SSR: Add fullscreen raytrace.
Clément Foucault [Fri, 21 Jul 2017 13:06:29 +0000 (15:06 +0200)]
Eevee: SSR: Add fullscreen raytrace.

4 years agoEevee: HiZ buffer: Split into two 24bit depth buffer
Clément Foucault [Fri, 21 Jul 2017 12:27:16 +0000 (14:27 +0200)]
Eevee: HiZ buffer: Split into two 24bit depth buffer

This way we don't have float precision issue we had before and we save some bandwidth.

4 years agoEevee: SSR: Add firefly filter and refine noise reduction.
Clément Foucault [Thu, 20 Jul 2017 22:24:16 +0000 (00:24 +0200)]
Eevee: SSR: Add firefly filter and refine noise reduction.

Push to 9 resolve sample.
Add an normalization as an option since it gives harsh limits.

4 years agoEevee: Codestyle.
Clément Foucault [Thu, 20 Jul 2017 22:20:05 +0000 (00:20 +0200)]
Eevee: Codestyle.

4 years agoEevee: SSR: Do the SSR pass only for probes if there is no valid double buffer.
Clément Foucault [Thu, 20 Jul 2017 22:19:23 +0000 (00:19 +0200)]
Eevee: SSR: Do the SSR pass only for probes if there is no valid double buffer.

This prevent black reflection when initializing SSR.

4 years agoEevee: SSR: Add mipmap filtering and bias to reduce noise.
Clément Foucault [Thu, 20 Jul 2017 16:40:23 +0000 (18:40 +0200)]
Eevee: SSR: Add mipmap filtering and bias to reduce noise.

Also fix the roughness factors.

4 years agoEevee: Fix glossy node roughness.
Clément Foucault [Thu, 20 Jul 2017 14:54:57 +0000 (16:54 +0200)]
Eevee: Fix glossy node roughness.

4 years agoEevee: SSR: Don't block the ray if tracing behind object.
Clément Foucault [Wed, 19 Jul 2017 21:40:14 +0000 (23:40 +0200)]
Eevee: SSR: Don't block the ray if tracing behind object.

This requires to check for backface after a hit.

4 years agoEevee: SSR: Add per pixel resolve of multiple rays.
Clément Foucault [Wed, 19 Jul 2017 17:21:16 +0000 (19:21 +0200)]
Eevee: SSR: Add per pixel resolve of multiple rays.

4 years agoEevee: SSR: Add roughness random rays.
Clément Foucault [Wed, 19 Jul 2017 13:39:37 +0000 (15:39 +0200)]
Eevee: SSR: Add roughness random rays.

4 years agoEevee: SSR: Add double buffer so we can read previous frame color.
Clément Foucault [Wed, 19 Jul 2017 12:22:03 +0000 (14:22 +0200)]
Eevee: SSR: Add double buffer so we can read previous frame color.

Also add simple reprojection and screen fade to the SSR resolve pass.

4 years agoEevee: SSR: Make raymarch step bigger.
Clément Foucault [Wed, 19 Jul 2017 12:19:03 +0000 (14:19 +0200)]
Eevee: SSR: Make raymarch step bigger.

4 years agoEevee: Fix Shader compilation.
Clément Foucault [Tue, 18 Jul 2017 14:48:45 +0000 (16:48 +0200)]
Eevee: Fix Shader compilation.

4 years agoEevee: SSR: Add simple raytracing.
Clément Foucault [Tue, 18 Jul 2017 14:48:24 +0000 (16:48 +0200)]
Eevee: SSR: Add simple raytracing.

Still imprecise.

4 years agoEevee: Fix clip/hashed alpha prepass/shadow crash.
Clément Foucault [Mon, 17 Jul 2017 13:43:24 +0000 (15:43 +0200)]
Eevee: Fix clip/hashed alpha prepass/shadow crash.

4 years agoEevee: SSR: Encode Normal in buffer and add cubemap fallback.
Clément Foucault [Mon, 17 Jul 2017 11:39:03 +0000 (13:39 +0200)]
Eevee: SSR: Encode Normal in buffer and add cubemap fallback.

Normals can point away from the camera so we cannot just put XY in the buffer and reconstruct Z later as we would not know the sign of Z.

4 years agoEevee: SSR: Output ssr datas to buffers.
Clément Foucault [Sun, 16 Jul 2017 21:49:25 +0000 (23:49 +0200)]
Eevee: SSR: Output ssr datas to buffers.

Output in 2 buffers Normals, Specular Color and roughness.
This way we can raytrace in a defered fashion and blend the exact contribution of the specular lobe on top of the opaque pass.

4 years agoEevee: Ssr: Add ssr id to glossy nodes.
Clément Foucault [Sat, 15 Jul 2017 14:09:44 +0000 (16:09 +0200)]
Eevee: Ssr: Add ssr id to glossy nodes.

An id is given to each glossy node in order to determine which specular lobe is using ssr.

4 years agoFix T50039: texture paint soften strength not working with float images.
Brecht Van Lommel [Mon, 24 Jul 2017 13:02:39 +0000 (15:02 +0200)]
Fix T50039: texture paint soften strength not working with float images.

4 years agoInitialize scene layer for evaluation context used by preview renderer
Sergey Sharybin [Mon, 24 Jul 2017 13:00:44 +0000 (15:00 +0200)]
Initialize scene layer for evaluation context used by preview renderer

Ideally need to clean and sane and impossible-to-break way of making sure
evaluation context is fully initialized, but that would need some thoughts
and experimentation.

4 years agoRender preview: Always make sure all ID datablocks references by objects are in bmain
Sergey Sharybin [Mon, 24 Jul 2017 12:50:26 +0000 (14:50 +0200)]
Render preview: Always make sure all ID datablocks references by objects are in bmain

Otherwise we'll have confused dependency graph builder, which wouldn't be able to
build proper graph.

Didn't find a way to avoid world copy here, we can probably escape with some shallow
copy here, but that will currently complicate code a lot.

Ideas to consider here:

- Use shallow copy of existing world after new ID management API is in place.

  Downside would be thread safety, kind of nice to have everything local.

- Switch depsgraph away from ID_TAG and do hash lookup or so.

  This will slow down depsgraph builder, but will make code more reliable.

4 years agoFix T51948: pen pressure not detected with some Wacom tablets.
James Fulop [Mon, 24 Jul 2017 11:32:16 +0000 (13:32 +0200)]
Fix T51948: pen pressure not detected with some Wacom tablets.

Generalizes current conditions, QT implements it the same way.

4 years agoCorrect invalid assert use
Campbell Barton [Mon, 24 Jul 2017 07:32:09 +0000 (17:32 +1000)]
Correct invalid assert use

4 years agoManipulator: view-selected support
Campbell Barton [Mon, 24 Jul 2017 05:28:14 +0000 (15:28 +1000)]
Manipulator: view-selected support

Only applies to selected manipulators
(currently not used for regular manipulators).

4 years agoManipulator: Expose Context.manipulator_group
Campbell Barton [Sun, 23 Jul 2017 19:19:13 +0000 (05:19 +1000)]
Manipulator: Expose Context.manipulator_group

Needed for operators run by the manipulator keymap
so they can access their selected manipulators.

4 years agoManipulator: handle keymaps for selected items
Campbell Barton [Sun, 23 Jul 2017 17:28:57 +0000 (03:28 +1000)]
Manipulator: handle keymaps for selected items

Was only handling keymap items when the cursor
was hovering over a manipulator.

4 years agoFix Cycles multi scatter GGX different render results with Clang and GCC.
Brecht Van Lommel [Sun, 23 Jul 2017 20:43:55 +0000 (22:43 +0200)]
Fix Cycles multi scatter GGX different render results with Clang and GCC.

The order of evaluation of function arguments is undefined, and the order
was reversed between these compilers. This was causing regressions tests
to give different results between Linux and macOS.

4 years agoManipulator: setup_keymap callback
Campbell Barton [Sun, 23 Jul 2017 17:27:57 +0000 (03:27 +1000)]
Manipulator: setup_keymap callback

Also remove manipulator_group argument, the info's in the class.

4 years agoFix T52152: allow zero roughness for Cycles principled BSDF, don't clamp.
Brecht Van Lommel [Sat, 22 Jul 2017 19:38:44 +0000 (21:38 +0200)]
Fix T52152: allow zero roughness for Cycles principled BSDF, don't clamp.