Commit Graph

58149 Commits

Author SHA1 Message Date
Sergey Sharybin
6208ce2e0a Eevee: Set engine data needs update to false when everything is up to date
Currently this shouldn't cause any differences, but is required for the upcoming
changes in informing draw engines about changes.
2017-11-29 11:01:08 +01:00
Campbell Barton
639d49b01f Merge branch 'master' into blender2.8 2017-11-29 16:15:21 +11:00
Campbell Barton
c17c6557b4 PyAPI: add function to check any mathutils type
Also add CheckExact versions of type checking macros.
2017-11-29 16:13:26 +11:00
Campbell Barton
ddc7e72fe1 RNA: remove paranoid NULL check
Was added as part of D2666.
2017-11-29 14:29:47 +11:00
Campbell Barton
0c8265c0a9 Merge branch 'master' into blender2.8 2017-11-29 14:21:03 +11:00
Campbell Barton
26a64ba23a RNA: sync API changes from 2.8 2017-11-29 14:13:34 +11:00
Julian Eisel
ad625acda8 RNA: Allow structs to define tags for their properties
Adds support for defining a number of tags as part of the rna-struct
definition, which its properties can set similar to property-flags.
BPY supports setting these tags when defining custom properties too.

* To define tags for a struct (which its properties can use then), define the tags in an `EnumPropertyItem` array, and assign them to the struct using `RNA_def_struct_property_tags(...)`.
* To set tags for an RNA-property in C, use the new `RNA_def_property_tags(...)`.
* To set tags for an RNA-property in Python, use the newly added tags parameter. E.g. `bpy.props.FloatProperty(name="Some Float", tags={'SOME_TAG', 'ANOTHER_TAG'})`.
2017-11-29 13:53:34 +11:00
Campbell Barton
f89563a806 Merge branch 'master' into blender2.8 2017-11-29 13:44:59 +11:00
Campbell Barton
0b325ba201 PyAPI: PyC_Err_PrintWithFunc utility function
Move function error printing utility into py_capi_utils.
2017-11-29 13:41:10 +11:00
Dalai Felinto
2f80fbbac3 Depsgraph: Fix Camera object showing when not in view layer
If the Scene->camera was not in the active view layer we would still see it in the viewport.
2017-11-28 17:47:22 -02:00
Clément Foucault
e559a99a04 Eevee: Fix T53413: Crash when using displacement bump relink.
ntree_shader_relink_displacement is creating a transient node that does not have a correct original to point to.
In this case we revert to constant uniform.
2017-11-28 17:22:37 +01:00
Sergey Sharybin
701ebb0a64 Draw manager: Pass explicit context to DEG scene update callback
This way it is more clear what is needed to be passed and what is available
in the callback itself.

Thanks Dalai for review and tips about engine type!
2017-11-28 16:47:03 +01:00
Bastien Montagne
e183372f90 Merge branch 'master' into blender2.8 2017-11-28 16:34:43 +01:00
Bastien Montagne
0c7fbc435f Cleanup (remove commented OMP directive). 2017-11-28 16:31:11 +01:00
Sergey Sharybin
08e7b5d348 Cleanup: naming 2017-11-28 15:08:43 +01:00
Sergey Sharybin
178ea1f798 Cleanup, naming of engine type variable 2017-11-28 15:06:32 +01:00
Sergey Sharybin
9d6bd665e3 Depsgraph: Wrap context used for editors update callback into a structure
This way we can extend it much easier.
2017-11-28 14:24:56 +01:00
Sergey Sharybin
db2a603f6e Depsgraph: Remove workaround for Blender Internal in viewport
This commit effectively reverts fix T45702 done in 067fe2719a.

Reasoning:

- Blender Internal is being replaced with Eevee, and will be removed entirely
  rather soon.

- All render engines are planned to have own depsgraph, so such threading
  conflicts should no longer be an issue.

- We don't want to spend time on porting workarounds for EOL things to a new
  design. Less code -- faster the work :)

- If such notifications will end up needed for some other cases, we would
  need to re-implement this a more proper depsgraph tagging/flushing and make
  it to work with all copy-on-write datablocks and everything.
2017-11-28 14:24:56 +01:00
Sergey Sharybin
86bfce6794 Depsgraph: Don't call DEG ID update functions directly
There might be much more logic involved there, also we might not know proper
evaluated CoW pointer there yet. So we leave this to dependency graph to
decide what exactly to do here.
2017-11-28 14:24:56 +01:00
Bastien Montagne
bf5b931d64 Removing OMP: BKE's tracking_stabilize.
Again, 2 times quicker with BLI than with OMP (from about 5ms to 2.5ms
per frame for the parallelized loop, on a rather small video...).
2017-11-28 12:38:10 +01:00
Campbell Barton
604de7cbe8 Merge branch 'master' into blender2.8 2017-11-28 20:35:24 +11:00
Campbell Barton
7c64e33b01 makesdna/makesrna: silence output by default
No need to print status for basic & reliable operations,
build systems can output operations they run if needed,
or debug output changed in the source if developers are debugging.

Nice for ninja, so any printed text hints at a problem to fix.
2017-11-28 20:27:40 +11:00
Dalai Felinto
91034646c7 Fix T53291: Deleting objects do not delete them from the blend file
User count was wrong for newly created files. We increase/decrease user count
when we link/delete objects from a SceneCollection.

So we don't want to leave user count of 1 after calling BKE_libblock_alloc in
BKE_object_add_only_object().
2017-11-27 14:52:21 -02:00
Brecht Van Lommel
2bf3825711 Fix T53145: bevel tool does not start with amount at zero. 2017-11-27 16:57:14 +01:00
Sergey Sharybin
29044cfb12 Depsgraph: Parameters component does exist in objects 2017-11-27 16:34:44 +01:00
Sergey Sharybin
f046af4d5d Merge branch 'master' into blender2.8 2017-11-27 16:23:32 +01:00
Sergey Sharybin
63bf489734 Cleanup: indentation 2017-11-27 16:22:09 +01:00
Sergey Sharybin
9e658b5ebc Remove workaround for loopcut and DM stability
Neither me nor Campbell could redo the issue, lets get rid of this workaround
and fix it properly if still needed.
2017-11-27 15:52:02 +01:00
Sergey Sharybin
5191104776 Depsgraph: Sanitize placement of component types in switch statement
Makes it more clear why and what is being ignored.
2017-11-27 15:34:36 +01:00
Sergey Sharybin
488b6fa669 Merge branch 'master' into blender2.8 2017-11-27 14:52:31 +01:00
Sergey Sharybin
e3f2b1676c Depsgraph: Make sure unexpected configuration does not happen 2017-11-27 14:51:49 +01:00
Sergey Sharybin
f54e076ae6 Merge branch 'master' into blender2.8 2017-11-27 14:32:19 +01:00
Sergey Sharybin
ef439a1f7e Sequencer: Fix missing FX compositor when starting rendering from frame with DoF disabled 2017-11-27 14:24:16 +01:00
Sergey Sharybin
408515810e Merge branch 'master' into blender2.8 2017-11-27 14:08:35 +01:00
Sergey Sharybin
9b42b3e114 Sequencer: Add option to render OpenGL preview with DoF
The title says it all actually, controlled with DoF check box next to textured
solid check box.

Thanks Campbell for review!
2017-11-27 12:21:21 +01:00
Sergey Sharybin
37fc23dd9e Refactor view3d offscreen drawing to avoid having multiple boolean arguments
This is fully unreadable to have lots of boolean arguments scattered across the
whole argument list. What does `false, true, true` mean in terms of behavior?

Replace those with bitfield which has advantage of having more human readable
meaning.
2017-11-27 12:11:56 +01:00
Sergey Sharybin
ff9cf06645 Tracking: Cleanup. make code friendly for multi-column editing 2017-11-27 08:50:01 +01:00
Campbell Barton
3bd6c8bfa2 WM: don't change selection on workspace append 2017-11-27 18:40:09 +11:00
Campbell Barton
d4161845b2 Tool System: show manipulators at startup
Support duplicating, switching workspaces too.
2017-11-27 18:36:54 +11:00
Campbell Barton
ee99d1453a Fix crash duplicating workspace 2017-11-27 17:24:26 +11:00
Campbell Barton
885e73d387 Manipulator: ignore depth-buffer for scale cage 2017-11-27 15:51:18 +11:00
Campbell Barton
7b8e89f297 Cleanup: incorrect comment 2017-11-27 15:15:56 +11:00
Campbell Barton
46d9c5de84 WM: handle widgets before tool keymaps
Allows adjusting on-screen widgets even when a tool is selected.
2017-11-27 15:10:33 +11:00
Bastien Montagne
de09366d57 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/mask/mask_draw.c
2017-11-26 20:29:56 +01:00
Bastien Montagne
440aa2bf70 Cleanup: ImageEditor's mask drawing code was re-implementing BKE_maskrasterize_buffer!
So this deduplicates and simplifies code, yeah.

Also, as an odd bonus, new code seems slighly quicker than previous one
(about 5 to 10% quicker).
2017-11-26 19:18:12 +01:00
Bastien Montagne
06e64058dd Removing OMP: BKE's mask_rasterize.c
Once again nothing much to say here, except that whole mask rendering
process from VSE is about 25% quicker now. ;)
2017-11-26 19:06:26 +01:00
Bastien Montagne
440a49a24c Removing OMP: autotrack BKE code.
Pretty straightforward this time, we already have a single struct
pointer containing all needed data (or nearly).

And we gain about 10-15% speed on tracking! :)
2017-11-26 17:25:41 +01:00
Bastien Montagne
f1ce279903 Removing OMP: bmesh_operators.c
Two more 'not really useful' cases (OMP only shows some noticeable
speedup with above 1M elements, and since this is quick operation anyway
compared to even ather basic operators, gain is in the 1% area of total
processing time in best case).

So not worth parallelizing here, we'll gain much more on tackling heavy
operations. ;)

And BMesh is free from OMP now!
2017-11-26 16:03:29 +01:00
Bastien Montagne
2b6f345558 Removing OMP: bmesh_interp.c
Performances tests on this one are quite surprising actually...
Parallelized loop itself is at least 10 times quicker with new BLI_task
code than it was with OMP. And subdividing e.g. a heavy mesh with 3
levels of multires (whole process) takes 8 seconds with new code, while
10 seconds with OMP one. And cherry on top, BLI_task code only uses
about 50% of CPU load, while OMP one was at nearly 100%!

In fact, I suspect OMP code was not properly declaring outside vars,
generating a lot of uneeded locks.

Also, raised the minimum level of subdiv to enable parallelization,
tests here showed that we only start to get significant gain with subdiv
levels of 4, below single threaded one is quicker.
2017-11-26 16:03:29 +01:00
Bastien Montagne
099bda8875 Removing OMP: nuke last usages in bmesh_mesh.c
Those three ones were actually giving no significant benefits, in fact
even slowing things down in one case compared to no parallelization at
all (in `BM_mesh_elem_table_ensure()`).

Point being, once more, parallelizing *very* small tasks (like index or
flag setting, etc.) is nearly never worth it.

Also note that we could not easlily use per-item parallel looping in
those three cases, since they are heavily relying on valid
loop-generated index (or are doing non-threadable things like allocation
from a mempool)...
2017-11-26 16:03:29 +01:00