Commit Graph

74 Commits

Author SHA1 Message Date
Sybren A. Stüvel
1b272a649b Cleanup: Blenkernel, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Jacques Lucke
750899fd31 Simulation: improve depsgraph integration
A simulation data block has an embedded node tree, which requires
special handling in a couple of places. Some of those places were
missing beforehand.

This also adds a relation to make sure that the simulation is evaluated
after animations on the embedded node tree are evaluated.
2020-07-22 19:16:33 +02:00
Bastien Montagne
13e17cbd47 Cleanup: remove unused includes from lib_query.c 2020-05-26 12:33:28 +02:00
Bastien Montagne
13b10ab852 Fix/refactor foreach_id handling of animdata.
Now callbacks for animdata, nla strip and fcurve are in their own proper
BKE files (mimicking `foreach_id` callback of `IDTypeInfo`).

This commit also fixes some missing handling of ID pointers (text ID and
IDProperties of script fcurve modifier...).
2020-05-26 12:33:28 +02:00
Bastien Montagne
b01d2ea72a Libquery: Refactor: add bmain to data passed to callback.
No reason to enforce defining own callback user data for something that
controlling has already available...
2020-05-25 15:28:15 +02:00
Bastien Montagne
70c483e7db libquery: Cleanup: finish refactor by removing no more used code. 2020-05-21 19:37:57 +02:00
Bastien Montagne
3cb6efd3ab Libquery refactor: Cleanup (remove no more used macros). 2020-05-21 19:36:05 +02:00
Bastien Montagne
1f6ef73f98 Refactor: Move scene foreach_id to new IDTypeInfo structure. 2020-05-21 19:29:55 +02:00
Bastien Montagne
c732edbaa4 Refactor: Move object foreach_id to new IDTypeInfo structure. 2020-05-21 19:09:48 +02:00
Bastien Montagne
b9aa2acecd Refactor: Move collection foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:47 +02:00
Bastien Montagne
e2b87aabb6 Cleanup collection handling in lib_query code.
Now we do not need anymore that extra function...
2020-05-20 18:43:47 +02:00
Bastien Montagne
1c79484d53 Libquery: refactor: handle scene's master collection like any othe embedded ID. 2020-05-20 18:43:46 +02:00
Bastien Montagne
3a284a37fd Refactor: Move simulation foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
Bastien Montagne
ee44283393 Refactor: Move pointcloud and volume foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
Bastien Montagne
4d613018ee Refactor: Move hair foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
Bastien Montagne
140935ee7e Refactor: Move grease pencil foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
Bastien Montagne
06c57d3e7a Refactor: Move workspace foreach_id to new IDTypeInfo structure. 2020-05-18 19:01:20 +02:00
Bastien Montagne
8f10f9d5dc Refactor: Move WindowManager and Screen foreach_id to new IDTypeInfo structure.
That one was a bit more complicated, and is still only partial refactor
(ultimately we want to have a foreach_id callback in SpaceType itself I
think...).
2020-05-18 18:51:06 +02:00
Bastien Montagne
ae97a7ac10 Refactor: Move action foreach_id to new IDTypeInfo structure. 2020-05-18 18:43:11 +02:00
Bastien Montagne
a8fc3c88ef Refactor: Move linestyle foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
Bastien Montagne
7ff933089a Refactor: Move mask foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
Bastien Montagne
c44d6fb987 Refactor: Move movieclip foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
Bastien Montagne
0055aa994d Refactor: Move particle foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
Bastien Montagne
4da3044abc Refactor: Move brush foreach_id to new IDTypeInfo structure. 2020-05-13 19:52:19 +02:00
Bastien Montagne
e4890fa564 Refactor: Move lightprobe foreach_id to new IDTypeInfo structure. 2020-05-13 19:39:47 +02:00
Bastien Montagne
58cc5c8573 Refactor: Move speaker foreach_id to new IDTypeInfo structure. 2020-05-13 19:30:04 +02:00
Bastien Montagne
3a896bb373 Refactor: Move world foreach_id to new IDTypeInfo structure. 2020-05-13 19:22:46 +02:00
Bastien Montagne
73f38f8db0 Refactor: Move shapekey foreach_id to new IDTypeInfo structure. 2020-05-13 19:08:54 +02:00
Bastien Montagne
9ac5413ac0 Refactor: Move camera foreach_id to new IDTypeInfo structure. 2020-05-13 19:01:20 +02:00
Bastien Montagne
13d0f74b80 Refactor: Move lamp foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Bastien Montagne
8ce0c9111d Refactor: Move texture foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Bastien Montagne
5fd64c014f Refactor: Move armature foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Bastien Montagne
9996688b71 Refactor: Move library foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Bastien Montagne
70b73732fe Refactor: Move lattice foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Bastien Montagne
b1b93c2ef1 Refactor: Move metaball foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Bastien Montagne
ef6610dec5 Refactor: Move Curve foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
Antonio Vazquez
a2f4d7b8a3 GPencil: Refactor - Rename modifier and shder functions
This change is to align names with changes in T76498
2020-05-08 10:34:42 +02:00
Antonio Vazquez
2bb9a465e6 Fix T76498: Refactoring - Rename BKE modifiers funtions 2020-05-08 10:34:35 +02:00
Bastien Montagne
b09189500d Refactor: libquery: Add NodeTree foreach_id support. 2020-05-07 16:54:32 +02:00
Bastien Montagne
95f8f321b6 Refactor: libquery: Add Material foreach_id support. 2020-05-07 16:49:11 +02:00
Bastien Montagne
339c3e3473 Fix (unreported) mistake in argument passing.
passing the address of the pointer instead of the pointer itself...
2020-05-07 16:49:11 +02:00
Bastien Montagne
cb8a197bc7 Refactor: libquery: Add Mesh foreach_id support. 2020-05-07 16:49:11 +02:00
Bastien Montagne
e39878b90e Initial step to move libquery to IDTypeInfo.
Part of T74960 (and hence T75724).

This commit only adds the basics helper code, and alter some internal libquery
code to use it.

Porting each IDType to the new system will be done gradually from there,
to allow better detection and handling of potential issues.

Differential Revision: https://developer.blender.org/D7598
2020-05-07 16:49:11 +02:00
Sybren A. Stüvel
aa72e3abf9 Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.c
All the driver-specific code in `fcurve.c` has been moved into a new file
`fcurve_driver.c`. The corresponding declarations have been moved from
`BKE_fcurve.h` to `BKE_fcurve_driver.h`.

All the `#include "BKE_fcurve.h"` statements have been investigated and
replaced with `BKE_fcurve_driver.h` where necessary.

No functional changes.
2020-05-01 13:08:22 +02:00
Bastien Montagne
4612ca3ede Cleanup: simplify a bit libquery code. 2020-04-30 18:01:47 +02:00
Bastien Montagne
cedf9f5cb7 Fix/cleanup: lib_query: missing case handling of new ID_SIM type.
Also update comments.
2020-04-29 11:05:45 +02:00
Bastien Montagne
9a9ecad65f Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
2020-04-29 10:57:47 +02:00
Bastien Montagne
afeddd42e6 Cleanup: use LISTBASE_FOREACH iterator everywhere possible in libquery.
Done also in 2.83 release branch to avoid too much conflicts on merging
(some of those were already done for nodes in master, and gave me
conflicts yesterday...).
2020-04-29 10:53:34 +02:00
Bastien Montagne
6278b48ea1 Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2020-04-28 15:40:12 +02:00
Bastien Montagne
9f090bac5c IDProperties: add a foreach looper and use it in libquery code.
Note: part of fix for T75279.

Differential Revision: https://developer.blender.org/D7550
2020-04-28 15:25:19 +02:00