1
1

Compare commits

...

240 Commits

Author SHA1 Message Date
172aa404d8 Merge branch 'blender2.8' into id_override_static 2017-11-29 17:45:14 +01:00
62d5a0353d Merge branch 'blender2.8' into id_override_static 2017-11-29 17:23:12 +01:00
e7a364ba8f ID static override: add basic support for overriding animation.
This is very bold right now - you simply can replace (or add) an action
to an override data-block. Actions themselves are not 'customizable'
through override at all currently (we may at least add
'add/remove/replace fcurves' feature in future), and nothing else in
animdata is overridable currently.
2017-11-29 17:20:00 +01:00
0b963b784a Make basic object & bones transformations overridable.
You can now override loc/rot/scale of objects and posebones.

Also added a basic operator to make an override of active linked object,
but this is very limited/wip/testing feature (you have to manually override
object and its armature, and relink to proper local overrides
yourself...). Final 'make proxy killer' will be much more automated of
course.
2017-11-29 17:14:27 +01:00
8a4155eb34 ID static override: Make most Image properties overridable.
First real 'usable' commit, will be needed by the 'virtual data-block'
asset feature (i.e. to be able to link a mere image file as if it was a
linked datablock, and generate automatically an override of it to make
it editable).
2017-11-29 17:10:24 +01:00
322433f18f ID static override: automatically detect new overrides as part of undo step.
We could do that in several different way, e.g. adding some tag during
DEG evaluation, etc. But this is not a critical process (it's main
purpose is user feedback), so current solution seems to work well enough
- and it's dead simple! ;)
2017-11-29 17:06:28 +01:00
e79d9048f3 ID Static Override: add basic generic UI tools to control override of properties. 2017-11-29 17:03:52 +01:00
fc6a116f83 ID Static Override: add basic UI feedback.
For now, using a new color for overridden properties (similar to
animated/driven status), UI team will need to work on a better solution
maybe...
2017-11-29 15:47:37 +01:00
00a6ce878d ID Static Override, part II: RNA changes.
This is essentially a huge refactor/extension of our existing RNA
compare & copy code, since static override needs more advanced handling here.

Note that not all new features are implemented yet, advanced things like
collections insertion/deletion are still TODO (medium priority).

This completes the ground work for overrides, remaining commits will be
about UI and some basic/testing activation of overrides for a limited
set of data-blocks & properties.

For details see https://developer.blender.org/D2417
2017-11-29 15:31:31 +01:00
adc165e651 Define RNA_STACK_ARRAY (usable everywhere in RNA), and make PYRNA_STACK_ARRAY use it. 2017-11-29 15:16:12 +01:00
0b6ff084a9 Merge branch 'blender2.8' into id_override_static
Conflicts:
	source/blender/blenkernel/intern/library_override.c
2017-11-29 15:09:22 +01:00
850a193f64 Merge ID static override, part I: core changes in DNA, BKE and .blend read/write.
See https://developer.blender.org/D2417 for details.

Note that since static overrides rely heavily on RNA, this commit is
essentially invisible from user PoV, more in next commits.
2017-11-29 15:05:03 +01:00
79324d3ca8 Merge branch 'blender2.8' into id_override_static 2017-11-29 13:19:25 +01:00
65fab5b17f Preparing merge of id_override_static: add BKE_id_swap().
This function swaps the memory content of two data-blocks (of same type
obviously), while preserving most of the ID 'header' itself.

It is intended to be used to quickly and easily replace the data of an
existing ID by another one, presumably a temporary 'working' one,
without having to suffer from things like name changes,
registering/removing from Main database, etc.
2017-11-29 13:14:59 +01:00
7051746a6b Merge branch 'blender2.8' into id_override_static 2017-11-29 12:45:41 +01:00
88ed3e37de Rename 'override' to 'override_static' (and similar).
Initially there was hope at least part of this work could be used for
dynamic overrides as well... but looks like not, so better be specific
and avoid any confusion.

PS: this commit break any file saved with static overrides, should not
be an issue though.
2017-11-29 12:40:18 +01:00
61a7f8b015 Address review points (mainly some missing usages of RNA_STACK_ARRAY). 2017-11-28 17:28:42 +01:00
dd4d5e42b0 Merge branch 'blender2.8' into id_override_static 2017-11-28 16:42:30 +01:00
140f7ac389 Cleanup: remove timer-like check for auto-ID-override generation. 2017-11-24 17:10:30 +01:00
5d0deaeb8b Merge branch 'blender2.8' into id_override_static 2017-11-24 17:07:21 +01:00
4f79d68c03 Remove override update from DEG, simply do it on undo push. 2017-11-24 16:57:58 +01:00
4a71ca6351 Merge branch 'blender2.8' into id_override_static 2017-11-24 11:55:44 +01:00
c9b4094808 Address points from initial review. 2017-11-23 23:33:29 +01:00
4ee4eed9e9 Merge branch 'blender2.8' into id_override_static 2017-11-23 22:18:46 +01:00
62aa672d63 Merge branch 'blender2.8' into id_override_static 2017-11-21 12:04:42 +01:00
b780c86a33 Hide override timing stuff behind some debug define. 2017-11-16 16:08:24 +01:00
3c905e49fd Merge branch 'blender2.8' into id_override_static 2017-11-16 13:05:42 +01:00
bc5381f154 Some cleanup/renaming, and move 'self remapping' into new id_swap function.
I can't think of any case where we would swap content of two IDs while
wanting to keep old 'self' ID pointers after the swap!
2017-11-16 12:29:25 +01:00
72346e6114 Rename destination and source parameters in override_apply.
local and reference are awfully confusing names here, since destination
is a copy of reference that will become local override once applied, and
source is .blend-file-written version of local override...
2017-11-16 10:24:03 +01:00
61ca31f28b Add custom override_apply func for animdata.
This makes creating animation in overridden ID working, at least in the
most basic case...
2017-11-16 10:10:33 +01:00
4c8bcb3a8d Merge branch 'blender2.8' into id_override_static 2017-11-15 10:51:49 +01:00
7e909a564f Heavy refactor of new RNA override/comparison code.
Main reason here is to make comparison/override_diff/override_store/override_apply
customizable per RNA property if needed.

This should allow us especially to get advanced behavior on case-by-case
basis, when dealing with Pointer and Collection properties mostly.

Note that IDProps remain fuzzy area for now, a big part of the code
tries to take them into account, but it's most likely still missing some
bits, and definitively not tested at all yet!
2017-11-14 22:31:55 +01:00
dfb541342b Some cleanup, fix auto-override handling in NULL pointer case.
Also, attempt to enable animation override, not yet working though think
we need some re-design of how override is handled per-property type...
2017-11-13 18:05:48 +01:00
f7a7c8d950 Merge branch 'blender2.8' into id_override_static 2017-11-13 17:44:45 +01:00
80904de485 Cleanup while attempting to fix auto-override detection in DEG.
Not sure why that piece of code stopped working, but now this operation
is pretty much never evaluated... Will have to either dig deeper in DEG
or ask Sergey about it, but not a crucial issue for now.
2017-11-10 17:16:29 +01:00
560097b499 Auto-override detection: ignore animated properties.
Animation is by definition another kind of (dynamic) override of properties,
which supersedes static override.

Note that this could be debated in some corner cases ('differential'
animation, like dloc/drot/dscale), but think we can ignore that for now,
and expect user to handle those manually when needed.
2017-11-10 17:16:09 +01:00
7a609a16eb Merge branch 'blender2.8' into id_override_static
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
2017-11-10 10:40:12 +01:00
0a15b7da92 Merge branch 'blender2.8' into id_override_static 2017-11-07 15:40:48 +01:00
731e848cff Merge blender2.8 branch.
Means that from now on, we work based on blender2.8, no more master!

Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/editors/interface/interface_ops.c
	source/blender/makesdna/DNA_ID.h
	source/blender/makesrna/intern/rna_ID.c
2017-11-07 15:17:59 +01:00
d60a1c3095 Merge branch 'master' into id_override_static
Conflicts:
	source/blender/makesrna/intern/rna_access.c
2017-11-06 20:18:58 +01:00
0dce80ad43 Merge branch 'master' into id_override_static
Conflicts:
	source/blender/editors/interface/interface_handlers.c
2017-11-06 16:08:23 +01:00
e47a2a8d75 Merge branch 'master' into id_override_static 2017-10-31 17:16:17 +01:00
c01cf979e0 Fix issues from recent UI API changes in master. 2017-10-31 17:07:24 +01:00
0dd184550f Merge branch 'master' into id_override_static 2017-10-31 16:58:56 +01:00
dd2b82e90f Merge branch 'master' into id_override_static 2017-10-30 13:41:53 +01:00
6016c7ab58 Merge branch 'master' into id_override_static 2017-10-27 12:10:24 +02:00
59f0ca9adf Merge branch 'master' into id_override_static 2017-10-23 10:26:11 +02:00
7376ebf678 Merge branch 'master' into id_override_static 2017-10-19 15:02:27 +02:00
f97ba5cd3a Merge branch 'master' into id_override_static 2017-10-17 09:39:51 +02:00
5f2707075f Merge branch 'master' into id_override_static 2017-10-14 15:24:41 +02:00
b884046e2a Merge branch 'master' into id_override_static 2017-10-10 20:21:32 +02:00
063ddf5958 Merge branch 'master' into id_override_static 2017-10-08 16:16:02 +02:00
05bfb8b905 Merge branch 'master' into id_override_static 2017-10-06 11:49:12 +02:00
942353d8b0 Add needed option to handle or not override's reference pointer when remapping.
There are cases where we'll want to also override the reference pointer
(when we actually switch that datablock itself), but in some specific
situations, like when creating a new override, we need to keep org
pointer here!
2017-10-04 22:01:30 +02:00
ff6caedb47 Merge branch 'master' into id_override_static 2017-10-04 21:00:44 +02:00
8327eb99e0 Merge branch 'master' into id_override_static 2017-10-04 17:13:48 +02:00
c1191102bc Merge branch 'master' into id_override_static 2017-10-03 12:33:06 +02:00
551ed636a6 Merge branch 'master' into id_override_static 2017-10-03 12:19:04 +02:00
4b2d0faedd Merge branch 'master' into id_override_static 2017-09-25 10:02:45 +02:00
dd5d8b050b Merge branch 'master' into id_override_static 2017-09-21 12:11:57 +02:00
d83bdbac2d Merge branch 'master' into id_override_static 2017-09-11 12:55:05 +02:00
9e394424c1 Merge branch 'master' into id_override_static 2017-09-08 14:19:16 +02:00
ca68eeab6c Merge branch 'master' into id_override_static 2017-09-05 10:07:07 +02:00
c493ab5ed8 Merge branch 'master' into id_override_static 2017-08-23 16:43:47 +02:00
f6f5474deb Merge branch 'master' into id_override_static 2017-08-21 14:41:22 +02:00
1ec38f8ac9 Merge branch 'master' into id_override_static 2017-08-16 11:51:01 +02:00
3f9bea4f0f Merge branch 'master' into id_override_static 2017-08-10 16:07:23 +02:00
1126b83c9b Merge branch 'id_copy_refactor' into id_override_static 2017-08-10 15:46:40 +02:00
496b510438 Merge branch 'master' into id_copy_refactor
Conflicts:
	source/blender/blenkernel/BKE_sequencer.h
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/sequencer.c
	source/blender/editors/space_sequencer/sequencer_edit.c
2017-08-10 15:43:52 +02:00
c116bb0c7f Merge branch 'master' into id_copy_refactor 2017-08-07 16:06:39 +02:00
881ee4fb26 Merge branch 'master' into id_copy_refactor 2017-08-07 12:52:25 +02:00
7db3994c4b Merge branch 'id_copy_refactor' into id_override_static 2017-07-20 12:50:49 +02:00
b54335b273 Merge branch 'master' into id_copy_refactor 2017-07-20 12:31:35 +02:00
c6bda91482 Add more BKE generic way to create an override, make Image mostly overridable, fix a bug in RNA. 2017-07-18 12:08:09 +02:00
238187e640 Merge branch 'id_copy_refactor' into id_override_static 2017-07-18 11:08:30 +02:00
2f2b3149ee Merge branch 'master' into id_copy_refactor 2017-07-18 11:08:03 +02:00
52c4d51fca Merge branch 'master' into id_override_static 2017-07-18 11:07:50 +02:00
24b1371b36 Merge branch 'id_copy_refactor' into id_override_static
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenloader/intern/writefile.c
2017-07-17 15:21:57 +02:00
a8e4aae091 Extend a bit 'NO_MAIN'/'NO_USER_REFCOUNT'/etc. flags to ID allocation itself.
No real reason we keep this only to copying, creating ID outside of
database is handy as well!

Also, add helpers to add/remove an ID from Main, and to set/clear its
'user refcounting' status. Those will be useful in future complex ID
manipulation cases (like static override...).
2017-07-17 15:16:41 +02:00
a70e941fd0 Some cosmetic renaming. 2017-07-17 14:00:06 +02:00
2a992c2464 Merge branch 'master' into id_copy_refactor 2017-07-17 13:50:53 +02:00
0c30245b01 Merge branch 'master' into id_override_static 2017-07-17 13:24:59 +02:00
a721ee8835 Merge branch 'id_copy_refactor' into id_override_static
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenloader/intern/writefile.c
2017-07-17 12:35:10 +02:00
377ab54dad Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenkernel/BKE_library.h
2017-07-17 12:17:21 +02:00
f9904b05cc Merge branch 'master' into id_copy_refactor 2017-07-17 11:48:50 +02:00
5019fc1c8d Merge branch 'master' into id_copy_refactor 2017-07-11 15:57:40 +02:00
2f812e1d7b Fix stupid mistake in new LineStyle copying code. 2017-07-11 15:56:43 +02:00
e75db0e61b Fix several crashes and other issues in new ID copying code.
Mostly in core and animdata area. Code should now also be more robust,
and slightly simpler & cleaner.
2017-07-11 14:16:48 +02:00
524e03cae1 Huuuuge refactor of Scene copying, added to generic library ID copying.
Note: there are several known issues with this commit (and most likely
more unknown ones), to be fixed in next ones.
2017-07-11 10:31:04 +02:00
d3abcf3318 Merge branch 'master' into id_copy_refactor 2017-07-10 21:30:31 +02:00
0dc428410a Merge branch 'master' into id_copy_refactor 2017-07-10 15:23:44 +02:00
0698e892c7 Add VFont copying.
Not much happy, have to include BKE_curve in BLI_freetypefont to copy
nurbs... Not sure why fonts are in BLI tbh. We are already replicating
quite a bit of nurbs logic there. :(
2017-07-10 13:57:05 +02:00
a7bf34cc0b Add Sound copying callback. 2017-07-10 12:59:11 +02:00
0b009edbde Move Palette, PaintCurve and CacheFIle to new ID copying system. 2017-07-10 09:56:52 +02:00
8bcf950c28 Move Mask and FreestyleLineStyle to new ID copying code. 2017-07-09 22:44:21 +02:00
6637530b81 Move Text, Brush and GPencil datablocks to new copying code. 2017-07-09 22:14:00 +02:00
dcfbe9a6f0 Move Action to new copying code. 2017-07-09 21:41:24 +02:00
f5f013d231 Merge branch 'master' into id_copy_refactor 2017-07-09 21:21:48 +02:00
caae973b8a Move Group and ParticleSettings to new copying system.
Also fix several mistakes from previous commits.
2017-07-08 17:09:52 +02:00
5a1cae541a Move World and MovieClip to new copying system. 2017-07-08 12:46:33 +02:00
fe46bb8b0e Rename new BKE_<foo>_copy_ex to BKE_<foo>_copy_data.
Those are not actually copying the ID, only its internal subdata (and
other ID-specific handling). Generic processing common to all ID copying
is done by `BKE_id_copy_ex()`!
2017-07-08 12:20:54 +02:00
17ceb807dd Move Material, Texture and Image datablocks to new copying code.
Note that this is also bringing back Image copying code into 'regular'
process, instead of doing its own dirty cooking.
2017-07-08 12:14:31 +02:00
fc6619a9ff Merge branch 'master' into id_copy_refactor 2017-07-07 12:35:35 +02:00
022ad8f769 Change a bit ideas behind new copying code, now ID-specific copying never handles usercount.
Makes things much simpler, and more consistent.

Also fix issue with new copying and bloody nodetrees, using same hack as
in original ntree copying code to detect 'root' ntrees that shall never
be put into bmain :(((((((
2017-07-06 15:46:14 +02:00
8af813fee9 Merge branch 'master' into id_copy_refactor 2017-07-06 12:26:34 +02:00
af46458c62 Merge branch 'master' into id_copy_refactor 2017-06-26 11:01:21 +02:00
b7145a2662 Initial work on new copying for nodetrees.
Note that those are an nightmare to handle correctly, current code is
like a plate of noodle, so... most likeley not fully working, think I'll
have to nuke localize code as well :(
2017-06-26 10:53:51 +02:00
48a85f99eb Add remaining 'new copying' for obdata ID types. 2017-06-22 22:46:52 +02:00
6635284917 Merge branch 'master' into id_copy_refactor 2017-06-22 10:44:33 +02:00
c907b16065 Add mball and lattice new copying, tweak a bit more skey handling. 2017-06-21 11:08:50 +02:00
797a696734 Merge branch 'master' into id_copy_refactor 2017-06-21 10:49:39 +02:00
90a463dcfc Add new Curve copying code. 2017-06-20 21:34:18 +02:00
1f7c6fda5d Fix wrong assert, and issue with Key ID freeing tag after copying from mesh... 2017-06-20 21:20:43 +02:00
39b0c6f060 Add Mesh and Key support to new copying code. 2017-06-20 17:55:38 +02:00
3a86873b68 Make object copying fully compatible/aware of new copy flag system.
(continuation of previous WIP commit, sorry about that one :/ ).

This commits changes quite a few things, distributing new copying flags
into sub-data copying code (mostly concerns ID refcounting or not).

It also removes ID refcounting handling from Modifiers' copy callback
(this was ugly from the start, proved to be problematic in current
master, and generally bad practice). This is now done by calling code.

Also, it brings back ID refcounting handling to main BKE_library's copy
code, which means in generic ID copying lower-level IDType-specific copy
code should not use it at all. Support at lower-level remains needed
though, unfortunately, to cope with partial copying tools etc.
2017-06-20 17:55:38 +02:00
596c20c677 Alembic tests: make failures a bit easier to diagnose. 2017-06-20 17:55:38 +02:00
d0af31b317 Fix T51762: Unit test script_alembic_import is failing.
Implemented workaround for use with the legacy depsgraph.
2017-06-20 17:55:38 +02:00
12a5a628f3 Fixed bl_load_py_modules / script_load_modules unit test
It tried to assert that
addons/io_blend_utils/blender_bam-unpacked.whl/__init__.py was loaded when
the io_blend_utils module was imported. However, this happens only on
demand, and not directly when importing the add-on.
2017-06-20 17:55:38 +02:00
b72ba5c78d Use for/else instead of setting 'ok' variable.
This is more efficient, and this use case is exactly what the else clause
is for.
2017-06-20 17:55:38 +02:00
0687d8bdce Removed trailing spaces 2017-06-20 17:55:38 +02:00
258634b43c Fix (unreported) missing Image usercount increase when copying UVProject modifier. 2017-06-20 17:55:38 +02:00
babc0c9bd7 Fix (unreported) bad copying code of Surface Deform modifier. 2017-06-20 17:55:38 +02:00
749a8daf26 Fix compiler warnings from own recent rB0d5c7e5e36b9. 2017-06-20 17:55:38 +02:00
2d3b6b5ad7 Fix (unreported) bad copying of Ocean modifier.
Was needlessly complicated code, forgot to copy a value (foam_fade), and
was utterly leaking memory!
2017-06-20 17:55:38 +02:00
20e3434c5f Fix (unreported) bad copying code in Mesh Deform modifier. 2017-06-20 17:55:38 +02:00
77046ba9d8 Fix (unreported) Dynamic Paint modifier not increasing ID usercount in copy function.
*Sigh* One more example of why we should keep ID management handling in
as few places as possible! It's impossible to keep more than a few
places in sync regarding which ID pointer is refcounted etc.
2017-06-20 17:55:38 +02:00
147735587c Fix (unreported) memory leak in Fluid modifier copying.
Also generally simplify/sanitize this copy code.
2017-06-20 17:55:38 +02:00
44b1680fbf WIP 2017-06-20 17:55:38 +02:00
46af186d21 Cleanup: doxygen comments
Also remove duplicate & mismatching comments from grease-pencil header.
Keep comments close to implementation to avoid getting out of sync.
2017-06-20 17:55:38 +02:00
e61dbcd284 Fix T51774: Children particles hair interpolation not correct with textures or dp.
Children where always getting at least one segment of fixed length...

Now fully hidden ones (zero length) get no segment at all.

Note that even very short ones keep getting one 'unit' length segment - would
rather avoid changing that at this point, given how complex children
particles 'length' can get with all kind of modifiers... Think we can
live with that for now anyway.
2017-06-20 17:55:38 +02:00
5f6725337a Fix T51840: UI redraw in node editor header missing on pointcache bake
Missing a notifier handler in the node editor
2017-06-20 17:55:38 +02:00
780310578a Fix unreported: Copy-pasting nodes crashes when they have an undefined type 2017-06-20 17:55:38 +02:00
d8de772410 Docs: Fix file:line links in generated API docs 2017-06-20 17:55:38 +02:00
f45300856c Add Cone: tip soft-min should be zero
Default value should be included in range.
2017-06-20 17:55:38 +02:00
6493328e37 Guarded allocator: Fix type in macro definition
The crash did not happen yet because we always had proper vmemh defined in
the parent scope.

Patch by Ivan Ivanov (aka obiwanus), thanks!

Differential Revision: https://developer.blender.org/D2715
2017-06-20 17:55:38 +02:00
2e9580e417 PyAPI: Fix warning about indent 2017-06-20 17:55:38 +02:00
0e78b3b794 Fix T51810: Add minimal example of usage of translation API for non-official addons. 2017-06-20 17:55:38 +02:00
09e5d1bc84 Usual i18n/UI messages fixes.
Please do not add useless tooltips! We have enough messages to translate
already...
2017-06-20 17:55:38 +02:00
23941b425e Add same new ID freeing API as copying one.
Idea is the same, looks like it will be a tad simpler than with copy
though, since we should not need to change each ID type freeing func, as
ID usercount handling is done in main BKE_library code (would like to do
that for copy as well, but it's not that simple).
2017-06-16 10:48:42 +02:00
fa64dfa449 On second thought, avoid adding new stuff to ID.
We can extend ID->tag and store there our few alloc-related tags.
2017-06-16 10:48:42 +02:00
7edeccf81d Fleshing a bit new copy logic (using Object datablock as Guinea pig). 2017-06-16 10:48:42 +02:00
8d22d5a2a9 Layout initial ideas/code structure of new ID copying. 2017-06-16 10:48:42 +02:00
5ecbc7c0f2 Merge branch 'master' into id_override_static 2017-06-14 15:20:15 +02:00
f4455faf4c Cleanup/expose template status in RNA utils API. 2017-06-14 15:19:16 +02:00
0e41f5c158 Rename override operation defines, add some operation flags. 2017-06-13 12:51:03 +02:00
352f9ed27b Some more cleanup, add (limited) copying of static override.
Working towards override template, still some work to do though.
2017-06-13 10:25:59 +02:00
470613cdf2 Cleanup: remove unused testcode. 2017-06-12 15:44:48 +02:00
e57bd4e786 Fix for removed stuff from DEG. 2017-06-12 15:31:30 +02:00
0697398af1 Merge branch 'master' into id_override_static 2017-06-12 15:18:01 +02:00
4ce7ad37fe Merge branch 'master' into id_override_static 2017-06-12 15:07:00 +02:00
9505209b1d Fix various issues in RNA diff handling, and make some more props overridable.
Namely, those allowing to link an object to an armature.

Thing is, we cannnot and absolutely do not want to use same trick as
armature proxies regarding deforming their related geometries.

So instead, we'll automatically make override of objects using
overridden armature as deformer, ultimately. This also allows for
several overrides of a same linked data.

Not sure how much good/bad this is, will have to ask artists once it's
ready for testing (cannot think of any non-ugly way to do that 'magic
trick' tbh).
2017-05-31 17:55:08 +02:00
734a889056 Some cleanup, introduce idea of 'override template'.
Nothing functionnal for now, just made it possible for override to have
NULL reference ID.

Those overrides would be used as templates (created in original file of
the ID, they define some kind of default overriding settings). They
should also allow to forcefully lock some properties (forbid users of
that library ID to override some properties).
2017-05-31 12:55:53 +02:00
3489874770 Merge branch 'master' into id_override_static 2017-05-30 16:20:58 +02:00
8aae0549df Make 'set override type' menu option of buttons functional.
There's still lots of things to fix or tweak, but basics are now
working.
2017-04-05 21:53:41 +02:00
ef6045a473 Add finer controll over 'strict' finding of override property operations. 2017-04-05 18:12:18 +02:00
558119854d Bring closer RNA and BKE ...override_..._find() functions, add RNA ..._get() ones. 2017-04-05 17:45:18 +02:00
15937c1f8e Rename RNA_property_override_..._get() functions to ..._find()
Matches functions defined in BKE_library_override!
2017-04-05 17:15:28 +02:00
8811f4cfa3 Merge branch 'master' into id_override_static 2017-04-05 15:34:26 +02:00
a48f5e991d Merge branch 'master' into id_override_static 2017-03-28 10:49:55 +02:00
8698624d1e Merge branch 'master' into id_override_static 2017-03-24 12:48:33 +01:00
f025c57cb4 Implement 'delete override' from UI menu options. 2017-03-24 12:47:34 +01:00
b03542b61f Add public API to BKE's lib override to delete override properties & operations. 2017-03-24 12:44:53 +01:00
da6a2def64 Fix bug in new copy/applyoverride code of RNA property. 2017-03-24 12:43:39 +01:00
78ccdfa0a0 Fix stupid mistake in new BLI_listbase_bytes_find(). 2017-03-24 12:39:55 +01:00
bf145a1a4c Merge branch 'master' into id_override_static 2017-03-23 17:04:35 +01:00
c54f045daf WIP UI menu entries for Override.
Empty shells for now...
2017-03-23 17:03:44 +01:00
6520e2a455 Merge branch 'master' into id_override_static 2017-03-22 19:45:55 +01:00
41f2393e0e Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenloader/intern/writefile.c
2017-03-20 12:49:00 +01:00
9ee6995a35 Merge branch 'writefile_rework' into id_override_static 2017-03-16 11:11:30 +01:00
d14298403f Merge branch 'master' into writefile_rework 2017-03-16 10:52:40 +01:00
836194d4a2 Merge branch 'writefile_rework' into id_override_static 2017-03-02 10:27:36 +01:00
fb02b4d4de Merge branch 'master' into writefile_rework 2017-03-02 10:27:16 +01:00
2fa16018b8 Add some basic UI and RNA feedback for overriden properties.
For now chose some teal blue to mark overridden state of prop in UI,
kind of last nicely different tint available...
2017-03-02 09:53:41 +01:00
1ca3fd0b81 Merge branch 'writefile_rework' into id_override_static 2017-03-01 16:32:06 +01:00
e56e0dd75c Merge branch 'master' into writefile_rework 2017-03-01 16:31:50 +01:00
e15af8a978 Merge branch 'writefile_rework' into id_override_static 2017-02-28 14:16:22 +01:00
7572ba85c6 Merge branch 'master' into writefile_rework 2017-02-28 14:16:05 +01:00
18387ad496 Big refactor of differential override storage.
On second thought, modifying real data-block to store diff in it is...
just bad. Because it affects actual data, because it involves complicated
and heavy processes like remapping, and because it stores useless values
in .blend file (i.e. values that would give garbage results if e.g.
opening .blend file with older version of Blender, etc.).

So instead, decided to save an extra data-block in .blend file each time
we have some differential overrides.

Note that for now, we do full copy of datablock into its extra 'storage'
sibbling for .blend file. This is bad (think about double copy of heavy
mesh...) and will have to be fixed. Whole copy process will need serious
work anyway, for that kind of features we need to be able to copy
without increase usercount of IDs etc.

In fact, here, maybe we even need a smarter version of copy that would
only duplicate sub-data as needed by diff-overriden properties...
2017-02-28 14:06:56 +01:00
b08a5d1e57 Merge branch 'writefile_rework' into id_override_static.
That way we don't have to add the same stupid few lines to *all*
datatypes writers! Obvious gain on efficiency and security from coding PoV.

Conflicts:
	source/blender/blenloader/intern/writefile.c
2017-02-27 14:50:21 +01:00
8c2caee7f4 Merge branch 'master' into writefile_rework 2017-02-27 10:03:49 +01:00
54107e6c40 Merge branch 'master' into id_override_static 2017-02-27 09:58:22 +01:00
441ca0202c Merge branch 'master' into id_override_static 2017-02-23 19:41:36 +01:00
15822d9d32 Refactor writefile handling of data-blocks.
Instead of calling a function looping over whole list of a given ID
type, make whole loop over Main in parent function, and call functions
writing a single datablock at a time.

This design is more in line with all other places in Blender where we
handle whole content of Main (including readfile.c), and much more easy
to extend and add e.g. some generic processing of IDs before/after
writing, etc.

From user point, there should be no change at all, only difference is
that data-block types won't be saved in same order as before (.blend
file specs enforces no order here, so this is not an issue, but it could
bug some third party users using other, simplified .blend file reader
maybe).

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2510
2017-02-13 14:57:14 +01:00
68ea57a09b Fix some crashes when ID would reference itself.
Typical case: bones having constraints targetting other bones from same
armature. ID swap needs remapping here.

Really have to find something better than regular ID copy + swap + relinking
for override operations, this is horribly inneficient, complicated
and... most likely a nest of bugs and worms.

(pretty sure e.g. we still can generate same pointers during writefile
with current code :( ).
2017-02-10 09:23:09 +01:00
cad99ae1a5 Merge branch 'master' into id_override_static 2017-02-09 14:54:33 +01:00
dce4e6139f Use a smaller cross icon for clearing search box contents 2017-02-09 14:51:42 +01:00
42249eb9b3 More tweaks to Normalisation options in Graph Editor
* Added a new dedicated icon for normalize
* Only use an icon for "Auto"
2017-02-09 14:51:42 +01:00
a8edfba122 Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons
These take less space, fit in better with rest of the UI, and make their relationship clearer
2017-02-09 14:51:42 +01:00
c42f64ab50 Fix: GPencil delete operators did not respect color locking 2017-02-09 14:51:42 +01:00
b2a0571a46 Cycles: Fix regression with transparent shadows in volume 2017-02-09 14:51:42 +01:00
4e9e577b88 Cycles: Solve speed regression by casting opaque ray first 2017-02-09 14:51:42 +01:00
1899f6c66d Cycles: Fix compilation error on OpenCL 2017-02-09 14:51:42 +01:00
b745195785 Cycles: Split shadow functions to avoid some duplicated calculations 2017-02-09 14:51:42 +01:00
beb6677119 Cycles: Store shadow intersections in the kernel globals
Seems CUDA failed to de-duplicate the array across multiple inlined
versions of the shadow_blocked(). Helped it a bit with that now.

Gives about 100MB memory improvement on a scenes after previous
commit and brings up memory "regression" to only 100MB comparing to
the master branch now.
2017-02-09 14:51:42 +01:00
7765614eb3 Cycles: Speedup transparent shadows on CUDA
This commit enables record-all behavior of transparent shadows
rays.

Render times difference goes as following:

               GTX 1080 render time
BMW                  -0.5%
Fishy Cat            -0.0%
Pabellon Barcelona   -11.6%
Classroom            +1.2%
Koro                 -58.6%

Kernel will now use some extra VRAM memory to store the intersection
array (200MB on my configuration). This we can optimize out with some
further commits.
2017-02-09 14:51:42 +01:00
1a222aaf9f Cycles: Implement record-all transparent shadow function for GPU
The idea is to record all possible transparent intersections when
shooting transparent ray on GPU (similar to what we were doing  on
CPU already).

This avoids need of doing whole ray-to-scene intersections queries
for each intersection and speeds up a lot cases like transparent
hair in the cost of extra memory.

This commit is a base ground for now and this feature is kept
disabled for until some further tweaks.
2017-02-09 14:51:42 +01:00
92ecd3218a Cycles: Use an utility function to sort intersections array 2017-02-09 14:51:42 +01:00
e4280e0e36 Cycles: Make GPU version of shadow_blocked() closer to CPU
Now we break the traversal cycle and then perform volume attenuation
and check with zero throughput. Not sure it makes any measurable sense
at this moment, but in the future it might help de-duplicating some
extra logic here.
2017-02-09 14:51:42 +01:00
b728e9ffbe Cycles: De-duplicate transparent shadows attenuation
Fair amount of code was duplicated for CPU and GPU, now we are
using inlined function to avoid such duplication.
2017-02-09 14:51:42 +01:00
54cde6d096 Fix T49249: Alembic export with multiple hair systems crash blender
Removed unnecessary call to DM_update_tessface_data(). This call is
already performed by DM_ensure_tessface(dm). The call being performed
twice caused a failing BLI_assert().

Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
6b5dde499b Alembic export: avoid infinite loops trying to find parent objects.
Also added some assertions for debugging purposes

Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
7fc974f89f Alembic export: only create transform writer if the object should be exported
Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
154b045f54 Alembic: #undef'ed the correct macro
TEST_RET is not defined anywhere in Blender's sources, and LAYER_CMP
is no longer used after this function ends.
2017-02-09 14:51:42 +01:00
bc7a33f1fc Alembic: Use getXForm() in check, because it's used in rest of the function too
This makes the code within the function consistent.
2017-02-09 14:51:42 +01:00
d4cc008af9 Alembic: Renamed copy_zup_yup to copy_yup_from_zup (and same for zup_from_yup)
With the new names the arguments (yup, zup) are in the same order as
they appear in the function name. The old names used copy_src_dst(dst,
src), which I found very confusing. Furthermore, now it is clear from
where to where the copy is made.

This makes the function names a little bit longer, though. If that is
a real issue, we can just name them zup_from_yup(zup, yup).

Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
fbae5a994c Various minor fixes & tweaks. 2017-02-08 20:26:11 +01:00
e029b754fe Some naive solution to avoid running 'generate auto override' code too often.
Proper solution will come later (probably based on some background job
or so...).
2017-02-08 15:38:25 +01:00
9a94b71c75 Merge branch 'master' into id_override_static 2017-02-08 09:59:31 +01:00
c2cece8b29 Preliminary step to support static override of armatures.
I.e. support override of loc/rot/scale of posechannels.

Also implied to add some minimal support of collections in 'diff
generating' RNA code.

Still much to be done of course.
2017-02-07 20:14:57 +01:00
0cc7ecd1dd Merge branch 'master' into id_override_static 2017-02-07 10:16:19 +01:00
98b868c399 Make write code theorically fully compatible with static override.
Readfile.c already was, since it's more generic code there (ID level).
2017-02-06 21:39:22 +01:00
c4d5ba4c7b Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenloader/intern/writefile.c
2017-02-06 21:01:28 +01:00
e1fc14c358 Merge branch 'master' into id_override_static 2017-02-06 20:54:08 +01:00
7b61d5f5b0 Minor cleanup (comments mostly). 2017-02-06 12:26:41 +01:00
3bab4e1136 Merge branch 'master' into id_override_static 2017-02-05 15:30:00 +01:00
2cc420f409 Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2017-01-31 11:46:34 +01:00
d9d247cf26 Merge branch 'master' into id_override_static 2017-01-23 12:27:36 +01:00
aa53d26c0e Merge branch 'master' into id_override_static
Conflicts:
	source/blender/makesrna/RNA_types.h
2017-01-12 12:58:57 +01:00
d5a7a15083 Merge branch 'master' into id_override_static 2017-01-09 10:50:20 +01:00
9f80107862 Working proof-of-concept of differential override operations.
So, now 'proportional' RNA properties (here, Object's scale) is stored
as 'multiply' override op.

Once again, this is mostly testing for now, there are a lot of potential
issues and traps in current code that'll need more background work to
address later if we keep working in this direction.

Main remaining TODO to complete the proof of concept now is sketching
out a bit of UI/UX control over override!
2017-01-09 10:27:44 +01:00
ffe3fa601c Merge branch 'master' into id_override_static 2017-01-08 12:09:48 +01:00
575e62f051 More WIP work towards supporting override differentila operations.
Code compiles, is mostly neither tested nor hooked to anything yet.
2017-01-05 20:50:51 +01:00
5e0db31f79 Merge branch 'master' into id_override_static 2017-01-04 17:36:33 +01:00
95fac91fb5 Merge branch 'master' into id_override_static 2017-01-04 10:32:24 +01:00
d5e5ce62af Add basic code to prevent editing non-overridable properties. 2017-01-03 21:01:05 +01:00
8684e1566d More work and refactor in RNA override part mostly.
This commit mainly extend/refactor RNA prop copy and equals functions
into more advanced override utils (since equals is a subset of
aurooverride operations generation, and copy is a subset of override
operations application).

And some other work needed on the road...
2017-01-03 18:45:09 +01:00
2fd55e1443 Add first basic working auto-override.
Still called from pre-depsgraph eval step, does an RNA comparison and
generate overriding rules for changed props...

Note: we most certainly do not want to run this on all depsgraph eval.
Own current idea would be to just tag IDs e.g. in depsgraph callback,
and run actual auto-generation e.g. in a low-priority job, maybe? not
sure... :|

Also, fix stupid mistake in RNA applying of override (used when reading
file to apply static override), and add object's loc/rot/scale as
overridable properties.
2017-01-02 22:08:50 +01:00
a634ee733f ID override static: Various minor fixes and tweaks. 2017-01-02 14:45:36 +01:00
b81333106e Merge branch 'master' into id_override_static 2017-01-02 12:57:28 +01:00
b318a3a811 Add ways to forbid override/auto-override.
Add a 'NOOP' override ruul to prevent any kind of override on a given
RNA path, and an ID flag 'AUTOOVERRIDE' to allow automatic definition of
override rules based on changed data.

Again, just defines, do not do anything yet.
2016-12-30 18:15:49 +01:00
453aef97be Include "static override rules generator" operation into new depsgraph.
Note that this is dummy empty placeholder for now!

Idea here is that depsgraph is best place to generate our override rules
based on data changes. That way all tools in Blender keep working as
usual, on local data, and overrides are generated when needed just
before IDs get actually evaluated.

Depsgraph has key advantage of only running over *changed* data-blocks
already.

Not sure this is actually valid idea, but for tests will do the work.
If we want to keep it, we'll have to find a way to prevent this running
too often though, especially not during most animation-triggered
evaluations.
2016-12-30 16:54:50 +01:00
4c224e861b Merge branch 'master' into override_static
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-12-30 12:27:30 +01:00
b76f2c0b6c Some cleanup and refactoring. 2016-12-14 16:03:51 +01:00
de87411544 Revert initial hack to get a new overridable RNA prop flag.
Now that we have some new free ones...
2016-12-14 16:03:51 +01:00
b827ca78c7 Final bits to get first (very raw, limited and experimental) override working.
Mostly code using override data to selectively update a copy of linked one
with local data.

As said, still totally hackish and experimental, but it works - you can
create overrides of linked Objects, and override their position, yeha! :P
2016-12-14 16:03:51 +01:00
4f67a79eac Moar WIP: add operator to make override of linked object.
Mostly nasty testing code, only overriding location of object for now.
And of course, we are still missing bits in read/write code to actually
do the override.

Also, add some minimal exposure of override in RNA, here again, most to
be done still.
2016-12-14 16:03:51 +01:00
64f78e15af More WIP: add basic new BKE and RNA override API, update DNA structs.
Still much to do to even get a first dead simple working prototype, not
doing anything yet (except compiling and not crashing when ran :P ).
2016-12-14 16:03:51 +01:00
d982122f79 Some initial, WIP DNA/RNA/readwrite code for static ID override.
Quite obviously totally useless (and harmless) currently, compiles but
does nothing.
2016-12-14 16:03:51 +01:00
49ab100383 Some changes to RNA property/struct comparison.
Could very easily get into infinite loop when comparing Pointer
properties... And in any case, comparing ID pointer should be enough, no
need to dive into all ID properties!
2016-12-14 16:03:51 +01:00
f5a9f4a584 Quick and dirty hack to get overridable RNA prop flag.
To be reverted once D2400 is committed.
2016-12-14 16:03:51 +01:00

Diff Content Not Available