Commit Graph

75472 Commits

Author SHA1 Message Date
Sergey Sharybin
dbde3c78f8 Cleanup: Make object_handle_update easier to follow 2017-11-29 16:12:39 +01:00
Sergey Sharybin
aa2ecbf35b Merge branch 'master' into blender2.8 2017-11-29 16:01:07 +01:00
Sergey Sharybin
1f9387ef91 Cleanup: Remove unused function 2017-11-29 15:59:51 +01:00
Sergey Sharybin
aad711d064 Merge branch 'master' into blender2.8 2017-11-29 15:47:00 +01:00
Clément Foucault
a02cbb3c3a Eevee: Fix default shader. 2017-11-29 16:02:51 +01:00
Sergey Sharybin
60703e45f3 Transform: Avoid use of ob->recalc in snapping code
Do a direct update of object transform instead, without involving
manual trickery of recalc flag.

Shouldn't be functional changes as far as artists are concerned,
but will allow us to get rid of recalc flags in 2.8.

Thanks Bastien for review!
2017-11-29 15:37:09 +01:00
Sergey Sharybin
c8b1a83a8c Depsgraph: Fix assert failure 2017-11-29 14:58:37 +01:00
Sergey Sharybin
04715b4a76 Draw manager: Cleanup, use lower case prefix for private functions 2017-11-29 12:49:15 +01:00
Sergey Sharybin
28a5e2437c External engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:30:55 +01:00
Sergey Sharybin
5fb2f92dcf Eevee engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:28:40 +01:00
Sergey Sharybin
5a814e83e8 Clay engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:26:59 +01:00
Sergey Sharybin
cdaa56ba0d Basic engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:24:36 +01:00
Sergey Sharybin
ffbc3a0f2a Eevee: Cleanup, avoid unneeded goto
Ideally this also should be split into smaller functions, but will leave that
for later a bit.
2017-11-29 12:19:57 +01:00
Sergey Sharybin
f6afdd576e Eevee: Cleanup, split long probe refresh function
There is no reason to have such a long function, it is really easy to break it
down into a smaller ones, and call them from where needed. Makes them smaller
and easier to follow. Also avoids use of confusing goto's.
2017-11-29 12:15:22 +01:00
Sergey Sharybin
e168e0f46f Eevee: Cleanup, avoid too much nested indentation
Just do early `continue`, makes code easier to follow than fewzillion of nested
checks and loops and everything.
2017-11-29 12:00:03 +01:00
Campbell Barton
28048f75ce Merge branch 'master' into blender2.8 2017-11-29 21:32:16 +11:00
Campbell Barton
e32cfb0743 Cleanup: rename bpy_util -> bpy_capi_utils
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
2017-11-29 21:11:29 +11:00
Sergey Sharybin
69d33ecdec Eevee: Stop depsgraph update callback form allocating unneeded memory 2017-11-29 11:07:52 +01:00
Sergey Sharybin
dc4c9de91a Draw manager: Cleanup, naming
Similar to previous commit in Eevee.
2017-11-29 11:01:08 +01:00
Sergey Sharybin
6b9999e3fc Eevee: Cleanup, naming
For functions which will allocate requested data if it does not exist yet
"_ensure" is to be used instead of "_get". "_get" functions should return
NULL in cases when requested data does not exist yet.
2017-11-29 11:01:08 +01:00
Sergey Sharybin
73aac1b919 Draw manager: Cleanup, indentation in preprocessor 2017-11-29 11:01:08 +01:00
Sergey Sharybin
3478d66b28 Depsgraph: Remove object-specific flag which was storing update tag
There were following issues:

- This was used in a similar way of DEG's ID update callback. No reason to have
  yet-another-way of informing editors/engines about changes. Better to keep
  regular update mechanism usable and fast for those needs.
- It wasn't granular at all, and granularity in flags is something what we
  need to support anyway, even for existing ID update.
- There is no reason to have it per-object. Depsgraph operates on IDs.
- It wasn't clear when and who clears the flag, and was possible to run into
  conflicts.
2017-11-29 11:01:08 +01:00
Sergey Sharybin
a6b6689c0a Draw manager: Listen to depsgraph's ID update callbacks
This replaces dedicated flag which wasn't clean who sets it and who clears it,
and which was also trying to re-implement existing functionality in a way.

Flushing is not currently very efficient but there are ways to speed this up
a lot, but needs more investigation.
2017-11-29 11:01:08 +01:00
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