Coder Social home page Coder Social logo

Comments (2)

tefusion avatar tefusion commented on June 2, 2024 1

Well they don't exactly work as intended. The importer now just has that converter script included at

#blend shape tracks don't work with SubdivMeshInstance3D
func convert_animation_blend_shape_tracks(anim_player: AnimationPlayer):
for animation_library_name in anim_player.get_animation_library_list():
var anim_lib:AnimationLibrary=anim_player.get_animation_library(animation_library_name)
for animation_name in anim_lib.get_animation_list():
var animation: Animation=anim_lib.get_animation(animation_name)
for track_idx in range(0, animation.get_track_count()):
if animation.track_get_type(track_idx)==Animation.TYPE_BLEND_SHAPE:
var fake_anim=animation.add_track(Animation.TYPE_VALUE)
var old_track_path=animation.track_get_path(track_idx)
var node_name=String(old_track_path.get_name(0))
var blend_shape_name=String(old_track_path.get_subname(0))
var new_track_path=node_name+":"+"blend_shapes/"+blend_shape_name
animation.track_set_path(fake_anim, NodePath(new_track_path))
for key_idx in range(0, animation.track_get_key_count(track_idx)):
var val=animation.track_get_key_value(track_idx, key_idx)
var time=animation.track_get_key_time(track_idx, key_idx)
var transition=animation.track_get_key_transition(track_idx, key_idx)
animation.track_insert_key(fake_anim, time, val, transition)
animation.track_swap(track_idx, fake_anim)
animation.remove_track(fake_anim)
.

The only real disadvantage I see right now is that the tracks aren't blue, since it prefixes all tracks with blendshape you'd have to actively try to make a problematic property. No idea if blend shape tracks otherwise actually work differently.

Edit: If you meant the actual comment there: In the AnimationPlayer for blend shape tracks the node gets casted to MeshInstance3D, cause SubdivMeshInstance3D doesn't inherit from MeshInstance this converter code needs to run. Imo with the existence of BakedSubdivMesh not that urgent (cause that one uses the ArrayMesh, MeshInstance3D combo and offers fully godot compatible data)

from godot-subdiv.

fire avatar fire commented on June 2, 2024

with the existence of BakedSubdivMesh not that urgent

Not so urgent. Closing

from godot-subdiv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.