diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-15 17:07:16 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-15 21:27:59 +0300 |
commit | 8e8d93eb86109988db44730a0107e9da9e870328 (patch) | |
tree | 7a4e317f52de4e07d3261817e55a5444be1379f2 /source/blender/blenkernel | |
parent | bb84f7ff5f5268226b4d14e0f1e44a2579354b37 (diff) |
GP: Redesign logic of drawing engine for object instance support
The initial design assumed that there was only one object for each unique name, but that was not the case when instances were created.
Now, instances are supported and speed has been greatly improved when repetitions are used.
As a result of this change, the option to create objects has been removed in the Instances modifier. This option was strange and was also against Blender's design rules, since a modifier should never create objects. The old functionality of the modifier can be achieved with instances.
Also, several memory leakage problems that were not previously detected have been eliminated, and especially in the grid and in the drawing process
Onion Skin is not supported in multi-user datablocks. Support this, makes incompatible with instances. We need find a solution in the long term, but now it's better keep disabled and make instances work. Anyway, the new instances makes unnecessary to use muli-user datablocks.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index d81dddb2b98..08d68f4a480 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -785,6 +785,14 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop) RNA_property_pointer_set(ptr, prop, idptr); RNA_property_update(C, ptr, prop); + /* tag grease pencil datablock and disable onion */ + if (GS(id->name) == ID_GD) { + DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(newid, OB_RECALC_OB | OB_RECALC_DATA); + bGPdata *gpd = (bGPdata *)newid; + gpd->flag &= ~GP_DATA_SHOW_ONIONSKINS; + } + return true; } } |