From 45fdea48c152b0e632a911139c7173f1e44f9310 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 29 Jan 2018 19:01:44 +1300 Subject: Fix T53614: New Depsgraph ignores NLA strips The new depsgraph was only considering the active action when attaching relations from the AnimData component/operation to the properties that are affected by the animation data. As a result, only properties animated by the active action were working, while those animated by NLA strips did not change when playing back/scrubbing the timeline. This commit fixes this introducing a recursive method to properly visit all NLA strips, and calling DepsRelBuilder::build_animdata_curves_targets() on each of those strips. --- .../intern/builder/deg_builder_relations.cc | 52 ++++++++++++++++------ .../intern/builder/deg_builder_relations.h | 9 +++- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 81daa8cfb8c..85ea2c0a8e4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -916,18 +916,7 @@ void DepsgraphRelationBuilder::build_animdata_curves(ID *id) ComponentKey adt_key(id, DEG_NODE_TYPE_ANIMATION); TimeSourceKey time_src_key; add_relation(time_src_key, adt_key, "TimeSrc -> Animation"); - /* Build relations from animation operation to properties it changes. */ - build_animdata_curves_targets(id); -} - -void DepsgraphRelationBuilder::build_animdata_curves_targets(ID *id) -{ - AnimData *adt = BKE_animdata_from_id(id); - if (adt == NULL || adt->action == NULL) { - return; - } - /* Get source operation. */ - ComponentKey adt_key(id, DEG_NODE_TYPE_ANIMATION); + /* Get source operations. */ DepsNode *node_from = get_node(adt_key); BLI_assert(node_from != NULL); if (node_from == NULL) { @@ -935,10 +924,28 @@ void DepsgraphRelationBuilder::build_animdata_curves_targets(ID *id) } OperationDepsNode *operation_from = node_from->get_exit_operation(); BLI_assert(operation_from != NULL); + /* Build relations from animation operation to properties it changes. */ + if (adt->action != NULL) { + build_animdata_curves_targets(id, adt_key, + operation_from, + &adt->action->curves); + } + BLI_LISTBASE_FOREACH(NlaTrack *, nlt, &adt->nla_tracks) { + build_animdata_nlastrip_targets(id, adt_key, + operation_from, + &nlt->strips); + } +} + +void DepsgraphRelationBuilder::build_animdata_curves_targets( + ID *id, ComponentKey &adt_key, + OperationDepsNode *operation_from, + ListBase *curves) +{ /* Iterate over all curves and build relations. */ PointerRNA id_ptr; RNA_id_pointer_create(id, &id_ptr); - BLI_LISTBASE_FOREACH(FCurve *, fcu, &adt->action->curves) { + BLI_LISTBASE_FOREACH(FCurve *, fcu, curves) { PointerRNA ptr; PropertyRNA *prop; int index; @@ -969,6 +976,25 @@ void DepsgraphRelationBuilder::build_animdata_curves_targets(ID *id) } } +void DepsgraphRelationBuilder::build_animdata_nlastrip_targets( + ID *id, ComponentKey &adt_key, + OperationDepsNode *operation_from, + ListBase *strips) +{ + BLI_LISTBASE_FOREACH(NlaStrip *, strip, strips) { + if (strip->act != NULL) { + build_animdata_curves_targets(id, adt_key, + operation_from, + &strip->act->curves); + } + else if (strip->strips.first != NULL) { + build_animdata_nlastrip_targets(id, adt_key, + operation_from, + &strip->strips); + } + } +} + void DepsgraphRelationBuilder::build_animdata_drivers(ID *id) { AnimData *adt = BKE_animdata_from_id(id); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index de13ee19122..aa55b9f66ae 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -201,7 +201,14 @@ struct DepsgraphRelationBuilder RootPChanMap *root_map); void build_animdata(ID *id); void build_animdata_curves(ID *id); - void build_animdata_curves_targets(ID *id); + void build_animdata_curves_targets(ID *id, + ComponentKey &adt_key, + OperationDepsNode *operation_from, + ListBase *curves); + void build_animdata_nlastrip_targets(ID *id, + ComponentKey &adt_key, + OperationDepsNode *operation_from, + ListBase *strips); void build_animdata_drivers(ID *id); void build_driver(ID *id, FCurve *fcurve); void build_driver_data(ID *id, FCurve *fcurve); -- cgit v1.2.3 From 70286a76523a8a9c36858285a080075e4cd313d2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 29 Jan 2018 14:43:12 +0100 Subject: Depsgraph: Cleanup, line wraps --- .../intern/builder/deg_builder_relations_rig.cc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc index b23a6112fce..b0e99799824 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc @@ -444,12 +444,24 @@ void DepsgraphRelationBuilder::build_rig(Object *object) void DepsgraphRelationBuilder::build_proxy_rig(Object *object) { - OperationKey pose_init_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT); - OperationKey pose_done_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE); + OperationKey pose_init_key(&object->id, + DEG_NODE_TYPE_EVAL_POSE, + DEG_OPCODE_POSE_INIT); + OperationKey pose_done_key(&object->id, + DEG_NODE_TYPE_EVAL_POSE, + DEG_OPCODE_POSE_DONE); BLI_LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) { - OperationKey bone_local_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL); - OperationKey bone_ready_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY); - OperationKey bone_done_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE); + OperationKey bone_local_key(&object->id, + DEG_NODE_TYPE_BONE, pchan->name, + DEG_OPCODE_BONE_LOCAL); + OperationKey bone_ready_key(&object->id, + DEG_NODE_TYPE_BONE, + pchan->name, + DEG_OPCODE_BONE_READY); + OperationKey bone_done_key(&object->id, + DEG_NODE_TYPE_BONE, + pchan->name, + DEG_OPCODE_BONE_DONE); add_relation(pose_init_key, bone_local_key, "Pose Init -> Bone Local"); add_relation(bone_local_key, bone_ready_key, "Local -> Ready"); add_relation(bone_ready_key, bone_done_key, "Ready -> Done"); -- cgit v1.2.3 From 6eb2b57f5a76d3ff91b485801747ba8547ab72d1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 29 Jan 2018 14:45:45 +0100 Subject: Depsgraph: Disable labels on relations This code was disable a while back and got re-enabled by some previous debug process. Having relation names in dot file helps understanding what's going on in one cases, but makes things spread too far away in others. --- source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc index 270202f9f34..b76cd9eaadd 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc @@ -468,7 +468,7 @@ static void deg_debug_graphviz_node_relations(const DebugContext &ctx, deg_debug_fprintf(ctx, "["); /* Note: without label an id seem necessary to avoid bugs in graphviz/dot */ deg_debug_fprintf(ctx, "id=\"%s\"", rel->name); - deg_debug_fprintf(ctx, "label=\"%s\"", rel->name); + // deg_debug_fprintf(ctx, "label=\"%s\"", rel->name); deg_debug_fprintf(ctx, ",color="); deg_debug_graphviz_relation_color(ctx, rel); deg_debug_fprintf(ctx, ",penwidth=\"%f\"", penwidth); /* NOTE: edge from node to own cluster is not possible and gives graphviz -- cgit v1.2.3 From 68c1e3c28d60297d736a598bd897e1fff57f47b7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 29 Jan 2018 14:53:27 +0100 Subject: Depsgraph: Fix missing update when property from proxy rig drives something --- source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 85ea2c0a8e4..107ba8dc9a1 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -535,6 +535,14 @@ void DepsgraphRelationBuilder::build_object(Object *object) ComponentKey ob_pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE); ComponentKey proxy_pose_key(&object->proxy->id, DEG_NODE_TYPE_EVAL_POSE); add_relation(ob_pose_key, proxy_pose_key, "Proxy"); + + ComponentKey ob_parameters_key(&object->id, + DEG_NODE_TYPE_PARAMETERS); + ComponentKey proxy_parameters_key(&object->proxy->id, + DEG_NODE_TYPE_PARAMETERS); + add_relation(ob_parameters_key, + proxy_parameters_key, + "Proxy Parameters"); } /* Object dupligroup. */ if (object->dup_group != NULL) { -- cgit v1.2.3 From 263efb0b9a736a1529d8c6fce37e56bdb8d7866b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 29 Jan 2018 15:06:44 +0100 Subject: Depsgraph: Correction for previous fix Original fix only worked when there is one custom property. --- .../depsgraph/intern/builder/deg_builder_nodes_rig.cc | 1 + .../depsgraph/intern/builder/deg_builder_relations.cc | 8 -------- .../depsgraph/intern/builder/deg_builder_relations_rig.cc | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index 177a0ec4358..29cd72c13fd 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -274,6 +274,7 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *object) DEG_OPCODE_POSE_INIT); op_node->set_as_entry(); + BLI_LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) { op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name, NULL, DEG_OPCODE_BONE_LOCAL); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 107ba8dc9a1..85ea2c0a8e4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -535,14 +535,6 @@ void DepsgraphRelationBuilder::build_object(Object *object) ComponentKey ob_pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE); ComponentKey proxy_pose_key(&object->proxy->id, DEG_NODE_TYPE_EVAL_POSE); add_relation(ob_pose_key, proxy_pose_key, "Proxy"); - - ComponentKey ob_parameters_key(&object->id, - DEG_NODE_TYPE_PARAMETERS); - ComponentKey proxy_parameters_key(&object->proxy->id, - DEG_NODE_TYPE_PARAMETERS); - add_relation(ob_parameters_key, - proxy_parameters_key, - "Proxy Parameters"); } /* Object dupligroup. */ if (object->dup_group != NULL) { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc index b0e99799824..4a822fe7477 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc @@ -444,6 +444,7 @@ void DepsgraphRelationBuilder::build_rig(Object *object) void DepsgraphRelationBuilder::build_proxy_rig(Object *object) { + Object *proxy_from = object->proxy_from; OperationKey pose_init_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT); @@ -466,6 +467,20 @@ void DepsgraphRelationBuilder::build_proxy_rig(Object *object) add_relation(bone_local_key, bone_ready_key, "Local -> Ready"); add_relation(bone_ready_key, bone_done_key, "Ready -> Done"); add_relation(bone_done_key, pose_done_key, "Bone Done -> Pose Done"); + + if (pchan->prop != NULL) { + OperationKey bone_parameters(&object->id, + DEG_NODE_TYPE_PARAMETERS, + DEG_OPCODE_PARAMETERS_EVAL, + pchan->name); + OperationKey from_bone_parameters(&proxy_from->id, + DEG_NODE_TYPE_PARAMETERS, + DEG_OPCODE_PARAMETERS_EVAL, + pchan->name); + add_relation(from_bone_parameters, + bone_parameters, + "Proxy Bone Parameters"); + } } } -- cgit v1.2.3 From cebc7bb1980dcc0864685036188aad4cd79f64c6 Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Mon, 29 Jan 2018 10:01:19 -0500 Subject: Fix nan problem in previous bevel commit. For chains, access to g_prod[0] was undefined. And two minor style (whitespace) changes. --- release/datafiles/locale | 2 +- release/scripts/addons | 2 +- source/blender/bmesh/tools/bmesh_bevel.c | 7 +++---- source/tools | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/release/datafiles/locale b/release/datafiles/locale index cd65bc3277e..469c949d1ca 160000 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit cd65bc3277eda27e1c0b9f20a25928f6586d89a8 +Subproject commit 469c949d1ca882be19daa128842f813b72a944d8 diff --git a/release/scripts/addons b/release/scripts/addons index f5536e5e49c..c88411ff777 160000 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit f5536e5e49c34dfc0a7b8990257cd393339e23c6 +Subproject commit c88411ff7776a2db5d6ef6117a1b2faa42a95611 diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 35167835646..a18c4405a31 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -1985,6 +1985,7 @@ static bool adjust_the_cycle_or_chain_fast(BoundVert *vstart, int np, bool iscyc g_prod[i] = gprod; gprod_sum += gprod; } + g_prod[0] = 1.0f; if (iscycle) { gprod *= g[0]; if (fabs(gprod - 1.0f) > BEVEL_EPSILON) { @@ -1993,8 +1994,6 @@ static bool adjust_the_cycle_or_chain_fast(BoundVert *vstart, int np, bool iscyc MEM_freeN(g_prod); return false; } - else - g_prod[0] = 1.0f; } if (gprod_sum == 0.0f) { MEM_freeN(g); @@ -2163,7 +2162,7 @@ static void adjust_offsets(BevelParams *bp) /* first follow paired edges in left->right direction */ v = vchainstart = vanchor; iscycle = false; - while(v->eon && !v->visited && !iscycle) { + while (v->eon && !v->visited && !iscycle) { enext = find_other_end_edge_half(bp, v->efirst, &bvcur); BLI_assert(enext != NULL); vnext = enext->leftv; @@ -2191,7 +2190,7 @@ static void adjust_offsets(BevelParams *bp) vchainstart = vnext; v->visited = true; v = vnext; - } while(!v->visited && v->eon); + } while (!v->visited && v->eon); adjust_the_cycle_or_chain(vchainstart, false); } } while ((vanchor = vanchor->next) != bv->vmesh->boundstart); diff --git a/source/tools b/source/tools index ccf20e08702..7695e14cfc5 160000 --- a/source/tools +++ b/source/tools @@ -1 +1 @@ -Subproject commit ccf20e08702ee6424edbda01544bb9f8bc386de4 +Subproject commit 7695e14cfc5820ac66546e0e515914d85ab81af3 -- cgit v1.2.3 From 282b3d0fcd0ab32d6f8ae1694bc50599788eb256 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 29 Jan 2018 15:59:46 +0100 Subject: Revert "Fix T53914: Volumetric scattering now goes correctly through transparent surfaces." This reverts commit 3c852ba0741f794a697f95073b04921e9ff94039. This is breaking the regression tests, and maybe requires some deeper changes to really fix. --- intern/cycles/kernel/kernel_path_state.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index e5e915791cb..2ae866bb051 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -179,13 +179,13 @@ ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, #endif } else { - /* Test max bounces for various ray types. - The check for max_volume_bounce doesn't happen here but inside volume_shader_sample(). - See T53914. - */ + /* Test max bounces for various ray types. */ if((state->bounce >= kernel_data.integrator.max_bounce) || (state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) || (state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) || +#ifdef __VOLUME__ + (state->volume_bounce >= kernel_data.integrator.max_volume_bounce) || +#endif (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce)) { return 0.0f; -- cgit v1.2.3 From fb941679bb6e537a8fb1e1de69b5a446490e761b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 29 Jan 2018 14:51:22 +0100 Subject: Fix Cycles allocating too much device memory, after recent memory refactoring. Spotted by Ha Hyung-jin, thanks! --- intern/cycles/device/device_memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h index 0f2015ee27c..d8fe41e78bb 100644 --- a/intern/cycles/device/device_memory.h +++ b/intern/cycles/device/device_memory.h @@ -247,7 +247,7 @@ public: void alloc_to_device(size_t num, bool shrink_to_fit = true) { - size_t new_size = num*sizeof(T); + size_t new_size = num; bool reallocate; if(shrink_to_fit) { -- cgit v1.2.3 From 1eeb846e781dac3f55d6c108d0fc4c3cfe88f4cc Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 24 Jan 2018 20:19:48 +0100 Subject: Fix Cycles viewport render not updating when tweaking displacement shader. This was disabled to avoid updating the geometry every time when the material includes displacement, because there was no way to distinguish between surface shader and displacement updates. As a solution, we now compute an MD5 hash of the nodes linked to the displacement socket, and only update the mesh if that changes. Differential Revision: https://developer.blender.org/D3018 --- intern/cycles/blender/blender_mesh.cpp | 2 +- intern/cycles/graph/node.cpp | 20 ++++++++++++++++++++ intern/cycles/graph/node.h | 4 ++++ intern/cycles/render/film.cpp | 2 +- intern/cycles/render/graph.cpp | 29 ++++++++++++++++++++++++++++- intern/cycles/render/graph.h | 3 +++ intern/cycles/render/mesh.cpp | 4 ++-- intern/cycles/render/shader.cpp | 23 +++++++++++++++++++---- intern/cycles/render/shader.h | 2 +- intern/cycles/util/util_md5.cpp | 7 +++++++ intern/cycles/util/util_md5.h | 1 + 11 files changed, 87 insertions(+), 10 deletions(-) diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 3b07464cd96..cda9fb59e49 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -1123,7 +1123,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob, bool attribute_recalc = false; foreach(Shader *shader, mesh->used_shaders) - if(shader->need_update_attributes) + if(shader->need_update_mesh) attribute_recalc = true; if(!attribute_recalc) diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp index 10d91a1e4ef..c71221746ad 100644 --- a/intern/cycles/graph/node.cpp +++ b/intern/cycles/graph/node.cpp @@ -18,6 +18,7 @@ #include "graph/node_type.h" #include "util/util_foreach.h" +#include "util/util_md5.h" #include "util/util_param.h" #include "util/util_transform.h" @@ -403,5 +404,24 @@ bool Node::equals(const Node& other) const return true; } +/* Hash */ + +void Node::hash(MD5Hash& md5) +{ + md5.append(type->name.string()); + + foreach(const SocketType& socket, type->inputs) { + md5.append(socket.name.string()); + + if(socket.is_array()) { + const array* a = (const array*)(((char*)this) + socket.struct_offset); + md5.append((uint8_t*)a->data(), socket.size() * a->size()); + } + else { + md5.append(((uint8_t*)this) + socket.struct_offset, socket.size()); + } + } +} + CCL_NAMESPACE_END diff --git a/intern/cycles/graph/node.h b/intern/cycles/graph/node.h index 53425f5faf1..d198c38be32 100644 --- a/intern/cycles/graph/node.h +++ b/intern/cycles/graph/node.h @@ -24,6 +24,7 @@ CCL_NAMESPACE_BEGIN +class MD5Hash; struct Node; struct NodeType; struct Transform; @@ -88,6 +89,9 @@ struct Node /* equals */ bool equals(const Node& other) const; + /* compute hash of node and its socket values */ + void hash(MD5Hash& md5); + ustring name; const NodeType *type; }; diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index b305f01095f..69828cc78da 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -496,7 +496,7 @@ void Film::tag_passes_update(Scene *scene, const array& passes_) scene->mesh_manager->tag_update(scene); foreach(Shader *shader, scene->shaders) - shader->need_update_attributes = true; + shader->need_update_mesh = true; } else if(Pass::contains(passes, PASS_MOTION) != Pass::contains(passes_, PASS_MOTION)) scene->mesh_manager->tag_update(scene); diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index fb2e34c2fc7..096de878e51 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -23,8 +23,9 @@ #include "util/util_algorithm.h" #include "util/util_foreach.h" -#include "util/util_queue.h" #include "util/util_logging.h" +#include "util/util_md5.h" +#include "util/util_queue.h" CCL_NAMESPACE_BEGIN @@ -683,6 +684,32 @@ void ShaderGraph::break_cycles(ShaderNode *node, vector& visited, vectorid] = false; } +void ShaderGraph::compute_displacement_hash() +{ + /* Compute hash of all nodes linked to displacement, to detect if we need + * to recompute displacement when shader nodes change. */ + ShaderInput *displacement_in = output()->input("Displacement"); + + if(!displacement_in->link) { + displacement_hash = ""; + return; + } + + ShaderNodeSet nodes_displace; + find_dependencies(nodes_displace, displacement_in); + + MD5Hash md5; + foreach(ShaderNode *node, nodes_displace) { + node->hash(md5); + foreach(ShaderInput *input, node->inputs) { + int link_id = (input->link) ? input->link->parent->id : 0; + md5.append((uint8_t*)&link_id, sizeof(link_id)); + } + } + + displacement_hash = md5.get_hex(); +} + void ShaderGraph::clean(Scene *scene) { /* Graph simplification */ diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h index 1d1701b30a2..7ed292b5b96 100644 --- a/intern/cycles/render/graph.h +++ b/intern/cycles/render/graph.h @@ -42,6 +42,7 @@ class SVMCompiler; class OSLCompiler; class OutputNode; class ConstantFolder; +class MD5Hash; /* Bump * @@ -243,6 +244,7 @@ public: size_t num_node_ids; bool finalized; bool simplified; + string displacement_hash; ShaderGraph(); ~ShaderGraph(); @@ -256,6 +258,7 @@ public: void relink(ShaderNode *node, ShaderOutput *from, ShaderOutput *to); void remove_proxy_nodes(); + void compute_displacement_hash(); void simplify(Scene *scene); void finalize(Scene *scene, bool do_bump = false, diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index 4bf5b60a737..5bcb47deb65 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -1964,7 +1964,7 @@ void MeshManager::device_update(Device *device, DeviceScene *dscene, Scene *scen /* Update normals. */ foreach(Mesh *mesh, scene->meshes) { foreach(Shader *shader, mesh->used_shaders) { - if(shader->need_update_attributes) + if(shader->need_update_mesh) mesh->need_update = true; } @@ -2104,7 +2104,7 @@ void MeshManager::device_update(Device *device, DeviceScene *dscene, Scene *scen << summary.full_report(); foreach(Shader *shader, scene->shaders) { - shader->need_update_attributes = false; + shader->need_update_mesh = false; } Scene::MotionType need_motion = scene->need_motion(); diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index abb9e19a074..51b7f76b9d5 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -200,7 +200,7 @@ Shader::Shader() used = false; need_update = true; - need_update_attributes = true; + need_update_mesh = true; } Shader::~Shader() @@ -235,9 +235,24 @@ void Shader::set_graph(ShaderGraph *graph_) /* do this here already so that we can detect if mesh or object attributes * are needed, since the node attribute callbacks check if their sockets * are connected but proxy nodes should not count */ - if(graph_) + if(graph_) { graph_->remove_proxy_nodes(); + if(displacement_method != DISPLACE_BUMP) { + graph_->compute_displacement_hash(); + } + } + + /* update geometry if displacement changed */ + if(displacement_method != DISPLACE_BUMP) { + const char *old_hash = (graph)? graph->displacement_hash.c_str() : ""; + const char *new_hash = (graph_)? graph_->displacement_hash.c_str() : ""; + + if(strcmp(old_hash, new_hash) != 0) { + need_update_mesh = true; + } + } + /* assign graph */ delete graph; graph = graph_; @@ -294,9 +309,9 @@ void Shader::tag_update(Scene *scene) } /* compare if the attributes changed, mesh manager will check - * need_update_attributes, update the relevant meshes and clear it. */ + * need_update_mesh, update the relevant meshes and clear it. */ if(attributes.modified(prev_attributes)) { - need_update_attributes = true; + need_update_mesh = true; scene->mesh_manager->need_update = true; } diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h index 3fdcd3c0c5b..4a48c1347da 100644 --- a/intern/cycles/render/shader.h +++ b/intern/cycles/render/shader.h @@ -98,7 +98,7 @@ public: /* synchronization */ bool need_update; - bool need_update_attributes; + bool need_update_mesh; /* If the shader has only volume components, the surface is assumed to * be transparent. diff --git a/intern/cycles/util/util_md5.cpp b/intern/cycles/util/util_md5.cpp index 19168135f01..749760d84f0 100644 --- a/intern/cycles/util/util_md5.cpp +++ b/intern/cycles/util/util_md5.cpp @@ -310,6 +310,13 @@ void MD5Hash::append(const uint8_t *data, int nbytes) memcpy(buf, p, left); } +void MD5Hash::append(const string& str) +{ + if(str.size()) { + append((const uint8_t*)str.c_str(), str.size()); + } +} + bool MD5Hash::append_file(const string& filepath) { FILE *f = path_fopen(filepath, "rb"); diff --git a/intern/cycles/util/util_md5.h b/intern/cycles/util/util_md5.h index e4cd66c85b0..b043b591e67 100644 --- a/intern/cycles/util/util_md5.h +++ b/intern/cycles/util/util_md5.h @@ -41,6 +41,7 @@ public: ~MD5Hash(); void append(const uint8_t *data, int size); + void append(const string& str); bool append_file(const string& filepath); string get_hex(); -- cgit v1.2.3 From b0af44fa4d7a2e134b315c49a4fbdf573f781004 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 30 Jan 2018 14:30:28 +1100 Subject: Fix T50630: Fluid fails on win32 w/ unicode paths Allow overriding gzip open w/ elbeem. --- intern/elbeem/CMakeLists.txt | 8 ++++++++ intern/elbeem/intern/ntl_blenderdumper.cpp | 12 +++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt index 30c5615f1d2..1534219a052 100644 --- a/intern/elbeem/CMakeLists.txt +++ b/intern/elbeem/CMakeLists.txt @@ -107,6 +107,14 @@ add_definitions( -DNEWDIRVELMOTEST=0 ) +if(WIN32) + # We need BLI_gzopen on win32 for unicode paths + add_definitions( + -DLBM_GZIP_OVERRIDE_H="${CMAKE_SOURCE_DIR}/source/blender/blenlib/BLI_fileops.h" + -D LBM_GZIP_OPEN_FN="\(gzFile\)BLI_gzopen" + ) +endif() + if(WITH_OPENMP) add_definitions(-DPARALLEL=1) else() diff --git a/intern/elbeem/intern/ntl_blenderdumper.cpp b/intern/elbeem/intern/ntl_blenderdumper.cpp index ec05c25004d..af99dc03add 100644 --- a/intern/elbeem/intern/ntl_blenderdumper.cpp +++ b/intern/elbeem/intern/ntl_blenderdumper.cpp @@ -22,7 +22,11 @@ #include - +#ifdef LBM_GZIP_OVERRIDE_H +# include LBM_GZIP_OVERRIDE_H +#else +# define LBM_GZIP_OPEN_FN(a, b) gzopen(a, b) +#endif /****************************************************************************** * Constructor @@ -141,7 +145,8 @@ int ntlBlenderDumper::renderScene( void ) std::ostringstream bvelfilename; bvelfilename << boutfilename.str(); bvelfilename << ".bvel.gz"; - gzf = gzopen(bvelfilename.str().c_str(), "wb9"); + /* wraps gzopen */ + gzf = LBM_GZIP_OPEN_FN(bvelfilename.str().c_str(), "wb9"); if(gzf) { int numVerts; if(sizeof(numVerts)!=4) { errMsg("ntlBlenderDumper::renderScene","Invalid int size"); return 1; } @@ -162,7 +167,8 @@ int ntlBlenderDumper::renderScene( void ) // compress all bobj's boutfilename << ".bobj.gz"; - gzf = gzopen(boutfilename.str().c_str(), "wb1"); // wb9 is slow for large meshes! + /* wraps gzopen */ + gzf = LBM_GZIP_OPEN_FN(boutfilename.str().c_str(), "wb1"); // wb9 is slow for large meshes! if (!gzf) { errMsg("ntlBlenderDumper::renderScene","Unable to open output '" + boutfilename.str() + "' "); return 1; } -- cgit v1.2.3 From d0f63d402db5260d57dc60cf52aa029d7f11f161 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 30 Jan 2018 20:33:20 +1100 Subject: Fix T53943: Weight paint crash in new scene --- source/blender/blenkernel/BKE_paint.h | 1 + source/blender/blenkernel/intern/paint.c | 36 ++++++++++++++++++++++ source/blender/editors/sculpt_paint/paint_vertex.c | 3 ++ source/blender/editors/sculpt_paint/sculpt.c | 29 ++--------------- 4 files changed, 43 insertions(+), 26 deletions(-) diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index cc02d8b547e..8e7e69d22ca 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -253,6 +253,7 @@ void BKE_sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, str struct MultiresModifierData *BKE_sculpt_multires_active(struct Scene *scene, struct Object *ob); int BKE_sculpt_mask_layers_ensure(struct Object *ob, struct MultiresModifierData *mmd); +void BKE_sculpt_toolsettings_data_ensure(struct Scene *scene); enum { SCULPT_MASK_LAYER_CALC_VERT = (1 << 0), diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index c6aa9c40fce..dba2bc7287e 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1057,3 +1057,39 @@ int BKE_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd) return ret; } + +void BKE_sculpt_toolsettings_data_ensure(struct Scene *scene) +{ + Sculpt *sd = scene->toolsettings->sculpt; + if (sd == NULL) { + sd = scene->toolsettings->sculpt = MEM_callocN(sizeof(Sculpt), __func__); + + /* Turn on X plane mirror symmetry by default */ + sd->paint.symmetry_flags |= PAINT_SYMM_X; + sd->paint.flags |= PAINT_SHOW_BRUSH; + + /* Make sure at least dyntopo subdivision is enabled */ + sd->flags |= SCULPT_DYNTOPO_SUBDIVIDE | SCULPT_DYNTOPO_COLLAPSE; + } + + if (!sd->detail_size) { + sd->detail_size = 12; + } + if (!sd->detail_percent) { + sd->detail_percent = 25; + } + if (sd->constant_detail == 0.0f) { + sd->constant_detail = 3.0f; + } + + /* Set sane default tiling offsets */ + if (!sd->paint.tile_offset[0]) { + sd->paint.tile_offset[0] = 1.0f; + } + if (!sd->paint.tile_offset[1]) { + sd->paint.tile_offset[1] = 1.0f; + } + if (!sd->paint.tile_offset[2]) { + sd->paint.tile_offset[2] = 1.0f; + } +} diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index a5405338ada..490343ab1f2 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -939,6 +939,9 @@ static void do_weight_paint_vertex( /* Toggle operator for turning vertex paint mode on or off (copied from sculpt.c) */ static void vertex_paint_init_session(Scene *scene, Object *ob) { + /* Create persistent sculpt mode data */ + BKE_sculpt_toolsettings_data_ensure(scene); + if (ob->sculpt == NULL) { ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session"); BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, false); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 37af1732045..2468f273a04 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5585,8 +5585,10 @@ static void SCULPT_OT_symmetrize(wmOperatorType *ot) static void sculpt_init_session(Scene *scene, Object *ob) { - ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session"); + /* Create persistent sculpt mode data */ + BKE_sculpt_toolsettings_data_ensure(scene); + ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session"); BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, false); } @@ -5650,31 +5652,6 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) if (flush_recalc) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - /* Create persistent sculpt mode data */ - if (!ts->sculpt) { - ts->sculpt = MEM_callocN(sizeof(Sculpt), "sculpt mode data"); - - /* Turn on X plane mirror symmetry by default */ - ts->sculpt->paint.symmetry_flags |= PAINT_SYMM_X; - ts->sculpt->paint.flags |= PAINT_SHOW_BRUSH; - - /* Make sure at least dyntopo subdivision is enabled */ - ts->sculpt->flags |= SCULPT_DYNTOPO_SUBDIVIDE | SCULPT_DYNTOPO_COLLAPSE; - } - - if (!ts->sculpt->detail_size) - ts->sculpt->detail_size = 12; - if (!ts->sculpt->detail_percent) - ts->sculpt->detail_percent = 25; - if (ts->sculpt->constant_detail == 0.0f) - ts->sculpt->constant_detail = 3.0f; - - /* Set sane default tiling offsets */ - if (!ts->sculpt->paint.tile_offset[0]) ts->sculpt->paint.tile_offset[0] = 1.0f; - if (!ts->sculpt->paint.tile_offset[1]) ts->sculpt->paint.tile_offset[1] = 1.0f; - if (!ts->sculpt->paint.tile_offset[2]) ts->sculpt->paint.tile_offset[2] = 1.0f; - - /* Create sculpt mode session data */ if (ob->sculpt) BKE_sculptsession_free(ob); -- cgit v1.2.3 From c80b1f54108b8d3491830b0667db4798fd751728 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 30 Jan 2018 21:02:27 +1100 Subject: Cleanup: warning, spelling --- source/blender/editors/sculpt_paint/sculpt.c | 1 - source/creator/creator_args.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2468f273a04..696267a0e8e 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5596,7 +5596,6 @@ static void sculpt_init_session(Scene *scene, Object *ob) static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - ToolSettings *ts = CTX_data_tool_settings(C); Object *ob = CTX_data_active_object(C); const int mode_flag = OB_MODE_SCULPT; const bool is_mode_set = (ob->mode & mode_flag) != 0; diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 19f30584f89..a9da1e8c794 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -1351,7 +1351,7 @@ static const char arg_handle_render_frame_doc[] = "\n" "\t* + start frame relative, - end frame relative.\n" "\t* A comma separated list of frames can also be used (no spaces).\n" -"\t* A range of frames can be expressed using '..' seperator between the first and last frames (inclusive).\n" +"\t* A range of frames can be expressed using '..' separator between the first and last frames (inclusive).\n" ; static int arg_handle_render_frame(int argc, const char **argv, void *data) { -- cgit v1.2.3 From b3c4a2a8da7f1a243628da852d1b8fdc986cbc25 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 30 Jan 2018 14:14:26 +0100 Subject: Fix T52520: Metaballs in edit mode causes infinite Cycles viewport reset The issue was introduced by eb016eb as a fix for T41258, which added depsgraph tagging with zero flag. The comment was saying that it's to make derived caches to be updated, however bot sure how that could possibly work: tagging ID for update with 0 flag only sets updated tags in bmain in old dependency graph. In the new depsgraph, where object data is a part of depsgraph, doing such a tag forces object to be updated, which re-triggers viewport rendering, which is causing such an infinite viewport render rest. Can not reproduce any crashes here, so maybe it's fine to move on with this change. --- source/blender/editors/include/ED_view3d.h | 2 +- source/blender/editors/object/object_edit.c | 5 ----- source/blender/editors/space_view3d/space_view3d.c | 6 +----- source/blender/editors/space_view3d/view3d_edit.c | 2 +- source/blender/editors/space_view3d/view3d_view.c | 6 +++--- source/blender/makesrna/intern/rna_space.c | 4 ++-- 6 files changed, 8 insertions(+), 17 deletions(-) diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 6e01245e6dc..86de619323c 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -452,7 +452,7 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, /* render */ void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *ar); -void ED_view3d_shade_update(struct Main *bmain, struct Scene *scene, struct View3D *v3d, struct ScrArea *sa); +void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa); #define V3D_IS_ZBUF(v3d) \ (((v3d)->flag & V3D_ZBUF_SELECT) && ((v3d)->drawtype > OB_WIRE)) diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index d7c7976c344..f8210f8a595 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -398,11 +398,6 @@ static bool ED_object_editmode_load_ex(Main *bmain, Object *obedit, const bool f if (freedata) ED_mball_editmball_free(obedit); } - /* Tag update so no access to freed data referenced from - * derived cache will happen. - */ - DAG_id_tag_update((ID *)obedit->data, 0); - return true; } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 996506a9cf7..a36b698a04e 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -290,7 +290,7 @@ void ED_view3d_stop_render_preview(wmWindowManager *wm, ARegion *ar) } } -void ED_view3d_shade_update(Main *bmain, Scene *scene, View3D *v3d, ScrArea *sa) +void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *sa) { wmWindowManager *wm = bmain->wm.first; @@ -302,10 +302,6 @@ void ED_view3d_shade_update(Main *bmain, Scene *scene, View3D *v3d, ScrArea *sa) ED_view3d_stop_render_preview(wm, ar); } } - else if (scene->obedit != NULL && scene->obedit->type == OB_MESH) { - /* Tag mesh to load edit data. */ - DAG_id_tag_update(scene->obedit->data, 0); - } } /* ******************** default callbacks for view3d space ***************** */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index ebd0bbe0129..2d002a38a19 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -4729,7 +4729,7 @@ static int toggle_render_exec(bContext *C, wmOperator *UNUSED(op)) v3d->prev_drawtype = v3d->drawtype; v3d->drawtype = OB_RENDER; } - ED_view3d_shade_update(CTX_data_main(C), CTX_data_scene(C), v3d, CTX_wm_area(C)); + ED_view3d_shade_update(CTX_data_main(C), v3d, CTX_wm_area(C)); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index baeee0e89d7..56f0e39aca0 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1164,7 +1164,7 @@ static bool view3d_localview_init( return ok; } -static void restore_localviewdata(wmWindowManager *wm, wmWindow *win, Main *bmain, Scene *scene, ScrArea *sa, const int smooth_viewtx) +static void restore_localviewdata(wmWindowManager *wm, wmWindow *win, Main *bmain, ScrArea *sa, const int smooth_viewtx) { const bool free = true; ARegion *ar; @@ -1214,7 +1214,7 @@ static void restore_localviewdata(wmWindowManager *wm, wmWindow *win, Main *bmai } } - ED_view3d_shade_update(bmain, scene, v3d, sa); + ED_view3d_shade_update(bmain, v3d, sa); } } } @@ -1231,7 +1231,7 @@ static bool view3d_localview_exit( locallay = v3d->lay & 0xFF000000; - restore_localviewdata(wm, win, bmain, scene, sa, smooth_viewtx); + restore_localviewdata(wm, win, bmain, sa, smooth_viewtx); /* for when in other window the layers have changed */ if (v3d->scenelock) v3d->lay = scene->lay; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index f3a7cd485d9..ca24cdd27ec 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -535,12 +535,12 @@ static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), Poin DAG_on_visible_update(bmain, false); } -static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { View3D *v3d = (View3D *)(ptr->data); ScrArea *sa = rna_area_from_space(ptr); - ED_view3d_shade_update(bmain, scene, v3d, sa); + ED_view3d_shade_update(bmain, v3d, sa); } static void rna_SpaceView3D_matcap_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) -- cgit v1.2.3