This commit is contained in:
1 parent
d77cc6a40e
commit
cc6acb188d
11 files changed
+548
-165
No files matched your search
@@ -6,6 +6,9 @@ use bevy_inspector_egui::bevy_inspector::hierarchy::SelectedEntities;
|
||||
use egui_phosphor_icons::icons;
|
||||
use transform_gizmo_bevy::prelude::GizmoOptions;
|
||||
|
||||
use crate::assets::operators::{
|
||||
apply_material_operator, apply_texture_operator, place_asset_operator, place_subasset_operator,
|
||||
};
|
||||
use crate::assets::{AssetSelection, AssetSubAssetKind, EditorAssets};
|
||||
use crate::gizmos::{EditorGizmoMode, EditorGizmoSpace};
|
||||
use crate::render_target::ViewportRenderTarget;
|
||||
@@ -545,7 +548,7 @@ fn viewport_asset_drop_ui(
|
||||
..
|
||||
}
|
||||
) {
|
||||
crate::assets::spawn_subasset_at(world, &selection, placement);
|
||||
place_subasset_operator(world, selection, placement);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -565,7 +568,7 @@ fn viewport_asset_drop_ui(
|
||||
.unwrap_or_else(|| crate::assets::ASSETS_ROOT.to_string()),
|
||||
kind: crate::assets::EditorAssetKind::Texture,
|
||||
};
|
||||
crate::ui::helpers::apply_texture_to_selection(world, &asset, selected);
|
||||
apply_texture_operator(world, asset, selected);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -578,15 +581,15 @@ fn viewport_asset_drop_ui(
|
||||
};
|
||||
match asset.kind {
|
||||
crate::assets::EditorAssetKind::Texture => {
|
||||
crate::ui::helpers::apply_texture_to_selection(world, &asset, selected);
|
||||
apply_texture_operator(world, asset, selected);
|
||||
return;
|
||||
}
|
||||
crate::assets::EditorAssetKind::Material => {
|
||||
crate::ui::helpers::apply_material_asset_to_selection(world, &asset, selected);
|
||||
apply_material_operator(world, asset, selected);
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
crate::assets::spawn_asset_at(world, &asset, placement);
|
||||
place_asset_operator(world, asset, placement);
|
||||
}
|
||||
Reference in new issue
Block a user