mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
added property editor for untyped textures
This commit is contained in:
@@ -93,6 +93,7 @@ use crate::{
|
||||
},
|
||||
message::MessageSender,
|
||||
};
|
||||
use fyrox::asset::untyped::UntypedResource;
|
||||
use std::{path::Path, sync::Arc};
|
||||
|
||||
pub mod animation;
|
||||
@@ -198,7 +199,9 @@ pub fn make_property_editors_container(sender: MessageSender) -> PropertyEditorD
|
||||
container.insert(FontPropertyEditorDefinition);
|
||||
container.insert(InheritablePropertyEditorDefinition::<FontResource>::new());
|
||||
container.insert(InheritablePropertyEditorDefinition::<Option<TextureResource>>::new());
|
||||
container.insert(InheritablePropertyEditorDefinition::<Option<UntypedResource>>::new());
|
||||
container.register_inheritable_vec_collection::<Option<TextureResource>>();
|
||||
container.register_inheritable_vec_collection::<Option<UntypedResource>>();
|
||||
|
||||
container.insert(MaterialPropertyEditorDefinition {
|
||||
sender: Mutex::new(sender.clone()),
|
||||
|
||||
@@ -12,6 +12,7 @@ use crate::{
|
||||
MODEL_RESOURCE_UUID, SHADER_RESOURCE_UUID, SOUND_BUFFER_RESOURCE_UUID, TEXTURE_RESOURCE_UUID,
|
||||
};
|
||||
use fyrox_core::math::curve::Curve;
|
||||
use fyrox_core::uuid;
|
||||
use fyrox_core::visitor::RegionGuard;
|
||||
use std::ffi::OsStr;
|
||||
use std::fmt::Display;
|
||||
@@ -243,7 +244,8 @@ impl Visit for ResourceHeader {
|
||||
/// that the resource is in default state. This is a trade-off to prevent wrapping internals into
|
||||
/// `Option`, that in some cases could lead to convoluted code with lots of `unwrap`s and state
|
||||
/// assumptions.
|
||||
#[derive(Clone, Reflect)]
|
||||
#[derive(Clone, Reflect, TypeUuidProvider)]
|
||||
#[type_uuid(id = "21613484-7145-4d1c-87d8-62fa767560ab")]
|
||||
pub struct UntypedResource(pub Arc<Mutex<ResourceHeader>>);
|
||||
|
||||
impl Visit for UntypedResource {
|
||||
|
||||
Reference in New Issue
Block a user