Commit Graph

75472 Commits

Author SHA1 Message Date
Sergey Sharybin
b7fbe6ae5d 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.
2017-07-24 15:00:44 +02:00
Sergey Sharybin
bbb1c0a077 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.
2017-07-24 14:50:26 +02:00
Campbell Barton
f65a8bbdb7 Correct invalid assert use 2017-07-24 17:32:28 +10:00
Campbell Barton
4fd3582b32 Manipulator: view-selected support
Only applies to selected manipulators
(currently not used for regular manipulators).
2017-07-24 17:26:02 +10:00
Campbell Barton
d53028b450 Manipulator: Expose Context.manipulator_group
Needed for operators run by the manipulator keymap
so they can access their selected manipulators.
2017-07-24 17:21:09 +10:00
Campbell Barton
c7bc2f5e87 Manipulator: handle keymaps for selected items
Was only handling keymap items when the cursor
was hovering over a manipulator.
2017-07-24 17:19:36 +10:00
Campbell Barton
392b6a303e Manipulator: setup_keymap callback
Also remove manipulator_group argument, the info's in the class.
2017-07-24 03:27:57 +10:00
Campbell Barton
9a5d06cdd5 Manipulator: use select keymap when enabled 2017-07-23 02:45:41 +10:00
Aaron Carlisle
3aeabe3afa Merge branch 'master' into blender2.8 2017-07-21 18:28:32 -04:00
mano-wii
a27b6ae4a9 Transform: remove unused argument 2017-07-21 18:04:05 -03:00
mano-wii
64fd45b1df Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/editors/transform/transform_snap_object.c
2017-07-21 14:20:24 -03:00
mano-wii
34f0250f32 Another solution to bug T38358 and related
Moving the ray_start_local to the new position does not lose as much precision as moving the ray_org_local to the corresponding position.

The problem of inaccuracy is within the functions: `bvhtree_ray_cast_data_precalc` and` fast_ray_nearest_hit`. And not directly in the values of the rays.
2017-07-21 14:02:16 -03:00
Campbell Barton
122706db9c Fix manipulator handles getting added each refresh
The same manipulator map handler would accumulate,
slowing down interactions.
2017-07-22 01:57:23 +10:00
Sergey Sharybin
ac0da72a60 Fix compilation error with Collada enabled 2017-07-21 17:44:11 +02:00
Sergey Sharybin
911f239d09 Merge branch 'master' into blender2.8 2017-07-21 16:08:31 +02:00
Sergey Sharybin
11204fce4e Fix strict compiler warning in BGE when linking directly to SDL 2017-07-21 16:07:59 +02:00
Sergey Sharybin
5605c26fcd Fix function declaration of some modifiers
Those functions did not use evaluation context.

Also fixed lots of unused variables warnings caused by commented out code which
needs to be ported away from DerivedMesh and to evaluation context.
2017-07-21 15:54:42 +02:00
Sergey Sharybin
cd301bf654 Depsgraph: Cleanup, remove unused function argument 2017-07-21 15:37:51 +02:00
Sergey Sharybin
9c2f55baa1 Fix compilation error with smoke and rigid body disabled 2017-07-21 15:36:59 +02:00
Luca Rood
1c4c288727 Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
Sergey Sharybin
9edb7e49d7 Depsgraph: Fix missing material update when changing links in node tree 2017-07-21 14:20:30 +02:00
Sergey Sharybin
4e28d88ece Fix T51724: Blender 2.80 EEVEE, Cycles, Clay Black Wall Graphical Glitch 2017-07-21 12:08:25 +02:00
Sergey Sharybin
9fbef5d5d5 Merge branch 'master' into blender2.8 2017-07-21 11:18:02 +02:00
Sergey Sharybin
4d67034076 Fix T52134: New depsgraph crashes when evaluating several psys on from object 2017-07-21 11:12:34 +02:00
Sergey Sharybin
2200e5a280 Fix strict compiler error after recent UI changes 2017-07-21 10:52:36 +02:00
Bastien Montagne
8b17ec0c00 Fix T52136: Blender segfault (stack overflow most certainly) when converting to mesh.
Stupid mistake in own recent refactor.
2017-07-21 10:24:20 +02:00
Bastien Montagne
dc6fcb8ecf UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues.
The way we use it, UI_PRECISION_FLOAT_MAX is actually + 1 to get total
number of digits, and float only has 7 meaningful digits, so that define
shall be at 6.
2017-07-21 10:12:35 +02:00
Campbell Barton
c425653f16 Set face-map to active when selecting
It was annoying have to use select operator to know which facemap
applies to the active face. This behavior follows materials.
2017-07-21 15:50:58 +10:00
Brecht Van Lommel
db8bc1d982 Fix a few harmless maybe uninitialized warnings with GCC 5.4.
GCC seems to detect uninitialized into function calls now, but then isn't
always smart enough to see that it is actually initialized. Disabling this
warning entirely seems a bit too much, so initialize a bit more now.
2017-07-21 00:54:58 +02:00
Brecht Van Lommel
0d4fd7528f Fix T46560: 2D paint smear and soften brushes not working with alpha.
Interpolate rather than do alpha over mix, matching projection paint.
2017-07-21 00:47:43 +02:00
Sergey Sharybin
3ededb19d8 Depsgraph: Fix crash when updating materials with copy on write enabled
The code was freeing GPU materials from non-main thread.
2017-07-20 17:48:36 +02:00
Sergey Sharybin
dfcb568c16 Fix T51925: Eevee: Animated Eevee values slowdown
Move material update from RNA callback to dependency graph.
2017-07-20 17:48:36 +02:00
Campbell Barton
177a8f6dab Manipulator: add access to manipulator's group 2017-07-21 00:51:03 +10:00
Campbell Barton
6b0d4302be PyAPI: use instancing when supported
This means when a new data-type is returned it will use the same
instance as the previously created one (if it exists).
2017-07-21 00:50:18 +10:00
Sergey Sharybin
57ee488404 Partially revert previous commit, some unwanted changes sneaked in 2017-07-20 16:15:13 +02:00
Sergey Sharybin
21f27692da Depsgraph: Use explicit material update operation code
Avoids string comparison on key matching.
2017-07-20 16:03:04 +02:00
Sergey Sharybin
83b0bf9166 Depsgraph: Solve TODO about more granular particle settings update tagging 2017-07-20 15:38:48 +02:00
Sergey Sharybin
905366ca7e Fix/workaround T52127: Combed hair from 2.78 not showing when appending
Quick solution to prevent particle components from being tagged for complete
re-evaluaiton.
2017-07-20 15:16:57 +02:00
Sergey Sharybin
84a87bf45a Depsgraph: Fix crashes when OCIO configuration is missing
We were creating copy on write version of scene prior to validating color management
settings for the original scene.
2017-07-20 15:00:09 +02:00
Sergey Sharybin
b7d0cfaa60 Depsgraph: Fix missing UV layers with copy on write enabled 2017-07-20 14:29:13 +02:00
Sergey Sharybin
00ddbd5848 Depsgraph: Fix crash with copy on write when scene has legacy bases
The remapping code was creating plkaceholders for objects coming from legacy
bases, but since those objects were never created by dependency graph (since
they are supposed to be ignored) the copy on write relations creation was
confused.

Now we do some special trickery to clear legacy bases on copy on write.
2017-07-20 13:27:34 +02:00
Sergey Sharybin
f42bb9d278 Depsgraph: Ignore groups from copy on write expansion
Groups will not have IDs in the dependency graph, so we shouldn't
create them for CoW as well.
2017-07-20 13:27:34 +02:00
Campbell Barton
f5f34a9aa6 RNA: face-map access
Currently RNA doesn't give us a good way of accessing singleton layers,
for now expose as a layer list (skin & paint-pask do this too).

Noted in T47811 that this should be changed.
2017-07-20 19:52:26 +10:00
Campbell Barton
819f3b37da BMesh face map layer access 2017-07-20 19:52:26 +10:00
Sergey Sharybin
0e2f8ed8a6 Depsgraph: Move strict checks under ifdef blocks
Those checks are not always helpful, since id remapping doesn't want to
worry about which components to tag for update. Perhaps in the future we
will introduce special flag which would mean "tag everything possible"/
2017-07-20 09:44:09 +02:00
Julian Eisel
827dc700ba Fix T51969: Filebrowser "Open File" button disappear when double-click thumbnail
This reverts commit 82ba89b042 (which caused T51969) and adds an
alternative fix (don't unset area stored in modal handler for fileselect
handlers).
2017-07-19 21:46:30 +02:00
Campbell Barton
adc43ff43f Merge branch 'master' into blender2.8 2017-07-20 03:53:44 +10:00
Campbell Barton
6e90294e08 Fix topology mirror ignoring center verts
Caused select-mirror to fail with edges & faces.
2017-07-20 03:52:53 +10:00
Clément Foucault
7fd4ad448c Clay Engine: Fix blue noise warning when compiling without clay. 2017-07-19 18:17:56 +02:00
Clément Foucault
02e318e8b9 Eevee: Fix crash when using lamps in dupli groups. 2017-07-19 18:17:56 +02:00