Dmitry Stepanov
13bf223e07
fixed editing of inheritable vars
2026-05-23 22:16:05 +03:00
Dmitry Stepanov
62501164b0
use inner value of node/widget wrapper in the inspector
2026-05-23 10:47:50 +03:00
Dmitry Stepanov
bee807ea17
fixed downcasting for widgets and scene nodes
...
- removed a bunch of unnecessary casts to &dyn Reflect
2026-05-22 20:31:20 +03:00
Dmitry Stepanov
d821684037
fixed is_out_of_sync to recursively check for out of sync
2026-05-21 22:04:23 +03:00
Dmitry Stepanov
8eb7496963
register ui widgets in inspector
2026-05-21 22:03:53 +03:00
Dmitry Stepanov
e4c14c9546
register scene nodes in inspector
2026-05-21 21:47:43 +03:00
Dmitry Stepanov
3a6c36de6b
doc improvements + corrections
2026-05-21 19:43:59 +03:00
Dmitry Stepanov
480559e07a
refactored Reflect::as_xxx methods to return value itself
...
- there's no reason anymore to use closures there because proxy structures now supports reflection in normal way
2026-05-21 18:22:39 +03:00
Dmitry Stepanov
1799856ea3
use Reflect auto impl for trait object wrappers
2026-05-21 13:37:28 +03:00
Dmitry Stepanov
07566d95b4
use derived impls of Reflect for Script + Node
2026-05-20 23:47:38 +03:00
Dmitry Stepanov
32d37bde41
ability to specify custom clone function for reflect trait
2026-05-20 23:38:41 +03:00
Dmitry Stepanov
ec83a5d6e5
refactored Reflect trait to remove unnecessary proxying
...
- proxying to the inner value overly complicates the implementation and adds a lot overhead
- this is quite dangerous change since it may have subtle side effects, needs to be thoroughly tested
2026-05-19 18:49:17 +03:00
Dmitry Stepanov
93d4920477
renamed methods with confusing naming + docs
2026-05-16 19:31:41 +03:00
Dmitry Stepanov
e96d96544f
mark inheritable variable as modified when accessing fields by _direct
2026-05-15 13:03:05 +03:00
Dmitry Stepanov
e7f1b1d4d8
cleaned up type info fetching from Reflect + put type info in a struct
2026-05-15 11:32:33 +03:00
Dmitry Stepanov
0a6b7a9bf1
fixed doc test
2026-05-14 22:06:23 +03:00
Dmitry Stepanov
b3be88a471
Reflect::into_any -> Reflect::into_inner_reflect + docs
2026-05-14 11:28:08 +03:00
June
e8740b6452
Fix read_pixels_of_type UB: use bytemuck::cast_slice ( #918 )
...
* fix: eliminate UB in read_pixels_of_type via bytemuck::cast_slice
The previous implementation used Vec::from_raw_parts to reinterpret a
Vec<u8> as Vec<T>, then mem::forget to suppress the original Vec's
destructor. This was UB for two reasons:
1. mem::forget receives an invalid value (already-transferred ownership)
2. Vec<T> deallocates with align_of::<T>(), but the memory was allocated
with align_of::<u8>() = 1, violating alloc/dealloc layout invariants
Replace with bytemuck::cast_slice + to_vec(), which safely casts the
byte slice and copies into a properly-aligned Vec<T>. The Pod bound
already guarantees valid bit patterns for any byte sequence.
Closes #827
* fix: zero-copy TypedPixels<T> wrapper preserves original byte layout
Per @mrDIMAS review: avoid the .to_vec() copy by introducing a
TypedPixels<T> proxy struct that owns the original Vec<u8> (preserving
its allocation layout for correct deallocation) and exposes &[T] via
Deref + bytemuck::cast_slice. Mirrors the BytesStorage pattern used in
fyrox-impl/src/scene/mesh/buffer.rs.
The single caller (HDR luminance histogram) uses &pixels as a slice,
which works unchanged via deref coercion.
2026-05-14 10:48:13 +03:00
Dmitry Stepanov
91f8c360b5
removed Reflect::as_any/as_any_mut
...
- useless methods because can be replaced via `Reflect::as_reflect` + `as &dyn Reflect` cast
2026-05-13 23:33:13 +03:00
Dmitry Stepanov
8df053acf4
fixed crash when closing a scene with a camera selected on other scene
...
- fixes #919
2026-05-13 19:11:01 +03:00
Dmitry Stepanov
f8c7edb223
fixed animation player fetching in absm editor
...
- previous impl was using ComponentProvider with a hacky impl that did unsafe transmute on a handle reference type
- new impl is using strong typing without type mangling
2026-05-13 13:12:02 +03:00
Dmitry Stepanov
d317a1179f
fixed doc comments + fixed misleading docs
2026-05-10 20:06:56 +03:00
Dmitry Stepanov
1c0cf15c50
unified naming for field fetching via reflection
...
- previous approach with `ComponentProvider` trait was quite misleading, it didn't return a "component" - it simply returned marked fieds
- the new approach is more explicit - method names tells exactly what they do
2026-05-10 18:28:18 +03:00
Dmitry Stepanov
fcd280057b
count fields in proc macro
...
- much faster than calling the default impl
2026-05-10 10:54:41 +03:00
Dmitry Stepanov
edc7bf0ec0
improved docs
2026-05-09 23:01:23 +03:00
Dmitry Stepanov
b17c5f5801
fixed failing test
2026-05-09 20:01:49 +03:00
Dmitry Stepanov
c03e4aa7e9
removed ComponentProvider, merged its functionality into Reflect
...
- chained component fetching isn't supported yet, so it is not one-to-one merge
2026-05-09 19:55:11 +03:00
Dmitry Stepanov
e553174d5d
Reflect::self_or_field_ref/mut_of_type
2026-05-08 17:30:09 +03:00
Dmitry Stepanov
5cf90dff53
Reflect::first_field_ref/mut_of_type
2026-05-08 15:18:08 +03:00
Dmitry Stepanov
1904f95519
Reflect::get_field_direct_ref/mut
2026-05-08 12:56:48 +03:00
Dmitry Stepanov
0899691cfc
Reflect::fields_count
2026-05-07 22:31:44 +03:00
Dmitry Stepanov
0527bcd2af
removed redundant allow switch
2026-05-07 22:31:31 +03:00
Dmitry Stepanov
660bcd709a
renamed field -> find_field + field_mut -> find_field_mut
2026-05-06 23:49:46 +03:00
Dmitry Stepanov
9df3443a24
merge modules
2026-05-06 11:06:39 +03:00
Dmitry Stepanov
747fa780f5
continue splitting reflect module
2026-05-06 11:03:47 +03:00
Dmitry Stepanov
e9b389be77
split reflect mod into smaller modules
2026-05-06 10:55:33 +03:00
Dmitry Stepanov
46192f2edb
moved reflect impl macros to separate mod + fix delegate_reflect macro
2026-05-05 09:52:05 +03:00
Dmitry Stepanov
1d316aad2c
fixed newtype_reflect macro + added full paths to types
2026-05-05 09:44:29 +03:00
Dmitry Stepanov
27df8cd631
use full paths to types in blank_reflect macro
2026-05-05 09:38:15 +03:00
Dmitry Stepanov
55dd4a58f8
moved ReflectHashMap into a separate module
2026-05-05 09:34:55 +03:00
Dmitry Stepanov
fcc04d52d7
moved module
2026-05-05 09:25:26 +03:00
Dmitry Stepanov
aae761a27e
removed ReflectBase trait + use trait upcasting instead
2026-05-05 00:29:44 +03:00
Dmitry Stepanov
225e8f9c47
docs for dyntype
2026-05-04 10:59:27 +03:00
Dmitry Stepanov
a355f5f92f
removed DynType::into_any and replaced it with trait upcasting
2026-05-04 10:41:46 +03:00
CopeFiend and CopeFiend
8e9d2573d0
Add UI_FONT_SIZE const in editor ( #914 )
...
* Added `UI_FONT_SIZE` const in Editor, prerequisite for font size
settings
* Added `fn set_style()` for FormattedText
* Fixes clippy warning
* Add WidgetMessage:Style handling to TextBox
---------
Co-authored-by: CopeFiend <[email protected] >
2026-04-30 22:17:20 +03:00
Dmitry Stepanov
2b86676b4a
type handle of absm for AbsmEventProvider widget
2026-04-29 20:37:13 +03:00
Dmitry Stepanov
e03e31a723
fixed incorrect condition in check box widget
2026-04-29 20:29:25 +03:00
Dmitry Stepanov
c9c2ca0f75
fixed inspector errors from StyledProperty
2026-04-28 23:15:38 +03:00
Dmitry Stepanov
1695edafc9
fixed enumerate_fields_recursively for InheritableVariable
...
- `enumerate_fields_recursively` resulted in double call of a `func` with the same name on an inheritable variable fields
2026-04-28 22:50:53 +03:00
Dmitry Stepanov
ba5eeae42e
improved logging of errors in inspector context menu
2026-04-28 21:46:28 +03:00