mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 21:37:01 +00:00
Compare commits
1 Commits
260663e38e
...
aa3bfa93b5
Author | SHA1 | Date | |
---|---|---|---|
|
aa3bfa93b5 |
@ -14,7 +14,3 @@ pub struct Animations {
|
||||
/// 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
|
||||
pub struct AnimationPlayerLink(pub Entity);
|
||||
|
||||
#[derive(Component, Reflect, Default, Debug)]
|
||||
#[reflect(Component)]
|
||||
pub struct Animated;
|
@ -120,7 +120,6 @@ impl Plugin for BlueprintsPlugin {
|
||||
.register_type::<MaterialInfo>()
|
||||
.register_type::<SpawnHere>()
|
||||
.register_type::<Animations>()
|
||||
.register_type::<Animated>()
|
||||
.register_type::<BlueprintsList>()
|
||||
.register_type::<Vec<String>>()
|
||||
.register_type::<HashMap<String, Vec<String>>>()
|
||||
|
Binary file not shown.
@ -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)
|
||||
empty_obj["BlueprintsList"] = f"({json.dumps(dict(children_per_collection))})"
|
||||
#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)
|
||||
|
||||
# we copy custom properties over from our original object to our empty
|
||||
@ -134,9 +125,7 @@ def copy_hollowed_collection_into(source_collection, destination_collection, par
|
||||
if object.parent == None:
|
||||
copy = duplicate_object_recursive(object, None, destination_collection)
|
||||
if parent_empty is not None:
|
||||
copy.parent = parent_empty
|
||||
if object.animation_data:
|
||||
copy['Animated'] = '()'
|
||||
copy.parent = parent_empty
|
||||
|
||||
# for every sub-collection of the source, copy its content into a new sub-collection of the destination
|
||||
for collection in source_collection.children:
|
||||
|
Loading…
Reference in New Issue
Block a user