diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-12 08:34:00 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-12 08:34:00 -0300 |
commit | 35b404ba085819e5cd5f432b7c00ef3167523bb7 (patch) | |
tree | 3219b591e13c31aef7b33cad46cd5febdc2d79e0 /scene/3d/mesh_instance.cpp | |
parent | 5afaf84ae1406fd8d03887740c3d4a38fa5e2a29 (diff) |
Unify naming of blendshape / morphtarget into just "Blend Shape"
Diffstat (limited to 'scene/3d/mesh_instance.cpp')
-rw-r--r-- | scene/3d/mesh_instance.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index c4712ecc7a..66bad45c45 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -42,10 +42,10 @@ bool MeshInstance::_set(const StringName& p_name, const Variant& p_value) { return false; - Map<StringName,MorphTrack>::Element *E = morph_tracks.find(p_name); + Map<StringName,BlendShapeTrack>::Element *E = blend_shape_tracks.find(p_name); if (E) { E->get().value=p_value; - VisualServer::get_singleton()->instance_set_morph_target_weight(get_instance(),E->get().idx,E->get().value); + VisualServer::get_singleton()->instance_set_blend_shape_weight(get_instance(),E->get().idx,E->get().value); return true; } @@ -67,7 +67,7 @@ bool MeshInstance::_get(const StringName& p_name,Variant &r_ret) const { if (!get_instance().is_valid()) return false; - const Map<StringName,MorphTrack>::Element *E = morph_tracks.find(p_name); + const Map<StringName,BlendShapeTrack>::Element *E = blend_shape_tracks.find(p_name); if (E) { r_ret = E->get().value; return true; @@ -86,7 +86,7 @@ bool MeshInstance::_get(const StringName& p_name,Variant &r_ret) const { void MeshInstance::_get_property_list( List<PropertyInfo> *p_list) const { List<String> ls; - for(const Map<StringName,MorphTrack>::Element *E=morph_tracks.front();E;E=E->next()) { + for(const Map<StringName,BlendShapeTrack>::Element *E=blend_shape_tracks.front();E;E=E->next()) { ls.push_back(E->key()); } @@ -119,16 +119,16 @@ void MeshInstance::set_mesh(const Ref<Mesh>& p_mesh) { mesh=p_mesh; - morph_tracks.clear(); + blend_shape_tracks.clear(); if (mesh.is_valid()) { - for(int i=0;i<mesh->get_morph_target_count();i++) { + for(int i=0;i<mesh->get_blend_shape_count();i++) { - MorphTrack mt; + BlendShapeTrack mt; mt.idx=i; mt.value=0; - morph_tracks["morph/"+String(mesh->get_morph_target_name(i))]=mt; + blend_shape_tracks["blend_shapes/"+String(mesh->get_blend_shape_name(i))]=mt; } mesh->connect(CoreStringNames::get_singleton()->changed,this,SceneStringNames::get_singleton()->_mesh_changed); |