Compare commits

..

1 Commits

Author SHA1 Message Date
Mark Moissette aa3bfa93b5
Merge 7584078f6d into 9f21df035b 2024-03-19 14:23:38 +01:00
4 changed files with 1 additions and 17 deletions

View File

@ -14,7 +14,3 @@ pub struct Animations {
/// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down" /// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down"
/// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid /// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid
pub struct AnimationPlayerLink(pub Entity); pub struct AnimationPlayerLink(pub Entity);
#[derive(Component, Reflect, Default, Debug)]
#[reflect(Component)]
pub struct Animated;

View File

@ -120,7 +120,6 @@ impl Plugin for BlueprintsPlugin {
.register_type::<MaterialInfo>() .register_type::<MaterialInfo>()
.register_type::<SpawnHere>() .register_type::<SpawnHere>()
.register_type::<Animations>() .register_type::<Animations>()
.register_type::<Animated>()
.register_type::<BlueprintsList>() .register_type::<BlueprintsList>()
.register_type::<Vec<String>>() .register_type::<Vec<String>>()
.register_type::<HashMap<String, Vec<String>>>() .register_type::<HashMap<String, Vec<String>>>()

View File

@ -112,15 +112,6 @@ def copy_hollowed_collection_into(source_collection, destination_collection, par
get_sub_collections([object.instance_collection], root_node, children_per_collection) get_sub_collections([object.instance_collection], root_node, children_per_collection)
empty_obj["BlueprintsList"] = f"({json.dumps(dict(children_per_collection))})" empty_obj["BlueprintsList"] = f"({json.dumps(dict(children_per_collection))})"
#empty_obj["Assets"] = {"Animations": [], "Materials": [], "Models":[], "Textures":[], "Audio":[], "Other":[]} #empty_obj["Assets"] = {"Animations": [], "Materials": [], "Models":[], "Textures":[], "Audio":[], "Other":[]}
if object.animation_data:
print("I have animation data")
ad = object.animation_data
if ad.action:
print(object.name,'uses',ad.action.name)
for t in ad.nla_tracks:
for s in t.strips:
print(object.name,'uses',s.action.name)
empty_obj['Animated'] = '()'
copy_animation_data(object, empty_obj) copy_animation_data(object, empty_obj)
# we copy custom properties over from our original object to our empty # we copy custom properties over from our original object to our empty
@ -135,8 +126,6 @@ def copy_hollowed_collection_into(source_collection, destination_collection, par
copy = duplicate_object_recursive(object, None, destination_collection) copy = duplicate_object_recursive(object, None, destination_collection)
if parent_empty is not None: if parent_empty is not None:
copy.parent = parent_empty copy.parent = parent_empty
if object.animation_data:
copy['Animated'] = '()'
# for every sub-collection of the source, copy its content into a new sub-collection of the destination # for every sub-collection of the source, copy its content into a new sub-collection of the destination
for collection in source_collection.children: for collection in source_collection.children: