diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
commit | 29f3af95272590d26f610ae828b2eeee89c82a00 (patch) | |
tree | a696a58a2561c48f7ec6166e369e22081e0a64d8 /source/blender/depsgraph | |
parent | dcb93126876879d969a30a7865700abd072066f8 (diff) |
GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
Diffstat (limited to 'source/blender/depsgraph')
3 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 687ee492c3b..01d84f6b5d8 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -1310,7 +1310,7 @@ void DepsgraphNodeBuilder::build_object_data_geometry_datablock(ID *obdata, bool obdata, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL, - function_bind(BKE_gpencil_eval_geometry, _1, (bGPdata *)obdata_cow)); + function_bind(BKE_gpencil_frame_active_set, _1, (bGPdata *)obdata_cow)); op_node->set_as_entry(); break; } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 78e05a69819..6791125d1e9 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2123,6 +2123,15 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata) add_relation(material_key, geometry_key, "Material -> GP Data"); } } + + /* Layer parenting need react to the parent object transformation. */ + LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { + if (gpl->parent != NULL) { + ComponentKey transform_key(&gpl->parent->id, NodeType::TRANSFORM); + ComponentKey gpd_geom_key(&gpd->id, NodeType::GEOMETRY); + add_relation(transform_key, gpd_geom_key, "GPencil Parent Layer"); + } + } break; } default: diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 95521ee9e47..1841f5f024f 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -43,6 +43,7 @@ #include "BKE_curve.h" #include "BKE_global.h" #include "BKE_idprop.h" +#include "BKE_gpencil.h" #include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_scene.h" @@ -791,6 +792,9 @@ void update_id_after_copy(const Depsgraph *depsgraph, } BKE_pose_pchan_index_rebuild(object_cow->pose); } + if (object_cow->type == OB_GPENCIL) { + BKE_gpencil_update_orig_pointers(object_orig, object_cow); + } update_particles_after_copy(depsgraph, object_orig, object_cow); update_modifiers_orig_pointers(object_orig, object_cow); update_proxy_pointers_after_copy(depsgraph, object_orig, object_cow); |