Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 4 Dec 2017 14:14:47 +0000 (15:14 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 4 Dec 2017 14:15:23 +0000 (15:15 +0100)
1  2 
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
source/blender/depsgraph/intern/depsgraph.cc
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/space_view3d/drawobject.c

index c4542660c8b24e58d74acfb0418cbecae049c356,19533272ef558e6e2a22384a6f47664cf54e0501..dfe97d02ec606e6dca1002da6ea1092c9fbee0de
@@@ -247,10 -195,10 +247,10 @@@ void DepsgraphNodeBuilder::build_rig(Ob
        op_node->set_as_exit();
  
        /* bones */
 -      LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
 +      LINKLIST_FOREACH (bPoseChannel *, pchan, &object_cow->pose->chanbase) {
-               /* node for bone eval */
-               op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE,
-                                            pchan->name, NULL, DEG_OPCODE_BONE_LOCAL);
+               /* Node for bone evaluation. */
+               op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name, NULL,
+                                            DEG_OPCODE_BONE_LOCAL);
                op_node->set_as_entry();
  
                add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
                                             function_bind(BKE_pose_bone_done, _1, pchan),
                                             DEG_OPCODE_BONE_DONE);
                op_node->set_as_exit();
 -              /* Constraints. */
+               /* Custom properties. */
+               if (pchan->prop != NULL) {
+                       add_operation_node(&object->id,
+                                          DEG_NODE_TYPE_PARAMETERS,
+                                          NULL,
+                                          DEG_OPCODE_PARAMETERS_EVAL,
+                                          pchan->name);
+               }
 +              /* Build constraints. */
                if (pchan->constraints.first != NULL) {
                        build_pose_constraints(object, pchan);
                }
index 1b9f27932f51facdedec40efa57e79837e93c271,275c6847e43082e48fbd77f2f4b1ef1f544e7415..aeb9f9ab93772f5faa6f42efeae57e0449c6710b
@@@ -1096,8 -1058,9 +1082,8 @@@ void DepsgraphRelationBuilder::build_dr
                /* Shape key driver - hook into the base geometry operation. */
                // XXX: double check where this points
                Key *shape_key = (Key *)id;
 -
                ComponentKey geometry_key(shape_key->from, DEG_NODE_TYPE_GEOMETRY);
-               add_relation(driver_key, geometry_key, "[Driver -> ShapeKey Geom]");
+               add_relation(driver_key, geometry_key, "Driver -> ShapeKey Geom");
        }
        else if (strstr(rna_path, "key_blocks[")) {
                ComponentKey geometry_key(id, DEG_NODE_TYPE_GEOMETRY);
index ce63d6455cca40546bc3a1086d976722dc887b70,ff8052407992b23414f1b5d3322b345c32ed4b01..2a2108e84803bec99d84d3e04b7be58317a7bcb5
@@@ -410,9 -414,10 +410,9 @@@ void DepsgraphRelationBuilder::build_ri
                        }
  
                        OperationKey parent_key(&object->id, DEG_NODE_TYPE_BONE, pchan->parent->name, parent_key_opcode);
-                       add_relation(parent_key, bone_pose_key, "[Parent Bone -> Child Bone]");
+                       add_relation(parent_key, bone_pose_key, "Parent Bone -> Child Bone");
                }
 -
 -              /* constraints */
 +              /* Buil constraints. */
                if (pchan->constraints.first != NULL) {
                        /* constraints stack and constraint dependencies */
                        build_constraints(&object->id, DEG_NODE_TYPE_BONE, pchan->name, &pchan->constraints, &root_map);
index 0a0a8ff2de358c840abb7f513a9eccddf3b5eadd,77a107534dd36a481a7a03815e597d515b75424a..a075ed657d14f01ba752fbb57dc5df05c0da4c03
@@@ -1583,10 -1573,18 +1583,18 @@@ static bool mouse_mesh_loop(bContext *C
        mvalf[1] = (float)(vc.mval[1] = mval[1]);
        em = vc.em;
  
+       /* Make sure that the edges are also considered for selection.
+        * TODO: cleanup: add `selectmode` as a parameter */
+       const short ts_selectmode = vc.scene->toolsettings->selectmode;
+       vc.scene->toolsettings->selectmode |= SCE_SELECT_EDGE;
        /* no afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad */
 -      ED_view3d_backbuf_validate(&vc);
 +      ED_view3d_backbuf_validate(&eval_ctx, &vc);
  
 -      eed = EDBM_edge_find_nearest_ex(&vc, &dist, NULL, true, true, NULL);
+       /* restore `selectmode` */
+       vc.scene->toolsettings->selectmode = ts_selectmode;
 +      eed = EDBM_edge_find_nearest_ex(&eval_ctx, &vc, &dist, NULL, true, true, NULL);
        if (eed == NULL) {
                return false;
        }