Compare commits

..

1419 Commits

Author SHA1 Message Date
mafiesto4 37a6ea9beb Merge remote-tracking branch 'origin/master' 2023-10-31 14:21:00 +01:00
mafiesto4 5ef3f66274 Merge branch 'master' of https://gitlab.flaxengine.com/flax/flaxengine 2023-10-31 14:17:55 +01:00
mafiesto4 1567c1c8d6 Fix Mono AOT on iOS to not freeze during GC stop-the-world event on memory collection 2023-10-31 14:15:35 +01:00
mafiesto4 2d1d8cc310 Fix typo 2023-10-30 18:34:20 +01:00
mafiesto4 1fc972d6ac Fix stall in GC collect on iOS with AOT 2023-10-30 16:45:57 +01:00
mafiesto4 f434ff2efe Fix memory overcommitment by HashSet when adding and removing the same item in a loop
#1829
2023-10-29 13:37:05 +01:00
mafiesto4 56c9429e25 Fix spawning prefab without transform provided
#1831
2023-10-29 02:57:59 +02:00
mafiesto4 83a931de7e Fix typo bug in DOF 2023-10-29 01:57:48 +02:00
mafiesto4 9c1a7a20d4 Add volk.h header to distributed build files 2023-10-28 22:10:41 +02:00
mafiesto4 d9c2decff5 Fix crash when contact was not read properly 2023-10-28 20:09:27 +02:00
mafiesto4 9f3221c533 Remove unused include 2023-10-28 14:02:25 +02:00
mafiesto4 468c93949e Fix crash when creating empty particle emitter 2023-10-28 14:01:44 +02:00
mafiesto4 b028faf0cc Update assets 2023-10-28 13:52:23 +02:00
mafiesto4 a95c9059aa Update build number 2023-10-28 13:49:05 +02:00
mafiesto4 615b6470e5 Fix iOS project path if it contains whitespace chars 2023-10-28 11:44:11 +02:00
mafiesto4 70a06c5db3 Update build number and add revision field for future patches 2023-10-26 15:21:01 +02:00
mafiesto4 d9b0e99b9c Add support for using Revision number in projects version 2023-10-26 15:20:35 +02:00
mafiesto4 1d41aa01ce Refactor vertex shaders to use GPUShaderProgramVS::InputElement for input layout data 2023-10-26 14:36:02 +02:00
mafiesto4 186e13b5e8 Add support for runtime running on GPU without Compute Shaders support 2023-10-26 14:33:21 +02:00
mafiesto4 bfaa292b04 Fix invoking managed method on value types (eg. Transform) to properly handle instance value
#1801
2023-10-26 11:37:37 +02:00
mafiesto4 f44421b7a7 Optimize managed method invoke on NetCore to skip virtual call that is the same as default one 2023-10-26 11:25:30 +02:00
mafiesto4 2158fa7358 Remove not needed end line in script template 2023-10-25 23:34:29 +02:00
mafiesto4 c27187bd0a Fix deserializing vector types in Editor from ToString FormatException
#1802
2023-10-25 19:17:04 +02:00
mafiesto4 966cd973c6 Add GetHash to various math/core types
#1802
2023-10-25 18:35:59 +02:00
mafiesto4 fa836c50a0 Merge branch 'MineBill-messagebox' 2023-10-25 14:58:56 +02:00
mafiesto4 a5d16b49e9 Merge branch 'messagebox' of https://github.com/MineBill/FlaxEngine into MineBill-messagebox 2023-10-25 14:58:51 +02:00
mafiesto4 9a6bce144b Merge branch 'solnem-feat/improved-camera-settings' 2023-10-25 14:58:14 +02:00
mafiesto4 daf31cfa4d Format code #1611 2023-10-25 14:57:44 +02:00
MineBill 6f773bd558 Make the message box a TASKMODEL to prevent interation with the editor. 2023-10-24 18:03:07 +03:00
mafiesto4 7c84ca5b84 Merge branch 'feat/improved-camera-settings' of https://github.com/solnem/FlaxEngine into solnem-feat/improved-camera-settings 2023-10-24 14:50:52 +02:00
mafiesto4 806590d1c3 Fix deadlock in scene loading
#1761 #1773
2023-10-24 14:08:34 +02:00
mafiesto4 ba374a27db Reduce code bloat 2023-10-23 22:26:55 +02:00
mafiesto4 9d1ba6cacf Fix compilation errors when building with old Delegate impl 2023-10-23 22:10:21 +02:00
mafiesto4 ea0094870c Merge branch 'Tryibion-particle-loop-fix' 2023-10-23 18:46:15 +02:00
mafiesto4 2220623cd2 Merge branch 'particle-loop-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-particle-loop-fix 2023-10-23 18:45:30 +02:00
mafiesto4 aed81b58ba Update readme 2023-10-23 16:00:23 +02:00
mafiesto4 9c4382dffb Fix using dock window panels on macOS in Editor 2023-10-23 15:59:09 +02:00
mafiesto4 f28947f59b Fix MacWindow::SetClientBounds to include screen scale 2023-10-23 14:50:10 +02:00
mafiesto4 6ff3e0f488 Various improvements to macOS platform 2023-10-22 20:06:54 +02:00
mafiesto4 ccf6c28b02 Add interval to Apple autoreleasepool 2023-10-22 19:55:20 +02:00
mafiesto4 c88e184df3 Fix crash when window gets removed during windows update loop 2023-10-22 15:56:25 +02:00
mafiesto4 1280e61af0 Add IsDebuggerPresent for macOS and iOS platforms 2023-10-22 15:33:21 +02:00
mafiesto4 9fa0b174f5 Fix deprecation warnings on Apple 2023-10-22 15:32:56 +02:00
Tryibion 78aae0da5a Better handling stopping/resetting non-looping effect. 2023-10-21 17:22:02 -05:00
Tryibion 7d9991999d Better fix. 2023-10-21 14:08:23 -05:00
Tryibion ad15c5b2fc Fix particles effect not being able to just call play if islooped is false. 2023-10-21 13:36:39 -05:00
mafiesto4 21f2e59d12 Add drag&drop support to macOS 2023-10-21 15:36:38 +02:00
mafiesto4 dcbc917b7d Add local util script to ignored on macOS 2023-10-21 15:13:36 +02:00
mafiesto4 08a6a2b6dc Fix potential crashes on macOS due to missing window inside view event 2023-10-21 13:04:33 +02:00
mafiesto4 ba39938ed5 Update Flax icon for macOS to match design guidelines 2023-10-21 12:44:43 +02:00
mafiesto4 ab49457944 Add log for build command invoke in deployer 2023-10-21 12:44:25 +02:00
mafiesto4 3188798152 Merge branch 'MineBill-remember-hierarchy-expanded' 2023-10-20 12:33:15 +02:00
mafiesto4 5cafe1c328 Merge branch 'remember-hierarchy-expanded' of https://github.com/MineBill/FlaxEngine into MineBill-remember-hierarchy-expanded 2023-10-20 12:33:08 +02:00
mafiesto4 ad7c7d7360 Merge branch 'MineBill-fix-module-names' 2023-10-20 12:29:06 +02:00
mafiesto4 70200b5608 Merge branch 'fix-module-names' of https://github.com/MineBill/FlaxEngine into MineBill-fix-module-names 2023-10-20 12:29:00 +02:00
mafiesto4 e796d9ea6f Further improve a989173e2d 2023-10-20 11:22:22 +02:00
mafiesto4 a5aaa92d62 Bump up build number 2023-10-20 00:28:28 +02:00
mafiesto4 4e9a739a52 Update GPU particle emitter graph version after recent changes 2023-10-20 00:28:13 +02:00
MineBill 7906e26fe0 Limit what characters module names can contain. 2023-10-20 00:19:32 +03:00
mafiesto4 770d21566a Add macOS disk image notarization 2023-10-19 23:13:05 +02:00
mafiesto4 418e220c00 Add proper codesigning for the Editor app for macOS 2023-10-19 22:40:42 +02:00
mafiesto4 9f98a5304f Merge remote-tracking branch 'origin/master' 2023-10-19 19:13:18 +02:00
mafiesto4 a8f961c438 Add cook&run support for macOS and Linux 2023-10-19 19:09:32 +02:00
mafiesto4 2bb8c82329 Add support for packaging editor with bundled platform data 2023-10-19 19:09:06 +02:00
MineBill c773c3e8fc Collapse/Expand all node in the tree if the user is pressing the Alt key. 2023-10-19 18:55:58 +03:00
MineBill 2f3685c161 Use PrefabObjectID when setting/getting the actor expanded value for prefabs. 2023-10-19 18:43:13 +03:00
mafiesto4 0ea00a09ca Fix regression from 3e7368b1cb to remove scene lock when spawning actors in async
#1743
2023-10-19 15:29:26 +02:00
mafiesto4 a989173e2d Fix UnitsToText to properly print string with 2 decimal places 2023-10-19 15:16:14 +02:00
mafiesto4 6f60218bec Optimize various rendering stages to skip loading shader when effect is disables 2023-10-19 15:07:03 +02:00
mafiesto4 c0fa858dd0 Fix warning on missing windows layout file when loading default layout 2023-10-19 14:25:37 +02:00
mafiesto4 6c45141ef9 Add dmg file building for macOS Editor deployment 2023-10-18 22:10:46 +02:00
mafiesto4 f373c867a7 Improve Game Cooker label text when platform data is missing 2023-10-18 21:57:35 +02:00
mafiesto4 5181db8a0e Fix vscode default build task to favor current architecture (eg. arm64 for Editor on macOS) 2023-10-18 21:51:36 +02:00
mafiesto4 55ad5ae367 Build Editor bindings only when generating editor project files
#1734 #1569
2023-10-18 16:17:19 +02:00
mafiesto4 24790b18ce Fix typo in shader 2023-10-18 12:56:48 +02:00
mafiesto4 8b096a9286 Fixes 2023-10-18 10:52:36 +02:00
mafiesto4 2d0eabc8be Fix deadlock in Foliage::GetFoliageTypeInstancesCount
#1724
2023-10-17 23:20:30 +02:00
mafiesto4 387e30a1dc Fix compilation regression 2023-10-17 23:13:05 +02:00
mafiesto4 52a621de42 Add color, emissive and opacity parameters setup for auto-imported material instances 2023-10-17 22:45:22 +02:00
mafiesto4 c457087612 Optimize memory allocation when using Sprite size during 2D rendering 2023-10-17 22:44:15 +02:00
mafiesto4 1cbf867fc7 Hide build scenes data toolbar button when none action is set and fix tooltip for cook and run action
#1731
2023-10-17 22:43:43 +02:00
mafiesto4 8d9f4d72f5 Various stability improvements for Editor 2023-10-17 22:42:47 +02:00
mafiesto4 90427da42f Add SubAssetFolder to model import option to redirect auto-imported materials and textures location 2023-10-17 09:59:21 +02:00
mafiesto4 cebae5c4e1 Add foreach loop support to Span type 2023-10-17 09:53:48 +02:00
mafiesto4 d92c7af2cf Fix debug file access race-conditions when importing many materials at once 2023-10-17 09:53:06 +02:00
mafiesto4 582cf94198 Fix setting up prefab objects ids mapping for nested prefabs to link cross-object references correctly 2023-10-16 16:37:44 +02:00
mafiesto4 3e7368b1cb Fix HandleObjectDeserializationError to be editor or dev only and thread-safe 2023-10-16 16:36:52 +02:00
mafiesto4 30d510f073 Fix models in toolbox 2023-10-16 16:34:55 +02:00
mafiesto4 50d47fe801 Fix asset load to trigger loading task within mutex to prevent race conditions when loading the same prefab from many threads at once 2023-10-16 16:10:57 +02:00
mafiesto4 036ad570cd Fix warning when dotnet cache file is missing 2023-10-16 11:20:49 +02:00
mafiesto4 d25954725f Add excluding GPU swapchain present time from CPU draw time in profiling tool 2023-10-16 10:58:07 +02:00
mafiesto4 db6b98ecd1 Add ProfilerGPU.Enabled to manually toggle GPU timings 2023-10-16 10:29:44 +02:00
mafiesto4 ad2bd2ce51 Merge branch 'nothingTVatYT-master' 2023-10-16 10:03:23 +02:00
mafiesto4 0c6e2935d1 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-10-16 10:03:16 +02:00
nothingTVatYT 48a5fe54e8 keep auto-close for non-Linux platforms 2023-10-16 01:13:06 +02:00
nothingTVatYT c42a264944 removed a left over debug statement 2023-10-16 01:08:47 +02:00
nothingTVatYT d1b2b64cd1 fix color picker (signal handler + alpha channel) 2023-10-15 21:43:15 +02:00
mafiesto4 88f718709b Add data sent/receive rate charts to the network profiler in Editor 2023-10-15 20:13:34 +02:00
mafiesto4 148ced5a55 Fix compilation 2023-10-15 19:04:35 +02:00
mafiesto4 e4941e5b00 Add asset loading task state check on fail 2023-10-15 18:46:15 +02:00
mafiesto4 8f941c3679 Merge branch 'Vizepi-master' 2023-10-15 18:08:35 +02:00
mafiesto4 c511ea6d23 Merge branch 'master' of https://github.com/Vizepi/FlaxEngine into Vizepi-master 2023-10-15 18:08:20 +02:00
Vizepi 00dc5d44d4 #1716 Do not rebuild contexts twice in a row 2023-10-15 12:24:25 +02:00
mafiesto4 f8f1a66ab9 Fix multi-line logs on Windows regression from cf94cd937a 2023-10-15 10:12:33 +02:00
mafiesto4 22395ce9c3 Merge branch 'GoaLitiuM-delay_dirty_rebuild' 2023-10-15 09:57:56 +02:00
mafiesto4 ab6acbc759 Merge branch 'delay_dirty_rebuild' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-delay_dirty_rebuild 2023-10-15 09:57:47 +02:00
GoaLitiuM 660c0660e2 Delay compiler and project generation after large file operations 2023-10-14 20:52:56 +03:00
mafiesto4 2f3929efe0 Fix Height Layer Blend material node codegen when alpha is constant
#1705
2023-10-14 18:03:51 +02:00
mafiesto4 e51aab0c56 Minor improvements 2023-10-14 18:03:21 +02:00
mafiesto4 eb430b05be Fx regression from #1474 that was causing incorrect checks for IsZero/IsOne in ShaderGraphValue 2023-10-14 18:00:53 +02:00
mafiesto4 96b87ea41a Merge branch 'Menotdan-missing_script_replacement' 2023-10-14 16:49:21 +02:00
mafiesto4 a87eaf82f0 Code style fix 2023-10-14 16:49:09 +02:00
mafiesto4 65a02fc9fd Merge branch 'missing_script_replacement' of https://github.com/Menotdan/FlaxEngine into Menotdan-missing_script_replacement 2023-10-14 16:35:14 +02:00
mafiesto4 3f4ae38291 Merge branch 'GoaLitiuM-delete_content_fix' 2023-10-14 16:34:27 +02:00
mafiesto4 9c5d03164f Merge branch 'delete_content_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-delete_content_fix 2023-10-14 16:34:22 +02:00
mafiesto4 b32a4b5c84 Merge branch 'GoaLitiuM-async_project_regen_fix' 2023-10-14 16:33:11 +02:00
mafiesto4 fc9490ca4c Merge branch 'async_project_regen_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-async_project_regen_fix 2023-10-14 16:32:42 +02:00
mafiesto4 40c0a30039 Merge branch 'GoaLitiuM-vscode_launch_tasks' 2023-10-14 16:31:03 +02:00
mafiesto4 37e3a91b73 Merge branch 'vscode_launch_tasks' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_launch_tasks 2023-10-14 16:30:57 +02:00
mafiesto4 075431385a Merge branch 'GoaLitiuM-csharp_optimize_module_fix' 2023-10-14 16:30:23 +02:00
mafiesto4 71a19eac29 Merge branch 'csharp_optimize_module_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-csharp_optimize_module_fix 2023-10-14 16:30:16 +02:00
mafiesto4 bedc492ce7 Merge branch 'GoaLitiuM-physx_oncontact_fix' 2023-10-14 16:30:03 +02:00
mafiesto4 ab25b6a258 Merge branch 'physx_oncontact_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-physx_oncontact_fix 2023-10-14 16:29:54 +02:00
GoaLitiuM a3d44e0fee Prevent project file regeneration running while compiling scripts 2023-10-14 17:29:03 +03:00
mafiesto4 69d84eb20f Merge branch 'Tryibion-debug-view-cm' 2023-10-14 16:28:44 +02:00
mafiesto4 f1575da171 Merge branch 'debug-view-cm' of https://github.com/Tryibion/FlaxEngine into Tryibion-debug-view-cm 2023-10-14 16:28:39 +02:00
GoaLitiuM 0c23b76456 Fix error when deleting multiple files and no folders selected 2023-10-14 17:28:21 +03:00
mafiesto4 e0c48ba749 Merge branch 'NoriteSC-Fix-GizmoSize' 2023-10-14 16:28:00 +02:00
mafiesto4 bdacf960d0 Merge branch 'Fix-GizmoSize' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-Fix-GizmoSize 2023-10-14 16:26:27 +02:00
mafiesto4 dcc28113a4 Merge branch 'GoaLitiuM-win_minimize_pos_fix' 2023-10-14 16:23:38 +02:00
mafiesto4 4b803feb11 Merge branch 'win_minimize_pos_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-win_minimize_pos_fix 2023-10-14 16:23:28 +02:00
mafiesto4 a5f00ed624 Fix NavCrowd to properly wait for navmesh loaded 2023-10-14 16:21:42 +02:00
mafiesto4 060bff1bdb Fix leftover separator in context menu in Content Window in some locations 2023-10-14 16:21:10 +02:00
mafiesto4 e4b89e1bad Fix plugins initialization order to properly unload scenes before them in cooked game 2023-10-14 16:20:27 +02:00
GoaLitiuM dca6baee49 Use and store restored window position after minimizing the window 2023-10-14 16:44:21 +03:00
mafiesto4 7904690ecf Cleanuo some old code style 2023-10-14 14:00:58 +02:00
Tryibion 7b984396cc Add not to close Debug View CM on button clicked. 2023-10-13 20:52:26 -05:00
GoaLitiuM dc1be86db7 Only generate one set of C++/C# launch tasks for VSCode
Proper fix for b9c6dcd4c7
2023-10-14 03:45:37 +03:00
GoaLitiuM 8548df4a1b Fix crash when physics actor contact is lost with another actor 2023-10-14 02:34:15 +03:00
GoaLitiuM 7014007362 Disable inheriting C# optimization level from dependency modules 2023-10-14 01:45:36 +03:00
mafiesto4 1a5606a45c Improve collision data cooking usability
#1687
2023-10-13 23:33:03 +02:00
mafiesto4 887d2b2115 Fix incorrect animated model bounds update 2023-10-13 23:32:44 +02:00
mafiesto4 1b48663f76 Merge branch 'GoaLitiuM-textbox_escape_fix' 2023-10-13 20:42:32 +02:00
GoaLitiuM 2d5ad297a5 Fix error when hitting escape in read-only textboxes 2023-10-13 19:57:32 +03:00
mafiesto4 18bf005654 Merge branch 'GoaLitiuM-vscode_prelaunch_task_fix' 2023-10-13 16:58:30 +02:00
mafiesto4 7e5c6caffa Merge branch 'vscode_prelaunch_task_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_prelaunch_task_fix 2023-10-13 16:58:23 +02:00
mafiesto4 702356f1e4 Missing change for c01614b8f5 and regression from 88eca13eb3 2023-10-13 16:58:02 +02:00
mafiesto4 c01614b8f5 Fix build regression from 7180080f19 2023-10-13 16:09:18 +02:00
mafiesto4 7180080f19 Refactor FileMode, FileAccess, FileShare enums into normal enums with docs 2023-10-13 15:44:47 +02:00
mafiesto4 9a636468e0 Fix crash when importing assets in Editor (race-condition from Content Importer thread)
#1691 #1679
2023-10-13 15:44:18 +02:00
mafiesto4 abd6881d7b Fix removing large amount of assets in Editor at once
#1484
2023-10-13 15:43:11 +02:00
mafiesto4 cf94cd937a Fix logging performance and crashes on non-Windows platforms
#662
2023-10-13 14:41:45 +02:00
mafiesto4 03c120ba69 Fix double engine assembly init in Editor 2023-10-13 14:26:33 +02:00
mafiesto4 db52be5936 Fix crash when item is already in a view
#1679
2023-10-13 11:31:43 +02:00
mafiesto4 d0fbf12b92 Fix editor tabs control size for tab header when scroll bar is visible
#1135
2023-10-13 11:16:34 +02:00
mafiesto4 6cd45a58f8 Fix preserving editor minimized floating windows in saved layout
#1135
2023-10-13 11:03:45 +02:00
NoriteSC 13686ae13f Fix 436 and 1251 2023-10-13 00:20:34 +02:00
mafiesto4 fe49811779 Fix linux build 2023-10-12 23:42:17 +02:00
mafiesto4 84d615935e Fix crash when updating GPU particle system without view buffers allocated
#1683
2023-10-12 23:39:39 +02:00
mafiesto4 fdd6b171bb Stability fixes 2023-10-12 23:12:53 +02:00
mafiesto4 74a69b8f13 Fix running game in non-ANSI path
#480
2023-10-12 22:29:48 +02:00
mafiesto4 677cd4e382 Fix build regression from 6f7f22eb47 2023-10-12 22:29:11 +02:00
mafiesto4 88eca13eb3 Add default font bundling (optional) and setup UI Style to match editor logic
#641
2023-10-12 22:28:40 +02:00
mafiesto4 830a810556 Merge branch 'GoaLitiuM-vs_open_file_fix' 2023-10-12 20:05:39 +02:00
mafiesto4 fcb60fbefb Merge branch 'vs_open_file_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vs_open_file_fix 2023-10-12 20:02:58 +02:00
mafiesto4 2414abf183 Fix particle attributes usage in GPU emitter function
#1640
2023-10-12 20:01:30 +02:00
mafiesto4 d52412c5c3 Fix particle emitter function cache clearing for GPU shader generation
#1640
2023-10-12 19:55:50 +02:00
Menotdan cfdbf75759 Merge branch 'FlaxEngine:master' into missing_script_replacement 2023-10-12 13:13:11 -04:00
mafiesto4 6f7f22eb47 Add outputting shader source code in Editor to text file when compilation fails for debugging 2023-10-12 18:57:27 +02:00
Menotdan a7b2230ef4 Remove unneeded using 2023-10-12 12:23:18 -04:00
Menotdan a8260ed8b6 Fixed Serialization Transfer. 2023-10-12 12:00:27 -04:00
mafiesto4 5b5f43714e Fix invalid particle attributes access inside emitter function
#1640
2023-10-12 17:55:49 +02:00
GoaLitiuM 602936b2bc Fix opening plugin project files in Visual Studio 2023-10-12 18:41:25 +03:00
mafiesto4 8af2f458d7 Fix missing particle layout attributes when using Particle Emitter Function
#1640
2023-10-12 17:39:42 +02:00
GoaLitiuM b9c6dcd4c7 Fix wrong Visual Studio Code preLaunchTask in launch tasks 2023-10-12 16:37:32 +03:00
mafiesto4 bd4127676b Merge branch 'GoaLitiuM-editor_camera_transform_fix' 2023-10-12 15:26:50 +02:00
mafiesto4 daaba49e26 Merge branch 'editor_camera_transform_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_camera_transform_fix 2023-10-12 15:26:45 +02:00
mafiesto4 4f24d53984 Merge branch 'GoaLitiuM-deprecation_messages' 2023-10-12 15:25:17 +02:00
mafiesto4 2f795c6559 Merge branch 'deprecation_messages' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-deprecation_messages 2023-10-12 15:25:12 +02:00
mafiesto4 74041e1322 Merge branch 'Tryibion-value-bo-slide-focus' 2023-10-12 15:24:51 +02:00
mafiesto4 51da322e48 Merge branch 'value-bo-slide-focus' of https://github.com/Tryibion/FlaxEngine into Tryibion-value-bo-slide-focus 2023-10-12 15:24:45 +02:00
mafiesto4 8be325d704 Merge branch 'RuanLucasGD-terrain_gizmo_improv' 2023-10-12 15:20:45 +02:00
mafiesto4 4ca8198478 Merge branch 'terrain_gizmo_improv' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-terrain_gizmo_improv 2023-10-12 15:20:38 +02:00
mafiesto4 455b3f2446 Fix XAudio2 playback when seeking audio start play location 2023-10-12 15:20:23 +02:00
mafiesto4 4ac65ee91c Fix audio preview for multi-channel audio clips 2023-10-12 14:31:41 +02:00
mafiesto4 69fb2c331f Minor improvements to audio 2023-10-12 14:03:43 +02:00
mafiesto4 2671e3881f Add Spacebar to toggle play/pause in Audio Clip window 2023-10-12 14:03:13 +02:00
mafiesto4 749c0cacb4 Fix audio playback in XAudio2 when clip is 3D but source is 2D 2023-10-12 13:11:07 +02:00
mafiesto4 b19bf57dfb Add logging any XAudio2 backed errors 2023-10-12 13:10:34 +02:00
mafiesto4 0175186c27 Improve #1627 to return proper anim length 2023-10-12 12:17:55 +02:00
mafiesto4 866ef896b2 Merge branch 'Tryibion-anim-fix' 2023-10-12 12:12:09 +02:00
mafiesto4 0280fa4f9b Merge branch 'anim-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-anim-fix 2023-10-12 12:12:01 +02:00
mafiesto4 b1ad2c3a02 Fix sprite shadow to match the sprite facing camera
#1504
2023-10-12 12:10:21 +02:00
Menotdan 318f9e5b77 Fix duplicated script replacement. 2023-10-12 01:33:22 -04:00
Menotdan 7742f2d8d4 Add debugging logs. 2023-10-12 01:26:25 -04:00
Menotdan 3d2363ea5c Merge remote-tracking branch 'origin/master' into missing_script_replacement 2023-10-12 01:26:20 -04:00
Menotdan 2b0db40c17 Add basic replacement functionality- replacing adds multiple copies on child actors, however. 2023-10-12 01:22:59 -04:00
Ruan Lucas e97ec74bf8 clean code 2023-10-11 18:37:04 -04:00
Tryibion 28d6fe84ef Small change 2023-10-11 16:17:59 -05:00
Tryibion 8eb9df9a18 Change new anim port to TryGetBox. 2023-10-11 15:57:02 -05:00
Tryibion f2c9ba5a00 Focus parent on value box slide end. 2023-10-11 15:33:32 -05:00
GoaLitiuM 02a219a376 Fix Editor viewport camera transformation getting corrupted when focused 2023-10-11 21:45:07 +03:00
GoaLitiuM 3ed28998e9 Add more descriptive deprecation messages 2023-10-11 21:38:33 +03:00
mafiesto4 fa96707c57 Fix crash when implementing INetworkSerializable in C#-only
#1664
2023-10-11 18:39:51 +02:00
mafiesto4 8f3a5bd74a Improve ObjectsRemovalService to handle newly added objects removing 2023-10-11 17:41:35 +02:00
mafiesto4 6dd9f0f036 Improve #1667 to log exception 2023-10-11 17:25:32 +02:00
mafiesto4 97f1572a78 Merge branch 'Menotdan-fix-removing-scripts' 2023-10-11 17:22:06 +02:00
mafiesto4 a0ada24764 Merge branch 'fix-removing-scripts' of https://github.com/Menotdan/FlaxEngine into Menotdan-fix-removing-scripts 2023-10-11 17:22:01 +02:00
mafiesto4 2067c73401 Merge branch 'MineBill-popup-fix' 2023-10-11 17:17:51 +02:00
mafiesto4 dad3e1f77d Revert f1d57e47cb in favor of #1670 2023-10-11 17:17:46 +02:00
mafiesto4 c853b404d6 Merge branch 'popup-fix' of https://github.com/MineBill/FlaxEngine into MineBill-popup-fix 2023-10-11 17:15:14 +02:00
MineBill 1986f2b58b Only set WS_CAPTION if the window is a regular window 2023-10-11 17:06:16 +03:00
mafiesto4 af468ee6ae Fix scripting interop in AOT mode to use reflection-based field access 2023-10-11 15:18:28 +02:00
mafiesto4 b92345c3ef Fix crash when running async C# code with Mono 2023-10-11 12:36:49 +02:00
mafiesto4 bc762761dd Fix engine when used without C# scripting at all 2023-10-11 12:35:27 +02:00
mafiesto4 cbdd6c4964 Add HasDepthClip to GPU Device limits 2023-10-11 10:15:44 +02:00
Menotdan a7937c2b2e Fixed script serialization failures from removing scripts. 2023-10-10 19:12:21 -04:00
mafiesto4 ac542bf920 Fix FieldHelper.GetFieldOffset crash for classes with const fields (compile-time)
Inline call in `CreateScriptingObject` for perf
2023-10-10 20:52:12 +02:00
mafiesto4 902c82ae1e Add pixel format logging when not supported for shadow map 2023-10-10 20:22:53 +02:00
Ruan Lucas 7fcb0a1da7 change terrain brush size with scroll 2023-10-10 10:46:47 -04:00
mafiesto4 ccf3469307 Minor Vulkan tweaks 2023-10-10 14:17:34 +02:00
mafiesto4 3ac7c4e0ee Codestyle fix 2023-10-09 23:21:02 +02:00
mafiesto4 69e973b837 Merge branch 'Chikinsupu-AnimationSampleNode-AnimationAssetReferencePort' 2023-10-09 22:25:03 +02:00
mafiesto4 dafc8a61c1 Merge branch 'AnimationSampleNode-AnimationAssetReferencePort' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-AnimationSampleNode-AnimationAssetReferencePort 2023-10-09 22:24:57 +02:00
mafiesto4 d2594c05ab Merge branch 'nothingTVatYT-fix-linux-open-files-dialog' 2023-10-09 22:22:36 +02:00
mafiesto4 d6d18e93e0 Merge branch 'fix-linux-open-files-dialog' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-fix-linux-open-files-dialog 2023-10-09 22:22:25 +02:00
mafiesto4 00a03beb78 Optimize Half2 conversion in Render2D 2023-10-09 21:45:36 +02:00
nothingTVatYT 2ff4a69f53 fix reading of pipe buffer from external filechooser 2023-10-09 17:25:28 +02:00
mafiesto4 00100e11f2 Fix C# objects serialization bug when script throws exception during saving to Json
#1656
2023-10-09 15:31:46 +02:00
mafiesto4 fa57440a2f Fix typo 2023-10-09 14:48:19 +02:00
mafiesto4 8a018977d6 Merge branch 'MineBill-fix-transition-data' 2023-10-09 14:35:24 +02:00
mafiesto4 26ffe31a0f Merge branch 'fix-transition-data' of https://github.com/MineBill/FlaxEngine into MineBill-fix-transition-data 2023-10-09 14:35:15 +02:00
mafiesto4 09f2be907e Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Flax.flaxproj
2023-10-09 12:40:47 +02:00
mafiesto4 8e23781153 Fix updating time left when destroying large amount of objects
#1584
2023-10-09 12:13:09 +02:00
mafiesto4 64d4076615 Minor tweaks 2023-10-09 12:06:55 +02:00
mafiesto4 d7e9e2ed16 Fix AssetsCache to include project path and reject cache when project gets duplicated with cache
#1631
2023-10-09 11:33:02 +02:00
mafiesto4 1ac4fef8d0 Merge branch 'nothingTVatYT-fix-linux-systeminfo' 2023-10-09 10:44:17 +02:00
mafiesto4 6c0011bef5 Merge branch 'fix-linux-systeminfo' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-fix-linux-systeminfo 2023-10-09 10:44:08 +02:00
mafiesto4 481a3cfba5 Minor tweaks 2023-10-08 23:33:51 +02:00
mafiesto4 fd7ef38639 Merge branch 'MineBill-linux-doubleclick' 2023-10-08 22:14:09 +02:00
mafiesto4 0b786feb65 Merge branch 'linux-doubleclick' of https://github.com/MineBill/FlaxEngine into MineBill-linux-doubleclick 2023-10-08 22:14:02 +02:00
nothingTVatYT 5b866b643b fix GetDesktopSize for Linux 2023-10-08 22:05:53 +02:00
minebill 03642632f5 Use a maximum distance between clicks, when detecting a double click 2023-10-08 22:05:02 +03:00
mafiesto4 552641c51a Fix potential crashes if uses calls terrain tools with invalid params 2023-10-08 17:02:26 +02:00
mafiesto4 4bfc97d982 Merge branch 'GoaLitiuM-viewport_cam_drift_fix' 2023-10-08 16:50:24 +02:00
mafiesto4 f3818c8a1d Merge branch 'viewport_cam_drift_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-viewport_cam_drift_fix 2023-10-08 16:48:23 +02:00
mafiesto4 45ae103612 Merge branch 'RuanLucasGD-Fix-Actor-OnDestroy' 2023-10-08 16:46:25 +02:00
mafiesto4 c3924d636d Merge branch 'Fix-Actor-OnDestroy' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-Fix-Actor-OnDestroy 2023-10-08 16:41:40 +02:00
mafiesto4 38664e9d43 More improvements to 13853d5fb5 2023-10-08 16:34:41 +02:00
GoaLitiuM 4db1975f02 Fix Editor viewport camera drifting with odd viewport sizes 2023-10-08 17:28:28 +03:00
mafiesto4 13853d5fb5 Fix model asset previews to wait for materials to be loaded 2023-10-08 16:01:34 +02:00
mafiesto4 734f8bcaf4 Fix shader compilation tracking to check for directory existence 2023-10-08 15:52:36 +02:00
mafiesto4 52833377ca Merge branch 'Tryibion-auto-module' 2023-10-08 15:14:40 +02:00
mafiesto4 b56447bae4 Refactor code in #1423 to be cleaner 2023-10-08 15:14:35 +02:00
mafiesto4 3b23e50ee6 Merge branch 'auto-module' of https://github.com/Tryibion/FlaxEngine into Tryibion-auto-module
# Conflicts:
#	Source/Editor/Windows/ContentWindow.ContextMenu.cs
2023-10-08 13:43:28 +02:00
mafiesto4 dd466ef162 Merge branch 'GoaLitiuM-ies_fix' 2023-10-08 13:40:17 +02:00
mafiesto4 f80271bdfd Merge branch 'ies_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-ies_fix 2023-10-08 13:36:55 +02:00
mafiesto4 e07c7f2c15 Merge branch 'GoaLitiuM-light_field_order_fix' 2023-10-08 13:36:20 +02:00
mafiesto4 916993f241 Merge branch 'light_field_order_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-light_field_order_fix 2023-10-08 13:36:10 +02:00
mafiesto4 96a56c11ef Merge branch 'RuanLucasGD-fix_edit_text_box' 2023-10-08 13:34:13 +02:00
mafiesto4 12ed17618f Merge branch 'fix_edit_text_box' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-fix_edit_text_box 2023-10-08 13:34:08 +02:00
mafiesto4 2d1415c40d Merge branch 'Chikinsupu-Visject-BendingPreviewConnectionFix' 2023-10-08 11:16:47 +02:00
mafiesto4 dc59a38b64 Merge branch 'Visject-BendingPreviewConnectionFix' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-BendingPreviewConnectionFix 2023-10-08 11:16:38 +02:00
mafiesto4 f7769439cf Merge branch 'Chikinsupu-Visject-ContextSensitiveParameterSupport' 2023-10-08 11:15:31 +02:00
mafiesto4 a9231d5e08 Merge branch 'Visject-ContextSensitiveParameterSupport' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-ContextSensitiveParameterSupport 2023-10-08 11:15:26 +02:00
mafiesto4 af388ef8b4 Merge branch 'Chikinsupu-Visject-FixItemDuplicationBug' 2023-10-08 11:13:00 +02:00
mafiesto4 b2ee160bfe Merge branch 'Visject-FixItemDuplicationBug' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-FixItemDuplicationBug 2023-10-08 11:12:55 +02:00
mafiesto4 df38752506 Merge branch 'MineBill-alt-key-linux' 2023-10-08 11:10:14 +02:00
mafiesto4 880e394554 Merge branch 'alt-key-linux' of https://github.com/MineBill/FlaxEngine into MineBill-alt-key-linux 2023-10-08 11:10:08 +02:00
mafiesto4 b8f094e007 Cleanup Iterator in ChunkedArray 2023-10-08 11:09:12 +02:00
mafiesto4 b93cbbd194 Merge branch 'GoaLitiuM-dict_iter_fix' 2023-10-08 11:05:18 +02:00
Christopher Rothert 5e85fa2c0c Merge branch 'master' into feat/improved-camera-settings 2023-10-08 01:41:05 +02:00
Christopher Rothert 966e5cdda2 Update some comments 2023-10-08 01:40:50 +02:00
Christopher Rothert 997c442e69 Update movement speed formatting
* add property for movement speed text format
* add additional checks to camera speed progress calculation
* round movement speed to make it visually more appealing in the context menu
2023-10-08 01:07:36 +02:00
Ruan Lucas 95f40ecc0c clean code 2023-10-07 16:27:14 -04:00
minebill e903348d71 Fix incorrect mapping of Alt key on linux 2023-10-07 22:28:39 +03:00
Ruan Lucas 56c3080b10 fix edit text box 2023-10-07 11:06:23 -04:00
Nils Hausfeld d41ec15606 - Implemented support for surface parameters 2023-10-07 13:57:05 +02:00
GoaLitiuM 2eb49dba59 Move Use Inverse Squared Falloff above Falloff Exponent in lights
Prevents the checkbox in UI from moving around when toggling the value.
2023-10-07 14:38:58 +03:00
GoaLitiuM bc658bbfba Fix Dictionary iterator comparison
Missing change from 9291295a4d
2023-10-07 14:25:07 +03:00
GoaLitiuM 1f4343d664 Fix IES profile light computation formula 2023-10-07 14:24:54 +03:00
Christopher Rothert 00aa54cde8 Update camera speed stepping and easing
* remove complex curve function
* update camera easing feature to use Mathf.Pow instead
* add total camera speed steps to ViewportOptions
* change default value for max camera speed from 64 to 32
* update ViewportOptions ordering and grouping
* update string format for movement speed
2023-10-07 02:40:52 +02:00
Nils Hausfeld e4bd84bd6a - Fixed items in Surface Paramter Group getting duplicated over and over again 2023-10-06 23:02:00 +02:00
Nils Hausfeld 78c0e1dd92 - Visual fix to preview connection when pulling out of an input box or a reroute node 2023-10-06 18:16:04 +02:00
Nils Hausfeld c4136dcaa9 Merge branch 'master' into AnimationSampleNode-AnimationAssetReferencePort 2023-10-06 17:50:36 +02:00
Nils Hausfeld 63d57151d0 - Minor cleanup 2023-10-06 17:50:19 +02:00
mafiesto4 a9dd9adc22 Merge branch 'MineBill-control-double-click' 2023-10-06 17:22:10 +02:00
mafiesto4 a8f6a90a2f Merge branch 'control-double-click' of https://github.com/MineBill/FlaxEngine into MineBill-control-double-click 2023-10-06 17:20:46 +02:00
mafiesto4 a40819e37b Merge branch 'Muzz-Vert-color-deduplication-check' 2023-10-06 17:06:29 +02:00
mafiesto4 e41e200305 Merge branch 'Vert-color-deduplication-check' of https://github.com/Muzz/FlaxEngine into Muzz-Vert-color-deduplication-check 2023-10-06 17:06:21 +02:00
mafiesto4 5cf1d2b46e Code format 2023-10-06 17:06:17 +02:00
mafiesto4 0fd225b185 Merge branch 'Tryibion-pos-camera' 2023-10-06 17:02:58 +02:00
mafiesto4 f1557554ab Merge branch 'pos-camera' of https://github.com/Tryibion/FlaxEngine into Tryibion-pos-camera 2023-10-06 17:02:51 +02:00
mafiesto4 5c57f73328 Merge branch 'ontrigger-improved-scrolling' 2023-10-06 17:01:29 +02:00
mafiesto4 bc291f592e Merge branch 'improved-scrolling' of https://github.com/ontrigger/FlaxEngine into ontrigger-improved-scrolling 2023-10-06 16:58:36 +02:00
mafiesto4 2d2ee03266 Merge branch 'Tryibion-scene-scroll-fix' 2023-10-06 16:08:13 +02:00
mafiesto4 e041a2d006 Merge branch 'scene-scroll-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-scene-scroll-fix 2023-10-06 16:07:45 +02:00
mafiesto4 cd889604e1 Fix build regression 2023-10-06 16:02:31 +02:00
mafiesto4 2cac149741 Code cleanup for #1377 2023-10-06 15:58:23 +02:00
Nils Hausfeld ea355dd560 - Title of Animation sample node gets updated when connection of animation reference box changes 2023-10-06 15:30:52 +02:00
mafiesto4 4853ec9f49 Merge branch 'Withaust-viewlayer' 2023-10-06 15:26:20 +02:00
mafiesto4 58552afc40 Merge branch 'viewlayer' of https://github.com/Withaust/FlaxEngine into Withaust-viewlayer 2023-10-06 15:26:15 +02:00
mafiesto4 ae308ab27a Minor code cleanup #1619 2023-10-06 15:25:25 +02:00
Nils Hausfeld e07ae33040 - Added input box to animation sample node to receive animation assets
- AssetSelect not gets shown or hidden depending on if the box has a connection
- Animation asset reference box now overrides asset picker
2023-10-06 15:23:43 +02:00
mafiesto4 3c35396f47 Merge branch 'Chikinsupu-Visject-AutomaticCasting' 2023-10-06 14:39:03 +02:00
mafiesto4 b1e6e6a8d1 Merge branch 'Visject-AutomaticCasting' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-AutomaticCasting 2023-10-06 14:38:58 +02:00
mafiesto4 a698095bdd Fix spatial audio playback when clip is set after the audio source was enabled
#1622
2023-10-06 14:34:08 +02:00
mafiesto4 92e28f66af Fix various issues with audio clip data buffers to reduce artifacts (especially when using 24-bit data) 2023-10-06 14:19:22 +02:00
mafiesto4 e29d3d02a2 Refactor audio clip import settings to use auto-generated bindings via AudioTool 2023-10-06 14:08:48 +02:00
mafiesto4 560f699dd8 Fix various issues with OpenAL buffers playback (do proper bit convertion) 2023-10-06 13:59:03 +02:00
mafiesto4 176123eb1f Fix AudioClip loading error when buffer start times diff has rounding error 2023-10-06 11:40:39 +02:00
mafiesto4 9870d162e4 Fix creating prefabs directly from prefab objects
#1432
2023-10-06 10:07:57 +02:00
Christopher Rothert fd94cfb469 Update how camera settings widget is displayed
* add option to force a certain text width to ViewportWidgetButton
* force camera settings widget to fit longest possible speed value
* changed displayed camera speed using string.Format
* changed some lines to always correctly display the camera speed
* switched from Mathf.Clamp to Mathf.Saturate for values between 0 and 1
2023-10-05 20:04:09 +02:00
Tryibion 233eb8a39d Fix prefab window tree 2023-10-05 12:13:41 -05:00
Tryibion 544ff3d5f0 Fix HScroll bar from covering nodes in scene window. 2023-10-05 12:10:49 -05:00
mafiesto4 3a56e39306 Merge branch 'GoaLitiuM-disable_resharper_build' 2023-10-05 19:02:27 +02:00
mafiesto4 5810febc4a Merge branch 'disable_resharper_build' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-disable_resharper_build 2023-10-05 19:02:21 +02:00
mafiesto4 f0293679c4 Merge branch 'GoaLitiuM-rules_assembly_csharp_ver' 2023-10-05 19:00:47 +02:00
mafiesto4 cecc4a4106 Merge branch 'rules_assembly_csharp_ver' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-rules_assembly_csharp_ver 2023-10-05 19:00:37 +02:00
GoaLitiuM 88d9e60bee Generate Rider-specific user solution configuration files
Disables "Use Resharper Build" option by default in generated solutions,
Resharper can't detect file changes in project using custom build
commands.
2023-10-05 19:31:28 +03:00
GoaLitiuM 858baa0ee0 Use latest supported C# version for building rules assemblies 2023-10-05 19:31:07 +03:00
Nils Hausfeld dc6a2d4d25 - Cleanup and comments 2023-10-05 18:11:08 +02:00
Nils Hausfeld d7ade326a9 - Implemented automatic casting to visject 2023-10-05 18:04:55 +02:00
mafiesto4 5dac7c234b Merge branch 'nothingTVatYT-master' 2023-10-05 14:22:00 +02:00
mafiesto4 62894cb6b1 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-10-05 14:21:52 +02:00
Christopher Rothert 3a9fdd8b52 Add possibility to disable camera easing
* add camera easing setting to camera settings widget
* add camera easing default setting to ViewportOptions
* update some settings in ViewportOptions
2023-10-05 13:10:02 +02:00
mafiesto4 546553b82d Add some new splash quotes 2023-10-05 11:44:14 +02:00
mafiesto4 9af6048bec Fix regression from #1312 when passing structure from C++ to C# thunk as already boxed value 2023-10-05 11:36:47 +02:00
mafiesto4 18aafb6fc7 Fix regression from #1312 when passing structure from C++ to C# thunk as already boxed value 2023-10-05 11:35:52 +02:00
mafiesto4 cd2f03d8ef Tweaks 2023-10-05 10:48:52 +02:00
mafiesto4 e6c45fccb3 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Engine/Level/Actors/AnimatedModel.cpp
2023-10-05 10:44:03 +02:00
mafiesto4 86d1d29820 Fix deadlock regression from fd679f0af5 when applying Game Settings itself 2023-10-05 10:13:49 +02:00
nothingTVatYT 9d4089dc0a Merge branch 'master' of github.com:nothingTVatYT/FlaxEngine 2023-10-05 00:08:04 +02:00
nothingTVatYT bc872ebff5 fix menu misalignment problem on Linux 2023-10-05 00:06:51 +02:00
Christopher Rothert 4b78d5e39e Orthographic/perspective mode toggle
Note: missing dedicated icon!
2023-10-04 23:30:51 +02:00
Christopher Rothert 1f2d665654 Add camera speed easing based on Mathf.InterpEaseInOut
* change camera move speed method to use easing curve
* add methods for inversion of Mathf.InterpEaseInOut (might have better alternative)
* add setting for easing curve degree in ViewportOptions

* update camera speed adjustments to use easing curve
* remove unused camera speed values array
* update some comments and namings
2023-10-04 23:30:51 +02:00
Christopher Rothert ccf37e9d68 Add saving and loading of cached values for camera settings
* remove "Default" from all settings in ViewportOptions as they are shown in the "Defaults" group anyway
2023-10-04 23:30:51 +02:00
Christopher Rothert a280ce3dc7 Add reset button to camera settings widget 2023-10-04 23:30:51 +02:00
Christopher Rothert 4f93a0d9c9 Add default camera settings to editor options
* update ViewportOptions to include new default camera settings
* update existing default settings in ViewportOptions
* extract viewport options setup into own method
* initialize new camera settings with default settings in EditorViewport
2023-10-04 23:30:50 +02:00
Christopher Rothert 67536f04e9 Improve camera panning
* add camera panning speed option to camera settings context menu
* add relative panning speed based on distance to camera target to camera settings context menu
* add relative panning option to camera settings context menu

* fix float comparisons
* remove invert panning entry from view widget
* remove unused show/hide method for camera widget
2023-10-04 23:30:50 +02:00
Christopher Rothert 3dcd1a5ffb Improve viewport camera settings
* remove fixed camera speed buttons from camera speed scale widget
* change camera speed scale widget to general camera settings widget
* move all camera-related settings from view mode widget to camera settings widget
* fix some typo

* add possibility to set camera speed manually
* add min/max camera speed options
2023-10-04 23:30:50 +02:00
mafiesto4 1838c7bba7 Minor cleanup 2023-10-04 23:21:40 +02:00
mafiesto4 469c599a5e Merge branch 'Tryibion-editor-font' 2023-10-04 23:15:41 +02:00
mafiesto4 a6e9637442 Merge branch 'editor-font' of https://github.com/Tryibion/FlaxEngine into Tryibion-editor-font 2023-10-04 23:15:29 +02:00
mafiesto4 fd679f0af5 Add automatic game settings apply when saving json file in Editor
#1440
2023-10-04 23:11:38 +02:00
Tryibion b586b5fe41 Ensure editor font is sent as something. 2023-10-04 15:57:28 -05:00
mafiesto4 d1c0900ad7 Fix potential error when loading Guid from Json 2023-10-04 22:38:06 +02:00
mafiesto4 d2eefd4345 Merge branch 'Chikinsupu-Visject-ContextSensitiveNodes' 2023-10-04 22:27:03 +02:00
mafiesto4 92f677f238 Codestyle formatting #1522 2023-10-04 22:25:27 +02:00
mafiesto4 2e6fa8fc25 Merge branch 'Visject-ContextSensitiveNodes' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-ContextSensitiveNodes 2023-10-04 22:15:31 +02:00
mafiesto4 7777f73c26 Fix warning 2023-10-04 20:20:35 +02:00
mafiesto4 b3cef29abc Merge branch 'Menotdan-material_import' 2023-10-04 20:16:39 +02:00
mafiesto4 f46cc32715 Cleanup code #1115 2023-10-04 20:15:23 +02:00
mafiesto4 c46303018e Merge branch 'material_import' of https://github.com/Menotdan/FlaxEngine into Menotdan-material_import 2023-10-04 19:59:42 +02:00
mafiesto4 6f28496754 Merge branch 'Tryibion-game-window-focus-issue' 2023-10-04 19:58:36 +02:00
mafiesto4 f2a3338dce Improve #859 2023-10-04 19:58:10 +02:00
mafiesto4 8811c9cda0 Merge branch 'game-window-focus-issue' of https://github.com/Tryibion/FlaxEngine into Tryibion-game-window-focus-issue 2023-10-04 19:02:18 +02:00
mafiesto4 1149d7a04f Merge branch 'GoaLitiuM-launchsettings_fix' 2023-10-04 18:57:55 +02:00
mafiesto4 1dcad007c7 Merge branch 'launchsettings_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-launchsettings_fix 2023-10-04 18:57:50 +02:00
mafiesto4 b1cb2cfb37 Merge branch 'GoaLitiuM-particle_update_fix' 2023-10-04 18:56:54 +02:00
mafiesto4 cbbe730d22 Merge branch 'particle_update_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-particle_update_fix 2023-10-04 18:56:49 +02:00
mafiesto4 1db179d0b2 Merge branch 'RuanLucasGD-import_mesh_with_collision_type_as_convex' 2023-10-04 17:39:44 +02:00
mafiesto4 a5374920bd Merge branch 'import_mesh_with_collision_type_as_convex' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-import_mesh_with_collision_type_as_convex 2023-10-04 17:39:39 +02:00
mafiesto4 57dc3e00c7 Merge branch 'Arcnor-pugixml_extra' 2023-10-04 17:37:02 +02:00
mafiesto4 bd14790628 Merge branch 'pugixml_extra' of https://github.com/Arcnor/FlaxEngine into Arcnor-pugixml_extra 2023-10-04 17:36:55 +02:00
mafiesto4 273a939229 Merge branch 'Tryibion-cs-script-namespace' 2023-10-04 17:36:19 +02:00
mafiesto4 099a80127e Merge branch 'cs-script-namespace' of https://github.com/Tryibion/FlaxEngine into Tryibion-cs-script-namespace 2023-10-04 17:36:10 +02:00
mafiesto4 f1d57e47cb Fix regression in some context menus on Windows due to recent changes to windows showing after first paint 2023-10-04 17:34:14 +02:00
mafiesto4 fe9b6d73a8 Fix build regression from b3b6251c10 2023-10-04 16:54:50 +02:00
mafiesto4 bed736a8ee Add support for importing embedded textures via Assimp importer
#669
2023-10-04 15:16:10 +02:00
Edu Garcia f1600b3014 Move custom pugixml changes to pugixml_extra 2023-10-04 13:14:06 +01:00
mafiesto4 d68c65d9d6 Fix build regression from 9fa709aa79 2023-10-04 13:50:15 +02:00
mafiesto4 391b03b5cd Merge branch 'Tryibion-windows-fix' 2023-10-04 13:37:10 +02:00
mafiesto4 a009afc1a3 Merge branch 'windows-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-windows-fix 2023-10-04 13:37:04 +02:00
mafiesto4 98241c0cbe Merge branch 'Tryibion-game-set-open' 2023-10-04 13:35:26 +02:00
mafiesto4 569a8eb538 Merge branch 'game-set-open' of https://github.com/Tryibion/FlaxEngine into Tryibion-game-set-open 2023-10-04 13:35:21 +02:00
mafiesto4 627c0a211d Merge branch 'Tryibion-skinned-box-fix' 2023-10-04 13:34:39 +02:00
mafiesto4 9bfc5f5daa Merge branch 'skinned-box-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-skinned-box-fix 2023-10-04 13:34:25 +02:00
mafiesto4 7c932d3a2f Merge branch 'nothingTVatYT-master' 2023-10-04 13:33:17 +02:00
mafiesto4 d2531273e6 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-10-04 13:33:10 +02:00
mafiesto4 58f926fbb4 Merge branch 'Menotdan-restore_message_clearer' 2023-10-04 13:28:54 +02:00
mafiesto4 25e1c3deaf Merge branch 'restore_message_clearer' of https://github.com/Menotdan/FlaxEngine into Menotdan-restore_message_clearer 2023-10-04 13:28:40 +02:00
mafiesto4 9fa709aa79 Fix importing skinned models with meshes that don't have valid skinning to properly link into the node's bone
#1525
2023-10-04 12:42:11 +02:00
mafiesto4 46353365da Fix missing debug shapes drawing when skeleton node gets selected
#1220
2023-10-04 10:24:36 +02:00
mafiesto4 52b9a995ad Fix bone Offset Matrix from fbx when using root RotationMatrix
#1525
2023-10-04 10:01:17 +02:00
mafiesto4 b3b6251c10 Add GlobalInfo parsing to OpenFBX
#1525
2023-10-04 09:47:48 +02:00
Tryibion c6bd989744 Add Game Settings open button to menu. 2023-10-03 22:47:13 -05:00
Tryibion b5d927baa5 Force windows window to be correct size when restoring window on maximize from minimize. 2023-10-03 16:22:43 -05:00
mafiesto4 68a713fb95 Fix model importer to use precomputed Offset Matrix for skeletal model bones
#1525
2023-10-03 22:30:58 +02:00
mafiesto4 4e83a0a757 Fix potential exception in drag and drop handling 2023-10-03 22:20:44 +02:00
Tryibion b948152a41 Simplify 2023-10-03 09:40:46 -05:00
GoaLitiuM 36b1dc1452 Fix particle effects not working properly at high framerate 2023-10-03 17:38:21 +03:00
Tryibion 9fbc51a22a Add back in fixed margin code. 2023-10-03 09:21:27 -05:00
Tryibion d6861696a5 Simplify. 2023-10-03 09:17:52 -05:00
Tryibion 60ac0a8196 Fix box changes from animations. 2023-10-03 08:25:05 -05:00
Tryibion 7bb3ddefeb Fix AnimatedModel box. 2023-10-03 07:51:15 -05:00
mafiesto4 167fead18d Backport https://github.com/nem0/OpenFBX/commit/0f53d0461f72a0b0879cd682097b597b85ae116f 2023-10-03 12:24:06 +02:00
mafiesto4 58c6e0cd15 Backport https://github.com/nem0/OpenFBX/commit/dde6cbeb14cab424b9bbbeb6d75c4b84cc22f633 2023-10-03 12:23:36 +02:00
mafiesto4 ee83c60e1f Backport https://github.com/nem0/OpenFBX/commit/756d9b28aa01915421a107552655efa68b804fcd 2023-10-03 12:23:13 +02:00
mafiesto4 78b08b4552 Backport https://github.com/nem0/OpenFBX/commit/ccceff4f7889611dd1fd9d5fd2d5ccecbc210b9f 2023-10-03 12:22:35 +02:00
mafiesto4 2caa168dd9 Fix using DefaultFrameRate for animation imported with Assimp
#1444
2023-10-03 10:00:57 +02:00
mafiesto4 8007417fe5 Fix applying scale to imported models with Assimp
#1445 #1443
2023-10-03 09:50:50 +02:00
nothingTVatYT 78b074e7da Fix segfault: target can be null when font size is changed 2023-10-03 01:14:35 +02:00
mafiesto4 94611c7f7e Merge branch 'Tryibion-input' 2023-10-02 21:30:41 +02:00
mafiesto4 3a2ff0f4a2 Merge branch 'input' of https://github.com/Tryibion/FlaxEngine into Tryibion-input 2023-10-02 21:30:31 +02:00
mafiesto4 4149da5f9e Fix crash when generating project files with toolchain setup that fails
#1537
2023-10-02 18:57:40 +02:00
Tryibion 4e42f84873 Fix bug in depreciated triggered action placement. 2023-10-02 08:39:13 -05:00
mafiesto4 dd66ee3521 Add using text Show in Finder on macOS in Editor 2023-10-02 13:26:26 +02:00
mafiesto4 5fe135e10b Fix updating Content folder name when renamed in Finder on macOS 2023-10-02 13:11:20 +02:00
mafiesto4 8a9d0271a3 Add ignoring ’.DS_Store’ files in Content on macOS 2023-10-02 13:04:21 +02:00
mafiesto4 b9198fc7a1 Merge remote-tracking branch 'origin/master' 2023-10-02 12:54:41 +02:00
mafiesto4 8bafdb0b78 Remove std::function usage from ArrayExtensions 2023-10-02 12:52:44 +02:00
mafiesto4 41f005f95b Fix typo from 17291a8a13 2023-10-02 12:49:02 +02:00
mafiesto4 17291a8a13 Fix Cannot find compatible metal driver on macOS due to the newest Vulkan SDK regression
#1469
2023-10-02 12:48:14 +02:00
mafiesto4 1156f72fbe Add versions sorting to VulkanSDK selection on macOS 2023-10-02 12:40:37 +02:00
mafiesto4 70f0fbe954 Fix crash on Vulkan when drawing shader without binding proper constant Buffer
#1289
2023-10-02 11:37:24 +02:00
mafiesto4 0ea3cb0d69 Improve workflow with Android project generated after #1570 2023-10-02 11:05:19 +02:00
Menotdan 10ea0b0665 Make it clearer what "Restore Materials on Reimport" means. 2023-10-02 03:32:11 -04:00
Menotdan 139aea5f2d Merge branch 'FlaxEngine:master' into material_import 2023-10-02 01:14:49 -04:00
Tryibion bd32619016 Small fix 2023-10-01 21:11:08 -05:00
mafiesto4 652510ee50 Minor codestyle tweaks for #1420 2023-10-01 21:55:20 +02:00
mafiesto4 9b605f445c Merge branch 'RedTheKitsune-better-missing-script-handling' 2023-10-01 21:12:07 +02:00
mafiesto4 ae654c2f0a Merge branch 'better-missing-script-handling' of https://github.com/RedTheKitsune/FlaxEngine into RedTheKitsune-better-missing-script-handling 2023-10-01 21:07:34 +02:00
mafiesto4 b492c9421b Fix Tag deserialization in cooked game
#1534
2023-10-01 21:02:08 +02:00
MineBill 8a34ae3ece Handle double clicking to eliminate perceived lag. 2023-10-01 18:41:32 +03:00
MineBill 618b1bfd39 Evaluate transition data before executing the transition rule. 2023-10-01 16:13:49 +03:00
mafiesto4 dd21020297 Merge remote-tracking branch 'origin/master' into 1.7 2023-10-01 13:17:41 +02:00
mafiesto4 a001a5fbdc Remove mutex usage since scenes are loaded in sync for now 2023-10-01 13:17:37 +02:00
mafiesto4 6d92d0b58f Merge branch 'RuanLucasGD-Remove-Background_From-CollisionDataWindow' 2023-10-01 12:35:27 +02:00
mafiesto4 2db55a3711 Merge branch 'Remove-Background_From-CollisionDataWindow' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-Remove-Background_From-CollisionDataWindow 2023-10-01 12:35:22 +02:00
mafiesto4 8de9e06b58 Merge branch 'Tryibion-main-win' 2023-10-01 12:33:59 +02:00
mafiesto4 fc499b763d Merge branch 'main-win' of https://github.com/Tryibion/FlaxEngine into Tryibion-main-win 2023-10-01 12:33:54 +02:00
mafiesto4 9acff68209 Merge branch 'Tryibion-rot-around-fix' 2023-10-01 12:32:51 +02:00
mafiesto4 4f5e7988c9 Merge branch 'rot-around-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-rot-around-fix 2023-10-01 12:32:42 +02:00
mafiesto4 20797fce5a Merge branch 'Tryibion-base-win-size' 2023-10-01 12:30:19 +02:00
mafiesto4 883abc2f3b Merge branch 'base-win-size' of https://github.com/Tryibion/FlaxEngine into Tryibion-base-win-size 2023-10-01 12:30:14 +02:00
mafiesto4 1e96bb7647 Merge branch 'GoaLitiuM-vs_android_intellisense_fix' 2023-10-01 12:29:43 +02:00
mafiesto4 ec7dcc4cfb Merge branch 'vs_android_intellisense_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vs_android_intellisense_fix 2023-10-01 12:29:36 +02:00
mafiesto4 acc7d0893f Merge branch 'GoaLitiuM-vscode_csharp_build_tasks' 2023-10-01 12:28:38 +02:00
mafiesto4 3ae0e4f65e Merge branch 'vscode_csharp_build_tasks' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_csharp_build_tasks 2023-10-01 12:28:30 +02:00
mafiesto4 92382b42c4 Merge branch 'GoaLitiuM-assembly_load_fix' 2023-10-01 12:28:09 +02:00
mafiesto4 7dc3a3c1a2 Merge branch 'assembly_load_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-assembly_load_fix 2023-10-01 12:27:54 +02:00
mafiesto4 3f8c91c83a Merge branch 'GoaLitiuM-build_engine_bindings' 2023-10-01 12:27:22 +02:00
mafiesto4 5832d995eb Merge branch 'build_engine_bindings' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-build_engine_bindings 2023-10-01 12:27:14 +02:00
mafiesto4 3754b5c958 Merge branch 'GoaLitiuM-sln_generation_fix2' 2023-10-01 12:26:44 +02:00
mafiesto4 6e47db0ebe Merge branch 'sln_generation_fix2' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-sln_generation_fix2 2023-10-01 12:26:39 +02:00
mafiesto4 38cf756f1f Merge branch 'Tryibion-blur-fix' 2023-10-01 12:25:44 +02:00
mafiesto4 8c61b6d41b Merge branch 'blur-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-blur-fix 2023-10-01 12:25:39 +02:00
mafiesto4 18a2824753 Merge branch 'GoaLitiuM-sceneanim_null_check_fix' 2023-10-01 12:12:33 +02:00
mafiesto4 19a0eab966 Merge branch 'sceneanim_null_check_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-sceneanim_null_check_fix 2023-10-01 12:12:21 +02:00
mafiesto4 4e839c2e3d Merge branch 'Arcnor-renameNewActor' 2023-10-01 12:10:33 +02:00
mafiesto4 26040f27cc Merge branch 'renameNewActor' of https://github.com/Arcnor/FlaxEngine into Arcnor-renameNewActor 2023-10-01 12:08:01 +02:00
mafiesto4 450d49b0e7 Merge branch 'Arcnor-labelSetBaselineGap' 2023-10-01 12:07:04 +02:00
mafiesto4 da647d3403 Merge branch 'labelSetBaselineGap' of https://github.com/Arcnor/FlaxEngine into Arcnor-labelSetBaselineGap 2023-10-01 12:06:57 +02:00
mafiesto4 2dd6297d18 Merge branch 'GoaLitiuM-visualscript_valuetype_fix' 2023-10-01 12:06:19 +02:00
mafiesto4 3f3f31f70f Merge branch 'visualscript_valuetype_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-visualscript_valuetype_fix 2023-10-01 12:06:00 +02:00
mafiesto4 e8a093f0b3 Merge branch 'Tryibion-font-size-fixes' 2023-10-01 12:05:24 +02:00
mafiesto4 5e3bb4d51e Merge branch 'font-size-fixes' of https://github.com/Tryibion/FlaxEngine into Tryibion-font-size-fixes 2023-10-01 12:05:20 +02:00
mafiesto4 3078a9d212 Merge branch 'davevanegdom-Statusbar-Imrpovements' 2023-10-01 12:04:01 +02:00
mafiesto4 4d6a27c92a Merge branch 'Statusbar-Imrpovements' of https://github.com/davevanegdom/FlaxEngine into davevanegdom-Statusbar-Imrpovements 2023-10-01 12:01:31 +02:00
mafiesto4 e0f840563d Merge branch 'M-3-H-master' 2023-10-01 12:00:50 +02:00
mafiesto4 a761a7e857 Merge branch 'master' of https://github.com/M-3-H/FlaxEngine into M-3-H-master 2023-10-01 12:00:40 +02:00
mafiesto4 5e283b3d16 Merge branch 'Tryibion-fix-tooltip' 2023-10-01 11:59:36 +02:00
mafiesto4 818b2c3bb5 Merge branch 'fix-tooltip' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-tooltip 2023-10-01 11:59:30 +02:00
mafiesto4 0690d8695d Merge branch 'Chikinsupu-Visject-PrettierConnectionBezier' 2023-10-01 11:59:10 +02:00
mafiesto4 c35a21a1dc Merge branch 'Visject-PrettierConnectionBezier' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-PrettierConnectionBezier 2023-10-01 11:57:08 +02:00
mafiesto4 0eda67bd73 Fix nested profiler events usage
#https://github.com/FlaxEngine/FlaxEngine/issues/1380
2023-10-01 11:56:54 +02:00
mafiesto4 659a70dc81 Merge branch 'Tryibion-bool-fix' 2023-10-01 11:36:26 +02:00
mafiesto4 3a85b27cbe Merge branch 'bool-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-bool-fix 2023-10-01 11:36:21 +02:00
mafiesto4 8c69363fba Merge branch 'Zode-master' 2023-10-01 11:35:11 +02:00
mafiesto4 f4ee709bc6 Merge branch 'master' of https://github.com/Zode/FlaxEngine into Zode-master 2023-10-01 11:35:06 +02:00
mafiesto4 ecda813b4a Merge branch 'AndrejStojkovic-master' 2023-10-01 11:34:36 +02:00
mafiesto4 bd8240c5a5 Merge branch 'master' of https://github.com/AndrejStojkovic/FlaxEngine into AndrejStojkovic-master 2023-10-01 11:34:30 +02:00
mafiesto4 5bfcbd907a Merge branch 'Tryibion-output-win' 2023-10-01 11:27:19 +02:00
mafiesto4 0d0dc9bc07 Merge branch 'output-win' of https://github.com/Tryibion/FlaxEngine into Tryibion-output-win 2023-10-01 11:27:11 +02:00
mafiesto4 1c21939f40 Minor changes 2023-10-01 11:24:49 +02:00
mafiesto4 d10d52ec0c Add thread-safety to various scripting methods 2023-10-01 10:57:51 +02:00
mafiesto4 075f40b93a Minor fixes 2023-10-01 10:56:30 +02:00
mafiesto4 af3f6d0003 Fix crash in new Delegate when checking if it's binded 2023-10-01 10:56:09 +02:00
mafiesto4 0ae413d4fe Fix crash when using Visual Script runtime in async 2023-10-01 10:55:48 +02:00
mafiesto4 b960600102 Optimize scenes loading with Job System 2023-10-01 10:55:01 +02:00
Tryibion b943c7ca3e Add extra check for stationary rotation. 2023-09-30 22:19:09 -05:00
Tryibion 113307ddf9 Simplify to return main window even in editor. 2023-09-30 21:36:41 -05:00
Tryibion 8edd50c293 Simplify 2023-09-30 21:34:40 -05:00
Tryibion cc681de30e Fix more and add bool check to orient the actor or not. 2023-09-30 21:33:27 -05:00
Tryibion 260c48e41d Change blur panel to draw self. Fix issue with blur strength slider. 2023-09-30 17:44:42 -05:00
Tryibion bae1cfbc8a Change base editor window size to 75% of desktop size when restored for first time. 2023-09-30 17:35:42 -05:00
Tryibion 1366c2850f Fix Actor.RotateAround to rotate the actors orientation. 2023-09-30 17:21:48 -05:00
Nils Hausfeld 07d13f0144 - Implemented very basic support for method override nodes
- Cleanup
2023-09-30 23:06:26 +02:00
Tryibion 85a985cd7f Expose Main Window to c# through Screen class. 2023-09-30 13:52:20 -05:00
Nils Hausfeld aca6d7110d - Cleanup and comments 2023-09-30 20:27:51 +02:00
Nils Hausfeld 2e09c4fb63 - Made visject items a tiny tiny tiny bit taller 2023-09-30 20:22:49 +02:00
Nils Hausfeld 1dc01cd023 - Added compatibility checks to packing structures nodes
- Added compatibility checks to more function nodes
2023-09-30 20:07:33 +02:00
Nils Hausfeld 719efc4a99 - Added Input/Output compatibility check to event based nodes
- Removed a huge chunk of compatibility checking code out of CMItem
2023-09-30 13:45:21 +02:00
Nils Hausfeld 35f641955b - Removed NodeTypeHint
- Added delegates to check compatiblity with custom archetypes
- Added compatibility check to InvokeMethod archetype
2023-09-30 13:20:04 +02:00
GoaLitiuM 6483f95450 Fix Visual Studio project folder GUIDs randomization during regeneration 2023-09-30 03:26:56 +03:00
GoaLitiuM cc318dddd7 Remap non-native Editor VS build configurations to native configurations 2023-09-30 02:37:05 +03:00
GoaLitiuM c9324004eb Build C# bindings after generating engine project files 2023-09-30 01:22:43 +03:00
GoaLitiuM 8b8970e4b9 Generate VSCode attach profile for native debugging 2023-09-29 23:51:27 +03:00
GoaLitiuM bf2c10b036 Generate one VSCode debugger attach launch profile per debugger type 2023-09-29 23:51:24 +03:00
GoaLitiuM 8a19b5ddd6 Skip adding VSCode task and launch profiles for plugins and dependencies 2023-09-29 23:51:22 +03:00
GoaLitiuM 811d639573 Generate Visual Studio Code build tasks for C#-projects 2023-09-29 23:51:17 +03:00
Nils Hausfeld 3befe4bb4a - Fixed a bug where items with a string match didn't get highlighted anymore when the group name matched
- Remouved double filtering when group name matched
- Started fixing asynchronous Un/Packing nodes filtering
2023-09-29 21:53:34 +02:00
GoaLitiuM 18310c9264 Fix loading shared managed assemblies multiple times 2023-09-29 22:12:50 +03:00
Nils Hausfeld b5dc916568 - Moved ScriptType casting check from Box to ScriptType class
- Even more cleanup and comments, wowzers
2023-09-29 17:44:31 +02:00
Nils Hausfeld 091d34b20d - Even more cleanup and comments 2023-09-29 17:26:56 +02:00
Nils Hausfeld 4bf46c3af3 - More cleanup and comments 2023-09-29 17:19:38 +02:00
Nils Hausfeld a4970b7fce - Group names now get filtered again (currently doing a second filtering pass through the items)
- More cleanup
2023-09-29 16:25:34 +02:00
Edu Garcia 8cdd026826 Merge branch 'FlaxEngine:master' into renameNewActor 2023-09-29 15:04:23 +01:00
Nils Hausfeld 2144ad4f7b Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-29 16:00:15 +02:00
Zode db8f721fa7 Fix build project generation under arch 2023-09-29 11:20:24 +03:00
Tryibion 8f5af2e149 Fix bool editor when null. 2023-09-28 19:49:59 -05:00
Ruan Lucas bb54229760 Simplify code 2023-09-28 20:13:57 -04:00
Tryibion 9975bde78c Change output window search and scroll bars to be like other windows. 2023-09-28 19:09:02 -05:00
Ruan Lucas ba20402900 Change OnDestroy order 2023-09-28 19:05:26 -04:00
mafiesto4 fd3f10864b Fixes for iOS #1312 2023-09-29 00:00:51 +02:00
mafiesto4 f77198c7ca Fixes for iOS #1312 2023-09-29 00:00:21 +02:00
GoaLitiuM 1d42988f39 Fix VisualScript method calls not working with value types 2023-09-29 00:50:19 +03:00
Edu Garcia 6d3fdeec8a Rename new actor after creating it 2023-09-28 22:50:07 +01:00
Edu Garcia 8eed667d5a Makes BaseLinesGapScale configurable for Label 2023-09-28 22:41:24 +01:00
Tryibion 9a5d8e2c51 Fix tooltip crash 2023-09-28 15:31:30 -05:00
Nils Hausfeld 84b240216f - Implemented context sensitive toggle functionality
- Item list now updates on the fly when toggleing context sensitivity
- Added profiling
- Fixed a highlighting bug
- Minor cleanup
2023-09-28 21:31:58 +02:00
Tryibion 137951201d Refactor to use Camera Node. 2023-09-28 14:09:08 -05:00
GoaLitiuM 96d880df6a Fix crash in SceneAnimationPlayer 2023-09-28 22:06:07 +03:00
GoaLitiuM 58445f04c4 Fix potential incorrect null checks in FlaxEngine.Objects
The null-conditional operator checks for reference equality of the
Object, but doesn't check the validity of the unmanaged pointer. This
check is corrected in cases where the object was not immediately
returned from the bindings layer and may have been destroyed earlier.
2023-09-28 22:05:58 +03:00
GoaLitiuM ea201b6173 Fix null check in SceneAnimationWindow
The null-conditional operator checks for reference equality of the
Object, but doesn't check the unmanaged pointer validity.
2023-09-28 22:05:17 +03:00
Nils Hausfeld b96098e555 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-28 20:59:59 +02:00
Nils Hausfeld 9acee40746 - Added context sensitive toggle gui 2023-09-28 20:53:47 +02:00
mafiesto4 58b9d76d24 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Editor/Viewport/PrefabWindowViewport.cs
#	Source/Engine/Physics/PhysX/SimulationEventCallbackPhysX.cpp
2023-09-28 20:42:54 +02:00
Nils Hausfeld 98f65ec303 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-28 20:34:56 +02:00
mafiesto4 310d61edda Merge branch 'Tryibion-prevent-full-desktop' 2023-09-28 20:34:29 +02:00
mafiesto4 983694eb4f Merge branch 'prevent-full-desktop' of https://github.com/Tryibion/FlaxEngine into Tryibion-prevent-full-desktop 2023-09-28 20:34:12 +02:00
Tryibion 9694522b4e Change to use enum value. 2023-09-28 13:25:56 -05:00
mafiesto4 7e55a61444 Merge branch 'GoaLitiuM-editor_bindings' 2023-09-28 20:18:35 +02:00
mafiesto4 481bbd3a77 Merge branch 'editor_bindings' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_bindings 2023-09-28 20:17:35 +02:00
mafiesto4 139e6d0d1f Improve #1514 to share code for tooltip position wrapping 2023-09-28 20:16:57 +02:00
mafiesto4 28c651252a Merge branch 'Tryibion-tooltip-move' 2023-09-28 20:07:50 +02:00
mafiesto4 b242820132 Merge branch 'tooltip-move' of https://github.com/Tryibion/FlaxEngine into Tryibion-tooltip-move 2023-09-28 19:59:59 +02:00
mafiesto4 88758a4f3a Merge branch 'Tryibion-editor-options-save-popup' 2023-09-28 19:58:29 +02:00
mafiesto4 9ad607c054 Merge branch 'editor-options-save-popup' of https://github.com/Tryibion/FlaxEngine into Tryibion-editor-options-save-popup 2023-09-28 19:58:24 +02:00
mafiesto4 e319b4dedc Minor optimization for PhysX events cleanup 2023-09-28 19:37:08 +02:00
mafiesto4 82b2f46b48 Post-merge tweaks for #1312 2023-09-28 19:21:06 +02:00
mafiesto4 30482f62e2 Merge branch 'GoaLitiuM-marshalling_scriptingobject_changes' 2023-09-28 18:41:30 +02:00
mafiesto4 279528a30d Merge branch 'marshalling_scriptingobject_changes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-marshalling_scriptingobject_changes
# Conflicts:
#	Source/Engine/Engine/NativeInterop.Unmanaged.cs
#	Source/Engine/Scripting/Runtime/DotNet.cpp
2023-09-28 18:41:20 +02:00
mafiesto4 46e00af723 Merge branch 'NoriteSC-BugFixes' into 1.7 2023-09-28 13:11:15 +02:00
mafiesto4 d71c171412 Cleanup code in #1367 and fix api compatibility, revert joint changes 2023-09-28 13:10:58 +02:00
mafiesto4 3b94792f2e Merge branch 'BugFixes' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-BugFixes
# Conflicts:
#	Source/Engine/Networking/NetworkReplicator.cpp
2023-09-28 12:28:19 +02:00
mafiesto4 7cc6163a38 Restore C# method caching in Editor 1d7ba2210a 2023-09-28 12:09:56 +02:00
mafiesto4 15377acc25 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-28 12:01:34 +02:00
mafiesto4 53c53c1166 Merge branch 'GoaLitiuM-sln_generation_fix' 2023-09-28 11:51:26 +02:00
mafiesto4 d89400b84e Merge branch 'sln_generation_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-sln_generation_fix 2023-09-28 11:51:20 +02:00
mafiesto4 c50bbfff76 Merge branch 'GoaLitiuM-clang_detect_fix' 2023-09-28 11:48:44 +02:00
mafiesto4 bd842e60bd Merge branch 'clang_detect_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-clang_detect_fix 2023-09-28 11:48:19 +02:00
mafiesto4 23cfc522e8 Merge branch 'GoaLitiuM-managed_error_dialog' 2023-09-28 11:47:30 +02:00
mafiesto4 0a8fa46f77 Merge branch 'managed_error_dialog' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managed_error_dialog 2023-09-28 11:47:23 +02:00
mafiesto4 77f962b33d Fix soft refs in bindings to match C# version that is not generic 2023-09-28 11:47:16 +02:00
mafiesto4 98d5769558 Fix performance bug in Development/Release builds due to incorrect draw calls batching (uninitialized memory) 2023-09-28 10:59:09 +02:00
mafiesto4 b7e871ecfd Minor tweaks 2023-09-28 10:58:29 +02:00
MZ 2cc6e80958 Checked my working. 2023-09-28 16:07:38 +10:00
MZ 299f68ebfe Vert color deduplication check 2023-09-28 16:00:31 +10:00
GoaLitiuM bcccb71373 Show full exception message in error message box for managed exceptions 2023-09-28 00:25:26 +03:00
mafiesto4 37d166dce7 Merge branch 'GoaLitiuM-mutex_delegate_fixes' into 1.7 2023-09-27 22:42:36 +02:00
mafiesto4 9a5165ebdd Merge branch 'mutex_delegate_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-mutex_delegate_fixes 2023-09-27 22:42:23 +02:00
ontrigger 249ded3d1f fix incorrect link 2023-09-27 22:12:21 +03:00
GoaLitiuM 8338d1cc37 Fix Which not returning the found executable on success 2023-09-27 21:47:45 +03:00
GoaLitiuM d7db26cf89 Detect latest versions of clang 2023-09-27 21:47:41 +03:00
Nils Hausfeld 155d11c07b - Filtering now also applies when dragging a connection from an input port 2023-09-27 19:28:06 +02:00
GoaLitiuM 22e5afdb6f Fix Visual Studio project GUIDs getting randomized during regeneration 2023-09-27 20:17:19 +03:00
Nils Hausfeld 98e9c75cb8 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-27 18:52:59 +02:00
GoaLitiuM 0c00dc20a2 Always generate additional Visual Studio solution files for all platforms 2023-09-27 19:43:59 +03:00
GoaLitiuM bff18a5564 Add -genproject -rider option for generating Rider compatible solution files 2023-09-27 19:43:56 +03:00
mafiesto4 2f9c601678 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-27 17:32:47 +02:00
Nils Hausfeld 63c213aec0 - Support for Impulse ports 2023-09-27 17:04:35 +02:00
Nils Hausfeld c4da34a463 - Implemented function node and bind/unbind node compatiblility/filtering
- Added NodeTypeHint enum
2023-09-27 16:24:33 +02:00
mafiesto4 44292efa04 Fix editing array of tags in Editor that is null initially
#1451
2023-09-27 13:38:03 +02:00
mafiesto4 86c06297e8 Merge branch 'GoaLitiuM-unsub_event_nothrow' 2023-09-27 13:21:18 +02:00
mafiesto4 934457ac0b Merge branch 'unsub_event_nothrow' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unsub_event_nothrow 2023-09-27 13:21:12 +02:00
mafiesto4 4dd6653098 Merge branch 'solnem-fix/editor-window-closing-during-camera-flight' 2023-09-27 13:18:17 +02:00
mafiesto4 75711a16bc Merge branch 'fix/editor-window-closing-during-camera-flight' of https://github.com/solnem/FlaxEngine into solnem-fix/editor-window-closing-during-camera-flight 2023-09-27 13:18:10 +02:00
mafiesto4 b00156f519 Add some improvements to particles editing
#1395
2023-09-27 13:04:44 +02:00
mafiesto4 523a14af56 Fix missing Variant marshalling for scripting structures bindings
#1395
2023-09-27 13:04:14 +02:00
Nils Hausfeld be944e35a5 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-27 12:48:07 +02:00
mafiesto4 e5e37f3a41 Add android_native_app_glue.h to be included in engine package 2023-09-27 11:31:52 +02:00
mafiesto4 bff9c3419d Merge branch 'GoaLitiuM-fix_uaf' 2023-09-26 21:30:04 +02:00
Tryibion d14dc56b5c Change name to AxisValueChanged. 2023-09-26 10:26:06 -05:00
Tryibion 9b48d1feb8 Update comments 2023-09-26 10:04:08 -05:00
Tryibion 071a73c6d9 Add AxisChanged event to InputAxis. 2023-09-26 10:03:34 -05:00
Tryibion 3a9dd3f8f8 Small wording change 2023-09-26 09:41:41 -05:00
Tryibion ed2dd7211a Add back depriciated Triggered event. 2023-09-26 09:40:30 -05:00
GoaLitiuM e8088f42ac Fix string use-after-free while loading managed assemblies 2023-09-26 17:37:53 +03:00
Tryibion eeab9774a9 Add easily getting action state 2023-09-26 09:31:23 -05:00
Tryibion ea1da0481f Change input event to trigger different input states. 2023-09-26 08:35:10 -05:00
mafiesto4 0ddb0e4350 Merge branch 'Tryibion-ui-adds' 2023-09-26 10:48:32 +02:00
mafiesto4 a919130434 Merge branch 'ui-adds' of https://github.com/Tryibion/FlaxEngine into Tryibion-ui-adds 2023-09-26 10:47:24 +02:00
mafiesto4 c015feac84 Merge branch 'stefnotch-patch-13' 2023-09-26 10:46:11 +02:00
mafiesto4 3b26d1e0ea Merge branch 'patch-13' of https://github.com/stefnotch/FlaxEngine into stefnotch-patch-13 2023-09-26 10:46:05 +02:00
mafiesto4 6621e70ae7 Add objects replication and RPC stats table to Network Profiler 2023-09-26 10:33:12 +02:00
stefnotch 1bc7ad5e9d Update SerializeAttribute.cs 2023-09-26 10:30:57 +02:00
Menotdan f06af4d589 Visual studio auto-formatting fixed by just editing it in notepad :) 2023-09-26 00:09:57 -04:00
Menotdan 0f53c486ed Fixed formatting to match master branch 2023-09-26 00:05:50 -04:00
Menotdan fdf760f483 Merge branch 'master' of https://github.com/Menotdan/FlaxEngine into material_import
Merge Upstream Changes.
2023-09-25 23:51:34 -04:00
ontrigger 2d37e59e73 completely remove SmoothingScale 2023-09-26 00:51:44 +03:00
Nils Hausfeld d8e2b06c38 - Minor cleanup 2023-09-25 23:26:33 +02:00
ontrigger 056d8d5b6c don't animate when scrollbar is held 2023-09-25 23:46:16 +03:00
ontrigger a18d2d0eba remove logging 2023-09-25 23:35:52 +03:00
ontrigger 6a62dac49b remove usages of SmoothingScale across the codebase 2023-09-25 23:29:29 +03:00
ontrigger 9667848c96 make scrolling duration based and deprecate SmoothingScale 2023-09-25 23:28:29 +03:00
Nils Hausfeld 3b393ef4db Groups now get filtered by box type when added after the context menu was opened 2023-09-25 22:07:50 +02:00
Christopher Rothert 5ced9453d4 Fix editor window closing when using RMB + Ctrl + W for slow camera flight 2023-09-25 22:03:40 +02:00
Nils Hausfeld 33c51d0a8e - Filtering is functioning now for all default groups 2023-09-25 19:10:05 +02:00
Tryibion fd3a5c55e1 Simplify code 2023-09-25 11:50:04 -05:00
Tryibion 5eff51d47e Add button to position camera to editor viewport view. 2023-09-25 11:46:37 -05:00
mafiesto4 da47088250 Add conditional profiling in Editor (run only when using Profiler window) 2023-09-25 18:34:07 +02:00
mafiesto4 216a5e9f92 Add support for displaying all active Network Peer stats in Editor Profiler tab 2023-09-25 16:49:18 +02:00
mafiesto4 a672f6aa6b Merge branch 'Tryibion-npute-editor-improve' 2023-09-25 16:34:09 +02:00
mafiesto4 c374127de1 Fix error when loading project on non-ASCII path
#1439
2023-09-25 16:34:01 +02:00
mafiesto4 96b6313acb Fix crash when loading C# assembly from non-ASNSI path
#1439
2023-09-25 16:30:24 +02:00
mafiesto4 cfd53eea60 Merge branch 'npute-editor-improve' of https://github.com/Tryibion/FlaxEngine into Tryibion-npute-editor-improve 2023-09-25 15:47:38 +02:00
mafiesto4 273e70da09 Merge branch 'Tryibion-fix-rightclick-source' 2023-09-25 15:46:49 +02:00
mafiesto4 d7b5a582f2 Merge branch 'fix-rightclick-source' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-rightclick-source 2023-09-25 15:46:43 +02:00
mafiesto4 212a2e1ded Format code from recent PRs 2023-09-25 15:42:23 +02:00
mafiesto4 ef106c6a29 Merge branch 'Radiangames-MMB_Pan' 2023-09-25 15:41:08 +02:00
mafiesto4 c46ec41f6f Merge branch 'MMB_Pan' of https://github.com/Radiangames/FlaxEngine into Radiangames-MMB_Pan 2023-09-25 15:40:19 +02:00
mafiesto4 90a4fba767 Improve #1490 performance to use Ordinal string comparision and just check for extension on some generated files 2023-09-25 15:39:00 +02:00
mafiesto4 e37d9017c0 Merge branch 'Tryibion-gen-file-filter' 2023-09-25 15:37:23 +02:00
mafiesto4 8ac23e556a Merge branch 'gen-file-filter' of https://github.com/Tryibion/FlaxEngine into Tryibion-gen-file-filter 2023-09-25 15:37:11 +02:00
mafiesto4 0e5755ddaf Merge branch 'Chikinsupu-TextBox-ControlBackspaceSupport' 2023-09-25 15:36:17 +02:00
mafiesto4 1b9d61b408 Merge branch 'TextBox-ControlBackspaceSupport' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-TextBox-ControlBackspaceSupport 2023-09-25 15:34:40 +02:00
mafiesto4 ee5c11cef5 Merge branch 'Chikinsupu-ContainerControl-ShiftTabSupport' 2023-09-25 15:34:11 +02:00
mafiesto4 2fb1778801 Merge branch 'ContainerControl-ShiftTabSupport' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-ContainerControl-ShiftTabSupport 2023-09-25 15:31:23 +02:00
mafiesto4 8d72b1661b Merge branch 'GoaLitiuM-vulkan_shader_comp_fix' 2023-09-25 15:22:55 +02:00
mafiesto4 4fd8697082 Working improvements from docs PR 2023-09-25 11:11:56 +02:00
mafiesto4 b2ec235f01 Minor tweaks 2023-09-25 11:00:49 +02:00
Tryibion 84ecd49439 Fix slider clipping left most pixel of fill bar. 2023-09-24 15:40:56 -05:00
Tryibion 8a2272b825 Add has border and border thickness options. 2023-09-24 15:40:40 -05:00
Tryibion cb89daad36 Clean up comments. 2023-09-24 15:15:53 -05:00
Tryibion 87ef35cd4f Add tooltips to move with the mouse cursor. 2023-09-24 15:14:28 -05:00
Nils Hausfeld 50ebd5cb87 - Fixed massive UI freeze because of perform layout oversight 2023-09-24 20:31:22 +02:00
Nils Hausfeld 8d39d51f90 - Added profiling 2023-09-24 20:22:44 +02:00
Nils Hausfeld 038a3603e4 - Possible nodes get filtered now depending on the available node ports 2023-09-24 19:33:03 +02:00
mafiesto4 626bdf2e37 Add Variant::AsStructure to comparision operator between VariantType and ScriptingTypeHandle 2023-09-24 19:27:23 +02:00
mafiesto4 8a00a3e61e Expose moveTo node functions to override in C# 2023-09-24 19:26:41 +02:00
mafiesto4 65583ac6aa Add NavMeshRuntime to scripting api 2023-09-24 19:26:17 +02:00
Nils Hausfeld 0de31f630f - Moved control point calculation into its own function since multiple parts of the code depend on it
- 'DrawConnection' function now calls the control point calculation function
- 'IntersectsConnection' function now calls the control point calculation function
2023-09-24 18:40:34 +02:00
Ruan Lucas 1e3debf1ec Remake #1413 2023-09-24 11:37:14 -04:00
Ruan Lucas 409b17df2d Remake 2023-09-24 11:28:07 -04:00
GoaLitiuM 9021deb49e Fix Vulkan shader compilation with source files missing the last newline 2023-09-24 15:39:24 +03:00
mafiesto4 15b1e0a984 Minor fixes 2023-09-24 13:20:19 +02:00
mafiesto4 959bd33efc Rename AllocState to NewState 2023-09-24 13:17:59 +02:00
Nils Hausfeld b6ad252305 - Removed unnecessary null-conditional operator
- Removed unnecessary Float2 allocation
2023-09-23 19:14:06 +02:00
GoaLitiuM 10bcb26005 Fix invalid characters in generated C# launch settings paths 2023-09-23 18:29:53 +03:00
mafiesto4 dc324b4ec6 Fix crash when max files open limit is too small on macOS/iOS 2023-09-23 14:47:16 +02:00
mafiesto4 f09aebacad Add editor app packaging for macOS 2023-09-23 14:42:05 +02:00
GoaLitiuM 080091c271 Fix missing bindings for Actor related actions 2023-09-23 15:35:55 +03:00
GoaLitiuM 385c3541c9 Apply global editor bindings in most windows 2023-09-23 15:23:09 +03:00
GoaLitiuM 52cf4df641 Add input bindings for File menu actions 2023-09-23 15:23:09 +03:00
GoaLitiuM a1cbaba743 Add Editor input bindings for Profiler window and Profiler actions 2023-09-23 15:23:09 +03:00
GoaLitiuM 8ed57863b8 Add Editor input bindings for Tools menu items 2023-09-23 15:23:09 +03:00
GoaLitiuM efbc757369 Cancel camera rotation toggle when entering playmode or hitting escape 2023-09-23 15:23:08 +03:00
GoaLitiuM 2023aa8c94 Add viewport camera movement speed adjustment input bindings 2023-09-23 15:23:08 +03:00
GoaLitiuM 0122a9f699 Implement viewport camera rotation toggle for trackpad users 2023-09-23 15:23:08 +03:00
GoaLitiuM 69ce189c5d Add input bindings for Scene viewport related actions and Pilot Actor 2023-09-23 15:23:08 +03:00
GoaLitiuM 964913013d Add shortcut key to gizmo buttons 2023-09-23 15:23:07 +03:00
GoaLitiuM 17e1afb04a Add Editor input option for toggling gizmo transform space 2023-09-23 15:23:07 +03:00
GoaLitiuM 61b4738b6a Fix Editor bindings with no modifiers triggering with modifiers pressed 2023-09-23 15:23:07 +03:00
GoaLitiuM 642766d9cc Add Editor input options for Play Current Scenes and running cooked game 2023-09-23 15:23:07 +03:00
Nils Hausfeld 963300c2cb - Implemented shift tab support for Container Controls 2023-09-23 11:56:45 +02:00
mafiesto4 1c20398d8c Merge remote-tracking branch 'origin/master' into 1.7 2023-09-22 22:43:29 +02:00
mafiesto4 248304a78f Fix regression of importing only a single material for models with split objects enabled
#1483
2023-09-22 19:43:00 +02:00
Meh d11e3b5bd4 Update SplashScreen.cpp 2023-09-22 19:25:16 +02:00
Nils Hausfeld df23174deb - Added proper control backspace support 2023-09-22 19:23:16 +02:00
Meh 25708e2875 add more quotes 2023-09-22 19:01:37 +02:00
mafiesto4 0948f7f18e Merge branch 'Tryibion-copy-paste-fix' 2023-09-22 18:56:44 +02:00
mafiesto4 07db94c4f7 Merge branch 'copy-paste-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-copy-paste-fix 2023-09-22 18:56:39 +02:00
mafiesto4 aa969ec023 Merge branch 'Tryibion-create-folder-fix' 2023-09-22 18:54:53 +02:00
mafiesto4 cb423f78f4 Merge branch 'create-folder-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-create-folder-fix 2023-09-22 18:50:57 +02:00
mafiesto4 86a7484947 Merge branch 'Tryibion-max-min-on-click' 2023-09-22 18:49:19 +02:00
mafiesto4 19651db45e Merge branch 'max-min-on-click' of https://github.com/Tryibion/FlaxEngine into Tryibion-max-min-on-click 2023-09-22 18:49:14 +02:00
mafiesto4 72d61017f1 Merge branch 'Chikinsupu-fix-VisjectContextMenu-SpaceInput' 2023-09-22 18:46:00 +02:00
mafiesto4 2b4911ef06 Merge branch 'fix-VisjectContextMenu-SpaceInput' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-fix-VisjectContextMenu-SpaceInput 2023-09-22 18:45:55 +02:00
Meh 45231a8b04 Update SplashScreen.cpp 2023-09-22 18:13:31 +02:00
Meh 7b051ce827 Update SplashScreen.cpp 2023-09-22 18:08:14 +02:00
Meh b82436cf4e Refactor splash screen quotes
removed bad ones and added more nice quotes.
2023-09-22 17:58:13 +02:00
mafiesto4 cf4fc535b3 Merge branch 'GoaLitiuM-debug_log_exception_line_fix' 2023-09-22 17:49:11 +02:00
Meh 15859134a3 Refactor splash screen quotes
Removed bad and weird quotes, added nice ones.
2023-09-22 17:33:17 +02:00
mafiesto4 dbbd6ce045 Add codesigning to macOS editor package binaries 2023-09-22 17:19:14 +02:00
GoaLitiuM 08d04ea6fb Fix exceptions in Debug Log Window not using correct line numbers
Additions to fix in commit 1714bc243a
2023-09-22 16:54:58 +03:00
Tryibion bd864c42fa Add popup to editor options to remind the user to save or not. 2023-09-22 08:40:38 -05:00
Nils Hausfeld d0679c1f9b - Made Visject connection bezier curves bend around nodes 2023-09-22 15:28:46 +02:00
davevanegdom d94dfe9fa9 Merge remote-tracking branch 'upstream/master' into Statusbar-Imrpovements 2023-09-22 13:19:57 +02:00
mafiesto4 faeb21a77a Merge branch 'GoaLitiuM-csproj_file_structure' 2023-09-22 13:02:42 +02:00
mafiesto4 da00d3b971 Merge branch 'csproj_file_structure' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-csproj_file_structure 2023-09-22 13:02:20 +02:00
mafiesto4 bd4efe5f02 Merge branch 'wackoisgod-macos-bugs-two' 2023-09-22 13:01:28 +02:00
mafiesto4 79aba00ab4 Merge branch 'macos-bugs-two' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-bugs-two 2023-09-22 13:01:21 +02:00
mafiesto4 1a0fad5be0 Merge branch 'MineBill-rider-open-file' 2023-09-22 12:58:04 +02:00
mafiesto4 6b8d1f448e Merge branch 'rider-open-file' of https://github.com/MineBill/FlaxEngine into MineBill-rider-open-file 2023-09-22 12:57:54 +02:00
mafiesto4 787479357e Codestyle fix #1495 2023-09-22 12:57:07 +02:00
mafiesto4 5f9a81a664 Merge branch 'GoaLitiuM-window_flicker_fix' 2023-09-22 12:55:18 +02:00
mafiesto4 d6c177ffca Merge branch 'window_flicker_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-window_flicker_fix 2023-09-22 12:55:11 +02:00
mafiesto4 2b01e3781c Merge branch 'GoaLitiuM-unloaded_assembly_fix' 2023-09-22 12:54:30 +02:00
mafiesto4 9731d76a94 Merge branch 'unloaded_assembly_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unloaded_assembly_fix 2023-09-22 12:54:22 +02:00
mafiesto4 bccb796baf Merge branch 'MineBill-shader-division' 2023-09-22 12:53:22 +02:00
mafiesto4 97be8b572f Merge branch 'shader-division' of https://github.com/MineBill/FlaxEngine into MineBill-shader-division 2023-09-22 12:53:16 +02:00
mafiesto4 053e27ca9c Merge branch 'wackoisgod-macos-csproj-fix' 2023-09-22 12:51:25 +02:00
mafiesto4 0fbb3f4414 Merge branch 'macos-csproj-fix' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-csproj-fix 2023-09-22 12:51:08 +02:00
mafiesto4 62c2008cbc Fix crash in C# JobSystem.Dispatch due to GC collecting Delegate object 2023-09-22 12:50:50 +02:00
mafiesto4 a0de513a43 Optimize updating scripts tick arrays 2023-09-22 12:37:35 +02:00
mafiesto4 31b3f56ddb Fix visibility of some internal NativeInterop methods for game bindings 2023-09-22 12:37:13 +02:00
mafiesto4 abcfc8af35 Add using exact C# method profiler data for profiler events in overriden thunk method callbacks 2023-09-22 12:04:41 +02:00
Andrew Spiering ab7ca683bb Addressing Feedback
* use a better method of getting Editor binary folder
2023-09-22 02:59:38 -07:00
Andrew Spiering 1537f49e73 Fixing Editor Path
* Again the path was hardcoded to win64
2023-09-22 02:41:09 -07:00
Andrew Spiering 017967d5f8 Fixing non-windows platforms csproj files
* Seems there was a hardcoded path ? for the prebuilt binaries for the FlaxEngine dll
2023-09-22 02:13:49 -07:00
MineBill 1714bc243a Fix not capturing the the Debug.Log line in the DebugLogWindow 2023-09-22 11:03:59 +03:00
Tryibion 7012832050 Add filter to content window to hide generated files. Hide by default. 2023-09-21 21:29:21 -05:00
Tryibion 521b180352 Fix issue with copying and poasting in same folder. 2023-09-21 18:56:45 -05:00
davevanegdom 5fc9176ce7 Removed customization for "Normal" and "TextColor" 2023-09-21 23:18:46 +02:00
Red Kitsune 794ccd42ff - Added MissingScriptEditor 2023-09-21 22:00:20 +02:00
GoaLitiuM bbf8883275 Fix docking hint areas not hiding after dragging a window 2023-09-21 20:13:06 +03:00
GoaLitiuM bf68d17afe Create VS folder structure for BuildScripts and FlaxEngine source files 2023-09-21 19:44:21 +03:00
GoaLitiuM 7d69abadb7 Fix script reload crash with .NET libraries 2023-09-21 19:44:01 +03:00
Nils Hausfeld d19984d3e9 - Pressing space to open visject context menu now ignores the space char as input 2023-09-21 18:02:00 +02:00
davevanegdom 80a3bb2ae2 Replaced string color lookups 2023-09-21 17:10:49 +02:00
Luke Schneider 65bf13ea4f Removed debug messages 2023-09-21 08:38:18 -05:00
Luke Schneider ad29dd0c92 MMB Panning
Added MMB panning to VisjectSurfaces (materials/etc).
2023-09-21 08:37:13 -05:00
davevanegdom 21c742bd8a Customizable statusbar 2023-09-21 14:54:57 +02:00
MineBill 8f668c8506 Ensure floating numbers are formatted with enough precision 2023-09-21 12:39:19 +03:00
mafiesto4 97ed46bc4f Merge branch 'GoaLitiuM-default_configurations_fix' 2023-09-21 11:31:43 +02:00
mafiesto4 38671e0e01 Merge branch 'default_configurations_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-default_configurations_fix 2023-09-21 11:28:59 +02:00
mafiesto4 4bc3d922d0 Merge branch 'GoaLitiuM-msbuild_detect_fix' 2023-09-21 11:28:04 +02:00
mafiesto4 b66cbc1d67 Merge branch 'msbuild_detect_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-msbuild_detect_fix 2023-09-21 11:27:59 +02:00
mafiesto4 d94c0d3323 Fix C#-only game projects to reference precompiled DLLs instead of FlaxEngine.csproj 2023-09-21 11:26:04 +02:00
mafiesto4 a420ca72d6 Fix Visual Studio solution project to ensure that main project is the first one 2023-09-21 11:23:57 +02:00
Andrew Spiering d4c71b5fd9 Launching Rider on macOS
* Fixing issues where when the editor would try and launch rider on an M1/2 machine it would not properly open because it was the wrong architecture which is now resolved because open will do the right thing
* Making the ParseArgs function a little more resilient against escaped arguments
2023-09-20 23:16:38 -07:00
Tryibion f315286e26 Change wording to "Set To Null" 2023-09-20 19:08:36 -05:00
Tryibion 12c0ce9ea5 Revert maximize. 2023-09-20 18:09:16 -05:00
Red Kitsune 74acc93c0c Add XML comments 2023-09-21 01:03:35 +02:00
Tryibion ccb3f40de0 Prevent inital window from being covering the task bar on restore of windows window 2023-09-20 17:58:08 -05:00
Tryibion eb5a1f1103 Fix max and min on double click main menu buttons for custom menu bar 2023-09-20 17:49:17 -05:00
GoaLitiuM ed51791b58 Prevent generating VS configurations for Win32 and engine projects 2023-09-21 01:00:04 +03:00
mafiesto4 da7ba0ecba Fix regression on cooking ios game 2023-09-20 22:41:47 +02:00
Tryibion ffbd14ad49 Fix right clicking on source folder to sometimes select non-visible child. 2023-09-20 15:35:36 -05:00
Tryibion cadd0d2356 Fix visuals 2023-09-20 15:18:33 -05:00
mafiesto4 bcce08e81c Codestyle fix and doc 2023-09-20 22:14:54 +02:00
GoaLitiuM 07da23338b Update README 2023-09-20 23:14:13 +03:00
GoaLitiuM d328f0adc4 Update build scripts to detect only supported versions of MSBuild 2023-09-20 23:14:11 +03:00
mafiesto4 386e097fe9 Merge branch 'wackoisgod-macos-flex-build-bugs' 2023-09-20 22:07:33 +02:00
Tryibion 812813251d Fix being able to create folder from project folder. 2023-09-20 14:42:18 -05:00
GoaLitiuM fea296bcbb Fix white window flickering in context menus 2023-09-20 22:00:16 +03:00
Tryibion dfb9f1985f Improve input editors to use combo box. 2023-09-20 13:19:03 -05:00
Andrew Spiering 821c373ae2 Allow for better support for running on m1/2 machines
* So we need to account for 2 possible situations where you are running under and emulated process and a native process with a different target host in this case x64
2023-09-20 09:12:48 -07:00
Menotdan 2b1266147c Add new condition from split object bugfix on master. 2023-09-20 11:02:19 -04:00
mafiesto4 20a4e348ef Bump up build number and version 2023-09-20 16:07:24 +02:00
mafiesto4 9f97787099 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-20 16:02:48 +02:00
mafiesto4 3ede4c2192 Fix typo 2023-09-20 16:02:24 +02:00
mafiesto4 4611de5ed6 Bump up build number 2023-09-20 16:02:15 +02:00
mafiesto4 8cd8ae93c3 Add ObjectRadius to DrawCall to properly cull local lights and env probes in Forward Shading 2023-09-20 15:01:02 +02:00
mafiesto4 8bd6649510 Refactor managed array unboxing to handle case of C# array passes as object
#1415
2023-09-20 14:17:11 +02:00
mafiesto4 5c5c64cf76 Update macOS app cooking to properly execute tools 2023-09-20 11:52:26 +02:00
mafiesto4 34a36d822a Improve parsing command line in build tools when using lots of quotes 2023-09-20 10:06:16 +02:00
mafiesto4 1740cbf2eb Improve process starting on mac 2023-09-20 09:21:56 +02:00
mafiesto4 e3cf9c05e4 Fix logging macOS process to remove redundant newlines 2023-09-20 09:06:54 +02:00
mafiesto4 038c67c819 Merge branch 'wackoisgod-macos-fixes' 2023-09-20 08:48:14 +02:00
Andrew Spiering f40657ea04 macOS support fixes
* Adding macOS FileSystemWatcher, this should allow files to be monitored and update like the other OSs
* Reworked how macOS launches processes to use NSTask which just deals with escaped and unescaped paths better
* Made a change to the ScriptsBuilder::RunBuildTool, this was adding the escaped values to the path, in reality it should be up to the underlying OS to make sure things are properly escaped, so removed those as they just end up causing issues. Also instead of appending the args to the fileName we just properly use the Arguments variable on the CreateProcessSettings
* No longer use open in order to show files in the finder, we use the proper method selectFile
* made a slight cleanup change to the MacPlatform Tick function
* Added ToNSString functions just to make that easier
* Added a ParseArguments function that will take a string and turn it into an array for NSTask
2023-09-19 20:58:12 -07:00
mafiesto4 92733d1a69 Merge branch 'GoaLitiuM-genproject_startup_fix' 2023-09-19 23:48:36 +02:00
mafiesto4 ea37a0924b Merge branch 'genproject_startup_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-genproject_startup_fix 2023-09-19 23:48:30 +02:00
mafiesto4 7e81fdbd75 Fix crash when D3D11 backend fails to create shader due to driver failure 2023-09-19 23:45:30 +02:00
GoaLitiuM 4a1787dfbe Generate project files at startup when project Cache was cleared 2023-09-20 00:15:25 +03:00
mafiesto4 a56ce92867 Fix crash when importing model with materials and Split Objects enabled 2023-09-19 23:07:10 +02:00
mafiesto4 417d911bab Merge branch 'dector-fix/1384/use-xdg-open-on-linux' 2023-09-19 22:01:35 +02:00
mafiesto4 5dd5bc3583 Merge branch 'fix/1384/use-xdg-open-on-linux' of https://github.com/dector/FlaxEngine into dector-fix/1384/use-xdg-open-on-linux 2023-09-19 22:01:28 +02:00
mafiesto4 6514ab3680 Merge branch 'Crawcik-unix-dotnet-location' 2023-09-19 22:00:42 +02:00
mafiesto4 d9333018c2 Merge branch 'unix-dotnet-location' of https://github.com/Crawcik/FlaxEngine into Crawcik-unix-dotnet-location
# Conflicts:
#	Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs
2023-09-19 22:00:36 +02:00
mafiesto4 c7bfd70628 Merge branch 'eLeSTRaGo-Dev-fix/launch_editor_second_time_on_linux' into 1.7 2023-09-19 21:53:43 +02:00
mafiesto4 b6971e1788 Merge branch 'fix/launch_editor_second_time_on_linux' of https://github.com/eLeSTRaGo-Dev/FlaxEngine into eLeSTRaGo-Dev-fix/launch_editor_second_time_on_linux 2023-09-19 21:53:31 +02:00
mafiesto4 a71de7357c Merge remote-tracking branch 'origin/master' into 1.7 2023-09-19 21:42:53 +02:00
mafiesto4 f0b5d3b838 Minor improvements 2023-09-19 21:37:24 +02:00
mafiesto4 e9cf188c2d Add outline for relevant BT nodes when debugging tree 2023-09-19 21:24:00 +02:00
mafiesto4 336fe46e03 Add GetDebugInfo to BT nodes for debugging 2023-09-19 20:57:19 +02:00
mafiesto4 f845344d03 Add internal access level to Scripting API members (field, properties and functions) 2023-09-19 20:39:48 +02:00
Andrej Stojkovikj 35ee890f9f Fix in typo, should be length instead of magnitude 2023-09-19 19:33:25 +02:00
Andrej Stojkovikj cb460af264 Revert last feature since feature already exists 2023-09-19 19:29:59 +02:00
Denys 4c5168a976 Use xdg-open to open file manager in Linux
`nautilus` is GNOME file manager. Other distros might use another FM.

As a common ground we can use `xdg-open` which is a part of `freedesktop.org` and should be available almost everywhere.
2023-09-19 16:50:17 +02:00
Andrej Stojkovikj 8930c7ba56 Implemented static functions for length and length squared for Vectors 2023-09-19 16:09:18 +02:00
Andrej Stojkovikj 3f299f4cf6 Just in case change type cast for other variables as well 2023-09-19 15:57:33 +02:00
Andrej Stojkovikj e1f528ec9a Fix SmoothDamp missed type casting for Vector2 2023-09-19 15:48:16 +02:00
Andrej Stojkovikj 4e44002259 Fix SmoothDamp missed type casting for Vector 3 2023-09-19 15:47:38 +02:00
mafiesto4 49a6b5734a Fix crash when setting material instance base material before it's loaded 2023-09-19 14:14:57 +02:00
mafiesto4 255e47fa1e Fix crash due to invalid message in Assimp 2023-09-19 14:00:37 +02:00
mafiesto4 2655dd12d6 Reapply e218cc417f but a little better 2023-09-19 13:40:01 +02:00
mafiesto4 bb5ff740bf Update recastnavigation lib to 1.6 2023-09-19 13:34:32 +02:00
mafiesto4 0083ebd887 Fix missing C# static fields in native scripting api 2023-09-19 09:32:37 +02:00
Red Kitsune 7c0546c68d After CR changes 2023-09-19 00:21:56 +02:00
mafiesto4 10dc06be9b Fix crash if OpenAL internal device name is all whitespaces 2023-09-18 19:23:10 +02:00
mafiesto4 c4b22b2120 Merge branch 'Tryibion-slider-thumb-highlighting' 2023-09-18 17:34:07 +02:00
mafiesto4 3c28fbe44c Merge branch 'slider-thumb-highlighting' of https://github.com/Tryibion/FlaxEngine into Tryibion-slider-thumb-highlighting 2023-09-18 17:29:41 +02:00
mafiesto4 fa73d9d451 Merge branch 'Tryibion-clamp-node-size' 2023-09-18 17:29:10 +02:00
mafiesto4 cdcba9bddb Merge branch 'clamp-node-size' of https://github.com/Tryibion/FlaxEngine into Tryibion-clamp-node-size 2023-09-18 17:29:02 +02:00
mafiesto4 b64db5ec88 Merge branch 'GoaLitiuM-dotnet8_compat_fix' 2023-09-18 17:27:09 +02:00
mafiesto4 b8a626c95d Merge branch 'dotnet8_compat_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet8_compat_fix 2023-09-18 17:27:02 +02:00
mafiesto4 6ff088d0cb Merge branch 'GoaLitiuM-hostfxr_msg' 2023-09-18 17:25:06 +02:00
mafiesto4 3381751c54 Merge branch 'hostfxr_msg' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-hostfxr_msg 2023-09-18 17:24:57 +02:00
mafiesto4 04713a829f Merge branch 'MineBill-fix_folder_rename' 2023-09-18 16:57:03 +02:00
mafiesto4 40c98ac9e5 Merge branch 'fix_folder_rename' of https://github.com/MineBill/FlaxEngine into MineBill-fix_folder_rename 2023-09-18 16:56:53 +02:00
mafiesto4 bf5b940892 Merge branch 'GoaLitiuM-editor_module_lookup_fix' 2023-09-18 15:16:14 +02:00
mafiesto4 502af0b67a Merge branch 'editor_module_lookup_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_module_lookup_fix 2023-09-18 15:16:07 +02:00
mafiesto4 960b825b4c Code style fix 2023-09-18 12:21:12 +02:00
elestrago 4fe02a24e9 Fix find Rider versions 2022 and later 2023-09-18 12:19:58 +02:00
Walrusking 4b0e70aa06 Fixes Rider 2022 not detected when installed with toolbox 2023-09-18 12:19:50 +02:00
Walrusking 03b8b9f73f Fix rider search detecting any jetbrains product as rider 2023-09-18 12:19:38 +02:00
mafiesto4 8b022af360 Merge branch 'wackoisgod-macos-rider-support' 2023-09-18 12:18:35 +02:00
mafiesto4 1de8581e6d Merge branch 'macos-rider-support' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-rider-support 2023-09-18 12:18:27 +02:00
mafiesto4 1c246db400 Merge branch 'Walrusking16-fix/detect-rider-installed-from-toolbox-windows' into 1.7 2023-09-18 12:16:43 +02:00
mafiesto4 db790a13d4 Merge branch 'fix/detect-rider-installed-from-toolbox-windows' of https://github.com/Walrusking16/FlaxEngine into Walrusking16-fix/detect-rider-installed-from-toolbox-windows 2023-09-18 12:16:37 +02:00
mafiesto4 f69b4ca410 Merge branch 'eLeSTRaGo-Dev-fix/detect-rider-installed-from-toolbox-linux' into 1.7 2023-09-18 12:12:18 +02:00
mafiesto4 79bf226fe1 Codestyle fix 2023-09-18 12:11:28 +02:00
mafiesto4 0ece806230 Merge branch 'wackoisgod-macos-flex-build-fixes' 2023-09-18 11:49:49 +02:00
mafiesto4 c63e2802a1 Merge branch 'macos-flex-build-fixes' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-flex-build-fixes 2023-09-18 11:49:43 +02:00
mafiesto4 a33647ecf1 Merge branch 'wackoisgod-script-generics-crash' 2023-09-18 11:47:40 +02:00
mafiesto4 342877ec42 Merge branch 'script-generics-crash' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-script-generics-crash 2023-09-18 11:47:33 +02:00
mafiesto4 e38a8bda7a Codestyle fix for #1425 2023-09-18 11:26:56 +02:00
mafiesto4 1f386f9ce0 Merge branch 'wackoisgod-macos-ios-build-issue' 2023-09-18 11:25:55 +02:00
Andrew Spiering 97f595922e Fixing broken build
Have to actually set it to true
2023-09-17 23:11:23 -07:00
Andrew Spiering 9f4429f87c When building the engine if you don't have iOS SDK Installed then don't build it
Currently when you try and build macOS editor it assumes you also want to build iOS because of the way this check works which assumes if you have Xcode Installed you are ready to go. This really should not be the case, so instead lets check to see if you have the iophonesdk installed for your current Xcode if not then skip it.
2023-09-17 22:26:50 -07:00
Andrew Spiering 3ac00b1e4e Fixing a crash when generic classes spanned across different assemblies
This code attempts to resolve an issue where if you had a class in Assembly A and it was generic and you had a class that inherited from it in Assembly B it would not properly resolve these classes, also added an error check for if I was not able to find the TypeIndex then log it and return thus also preventing a crash when it goes to resolve the NativeType
2023-09-17 20:37:37 -07:00
Andrew Spiering 824ee9ec7f Fixing a typo :/ 2023-09-17 18:48:54 -07:00
Tryibion 6e94b21452 Fix build issue 2023-09-17 20:02:22 -05:00
Andrew Spiering 69e54d7f88 Fixing an issue if running an x64 machine already 2023-09-17 15:53:48 -07:00
Tryibion 17383fe0b6 Small fix to error message 2023-09-17 17:49:38 -05:00
Tryibion c1104e803d Code cleanup 2023-09-17 17:48:09 -05:00
Andrew Spiering 183ab7738f Fixing Flex Build issues on M1/2 macs
* This resolves some issues where if you are building the actual C# dlls you also need them to be x64 based if you are targeting an x64 based target. This is a little complicated here because we set all this up ahead of time assuming that all the targets are compatible but in this case they are not so, just following what other places in the code are doing around this specifically dotnet AOT.
2023-09-17 15:42:26 -07:00
Tryibion 478c946c1c Add automatic module creation. 2023-09-17 17:42:18 -05:00
Andrew Spiering 76945b9144 MacOS Rider Support
* Adding in code to properly look for rider on macOS
* Also fixing an issue in the macOS CreateProcess where spaces where not properly escaped for popen(which one should likely use NSTask long term)
2023-09-17 14:56:22 -07:00
Andrej Stojkovikj 831500faa7 Fix type definition for Vector2 and Vector3 2023-09-17 23:16:08 +02:00
Red Kitsune 5cc3e40902 Implemented better missing script handling 2023-09-17 20:28:34 +02:00
mafiesto4 ffec2f751d Merge branch 'wackoisgod-macos-arm-dotnet-fix' 2023-09-17 19:24:07 +02:00
mafiesto4 660dc81d8e Merge branch 'macos-arm-dotnet-fix' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-arm-dotnet-fix 2023-09-17 19:23:50 +02:00
mafiesto4 c0d5cf8022 Merge branch 'GoaLitiuM-contentdb_delete_fix' 2023-09-17 19:22:08 +02:00
Andrew Spiering bdd182f3da Fixing x64 editor/runtime on arm64 macs
* This allows for a much more broader check for the dotnet sdk runtime to support running x64 binaries on arm64
2023-09-16 18:23:27 -07:00
Tryibion ab2d60e6d2 Fix viewport options extras locations. 2023-09-16 15:30:49 -05:00
Andrej Stojkovikj d87a60de48 Naming scheme for Vector2 fix 2023-09-16 22:27:12 +02:00
Tryibion e9bafed2c7 Fix about dialog button 2023-09-16 15:22:15 -05:00
Tryibion f4b7ae41a9 Fix profiler rows with larger font sizes. 2023-09-16 14:51:47 -05:00
Tryibion 1d08e4b1b8 Add several fixes to button sizes when fonts are larger. 2023-09-16 14:28:21 -05:00
Andrej Stojkovikj 7a73c04688 SmoothDamp implementation for Vector2 and Vector3 2023-09-16 21:18:00 +02:00
Walrusking 425d625aa7 Fix rider search detecting any jetbrains product as rider 2023-09-16 13:48:49 -04:00
Tryibion dabbd7bc6a Add highlighting when mouse is over slider thumb. 2023-09-16 11:46:36 -05:00
MineBill 9931a5c026 Don't treat '.' in folder names as extensions. 2023-09-16 19:09:38 +03:00
GoaLitiuM 9a7fb82738 Fix tests 2023-09-16 18:39:01 +03:00
Tryibion a89856bece Increase size of clamp node to handle vector4. 2023-09-16 10:15:26 -05:00
GoaLitiuM 5ab299fed9 Fix assets getting deleted when modified by external applications 2023-09-16 18:11:22 +03:00
GoaLitiuM 785943bef8 Add missing marshaller methods for compatibility 2023-09-16 16:00:12 +03:00
GoaLitiuM f114301e97 Improve hostfxr error messages 2023-09-16 15:03:09 +03:00
GoaLitiuM 58b2530ac4 Remove redundant reference counter from Delegate 2023-09-16 14:16:25 +03:00
GoaLitiuM 2d2bfd9cd1 Include EditorModules in Assembly lookup paths 2023-09-16 14:15:09 +03:00
Ruan Lucas 23b6b93726 add collision type to model importer 2023-09-15 19:13:32 -04:00
Menotdan 451900b7ee Merge branch 'FlaxEngine:master' into material_import 2023-09-15 02:17:34 -04:00
Walrusking f319e9f234 Fixes Rider 2022 not detected when installed with toolbox 2023-09-15 01:31:33 -04:00
elestrago 8226764eec Fix find Rider versions 2022 and later 2023-09-15 02:35:20 +02:00
elestrago 2efc31a74e Execute map window before resize in LinuxWindow 2023-09-15 02:13:13 +02:00
Crawcik 1dd7a27568 Checking for executable 2023-09-14 23:19:36 +02:00
Crawcik 64a5d895bd Better version checking 2023-09-14 23:18:12 +02:00
Crawcik 73bf28dc47 Change of priorities on RID 2023-09-14 22:37:56 +02:00
Crawcik 6dd0957c4a Adding better finding dotnet root location for mac&unix 2023-09-14 22:34:03 +02:00
mafiesto4 ae9b807cc1 Allow using CustomValueContainer as readonly if setter action is null 2023-09-14 13:54:31 +02:00
mafiesto4 f7787a9221 Add Behavior knowledge data debugging 2023-09-14 13:53:19 +02:00
mafiesto4 35609c9883 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-14 13:25:59 +02:00
mafiesto4 722133165b Fix marshalling Array<Variant> as object[] (C# codegen error) 2023-09-14 13:18:52 +02:00
GoaLitiuM c686e59fd6 Lazy allocate mutex in Delegate 2023-09-13 17:30:13 +03:00
mafiesto4 b8abcb5755 Merge branch 'GoaLitiuM-delegate_mutex' into 1.7 2023-09-13 11:44:55 +02:00
mafiesto4 936018c49e Add DELEGATE_USE_ATOMIC to toggle #1319 for backward compatibility 2023-09-13 11:44:44 +02:00
Wiktor Kocielski d389348260 Add View Layers button & Reset/Disable/Copy/Paste buttons to View Flags/Debug View & Camera RenderFlags/RenderView addition 2023-09-13 12:17:34 +03:00
mafiesto4 38f7606923 Merge branch 'delegate_mutex' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-delegate_mutex 2023-09-13 10:57:34 +02:00
mafiesto4 682ff2fb3a Minor tweaks 2023-09-13 10:52:46 +02:00
mafiesto4 6bdbaecc18 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Engine/Physics/PhysX/SimulationEventCallbackPhysX.cpp
2023-09-13 10:29:28 +02:00
mafiesto4 cb2ed817a2 Merge branch 'GoaLitiuM-physx_collision_perf' into 1.7 2023-09-13 10:28:14 +02:00
mafiesto4 656d984df7 Merge branch 'physx_collision_perf' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-physx_collision_perf 2023-09-13 10:27:29 +02:00
mafiesto4 963c12a75f Merge branch 'RuanLucasGD-add_spline_edit_options' 2023-09-12 22:25:28 +02:00
mafiesto4 cb44c9370e Refactor new spline editor to use icons via Tabs control #1292 2023-09-12 22:25:18 +02:00
mafiesto4 dbd85fddfe Refactor Editor Tab controls system to allows customizing the tab header controls 2023-09-12 22:24:15 +02:00
mafiesto4 3e1940c799 Add new spline icons #1292 2023-09-12 22:18:26 +02:00
mafiesto4 2a8e35d1ff Format code #1292 2023-09-12 14:38:23 +02:00
mafiesto4 f2e6bfdead Merge branch 'add_spline_edit_options' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-add_spline_edit_options 2023-09-12 14:26:39 +02:00
mafiesto4 aa34f85b39 Merge branch 'Tryibion-input-editors' 2023-09-12 14:21:39 +02:00
mafiesto4 097d26f8cb Codestyle fix #1262 2023-09-12 14:21:27 +02:00
mafiesto4 6ece66b018 Merge branch 'input-editors' of https://github.com/Tryibion/FlaxEngine into Tryibion-input-editors 2023-09-12 14:09:49 +02:00
mafiesto4 9bbdf16623 Fix potential content tree freeze when toggling engine/plugins files showing 2023-09-12 14:03:53 +02:00
mafiesto4 04be05239a Merge branch 'Tryibion-lods' 2023-09-12 13:56:52 +02:00
mafiesto4 3170142171 Merge branch 'lods' of https://github.com/Tryibion/FlaxEngine into Tryibion-lods 2023-09-12 13:56:42 +02:00
mafiesto4 44eba3fdae Fix missing xml comment line from #1291 2023-09-12 13:54:01 +02:00
mafiesto4 a9c8a76f87 Merge branch 'Withaust-layeraddition' 2023-09-12 13:52:30 +02:00
mafiesto4 4cae6e50d5 Merge branch 'layeraddition' of https://github.com/Withaust/FlaxEngine into Withaust-layeraddition 2023-09-12 13:52:23 +02:00
mafiesto4 7b4c8e391a Minor optimization for clearing collider from simulation events cache 2023-09-12 13:50:50 +02:00
mafiesto4 c10658c3fc Fix deserialization, add more docs and tweaks to #1345 2023-09-12 13:50:22 +02:00
mafiesto4 452cdfd163 Merge branch 'Tryibion-physics-settings' 2023-09-12 13:03:12 +02:00
mafiesto4 1591da75ac Merge branch 'physics-settings' of https://github.com/Tryibion/FlaxEngine into Tryibion-physics-settings 2023-09-12 13:03:04 +02:00
mafiesto4 639149b63b Fix crash when toggling WheeledVehicle active state
#1351
2023-09-12 11:41:33 +02:00
mafiesto4 3e35a6a7af Fix cloth sim due to culling bug in cooked game 2023-09-11 22:55:03 +02:00
mafiesto4 fb488cbaf7 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-11 22:43:46 +02:00
mafiesto4 762960bee1 Merge branch 'Tryibion-plugin-project-creation' 2023-09-11 22:42:55 +02:00
mafiesto4 9d494679ac Add formatting MyPlugin.cs for new plugin setup
#1335
2023-09-11 22:42:48 +02:00
mafiesto4 985d6cc811 Add UTF8 format for created plugin files and format code
#1335
2023-09-11 22:32:37 +02:00
mafiesto4 99c2adc1f3 Add game settings formatting for created plugin ProjectInfo
#1335
2023-09-11 22:32:17 +02:00
mafiesto4 776fbe2a7b Fix creating plugin with whitespace or non-ASCII character in the name
#1335
2023-09-11 22:30:51 +02:00
mafiesto4 2fa7740a0f Merge branch 'plugin-project-creation' of https://github.com/Tryibion/FlaxEngine into Tryibion-plugin-project-creation 2023-09-11 21:48:31 +02:00
mafiesto4 0a5f983ff4 Fix error when model is missing in Editor for prefab editor
#1354
2023-09-11 21:36:36 +02:00
mafiesto4 b7cf0d4420 Merge branch 'NoriteSC-ContentBrowserImprovement' 2023-09-11 20:03:51 +02:00
mafiesto4 16fed8927c Refactor #1266 (code quality and simplicity) 2023-09-11 20:02:53 +02:00
mafiesto4 2ddb44afa8 Merge branch 'ContentBrowserImprovement' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-ContentBrowserImprovement
# Conflicts:
#	Source/Editor/Windows/ContentWindow.cs
2023-09-11 15:39:48 +02:00
mafiesto4 59c460ccbc Format code 2023-09-11 15:08:13 +02:00
mafiesto4 748ff3b8a5 Optimize CultureInfoEditor and TagEditor performance when searching entries by text 2023-09-11 15:07:37 +02:00
mafiesto4 829d3b3642 Add editor shortcuts usability when toolstrip or main menu controls are focused 2023-09-11 15:07:06 +02:00
mafiesto4 48d4a51c1b Fix crash when boxing native array to managed value 2023-09-11 15:06:26 +02:00
mafiesto4 1134cfa6a6 Fix using ManagedDictionary when item value type is array
#1305
2023-09-11 15:05:46 +02:00
mafiesto4 9afa98e905 Fix Random Range nodes in CPU particles/script graphs when using int
#1341
2023-09-11 13:59:10 +02:00
mafiesto4 fb27606541 Add missing Particle Scale getter node to Particle Emitter graph
#1343
2023-09-11 13:54:44 +02:00
mafiesto4 716e643f2a Fix applying prefab changes to nesting prefab instances
#1256
2023-09-10 21:07:41 +02:00
mafiesto4 ae27d51dc6 Fix building for Android with the latest Java version (update to Gradle 8.3) 2023-09-10 14:53:58 +02:00
mafiesto4 a4312590e7 Fix debug draw leftover from 9da686cd52
#1369 #1365
2023-09-10 13:34:46 +02:00
Wiktor Kocielski 8008f05d64 Merge branch 'master' into layeraddition 2023-09-10 13:39:31 +03:00
mafiesto4 328bfa8322 Merge branch 'Tryibion-sort-projects' 2023-09-10 12:06:30 +02:00
mafiesto4 e1a75b9ae9 Merge branch 'sort-projects' of https://github.com/Tryibion/FlaxEngine into Tryibion-sort-projects 2023-09-10 12:05:14 +02:00
mafiesto4 f08e1019b4 Merge branch 'Tryibion-content-item-improve' 2023-09-10 12:03:47 +02:00
mafiesto4 212b7970fc Merge branch 'content-item-improve' of https://github.com/Tryibion/FlaxEngine into Tryibion-content-item-improve 2023-09-10 12:00:20 +02:00
mafiesto4 9da686cd52 Improve #1369 for #1365 2023-09-10 11:58:54 +02:00
mafiesto4 948ca92b4f Merge branch 'RuanLucasGD-master' 2023-09-10 11:44:40 +02:00
mafiesto4 3962285b87 Merge branch 'master' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-master 2023-09-10 11:44:34 +02:00
mafiesto4 53deeff116 Missing change from 9291295a4d 2023-09-10 11:33:08 +02:00
mafiesto4 9291295a4d Fix Dictionary and HashSet iterators to prevent unwanted data copies
#1361
2023-09-10 11:25:36 +02:00
mafiesto4 0c89aa1958 Merge branch 'Withaust-resizedelegate' 2023-09-10 11:12:25 +02:00
mafiesto4 9d031fadc0 Merge branch 'resizedelegate' of https://github.com/Withaust/FlaxEngine into Withaust-resizedelegate 2023-09-10 11:12:19 +02:00
mafiesto4 d730d712fb Merge branch 'Tryibion-slider' 2023-09-10 11:09:37 +02:00
mafiesto4 317c7021a3 Merge branch 'slider' of https://github.com/Tryibion/FlaxEngine into Tryibion-slider 2023-09-10 11:08:10 +02:00
mafiesto4 d11a90a680 Merge branch 'RuanLucasGD-add_DebugDraw_DrawRay' 2023-09-10 11:03:37 +02:00
mafiesto4 f8d56fceec Merge branch 'add_DebugDraw_DrawRay' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-add_DebugDraw_DrawRay 2023-09-10 11:03:31 +02:00
mafiesto4 bd63fadfbd Merge branch 'scene-select-fix' of https://github.com/Tryibion/FlaxEngine 2023-09-10 10:59:13 +02:00
mafiesto4 b279adbaab Merge branch 'GoaLitiuM-managed_utf8_str_fix' 2023-09-10 10:52:21 +02:00
mafiesto4 002d46cddd Merge branch 'managed_utf8_str_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managed_utf8_str_fix 2023-09-10 10:52:08 +02:00
mafiesto4 6bbc74caf2 Merge branch 'Tryibion-cache-clothgizmo-values' into 1.7 2023-09-10 10:47:41 +02:00
mafiesto4 36e19b112a Merge branch 'cache-clothgizmo-values' of https://github.com/Tryibion/FlaxEngine into Tryibion-cache-clothgizmo-values 2023-09-10 10:47:34 +02:00
mafiesto4 8a31a63713 Fix build 2023-09-10 10:25:03 +02:00
mafiesto4 f20977732e Merge branch 'Tryibion-remove-tag' 2023-09-10 10:18:52 +02:00
mafiesto4 d653300e18 Merge branch 'remove-tag' of https://github.com/Tryibion/FlaxEngine into Tryibion-remove-tag 2023-09-10 10:18:45 +02:00
Ruan Lucas c6ad4d0e19 small doc fix 2023-09-09 13:07:39 -04:00
Ruan Lucas 420e02e3c1 add empty drawRay 2023-09-09 09:28:06 -04:00
Ruan Lucas 317384ed28 add debugdraw::drawray 2023-09-08 22:19:09 -04:00
Tryibion 99627da9b2 Cache cloth gizmo values. 2023-09-08 21:16:13 -05:00
Ruan Lucas fc7c24f771 Fix for #1365 2023-09-07 11:33:16 -04:00
Wiktor Kocielski 5ceafaad77 WindowBase::Resized delegate 2023-09-06 05:47:51 +03:00
Wiktor Kocielski d9a1eb349d Implement tags recursive addition 2023-09-06 05:43:27 +03:00
Wiktor Kocielski 7c9959bca5 Merge branch 'FlaxEngine:master' into layeraddition 2023-09-06 05:19:55 +03:00
Tryibion d96f19e5c6 Change exposed positionns to float 2 2023-09-05 08:44:59 -05:00
Tryibion 65a02f032f Expose helpful slider data. 2023-09-05 08:25:25 -05:00
Tryibion 20f35e332f Add slider control 2023-09-04 20:15:59 -05:00
Menotdan 1ed84a9b40 Merge branch 'FlaxEngine:master' into material_import 2023-09-04 11:42:05 -04:00
Tryibion 39ecfe8c24 Small bug fix 2023-09-03 12:11:33 -05:00
Mr. Capybara 0a094ca916 Merge branch 'FlaxEngine:master' into add_spline_edit_options 2023-09-03 09:25:14 -04:00
Tryibion 924e1c6d81 Fix right click deselecting scene tree nodes. 2023-09-03 06:36:29 -05:00
GoaLitiuM afec6afe4c Fix managed UTF-8 string allocation not using correct encoding 2023-09-03 14:05:21 +03:00
GoaLitiuM 4ffec5e09a Use HashSet as backing storage for bound Delegate functions 2023-09-02 23:14:38 +03:00
GoaLitiuM 6278fea496 Optimize PhysX collision event handling and onContact callback 2023-09-02 23:04:35 +03:00
Tryibion 92a5432d22 Sort plugin projects in content tree. 2023-09-02 13:13:34 -05:00
mafiesto4 6a5e660c2e Merge remote-tracking branch 'origin/master' into 1.7 2023-09-02 19:02:52 +02:00
Tryibion 67909e33c8 Add difference for folders. 2023-09-01 16:37:14 -05:00
Tryibion 53861c4795 Improve content item in tile view. Decrease margin between list view items. 2023-09-01 14:28:26 -05:00
mafiesto4 36dca16991 Fix WheeledVehicle driving in Drive4W mode when wheels are in custom order
#1352
2023-09-01 13:43:36 +02:00
Tryibion 5b5c298a96 Add remove tag method to actor. 2023-09-01 06:35:52 -05:00
mafiesto4 5a8944a82d Add support for editing WheeledVehicle engine/differential config at runtime without full physics state rebuild
#1348
2023-09-01 12:52:01 +02:00
mafiesto4 b0ec8525aa Add support for editing WheeledVehicle wheels config at runtime without full physics state rebuild
#1324
2023-09-01 12:40:51 +02:00
mafiesto4 a8cc4d7fcb Fix wheel vehicle drive when EnableSimulation is disabled
#1323
2023-09-01 12:14:26 +02:00
mafiesto4 23db68b416 Merge branch 'Tryibion-progress-bar-improv' 2023-09-01 11:59:12 +02:00
mafiesto4 622293a55b Merge branch 'progress-bar-improv' of https://github.com/Tryibion/FlaxEngine into Tryibion-progress-bar-improv 2023-09-01 11:59:05 +02:00
mafiesto4 60178da101 Merge branch 'Tryibion-add-reset-ibrush' 2023-09-01 11:58:42 +02:00
mafiesto4 50fe02d7ad Merge branch 'add-reset-ibrush' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-reset-ibrush 2023-09-01 11:58:19 +02:00
mafiesto4 462da342a7 Fix ContextMenuSingleSelectGroup selection of the first item that had default value 2023-09-01 11:43:02 +02:00
mafiesto4 21b90fb829 Fix crash when spawning large amount of network objects at once by sending spawn message in parts
#1344
2023-09-01 11:42:31 +02:00
Tryibion a98458be1f Small improvements. 2023-08-31 14:14:01 -05:00
Tryibion e4dfda7202 Add method enum. 2023-08-31 14:07:17 -05:00
mafiesto4 8ff96723db Add async update to Behavior via Task Graph System 2023-08-31 14:54:26 +02:00
mafiesto4 f43f17a783 Add Move To node to BT 2023-08-31 14:02:03 +02:00
mafiesto4 5d2fae5896 Add GetColliders utility to RigidBody 2023-08-31 14:01:30 +02:00
mafiesto4 67d5d3a3fb Fix missing Variant typename for Object or Asset value to properly pass type checks 2023-08-31 09:37:54 +02:00
mafiesto4 5500e99ed8 Add NavMeshPathFlags to navmesh for partial paths info 2023-08-31 09:37:27 +02:00
mafiesto4 540681e59d Add MoveTowards to vector3 2023-08-31 09:23:16 +02:00
Tryibion 53fd158f2d Add a way to reset an IBrush to null for default functionality. 2023-08-30 18:09:59 -05:00
Tryibion d7112dc534 Improve progress bar to add switch between clipping and stretch and add direction. 2023-08-30 17:59:39 -05:00
mafiesto4 b6c8a08b58 Add Has Goal decorator to BT 2023-08-29 17:31:35 +02:00
mafiesto4 57ee884397 Add hot-reload support for BT to properly reload node instances data 2023-08-29 16:33:41 +02:00
mafiesto4 c32a139dbd Fix crash when unboxing managed structure with refs into Variant 2023-08-29 11:57:18 +02:00
mafiesto4 16930466d5 Hide some compiler-generated types from TypeSearchPopup 2023-08-29 11:43:11 +02:00
mafiesto4 c7d277ca74 Fix crash when unboxing managed structure with refs into Variant 2023-08-29 11:42:47 +02:00
mafiesto4 597f186902 Fix Editor UI when one of the properties panel throws exceptions 2023-08-29 11:42:12 +02:00
mafiesto4 17cbd66aed Fix Label to draw text under children 2023-08-29 11:41:29 +02:00
mafiesto4 0defecaeb9 Add concept of Goals to Behavior Knowledge 2023-08-29 11:41:07 +02:00
mafiesto4 81a2898d4e Add double-reference support for scripting function parameters to move value 2023-08-28 14:19:02 +02:00
mafiesto4 8906453b15 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-28 09:11:29 +02:00
mafiesto4 bd750d2634 Fix incoming drag drop location on macOS 2023-08-27 22:41:57 +02:00
mafiesto4 fa77a52a2c Fix prefab apply bug when one of the prefabs in project is broken 2023-08-27 20:08:27 +02:00
mafiesto4 1292fa3f45 Merge branch 'Withaust-replicationdisabling' 2023-08-27 16:43:31 +02:00
mafiesto4 0909c5bcc0 Merge branch 'replicationdisabling' of https://github.com/Withaust/FlaxEngine into Withaust-replicationdisabling 2023-08-27 16:43:24 +02:00
mafiesto4 8681f37218 Merge branch 'GoaLitiuM-xaudio2_crash' 2023-08-27 16:38:37 +02:00
mafiesto4 dc871a637b Merge branch 'xaudio2_crash' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-xaudio2_crash 2023-08-27 16:38:21 +02:00
mafiesto4 68db761c8b Merge branch 'Tryibion-animevent-abswrapper-remove' 2023-08-27 16:36:45 +02:00
mafiesto4 3b163b6c4b Minor cleanup 2023-08-27 16:36:37 +02:00
mafiesto4 94bd4d39f7 Merge branch 'animevent-abswrapper-remove' of https://github.com/Tryibion/FlaxEngine into Tryibion-animevent-abswrapper-remove 2023-08-27 16:31:48 +02:00
mafiesto4 9b184fd618 Merge branch 'Tryibion-add-tab-breaks' 2023-08-27 16:30:46 +02:00
mafiesto4 6261f02d1c Merge branch 'add-tab-breaks' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-tab-breaks 2023-08-27 16:29:31 +02:00
mafiesto4 698e933e18 Merge branch 'Tryibion-timeline-ui' 2023-08-27 16:28:44 +02:00
mafiesto4 97b56d1e72 Minor tweak #1332 2023-08-27 16:28:35 +02:00
mafiesto4 6274c2a8e6 Merge branch 'timeline-ui' of https://github.com/Tryibion/FlaxEngine into Tryibion-timeline-ui 2023-08-27 16:25:29 +02:00
mafiesto4 87e19ef4bc Fix crash on terrain export in Editor
#1330
2023-08-27 16:19:25 +02:00
mafiesto4 9069d0a853 Merge branch 'Tryibion-filter-cm' 2023-08-27 15:37:27 +02:00
mafiesto4 48c74e5ea5 Merge branch 'filter-cm' of https://github.com/Tryibion/FlaxEngine into Tryibion-filter-cm 2023-08-27 15:37:22 +02:00
mafiesto4 542a89bffc Merge branch 'Tryibion-show-jsonasset-type' 2023-08-27 15:36:49 +02:00
Tryibion 44598d4741 Small change in showing target error 2023-08-26 17:07:04 -05:00
Tryibion 87aba23299 Add tab breaks for window tabs. 2023-08-26 16:49:37 -05:00
Tryibion c5ff2c8c2f Add tooltip text. 2023-08-26 16:17:21 -05:00
Tryibion 514bc00310 Show Json Asset Type on ToolStrip of Json Asset Window. 2023-08-26 16:10:59 -05:00
Tryibion d969a7f8b0 Add more physics settings. 2023-08-26 15:17:45 -05:00
mafiesto4 50669a341d Improve connections drawing for BehaviorTree and AnimGraph 2023-08-26 09:38:33 +02:00
Tryibion 8ad4c94545 Add not closing contnent filter cm on click 2023-08-25 15:25:51 -05:00
GoaLitiuM 3939106e78 Fix crash with XAudio2 backend when source is playing
The array containing the sources might grow and invalidate existing
pointers to sources while some of the previous sources are still playing.
2023-08-25 22:09:00 +03:00
NoriteSC 1cb3c798e5 Revent 2023-08-25 19:12:35 +02:00
Tryibion ff2f239858 Add system reference. 2023-08-25 08:17:09 -05:00
mafiesto4 1287731816 Add reordering and reparenting decorators (with undo) 2023-08-25 14:54:40 +02:00
NoriteSC 6ab2e540a3 Bug Fixes
script and actors not having connect transform in on awake and in on start

join auto anchor having wrong anchor because was including scale

fixed selection do to changes to transform accessibility ?
2023-08-25 14:51:49 +02:00
mafiesto4 99547a1ff4 Add Has Tag decorator 2023-08-25 10:42:53 +02:00
mafiesto4 b31f262214 Add Knowledge Conditional and Knowledge Values Conditional decorators to BT 2023-08-25 10:25:24 +02:00
mafiesto4 cc7e93e2ee Don't recheck decorators conditions if the node is already relevant 2023-08-25 10:22:33 +02:00
mafiesto4 992cc381d5 Simplify Variant code with define for ManagedObject handle 2023-08-25 10:22:09 +02:00
Wiktor Kocielski 87e36bcfd5 Stop replication if NetworkManager::NetworkFPS < 0 2023-08-25 02:44:23 +03:00
Wiktor Kocielski 7b44075ac8 Add recursive methods for layers 2023-08-25 00:01:31 +03:00
Tryibion 0bbd619e32 Code cleanup 2023-08-24 13:54:55 -05:00
Tryibion 51664fc236 Use pltform process. 2023-08-24 13:51:08 -05:00
Tryibion fb69bc64f8 Add automated plugin project creation and Git cloning. 2023-08-24 11:38:14 -05:00
mafiesto4 2026c84baa Hide node close button when read-only (eg. play mode) 2023-08-24 16:56:28 +02:00
mafiesto4 a27cb4e215 Refactor BT nodes methods to always use context structure as input 2023-08-24 16:51:25 +02:00
mafiesto4 8c1dfb3087 Add Time Limit and Cooldown decorators to BT 2023-08-24 16:41:01 +02:00
mafiesto4 d2034622cb Add Invert, ForceSuccess, ForceFailed and Loop decorators to BT 2023-08-24 13:06:55 +02:00
mafiesto4 69ab69c5cc Add Decorators support to BT graph 2023-08-24 13:05:54 +02:00
mafiesto4 0c206564be Fix generic typename to be properly converted to C# 2023-08-24 13:02:29 +02:00
mafiesto4 5f581bf156 Add OnPasted to Visject Surface nodes for custom post-paste logic 2023-08-24 10:43:59 +02:00
mafiesto4 952fe61515 Add SurfaceNodeActions for more contextual surface nodes scripting 2023-08-24 10:43:22 +02:00
mafiesto4 60e5c5446c Add SealedNodes feature to Visject Surface nodes 2023-08-24 10:41:02 +02:00
mafiesto4 c58dc51291 Various improvements to Visject Surface 2023-08-24 10:12:40 +02:00
Tryibion 7e429854d6 Simplify check to use attribute. 2023-08-23 09:03:56 -05:00
Tryibion e1645210b3 Add check and indication if no anim events are found. 2023-08-23 08:46:21 -05:00
Tryibion e16e2e2877 Prevent AbstractWrapper from showing in Add AnimEvent CM. 2023-08-23 08:35:35 -05:00
mafiesto4 73c0758410 Add releasing nested nodes state when BT tree goes irrelevant 2023-08-23 13:43:46 +02:00
Tryibion 3295d58684 Simplify 2023-08-22 21:34:36 -05:00
Tryibion 72488c4250 Update cs script temple to use non-indented namespace. 2023-08-22 21:14:33 -05:00
Tryibion a737e7bb05 Small fix to UI 2023-08-22 17:36:09 -05:00
Tryibion ce4cf9b34b Add timeline position numbers and add to GUI. 2023-08-22 15:42:16 -05:00
mafiesto4 3259af3368 Add Force Finish node to BT 2023-08-22 11:12:05 +02:00
mafiesto4 d86eb5a4c2 Add drag&drop for nested BT spawning in Editor 2023-08-22 10:45:50 +02:00
mafiesto4 50c85aec6d Minor improvements to #1315 and add getter of current window style 2023-08-21 23:33:33 +02:00
mafiesto4 d432654a57 Merge branch 'Tryibion-set-window-mode' 2023-08-21 22:42:20 +02:00
mafiesto4 b4adb7f3e1 Merge branch 'set-window-mode' of https://github.com/Tryibion/FlaxEngine into Tryibion-set-window-mode 2023-08-21 22:42:13 +02:00
mafiesto4 3edae2f686 Merge branch 'Withaust-terraincache' 2023-08-21 22:31:18 +02:00
mafiesto4 845697cc4a Merge branch 'terraincache' of https://github.com/Withaust/FlaxEngine into Withaust-terraincache 2023-08-21 22:31:01 +02:00
mafiesto4 6bf2f219db Merge branch 'Tryibion-rename-popup-check' 2023-08-21 22:02:45 +02:00
mafiesto4 c137b5743a Merge branch 'rename-popup-check' of https://github.com/Tryibion/FlaxEngine into Tryibion-rename-popup-check 2023-08-21 22:02:38 +02:00
mafiesto4 dc3ae040a3 Merge branch 'Tryibion-dont-close-cm' 2023-08-21 21:58:15 +02:00
mafiesto4 131b2ae688 Merge branch 'dont-close-cm' of https://github.com/Tryibion/FlaxEngine into Tryibion-dont-close-cm 2023-08-21 21:56:40 +02:00
mafiesto4 3e92409d66 Merge branch 'Tryibion-button-border' 2023-08-21 21:55:03 +02:00
mafiesto4 8c230e7cb0 Merge branch 'button-border' of https://github.com/Tryibion/FlaxEngine into Tryibion-button-border 2023-08-21 21:54:56 +02:00
mafiesto4 863b6338ce Fix missing asset refs from BT nodes data 2023-08-21 18:28:05 +02:00
mafiesto4 cc5cde5bc7 Add Nested node to BT 2023-08-21 17:38:48 +02:00
mafiesto4 a6e503d21b Add Selector node to BT 2023-08-21 00:07:25 +02:00
mafiesto4 fce82247ab Add Delay node to BT 2023-08-20 21:42:43 +02:00
mafiesto4 2e9facc429 Add Random::RandRange 2023-08-20 21:41:20 +02:00
mafiesto4 a44c1521af Fix property value sliders usage in BT editor 2023-08-20 21:40:03 +02:00
GoaLitiuM 9ec7b09771 Merge fixes 2023-08-20 20:31:45 +03:00
GoaLitiuM 42ab218a8e Merge branch 'master' into marshalling_scriptingobject_changes
# Conflicts:
#	Source/Engine/Engine/NativeInterop.Invoker.cs
#	Source/Engine/Engine/NativeInterop.Unmanaged.cs
2023-08-20 20:24:41 +03:00
Tryibion 1286a29462 Add not closing some cm buttons 2023-08-19 14:30:08 -05:00
mafiesto4 eee53dfbdc Add BehaviorKnowledgeSelector for Behavior Knowledge unified data access 2023-08-19 19:50:17 +02:00
Tryibion 134273abd9 Remove popup from appearing if the content item can not re renamed. 2023-08-19 12:47:29 -05:00
mafiesto4 dee2f11ae4 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-19 19:46:19 +02:00
mafiesto4 9afb8778e8 Merge branch 'GoaLitiuM-variant_fix' 2023-08-19 19:45:18 +02:00
mafiesto4 3498806588 Add support for accessing scripting properties via ManagedBinaryModule fields API 2023-08-19 17:45:42 +02:00
Tryibion 5354063129 Add simple way to remove button border. 2023-08-19 10:43:04 -05:00
mafiesto4 de6254b5a5 Various fixes for scripting bindings codegen 2023-08-19 17:00:05 +02:00
mafiesto4 e36bf6e19a Add MarshalAs tag to APi structs/classes for custom marshaling via implicit casting 2023-08-19 16:59:39 +02:00
GoaLitiuM 769a20002d Fix Variant move assignment operator with managed objects 2023-08-19 13:12:50 +03:00
mafiesto4 32c47949fa Fix error when scripting structure uses StringAnsi field 2023-08-18 13:32:06 +02:00
mafiesto4 f088f2b61d Merge remote-tracking branch 'origin/master' into 1.7 2023-08-18 10:33:51 +02:00
mafiesto4 122524bd19 Fix linux build 2023-08-18 09:12:10 +02:00
mafiesto4 430d55aada Merge branch 'GoaLitiuM-manageddict_cache' 2023-08-18 00:25:12 +02:00
mafiesto4 de270d7478 Merge branch 'manageddict_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-manageddict_cache 2023-08-18 00:25:07 +02:00
mafiesto4 fe9cc8576a Merge branch 'GoaLitiuM-actor_paste' 2023-08-18 00:18:55 +02:00
mafiesto4 52691d3230 Merge branch 'actor_paste' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-actor_paste 2023-08-18 00:18:50 +02:00
mafiesto4 595bb2b7fa Fix nested animation playrate when the framerate is different
#1258
2023-08-18 00:17:27 +02:00
mafiesto4 925b5abb78 Fix crash on Linux when using unmapped keyboard Keyboard
#1321
2023-08-17 21:47:02 +02:00
mafiesto4 b78db755ec Fix crash regression d9ee8f4665
#1318
2023-08-17 21:40:36 +02:00
mafiesto4 1e3e75cb99 Add relevancy to Behavior Tree nodes 2023-08-17 21:24:19 +02:00
mafiesto4 14ffd0aa08 Add Variant new value init for objects 2023-08-17 16:10:07 +02:00
mafiesto4 fad825690e Add BehaviorTree nodes sorting by X position on a surface 2023-08-17 15:44:30 +02:00
mafiesto4 70228ca355 Various improvements to Variant 2023-08-17 15:29:11 +02:00
mafiesto4 c15a48b0b4 Allow Scripting Object as BT blackboard but don't support plain classes 2023-08-17 15:29:00 +02:00
mafiesto4 5f79fdd5f9 Fix bt node sizing on spawm 2023-08-17 15:27:02 +02:00
mafiesto4 77f7d55f5a Fix log spam from TypeEditor if type is missing 2023-08-17 15:26:50 +02:00
mafiesto4 c18625e017 Add initial Behavior simulation 2023-08-17 15:26:31 +02:00
mafiesto4 d1e2d6699e Add bt nodes init 2023-08-16 22:28:48 +02:00
mafiesto4 6e85bb8f75 Add ScriptingType to msvc natvis 2023-08-16 22:27:52 +02:00
mafiesto4 66678fc219 Fix log spam from TypeEditor if type is missing 2023-08-16 22:27:17 +02:00
mafiesto4 dd8e05ed49 Add C#-only types for Variant value storage from 0cb049167b 2023-08-16 22:27:03 +02:00
GoaLitiuM 3e33c63957 Optimize actor pasting performance with huge amount of actors
- Name lookups are cached to avoid checking the name from same Actor multiple times
- Avoid getting actor children multiple times for same parent
2023-08-16 20:24:19 +03:00
mafiesto4 0cb049167b Add NewValue/DeleteValue to Variant for owned value storage 2023-08-16 18:29:59 +02:00
GoaLitiuM 017b45d674 Use mutex over atomic operations in Delegate 2023-08-16 17:39:08 +03:00
mafiesto4 18b47257fd Add **Behavior Tree** asset type and editing 2023-08-16 13:26:33 +02:00
mafiesto4 f8dc59d670 Change Debug to be static 2023-08-16 13:10:58 +02:00
mafiesto4 81622c92ae Add ReadOnly to CustomEditorPresenter 2023-08-16 13:09:50 +02:00
Tryibion 8e1cac7d2f Add to be able to choose sloppy mesh simplification or not in model import settings for LODs. 2023-08-15 21:34:07 -05:00
Wiktor Kocielski a3063258e5 Add ability to clean patch caches 2023-08-15 12:35:32 +03:00
Tryibion 6e5f693459 Small change to allow other platforms to use fullscreen and windowed in WindowMode function 2023-08-14 18:25:19 -05:00
Tryibion cfd11a7e77 Add borderless window on Windows platform and add easy function in Screen class to change window mode. 2023-08-14 18:11:05 -05:00
mafiesto4 73076dc5cb Merge branch 'RuanLucasGD-locked_focus' 2023-08-14 18:53:20 +02:00
mafiesto4 95fdcf01be Codestyle fix 2023-08-14 18:53:11 +02:00
mafiesto4 b3fc7b3b68 Merge branch 'locked_focus' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-locked_focus 2023-08-14 18:46:48 +02:00
mafiesto4 9f7fd42677 Codestyle fix 2023-08-14 18:44:21 +02:00
mafiesto4 7664744683 Merge branch 'envision3d-feature/1151-play-mode-refactor-cleanup' 2023-08-14 18:42:11 +02:00
mafiesto4 7da93ad68d Merge branch 'feature/1151-play-mode-refactor-cleanup' of https://github.com/envision3d/FlaxEngine into envision3d-feature/1151-play-mode-refactor-cleanup 2023-08-14 18:42:05 +02:00
mafiesto4 1948a84301 Add crash to soft-return if managed event bind target object native instance is gone
#1278
2023-08-14 18:40:03 +02:00
mafiesto4 b3a359b158 Merge branch 'Withaust-navigationfix' 2023-08-14 18:31:13 +02:00
mafiesto4 f1d46979b3 Merge branch 'navigationfix' of https://github.com/Withaust/FlaxEngine into Withaust-navigationfix 2023-08-14 18:31:08 +02:00
mafiesto4 b8db87a678 Merge branch 'Withaust-foreignobject' 2023-08-14 18:29:19 +02:00
mafiesto4 06d8ff02b3 Merge branch 'foreignobject' of https://github.com/Withaust/FlaxEngine into Withaust-foreignobject 2023-08-14 18:29:10 +02:00
mafiesto4 0e2d1b6ad2 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-14 18:14:59 +02:00
mafiesto4 0b1c23dde3 Merge branch 'GoaLitiuM-postfxmaterial_marshalling_fix' 2023-08-14 18:10:22 +02:00
mafiesto4 87bc486c8b Merge branch 'postfxmaterial_marshalling_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-postfxmaterial_marshalling_fix 2023-08-14 18:10:17 +02:00
GoaLitiuM 5e3018817c Fix marshalling issue with PostFxMaterialSettings Materials 2023-08-14 18:25:48 +03:00
mafiesto4 3014a2a7d8 Merge branch 'Tryibion-paste-fix' 2023-08-14 16:20:14 +02:00
mafiesto4 55ca419aba Merge branch 'paste-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-paste-fix 2023-08-14 16:18:44 +02:00
mafiesto4 66042845e4 Codestyle fixe 2023-08-14 16:13:55 +02:00
mafiesto4 00ecdcd2ec Merge branch 'Withaust-replicationfix' 2023-08-14 16:03:33 +02:00
mafiesto4 4e81f80495 Merge branch 'replicationfix' of https://github.com/Withaust/FlaxEngine into Withaust-replicationfix 2023-08-14 16:03:27 +02:00
mafiesto4 a2fda47688 Merge branch 'GoaLitiuM-object_destroynow_csharp' 2023-08-14 15:51:57 +02:00
mafiesto4 3197479cc0 Merge branch 'object_destroynow_csharp' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-object_destroynow_csharp 2023-08-14 15:51:45 +02:00
mafiesto4 860dce487f Codestyle fixes 2023-08-14 15:47:24 +02:00
mafiesto4 dbd1fa3de6 Merge branch 'GoaLitiuM-managedhandlepool_refactor' 2023-08-14 15:44:03 +02:00
mafiesto4 6af6afc6a4 Merge branch 'managedhandlepool_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedhandlepool_refactor 2023-08-14 15:43:57 +02:00
mafiesto4 6d26c05ced Merge branch 'GoaLitiuM-managedarray_pool_cache' 2023-08-14 15:39:50 +02:00
mafiesto4 d5245f6a8c Merge branch 'managedarray_pool_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedarray_pool_cache 2023-08-14 15:39:44 +02:00
mafiesto4 4106a0febb Merge branch 'GoaLitiuM-arraytype_cache' 2023-08-14 15:36:33 +02:00
mafiesto4 342ec4c3c2 Merge branch 'arraytype_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-arraytype_cache 2023-08-14 15:36:27 +02:00
mafiesto4 13e0582ef2 Codestyle fixes 2023-08-14 15:36:19 +02:00
mafiesto4 72a5aa7ec6 Merge branch 'GoaLitiuM-invoker_ret_refactor' 2023-08-14 15:31:56 +02:00
mafiesto4 238ff38bf2 Merge branch 'invoker_ret_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-invoker_ret_refactor 2023-08-14 15:31:50 +02:00
mafiesto4 b4c42defb3 Merge branch 'GoaLitiuM-unboxvalue_fixes' 2023-08-14 15:28:29 +02:00
mafiesto4 838af2bcbe Merge branch 'unboxvalue_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unboxvalue_fixes 2023-08-14 15:28:24 +02:00
mafiesto4 5ae27a0e92 Code style fix 2023-08-14 15:25:12 +02:00
mafiesto4 86fde59a7a Merge branch 'GoaLitiuM-mclass_method_iter' 2023-08-14 15:24:56 +02:00
mafiesto4 212aba4375 Merge branch 'mclass_method_iter' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-mclass_method_iter 2023-08-14 15:24:47 +02:00
mafiesto4 57be27b5e5 Merge branch 'GoaLitiuM-intellisense_stdcpp' 2023-08-14 15:09:12 +02:00
mafiesto4 22a1f433a1 Merge branch 'intellisense_stdcpp' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-intellisense_stdcpp 2023-08-14 15:09:00 +02:00
mafiesto4 ca687ac805 Merge branch 'Withaust-commonvalue' 2023-08-14 15:07:40 +02:00
mafiesto4 430a4eb57f Merge branch 'commonvalue' of https://github.com/Withaust/FlaxEngine into Withaust-commonvalue 2023-08-14 15:03:47 +02:00
mafiesto4 f0d851e846 Merge branch 'GoaLitiuM-csharp_optimize_dev' 2023-08-14 14:41:03 +02:00
mafiesto4 19f14919c0 Allow modifying surface node archetype reference 2023-08-14 13:11:42 +02:00
mafiesto4 da44babb03 Add ignoring types with CompilerGeneratedAttribute in Editor 2023-08-14 13:11:00 +02:00
GoaLitiuM 53b1d0dd85 Optimize ScriptingObject managed initialization 2023-08-13 23:56:27 +03:00
GoaLitiuM cd56101aa3 Expose Object::DeleteObjectNow as Object.DestroyNow in managed scripting 2023-08-13 23:46:38 +03:00
GoaLitiuM 0008123e76 Cache ManagedDictionary types and helper method thunks 2023-08-13 23:15:06 +03:00
GoaLitiuM d4d404ac0b Optimize native interop marshallers runtime type checking 2023-08-13 22:28:56 +03:00
GoaLitiuM 1b0976d99b Refactor ManagedHandlePool
Weak handles are now stored in one sets of dictionarys synchronized with
other threads. This so far seems the fastest way to manage the
dictionaries for now.
2023-08-13 22:14:37 +03:00
GoaLitiuM 65de284a66 Optimize managed method invokers return value marshalling 2023-08-13 22:10:07 +03:00
GoaLitiuM d9ee8f4665 Cache pooled ManagedArray managed handles 2023-08-13 21:56:52 +03:00
GoaLitiuM 27e1401fc7 Slightly improve MClass::GetMethod method iteration
Check the number of parameters first before expensive string comparison
2023-08-13 21:54:44 +03:00
GoaLitiuM 1254af8bbb Optimize UnboxValue performance, safety and memory usage
- Avoids unnecessary boxing of the converted values by storing them in
unmanaged memory.
- Wrap ToNative-method in a delegate and cache it
- Fixes returning address to unpinned memory by pinning POD-types for
a short period of time.
2023-08-13 21:53:42 +03:00
GoaLitiuM 44b70d87e5 Cache MakeArrayType results in native interop 2023-08-13 21:42:40 +03:00
GoaLitiuM e6878942f9 Fix missing C++ standard version in VC++ projects intellisense options 2023-08-13 21:33:17 +03:00
GoaLitiuM 4ce1f31f12 Enable optimizations for Editor module in Development builds 2023-08-13 21:30:40 +03:00
GoaLitiuM 3df044d07b Add build option to change code optimization level in C# modules 2023-08-13 21:29:38 +03:00
mafiesto4 bb8f098714 Add reroute node usage to Visject only if surface type allows it 2023-08-13 19:14:57 +02:00
mafiesto4 ae4bce7a68 Add Visject surface boxes and connections drawing customization via style 2023-08-13 19:14:23 +02:00
Wiktor Kocielski f44156eb80 Remove another unnecessary exposed CommonValue.h 2023-08-13 09:02:43 +03:00
Wiktor Kocielski 1413da189e NetworkReplicator::ResolveForeignObject 2023-08-13 06:39:35 +03:00
Mr. Capybara 79eddd07aa Merge branch 'FlaxEngine:master' into add_spline_edit_options 2023-08-12 11:03:22 -04:00
Ruan Lucas be33fc6018 improv scroll locked focus 2023-08-11 22:31:12 -04:00
Wiktor Kocielski b35065ab3f Fix annoying error that happens due to an oversight 2023-08-12 03:58:28 +03:00
Ruan Lucas db806ad500 fix for large worlds 2023-08-11 08:28:28 -04:00
Ruan Lucas 645977f148 add scroll to focus 2023-08-10 22:41:48 -04:00
Ruan Lucas f2072028d4 change default key 2023-08-10 22:31:03 -04:00
Ruan Lucas aa3dd14bfc add locked focus 2023-08-10 22:24:55 -04:00
mafiesto4 e27f1a8a41 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-10 18:34:27 +02:00
mafiesto4 09be2375f6 Merge branch 'GoaLitiuM-skip_postprocess_pass' 2023-08-10 12:05:00 +02:00
mafiesto4 7e75b9ad78 Merge branch 'skip_postprocess_pass' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-skip_postprocess_pass 2023-08-10 12:04:52 +02:00
mafiesto4 a2b338f704 Merge branch 'GoaLitiuM-load_library_fix' 2023-08-10 11:59:23 +02:00
mafiesto4 6da1a61726 Merge branch 'load_library_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-load_library_fix 2023-08-10 11:59:17 +02:00
mafiesto4 33512fd19b Merge branch 'GoaLitiuM-alc_reload_fix' 2023-08-10 11:56:24 +02:00
mafiesto4 85eb3541eb Merge branch 'alc_reload_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-alc_reload_fix 2023-08-10 11:56:17 +02:00
mafiesto4 ef1e89848f Merge branch 'Withaust-particleeffectfix' 2023-08-10 11:53:30 +02:00
mafiesto4 71c273d8f6 Merge branch 'particleeffectfix' of https://github.com/Withaust/FlaxEngine into Withaust-particleeffectfix 2023-08-10 11:53:20 +02:00
mafiesto4 cd949382cb Merge branch 'GoaLitiuM-vspreview_build_fix' 2023-08-10 11:48:59 +02:00
mafiesto4 9853181600 Merge branch 'vspreview_build_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vspreview_build_fix 2023-08-10 11:48:51 +02:00
Menotdan a1a274df37 Merge branch 'FlaxEngine:master' into material_import 2023-08-09 15:31:44 -04:00
Menotdan 52e546b3ba fix unneeded include. 2023-08-09 15:29:14 -04:00
Menotdan af3d9d0eb3 Re-implement functionality for importing materials as instances. 2023-08-09 15:28:47 -04:00
Menotdan 9156e7727b Merge commit 'refs/pull/1115/head' of https://github.com/FlaxEngine/FlaxEngine into material_import1.6
Repair merge
2023-08-09 15:28:15 -04:00
GoaLitiuM 9d8105e3f3 Separate managed assembly unloading and scripting ALC reinitialization
Fixes an issue with multiple managed assemblies unloading and releasing
all cached data before native resources were fully released in other
assemblies.
2023-08-08 17:39:31 +03:00
Wiktor Kocielski 47c6e54406 Fix exposed public CommonValue inclusion 2023-08-08 08:45:14 +03:00
envision3d b9ffb950f3 Refactor and more appropriately organize logic
- move play logic to simulation module
- update play hotkey to call play game/scene delegate function
- link hotkey tooltip text to inputOptions
2023-08-06 13:11:45 -05:00
Ruan Lucas dc3e71a262 fix for large worlds 2023-08-05 21:26:27 -04:00
Ruan Lucas 6b1cc5bf2f adjust again... 2023-08-05 12:07:40 -04:00
Ruan Lucas 144f0a1717 Merge branch 'add_spline_edit_options' of https://github.com/RuanLucasGD/FlaxEngine into add_spline_edit_options 2023-08-05 12:00:50 -04:00
Mr. Capybara 78cf55904e Merge branch 'FlaxEngine:master' into add_spline_edit_options 2023-08-05 11:11:11 -04:00
Ruan Lucas 38492ffe70 small adjust 2023-08-05 11:01:15 -04:00
mafiesto4 1958adb126 Add AI module to engine 2023-08-04 13:19:03 +02:00
mafiesto4 73bbe63c1e Missing change for 05d477d6c8 2023-08-04 13:10:36 +02:00
mafiesto4 05d477d6c8 Add SelectionChanged public event for VisjectSurface and properly invoke it only when selection actually changes 2023-08-04 12:52:54 +02:00
mafiesto4 b5fa5fa68e Add SerializableScriptingObject for easier serialization of scripting objects in gameplay or content 2023-08-04 10:11:58 +02:00
mafiesto4 cab1d8cac4 Fix missing Visject CM groups auto-expanding if enabled 2023-08-03 16:29:07 +02:00
mafiesto4 c0d32a99b0 Refactor Visject surface nodes cache to reuse between graphs 2023-08-03 15:44:02 +02:00
mafiesto4 bb96f2cd6d Add GroupArchetype to Visject nodes spawn query check 2023-08-03 14:53:02 +02:00
Wiktor Kocielski ec3b921a4f Fix navigation rebuilding 2023-08-02 05:17:49 +03:00
GoaLitiuM fe87eb96e6 Skip post processing when tonemapping and camera artifacts are disabled 2023-08-01 20:20:34 +03:00
GoaLitiuM db56284ca4 Fix WindowsPlatform::LoadLibrary to not modify the string parameter 2023-08-01 20:19:10 +03:00
mafiesto4 8dc98174cf Minor tweaks 2023-08-01 14:14:27 +02:00
mafiesto4 869649e5ed Merge remote-tracking branch 'origin/master' into 1.7 2023-08-01 14:05:49 +02:00
mafiesto4 94386d24ab Minor tweaks 2023-08-01 10:27:31 +02:00
mafiesto4 f29cd1b7b8 Simplify code #1275 2023-08-01 10:03:47 +02:00
mafiesto4 453d326303 Merge branch 'Withaust-gridscale' 2023-08-01 10:01:37 +02:00
mafiesto4 ef1c812349 Merge branch 'gridscale' of https://github.com/Withaust/FlaxEngine into Withaust-gridscale 2023-08-01 10:01:32 +02:00
mafiesto4 911cdb3f2d Softlock fix 2023-08-01 10:01:00 +02:00
mafiesto4 f79390baa4 Merge branch 'Withaust-mordorfix' 2023-08-01 09:59:41 +02:00
mafiesto4 714b35b520 Merge branch 'mordorfix' of https://github.com/Withaust/FlaxEngine into Withaust-mordorfix 2023-08-01 09:59:36 +02:00
mafiesto4 cfab58ccc6 Fix some actor assets into soft checks 2023-08-01 09:57:38 +02:00
Ruan Lucas f511259a33 draw spline point size by distance from camera 2023-07-31 22:43:33 -04:00
Ruan Lucas 600659e453 Move DrawSpline from Spline.cpp to SplineNode.cs 2023-07-31 22:34:50 -04:00
Ruan Lucas 2b7b80ad38 makes more easy select a spline point or spline tangent 2023-07-31 22:05:13 -04:00
Ruan Lucas b80682c97e set spline points / tangents size by camera distance 2023-07-31 19:21:26 -04:00
Ruan Lucas 84bed5b1c9 Revert "test"
This reverts commit b5eadbc531.
2023-07-31 14:02:03 -04:00
mafiesto4 dfbda334f9 Merge branch 'Tryibion-dup-fix' 2023-07-31 19:10:18 +02:00
mafiesto4 64446bea53 Merge branch 'dup-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-dup-fix 2023-07-31 19:10:13 +02:00
mafiesto4 479366c47f Merge branch 'envision3d-feature/1151-play-mode-actions' 2023-07-31 19:03:09 +02:00
mafiesto4 81860e5f18 Cleanup code #1215 and add cook game icon 2023-07-31 19:02:53 +02:00
mafiesto4 6e9b9b6d0e Merge branch 'feature/1151-play-mode-actions' of https://github.com/envision3d/FlaxEngine into envision3d-feature/1151-play-mode-actions 2023-07-31 17:24:55 +02:00
mafiesto4 71bce781f7 Force disable flot128 in fmt 2023-07-31 17:24:47 +02:00
mafiesto4 89c0b9a24d Merge branch 'GoaLitiuM-dotnet_defines' 2023-07-31 17:13:57 +02:00
mafiesto4 8d48b27608 Merge branch 'dotnet_defines' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_defines 2023-07-31 17:13:52 +02:00
mafiesto4 de55f465fc Merge branch 'GoaLitiuM-dotnet_analyzer_support' 2023-07-31 17:12:23 +02:00
mafiesto4 9774f62e32 Merge branch 'dotnet_analyzer_support' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_analyzer_support 2023-07-31 17:12:18 +02:00
mafiesto4 dc9fe11c47 Merge branch 'GoaLitiuM-generic_asset_reference_attrib' 2023-07-31 16:59:54 +02:00
Ruan Lucas b5eadbc531 test 2023-07-31 09:06:39 -04:00
GoaLitiuM e598746980 Fix build issues in Visual Studio 2022 Preview 5 2023-07-30 22:09:23 +03:00
GoaLitiuM 735b2e30f0 Output generated .NET source generator files to Intermediate folder
Mostly useful for debugging source generators, VS doesn't seem to
utilize these files in any way.
2023-07-30 21:58:16 +03:00
GoaLitiuM 13e11091fc Support user defined .NET analyzers/source generators in Flax.Build 2023-07-30 21:58:11 +03:00
GoaLitiuM 3ba05f52df Add common .NET SDK preprocessor definitions 2023-07-30 21:57:44 +03:00
GoaLitiuM bf351f71bf Guard generic AssetReferenceAttribute to work only in .NET 7 2023-07-30 20:48:36 +03:00
GoaLitiuM 06250fcb6d Implement a generic version of AssetReferenceAttribute 2023-07-30 20:40:30 +03:00
Wiktor Kocielski 383b21c108 Softlock fix 2023-07-29 18:55:29 +03:00
Wiktor Kocielski 8250f92af3 Add grid scale to the editor viewport settings 2023-07-29 13:34:46 +03:00
Wiktor Kocielski eb641e142e ShadowOfMordor terrain fix 2023-07-29 01:00:07 +03:00
NoriteSC 0b89164328 Merge branch 'FlaxEngine:master' into ContentBrowserImprovement 2023-07-28 15:56:40 +02:00
NoriteSC 131060efa7 bug fix 2023-07-28 12:48:43 +02:00
Tryibion 5cd72c9b24 Fix duplicating actor in scene on shift click if the actor has not been moved 2023-07-27 16:51:44 -05:00
Tryibion d6bfcbcc3d Add for prefab 2023-07-27 10:49:29 -05:00
Tryibion 10c8454e8f Paste at same level of selected actor parent node instead of as child of selected actor for better behavior. 2023-07-27 10:33:30 -05:00
mafiesto4 80bcc0f32e Merge branch 'Tryibion-prefab-batch' 2023-07-26 21:21:20 +02:00
mafiesto4 36db7ad7dd Merge branch 'prefab-batch' of https://github.com/Tryibion/FlaxEngine into Tryibion-prefab-batch 2023-07-26 21:19:57 +02:00
mafiesto4 95922bb38b Fix compilation 2023-07-26 21:18:22 +02:00
mafiesto4 63e83d1f92 Merge branch 'NoriteSC-MathLib' 2023-07-26 19:33:13 +02:00
mafiesto4 77daf85fc1 Add unit test for angles unwind math #1267 2023-07-26 19:31:43 +02:00
mafiesto4 fae20daac9 Cleanup code #1267 2023-07-26 19:28:55 +02:00
mafiesto4 dceea2656e Merge branch 'MathLib' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-MathLib 2023-07-26 18:32:31 +02:00
mafiesto4 36cc80a003 Merge branch 'GoaLitiuM-api_inject_code_dup_fix' 2023-07-26 18:25:29 +02:00
GoaLitiuM c2fffbcfdb Fix API_INJECT_CODE injecting duplicated code 2023-07-25 20:49:20 +03:00
NoriteSC 3bd8d930e0 doc fixes and code corections
mathf UnwindRadians has fixed coust
added UnwindRadiansAccurate oldversion
2023-07-25 15:27:18 +02:00
Ruan Lucas 714d0c2ca0 small fix 2023-07-24 22:41:45 -04:00
Ruan Lucas ea48a89e00 improve auto smooth 2023-07-24 22:34:48 -04:00
Ruan Lucas 7b0e9b9e06 simplify code 2023-07-24 19:30:31 -04:00
mafiesto4 ce16debabd Merge remote-tracking branch 'origin/master' into 1.7 2023-07-24 23:21:03 +02:00
NoriteSC 6a65ccd5ef rev1 2023-07-24 22:10:12 +02:00
mafiesto4 543433440e Fix nested animation playrate when the framerate is different
#1258
2023-07-24 19:21:03 +02:00
mafiesto4 be0baa172e Merge branch 'mtszkarbowiak-fix/string-marshalling' 2023-07-24 18:14:30 +02:00
mafiesto4 619b0bff6b Merge branch 'fix/string-marshalling' of https://github.com/mtszkarbowiak/FlaxEngine into mtszkarbowiak-fix/string-marshalling 2023-07-24 18:14:24 +02:00
mafiesto4 c9254457a9 Code style tweaks 2023-07-24 16:24:39 +02:00
mafiesto4 7cfcca860a Merge branch 'Tryibion-platform-ref-fix' 2023-07-24 16:18:11 +02:00
mafiesto4 cf4ca17241 Merge branch 'platform-ref-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-platform-ref-fix 2023-07-24 16:17:57 +02:00
mafiesto4 93aa202eed Merge branch 'Tryibion-assetpicker-scroll' 2023-07-24 16:15:23 +02:00
mafiesto4 4903fe8191 Merge branch 'assetpicker-scroll' of https://github.com/Tryibion/FlaxEngine into Tryibion-assetpicker-scroll 2023-07-24 16:15:18 +02:00
mafiesto4 5f090c2bf2 Merge branch 'GoaLitiuM-api_param_params' 2023-07-24 16:14:08 +02:00
mafiesto4 2643234718 Merge branch 'api_param_params' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-api_param_params 2023-07-24 16:14:03 +02:00
Ruan Lucas 56285e544e disable set all linear / smooth when select many splines 2023-07-24 08:54:53 -04:00
mafiesto4 11bb6d4364 Fix crash when using custom Anim Graph node (.NET 7 regression) 2023-07-24 14:23:28 +02:00
Ruan Lucas c79c91a19a add undo / redo to edit spline options and some small changes 2023-07-23 20:27:45 -04:00
Tryibion f80b7ee2a5 Fix spacing 2023-07-23 18:58:47 -05:00
Tryibion 12005ad314 Simplify functionality into function. 2023-07-23 15:20:57 -05:00
Tryibion 02d135053f Add scroll to selected asset/content item on asset picker select menu open. 2023-07-23 15:10:31 -05:00
GoaLitiuM d1a6bdceed Add params tag to API_PARAM for C# variadic parameters support 2023-07-23 12:47:00 +03:00
Mateusz Karbowiak 91e0e2011c Fix visibility of string wrapper 2023-07-22 18:44:36 +02:00
Ruan Lucas 1a72aeeb24 disable edit tangent buttons when select multiple values 2023-07-21 22:15:43 -04:00
Ruan Lucas bd8c5985b1 remove debug 2023-07-21 22:11:30 -04:00
Ruan Lucas f8da0708e1 add suport to loop spline on set tangent linear 2023-07-21 22:11:15 -04:00
Ruan Lucas 1bd7210107 don't let aligned or free mode on first or end spline point 2023-07-21 21:05:36 -04:00
Ruan Lucas 6872f35add don't let set smooth tangent in/out on start/end spline if isn't loop 2023-07-21 21:00:08 -04:00
Tryibion 0ba9f7c51d Small simplification of null checking for input editors 2023-07-21 13:33:00 -05:00
Tryibion 9b0c6a070a Add InputEvent and InputAxis editors and changed UICanvas to use them. 2023-07-21 13:26:51 -05:00
Ruan Lucas 008f219883 organize smooth in and smooth out tangents code 2023-07-21 10:25:55 -04:00
Tryibion 83427ba1d4 Add batch creating prefabs from mutiple selected actors in the scene tree. 2023-07-20 23:02:26 -05:00
Tryibion a1cdf3e733 Fix bug of populating asset picker if option platform type does not exist. 2023-07-20 21:31:07 -05:00
Ruan Lucas 5c7faf7262 disable edit tangent options when deselect tangents or spline points on spline editor 2023-07-20 16:40:05 -04:00
Ruan Lucas 4cf2bba840 fix edit buttons style on spline editor 2023-07-20 13:19:18 -04:00
Ruan Lucas e6715ad095 add methods to auto select tangents or points on change edit mode on spline editor 2023-07-20 13:05:56 -04:00
Ruan Lucas 50f1688140 add smooth in tangent and smooth out tangent 2023-07-20 10:52:07 -04:00
Ruan Lucas 902a3c1eed smooth point on set linear point to free 2023-07-20 09:36:05 -04:00
Ruan Lucas e40c0be00d fix set type on press edit buttons not working 2023-07-20 09:25:48 -04:00
envision3d dba0675873 Merge branch 'master' of https://github.com/FlaxEngine/FlaxEngine into feature/1151-play-mode-actions 2023-07-20 02:00:53 -05:00
Ruan Lucas 8a9b76a468 clean code 2023-07-19 16:28:15 -04:00
Ruan Lucas 7855db951e auto detect tangent type when click on spline keyframe 2023-07-19 16:01:05 -04:00
Ruan Lucas 7036e77d60 fix auto smooth point on click 2023-07-19 10:20:30 -04:00
Ruan Lucas 95c934d6b4 se button color when set tangent mode 2023-07-19 09:07:40 -04:00
Ruan Lucas a42dc8f434 change tangent edit option base class name 2023-07-19 08:44:22 -04:00
Ruan Lucas 1ec2df1a29 disable edit tangents buttons when don't have any tangent or point selected 2023-07-19 08:43:11 -04:00
mafiesto4 32d9067710 Fix build 2023-07-19 09:08:17 +02:00
Ruan Lucas 590a892f16 set spline point as selected when has a tangent selected and set as linear 2023-07-18 21:54:30 -04:00
Ruan Lucas 2fac4c9284 add smooth tangent on first and last keyframe 2023-07-18 20:28:28 -04:00
Ruan Lucas 2be6a6be9e add basic options 2023-07-18 16:48:15 -04:00
mafiesto4 b26b9302e0 Remove unused TIsArithmetic 2023-07-18 18:43:10 +02:00
mafiesto4 eea0b37dc3 Merge remote-tracking branch 'origin/master' into 1.7 2023-07-18 18:35:44 +02:00
mafiesto4 b2b10ce7da Fix various core types to be trivially constructible as properly POD-type 2023-07-18 18:20:11 +02:00
mafiesto4 872509df2a Fix incorrect Transform Position To Screen UV in particles graph in CPU code path 2023-07-18 18:13:19 +02:00
mafiesto4 e96e338fd3 Merge branch 'Tryibion-log-count' 2023-07-18 17:45:25 +02:00
mafiesto4 a80e3f5a15 Merge branch 'log-count' of https://github.com/Tryibion/FlaxEngine into Tryibion-log-count 2023-07-18 17:45:18 +02:00
Tryibion be079b9b67 Improvements to debug log count. 2023-07-18 09:51:21 -05:00
mafiesto4 e39a56fc4e Merge remote-tracking branch 'origin/master' into 1.7 2023-07-18 11:47:39 +02:00
mafiesto4 60c0995bc3 Add undo for #1247 2023-07-18 11:46:15 +02:00
mafiesto4 8f8c0e4b81 Minor fixes for #1247 2023-07-18 10:55:15 +02:00
mafiesto4 338499536f Add ModelInstanceActor::GetMaterialSlots 2023-07-18 10:55:00 +02:00
mafiesto4 0f613abfb9 Add ToSpan from 24c03c0e4b 2023-07-18 10:54:21 +02:00
mafiesto4 fdb06424d4 Merge branch 'Tryibion-mat-entry' 2023-07-18 10:25:46 +02:00
mafiesto4 5b40f770b1 Merge branch 'mat-entry' of https://github.com/Tryibion/FlaxEngine into Tryibion-mat-entry 2023-07-18 10:25:35 +02:00
mafiesto4 488958ce44 Fix DrawSceneDepth to properly draw scene objects when custom actors list is empty
#1253
2023-07-18 10:16:11 +02:00
mafiesto4 a535c701e5 Merge branch 'GoaLitiuM-generic_type_fix' 2023-07-18 09:51:14 +02:00
mafiesto4 9c2cff6f3c Merge branch 'generic_type_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-generic_type_fix 2023-07-18 09:50:56 +02:00
mafiesto4 44518e88d5 Fix crash when using Vector3 soft casting in Visual Scripts 2023-07-18 09:48:43 +02:00
mafiesto4 07ef07e979 Merge remote-tracking branch 'origin/1.7' into 1.7
# Conflicts:
#	Source/Engine/Physics/Actors/Cloth.cpp
2023-07-17 18:27:31 +02:00
mafiesto4 5012d4432e Add NvCloth for Linux 2023-07-17 18:22:40 +02:00
mafiesto4 3d5d7ad968 Don't recook cloth mesh when rebuilding it 2023-07-17 15:34:38 +02:00
mafiesto4 868084286c Add automatic cloth rebuild when simulation fails with NaN 2023-07-17 15:17:22 +02:00
mafiesto4 1af076f180 Add distance-based and frustum-based culling to cloth 2023-07-17 11:16:01 +02:00
mafiesto4 de8613e223 Merge remote-tracking branch 'origin/master' into 1.7 2023-07-16 22:40:02 +02:00
mafiesto4 10d9942e8f Add async pre-sim update for cloth via job system 2023-07-16 22:39:56 +02:00
mafiesto4 2046eca45a Add NvCloth fabric reusing for multiple instances of the same cloth mesh 2023-07-16 14:40:11 +02:00
mafiesto4 e075a1c6aa Run cloth simulation in async via job system 2023-07-16 12:59:18 +02:00
mafiesto4 adfaf8c961 Don't update cloth colliders every frame 2023-07-16 12:53:59 +02:00
mafiesto4 9179586f14 Fix cloth painting in prefab window 2023-07-16 12:36:38 +02:00
mafiesto4 011162744c Fix various keyboard handling on macOS 2023-07-16 12:04:22 +02:00
mafiesto4 6853aa6e81 Add control/command/option keys handling on macOS 2023-07-16 12:04:18 +02:00
mafiesto4 6fc168bdf1 Add macOS message box with buttons 2023-07-16 12:04:12 +02:00
mafiesto4 6d48fce763 Fix mouse cursor setting on macOS to properly handle screen scale 2023-07-16 12:04:06 +02:00
mafiesto4 371db610a9 Merge remote-tracking branch 'origin/1.7' into 1.7 2023-07-16 12:03:06 +02:00
mafiesto4 31943ca9bd Add normals computing to cloth mesh 2023-07-16 12:02:33 +02:00
mafiesto4 f0496d53e8 Add RenderTools::CalculateTangentFrame utility 2023-07-16 11:57:21 +02:00
Tryibion 868db7c848 Add functionality to combine similar logs into a log with a count. 2023-07-15 13:52:10 -05:00
Tryibion c89421438b Code cleanup 2023-07-15 10:42:41 -05:00
Tryibion 02219beac9 Handle edge case 2023-07-15 10:27:59 -05:00
Tryibion c8edaf5d6e Fix bug with not using slot material 2023-07-15 10:10:37 -05:00
Tryibion ba93e1e1d0 Add showing default materials to model entries. 2023-07-15 10:00:34 -05:00
mafiesto4 1ae89c7545 Fix various keyboard handling on macOS 2023-07-15 15:07:52 +02:00
mafiesto4 4a0235785b Add control/command/option keys handling on macOS 2023-07-15 15:00:55 +02:00
mafiesto4 8f4ada2555 Add macOS message box with buttons 2023-07-15 14:42:54 +02:00
mafiesto4 a7e436412c Fix mouse cursor setting on macOS to properly handle screen scale 2023-07-15 14:01:56 +02:00
GoaLitiuM ff56152ef2 Fix releasing non-collectible types with collectible generic types 2023-07-15 13:20:56 +03:00
mafiesto4 18fb7fb849 Add NvCloth for iOS 2023-07-15 11:27:26 +02:00
mafiesto4 6664972fbf Add NvCloth for macOS 2023-07-15 11:22:00 +02:00
mafiesto4 2645b69ec0 Tweak air lif/drag coeffs to properly simulate wind on cloth 2023-07-14 17:10:28 +02:00
mafiesto4 aef3ae14d4 Add animated model pose handling as a input to cloth for proper character clothing sim 2023-07-14 17:10:09 +02:00
mafiesto4 68d97fcc48 Improve cloth paint picking logic 2023-07-14 14:17:19 +02:00
mafiesto4 3f9e286279 Fix crash when creating cloth with all vertices fixed 2023-07-14 14:12:30 +02:00
mafiesto4 3141b4fb04 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Engine/Level/Actors/SplineModel.cpp
#	Source/Engine/Level/Actors/SplineModel.h
2023-07-14 14:10:21 +02:00
mafiesto4 b1056e160a Add debug sanity checks to cloth to solve issues 2023-07-14 13:36:44 +02:00
mafiesto4 84c99ea1c3 Fix nested animation sampling bug
#1244
2023-07-14 13:10:20 +02:00
mafiesto4 f5f948ea4c Fix culling artifacts in animated model preview in Editor 2023-07-14 12:17:21 +02:00
mafiesto4 a6924d37c1 Add ModelInstanceActor::GetMaterial to get actual material used to render certain entries 2023-07-14 11:58:51 +02:00
mafiesto4 7b88569e73 Add sealed tag to virtual functions in API bindings to block inheritance in C#/VS 2023-07-14 11:57:38 +02:00
mafiesto4 40fc2f8295 Fix missing header files in deployed engine package
#1242
2023-07-14 11:25:54 +02:00
mafiesto4 843abca8ca Fix error when opening shader asset if it's not visible in Content window 2023-07-14 10:59:04 +02:00
mafiesto4 24c03c0e4b Add cloth painting tools to Editor 2023-07-13 23:30:37 +02:00
mafiesto4 3b90e75307 Various improvements to serialization of data encoded via Base64 to Json 2023-07-13 13:10:34 +02:00
mafiesto4 c6a82b8c36 Add DebugDraw::DrawLine with separate start/end colors 2023-07-13 13:08:53 +02:00
mafiesto4 15b2d4e041 Add IPresenterOwner to editor Custom Editor for more context and advanced interactions 2023-07-12 12:36:30 +02:00
mafiesto4 159beae8ae Merge remote-tracking branch 'origin/master' into 1.7 2023-07-12 12:24:24 +02:00
mafiesto4 8a07c486bc Refactor Editor gizmo modes ownership to support using them in prefab window 2023-07-12 12:24:13 +02:00
mafiesto4 3e801dbc8d Merge branch 'Tryibion-debug-lights' 2023-07-10 12:52:10 +02:00
mafiesto4 170906e483 Merge branch 'debug-lights' of https://github.com/Tryibion/FlaxEngine into Tryibion-debug-lights 2023-07-10 12:52:05 +02:00
mafiesto4 a22cedf286 Merge branch 'Tryibion-spotlight-inner-debug' 2023-07-10 12:46:48 +02:00
mafiesto4 ae1c0b45d8 Merge branch 'spotlight-inner-debug' of https://github.com/Tryibion/FlaxEngine into Tryibion-spotlight-inner-debug 2023-07-10 12:46:40 +02:00
mafiesto4 6ae77d0c17 Merge remote-tracking branch 'origin/1.6' into 1.7 2023-07-09 11:55:50 +02:00
Tryibion 0a57cbbecf Add not showing lights debug based on other light flags as well. 2023-07-07 17:48:16 -05:00
Tryibion a0bb3f2995 Add light debug view flag to draw light shapes 2023-07-07 17:32:46 -05:00
Tryibion 48474065d7 Add spot light inner circle debug lines. 2023-07-07 16:46:35 -05:00
mafiesto4 e4c3461053 Merge remote-tracking branch 'origin/master' into 1.7 2023-07-03 22:01:50 +02:00
mafiesto4 53ee65a5a6 Add thickness to cloth to prevent intersecting with colliders 2023-07-03 14:13:35 +02:00
mafiesto4 f81989a171 Add **Cloth** simulation with physics 2023-07-03 10:38:36 +02:00
mafiesto4 8818b3b07c Add NvCloth dependency 2023-07-03 09:51:42 +02:00
mafiesto4 99ee0b1bfe Add MeshDeformation utility for generic meshes vertices morphing (eg. via Blend Shapes or Cloth) 2023-07-03 09:49:23 +02:00
mafiesto4 60181a29a3 Add copy/move ctor/operator to Delegate 2023-07-02 15:46:55 +02:00
mafiesto4 04963fef18 Various code fixes and tweaks 2023-07-02 15:46:29 +02:00
mafiesto4 0d7e7edf80 Optimize BoundingBox::Transform 2023-06-29 16:50:53 +02:00
mafiesto4 e3cbe1458d Add MeshReference to ModelInstanceActor for easy mesh referencing and its data access interface 2023-06-29 16:50:00 +02:00
mafiesto4 656866c1d4 Various improvements in Editor code 2023-06-29 16:41:15 +02:00
envision3d 940b0e02e5 improve state syncing of context menus and editor options 2023-06-28 04:08:36 -05:00
envision3d 39f4c00135 add play button actions, number of players
- add context menu support for toolstrip buttons
- add "Play Game" vs. "Play Scenes"
- add context menu for choosing play button action to toolstrip button
- add number of game client selection for cook & run
- add context menu for cook & run to toolstrip button
- add menu items for the above
- add editor option entries for saving user preferences for the above
2023-06-28 02:02:10 -05:00
mafiesto4 4741f194f6 Update CMake project to the latest VS 2022 2023-06-21 23:07:52 +02:00
mafiesto4 9b0fdb2cbd Disable assertions in Release build mode 2023-06-19 13:59:04 +02:00
mafiesto4 f952a392de Add **stencil buffer** support to GPUPipelineState 2023-06-19 13:46:37 +02:00
mafiesto4 a6353c0bb9 Rename GPUPipelineState::Description::PrimitiveTopologyType to PrimitiveTopology 2023-06-19 11:53:40 +02:00
mafiesto4 7fc3b264ac Improve DX12 PSO debug name building 2023-06-19 11:21:53 +02:00
mafiesto4 1c9d8aa470 Add GPUContext::SetStencilRef to stencil reference value 2023-06-19 11:21:35 +02:00
Menotdan e3f004b831 remove extraneous stack trace print that i used for debugging 2023-05-22 14:26:55 -04:00
Menotdan 284c3d832a fix a couple of bugs with importing without material instances 2023-05-22 14:26:20 -04:00
Menotdan 4acfffeaf4 Make it so the material instances get linked to the material slots. 2023-05-22 13:51:13 -04:00
Menotdan 37fe1154a3 Importing as instances works now 2023-05-22 10:12:00 -04:00
Menotdan f03bb60d5b Figured out where I actually need to add code, and added code there. 2023-05-21 00:20:54 -04:00
Menotdan 89ce2b087e Add parameter for AddMaterial() as an experiment, messing around with ideas. 2023-05-20 00:13:45 -04:00
Menotdan 9a71e0274f Add required options for material instance importing. 2023-05-20 00:03:40 -04:00
GoaLitiuM bf9dbbc79e Restore disabled compiler warnings of unused events 2023-01-14 18:01:14 +02:00
GoaLitiuM 5fa10fd17b Allow unsubscribing from managed events multiple times 2023-01-14 17:45:21 +02:00
Tryibion fd4b9a5a9f Return focus to parent on mouse leave. 2022-12-16 16:29:43 -06:00
843 changed files with 36382 additions and 9664 deletions
+1
View File
@@ -12,6 +12,7 @@ Source/*.csproj
/Package_*/
!Source/Engine/Debug
/Source/Platforms/Editor/Linux/Mono/etc/mono/registry
PackageEditor_Cert.command
PackageEditor_Cert.bat
PackagePlatforms_Cert.bat
Binary file not shown.
Binary file not shown.
Binary file not shown.
+25 -26
View File
@@ -2,35 +2,34 @@
using System.Collections.Generic;
using FlaxEngine;
namespace %namespace%
namespace %namespace%;
/// <summary>
/// %class% Script.
/// </summary>
public class %class% : Script
{
/// <summary>
/// %class% Script.
/// </summary>
public class %class% : Script
/// <inheritdoc/>
public override void OnStart()
{
/// <inheritdoc/>
public override void OnStart()
{
// Here you can add code that needs to be called when script is created, just before the first game update
}
/// <inheritdoc/>
public override void OnEnable()
{
// Here you can add code that needs to be called when script is enabled (eg. register for events)
}
// Here you can add code that needs to be called when script is created, just before the first game update
}
/// <inheritdoc/>
public override void OnEnable()
{
// Here you can add code that needs to be called when script is enabled (eg. register for events)
}
/// <inheritdoc/>
public override void OnDisable()
{
// Here you can add code that needs to be called when script is disabled (eg. unregister from events)
}
/// <inheritdoc/>
public override void OnDisable()
{
// Here you can add code that needs to be called when script is disabled (eg. unregister from events)
}
/// <inheritdoc/>
public override void OnUpdate()
{
// Here you can add code that needs to be called every frame
}
/// <inheritdoc/>
public override void OnUpdate()
{
// Here you can add code that needs to be called every frame
}
}
Binary file not shown.
+1 -11
View File
@@ -11,16 +11,6 @@ for %%I in (Source\Logo.png) do if %%~zI LSS 2000 (
call "Development\Scripts\Windows\GetMSBuildPath.bat"
if errorlevel 1 goto Error_NoVisualStudioEnvironment
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto Compile
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
for %%j in (15.0, Current) do (
if exist "%%i\MSBuild\%%j\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\%%j\Bin\MSBuild.exe"
goto Compile
)
)
)
:Compile
md Cache\Intermediate >nul 2>nul
dir /s /b Source\Tools\Flax.Build\*.cs >Cache\Intermediate\Flax.Build.Files.txt
@@ -44,7 +34,7 @@ goto Exit
echo CallBuildTool ERROR: The script is in invalid directory.
goto Exit
:Error_NoVisualStudioEnvironment
echo CallBuildTool ERROR: Missing Visual Studio 2015 or newer.
echo CallBuildTool ERROR: Missing Visual Studio 2022 or newer.
goto Exit
:Error_CompilationFailed
echo CallBuildTool ERROR: Failed to compile Flax.Build project.
+13 -53
View File
@@ -4,66 +4,26 @@ rem Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
set MSBUILD_PATH=
rem Look for MSBuild version 17.0 or later
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto VsWhereNotFound
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto End
)
)
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto End
)
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 17.0 -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\Current\Bin\MSBuild.exe"
goto End
)
)
:VsWhereNotFound
if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe" (
set MSBUILD_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
goto End
rem Look for MSBuild version 17.0 or later in pre-release versions
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 17.0 -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\Current\Bin\MSBuild.exe"
goto End
)
)
call :GetInstallPath Microsoft\VisualStudio\SxS\VS7 15.0 MSBuild\15.0\bin\MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\14.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\12.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\4.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
echo GetMSBuildPath ERROR: Could not find MSBuild version 17.0 or later.
exit /B 1
:VsWhereNotFound
echo GetMSBuildPath ERROR: vswhere.exe was not found.
exit /B 1
:End
exit /B 0
:GetInstallPath
for /f "tokens=2,*" %%A in ('REG.exe query HKCU\SOFTWARE\%1 /v %2 2^>Nul') do (
if exist "%%B%%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKLM\SOFTWARE\%1 /v %2 2^>Nul') do (
if exist "%%B%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKCU\SOFTWARE\Wow6432Node\%1 /v %2 2^>Nul') do (
if exist "%%B%%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKLM\SOFTWARE\Wow6432Node\%1 /v %2 2^>Nul') do (
if exist "%%B%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
exit /B 1
exit /B 0
+3 -2
View File
@@ -2,8 +2,9 @@
"Name": "Flax",
"Version": {
"Major": 1,
"Minor": 6,
"Build": 6344
"Minor": 7,
"Revision": 0,
"Build": 6404
},
"Company": "Flax",
"Copyright": "Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.",
+6
View File
@@ -248,6 +248,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=bitangent/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=bitangents/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bokeh/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=borderless/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BRDF/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=coeff/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=colliders/@EntryIndexedValue">True</s:Boolean>
@@ -255,6 +256,8 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=comperand/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=coord/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=cubemap/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deformer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=deformers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=defragmentation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Delaunay/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Defocus/@EntryIndexedValue">True</s:Boolean>
@@ -290,6 +293,8 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=lightmaps/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Linearize/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=lods/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Marshallable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=marshallers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mclass/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=memcpy/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=metalness/@EntryIndexedValue">True</s:Boolean>
@@ -318,6 +323,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=raycast/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=raycasting/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=raycasts/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=reachability/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=readback/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Reimports/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=reimported/@EntryIndexedValue">True</s:Boolean>
+11 -4
View File
@@ -1,15 +1,22 @@
@echo off
rem Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
:: Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
setlocal
pushd
echo Generating Flax Engine project files...
rem Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments)
call "Development\Scripts\Windows\CallBuildTool.bat" -genproject %*
:: Change the path to the script root
cd /D "%~dp0"
:: Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments)
call "Development\Scripts\Windows\CallBuildTool.bat" -genproject %*
if errorlevel 1 goto BuildToolFailed
:: Build bindings for all editor configurations
echo Building C# bindings...
Binaries\Tools\Flax.Build.exe -build -BuildBindingsOnly -arch=x64 -platform=Windows --buildTargets=FlaxEditor
popd
echo Done!
exit /B 0
+5
View File
@@ -10,3 +10,8 @@ cd "`dirname "$0"`"
# Run Flax.Build to generate project files (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --genproject "$@"
# Build bindings for all editor configurations
echo Building C# bindings...
# TODO: Detect the correct architecture here
Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=ARM64 -platform=Mac --buildTargets=FlaxEditor
+5
View File
@@ -10,3 +10,8 @@ cd "`dirname "$0"`"
# Run Flax.Build to generate project files (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --genproject "$@"
# Build bindings for all editor configurations
echo Building C# bindings...
# TODO: Detect the correct architecture here
Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=x64 -platform=Linux --buildTargets=FlaxEditor
+5 -4
View File
@@ -4,7 +4,7 @@
<a href="https://flaxengine.com/discord"><img src="https://discordapp.com/api/guilds/437989205315158016/widget.png"/></a>
Flax Engine is a high quality modern 3D game engine written in C++ and C#.
From stunning graphics to powerful scripts - Flax can give everything for your games. Designed for fast workflow with many ready to use features waiting for you right now. To learn more see the website ([www.flaxengine.com](https://flaxengine.com)).
From stunning graphics to powerful scripts, it's designed for fast workflow with many ready-to-use features waiting for you right now. To learn more see the website ([www.flaxengine.com](https://flaxengine.com)).
This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Anyone is welcome to contribute or use the modified source in Flax-based games.
@@ -31,19 +31,20 @@ Follow the instructions below to compile and run the engine from source.
* Install Visual Studio 2022 or newer
* Install Windows 8.1 SDK or newer (via Visual Studio Installer)
* Install Microsoft Visual C++ 2015 v140 toolset or newer (via Visual Studio Installer)
* Install .Net 7 SDK (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install .NET 7 SDK for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install Git with LFS
* Clone repo (with LFS)
* Run **GenerateProjectFiles.bat**
* Open `Flax.sln` and set solution configuration to **Editor.Development** and solution platform to **Win64**
* Set Flax (C++) or FlaxEngine (C#) as startup project
* Compile Flax project (hit F7 or CTRL+Shift+B)
* Optionally set Debug Type to **Managed Only (.NET Core)** to debug C#-only, or **Mixed (.NET Core)** to debug both C++ and C#
* Run Flax (hit F5 key)
## Linux
* Install Visual Studio Code
* Install .Net 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install .NET 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Ubuntu: `sudo apt install dotnet-sdk-7.0`
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Ubuntu: `sudo apt install vulkan-sdk`
@@ -66,7 +67,7 @@ Follow the instructions below to compile and run the engine from source.
## Mac
* Install XCode
* Install .Net 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install .NET 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Clone repo (with LFS)
* Run `GenerateProjectFiles.command`
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Drag;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -31,7 +32,7 @@ namespace FlaxEditor.Content.GUI
: base(x, y, height)
{
TargetNode = targetNode;
Text = targetNode.NavButtonLabel + "/";
Text = targetNode.NavButtonLabel;
}
/// <inheritdoc />
@@ -72,7 +73,6 @@ namespace FlaxEditor.Content.GUI
if (_dragOverItems == null)
_dragOverItems = new DragItems(ValidateDragItem);
_dragOverItems.OnDragEnter(data);
var result = GetDragEffect(data);
_validDragOver = result != DragDropEffect.None;
@@ -122,4 +122,70 @@ namespace FlaxEditor.Content.GUI
return result;
}
}
sealed class ContentNavigationSeparator : ComboBox
{
public ContentNavigationButton Target;
public ContentNavigationSeparator(ContentNavigationButton target, float x, float y, float height)
{
Target = target;
Bounds = new Rectangle(x, y, 16, height);
Offsets = new Margin(Bounds.X, Bounds.Width, Bounds.Y, Bounds.Height);
UpdateTransform();
MaximumItemsInViewCount = 20;
var style = Style.Current;
BackgroundColor = style.BackgroundNormal;
BackgroundColorHighlighted = BackgroundColor;
BackgroundColorSelected = BackgroundColor;
}
protected override ContextMenu OnCreatePopup()
{
// Update items
ClearItems();
foreach (var child in Target.TargetNode.Children)
{
if (child is ContentTreeNode node)
{
if (node.Folder.VisibleInHierarchy) // Respect the filter set by ContentFilterConfig.Filter(...)
AddItem(node.Folder.ShortName);
}
}
return base.OnCreatePopup();
}
public override void Draw()
{
var style = Style.Current;
var rect = new Rectangle(Float2.Zero, Size);
var color = IsDragOver ? style.BackgroundSelected * 0.6f : (_mouseDown ? style.BackgroundSelected : (IsMouseOver ? style.BackgroundHighlighted : Color.Transparent));
Render2D.FillRectangle(rect, color);
Render2D.DrawSprite(Editor.Instance.Icons.ArrowRight12, new Rectangle(rect.Location.X, rect.Y + rect.Size.Y * 0.25f, rect.Size.X, rect.Size.X), EnabledInHierarchy ? style.Foreground : style.ForegroundDisabled);
}
protected override void OnLayoutMenuButton(ContextMenuButton button, int index, bool construct = false)
{
button.Icon = Editor.Instance.Icons.FolderClosed32;
if (_tooltips != null && _tooltips.Length > index)
button.TooltipText = _tooltips[index];
}
protected override void OnItemClicked(int index)
{
base.OnItemClicked(index);
var item = _items[index];
foreach (var child in Target.TargetNode.Children)
{
if (child is ContentTreeNode node && node.Folder.ShortName == item)
{
Editor.Instance.Windows.ContentWin.Navigate(node);
return;
}
}
}
}
}
@@ -45,8 +45,14 @@ namespace FlaxEditor.Content.GUI
private void ImportActors(DragActors actors, ContentFolder location)
{
// Use only the first actor
Editor.Instance.Prefabs.CreatePrefab(actors.Objects[0].Actor);
foreach (var actorNode in actors.Objects)
{
var actor = actorNode.Actor;
if (actors.Objects.Contains(actorNode.ParentNode as ActorNode))
continue;
Editor.Instance.Prefabs.CreatePrefab(actor, false);
}
}
/// <inheritdoc />
@@ -62,7 +68,7 @@ namespace FlaxEditor.Content.GUI
_validDragOver = true;
result = DragDropEffect.Copy;
}
else if (_dragActors.HasValidDrag)
else if (_dragActors != null && _dragActors.HasValidDrag)
{
_validDragOver = true;
result = DragDropEffect.Move;
@@ -88,7 +94,7 @@ namespace FlaxEditor.Content.GUI
result = DragDropEffect.Copy;
}
// Check if drop actor(s)
else if (_dragActors.HasValidDrag)
else if (_dragActors != null && _dragActors.HasValidDrag)
{
// Import actors
var currentFolder = Editor.Instance.Windows.ContentWin.CurrentViewFolder;
+22 -14
View File
@@ -220,8 +220,9 @@ namespace FlaxEditor.Content.GUI
// Remove references and unlink items
for (int i = 0; i < _items.Count; i++)
{
_items[i].Parent = null;
_items[i].RemoveReference(this);
var item = _items[i];
item.Parent = null;
item.RemoveReference(this);
}
_items.Clear();
@@ -261,11 +262,15 @@ namespace FlaxEditor.Content.GUI
ClearItems();
// Add references and link items
_items.AddRange(items);
for (int i = 0; i < items.Count; i++)
{
items[i].Parent = this;
items[i].AddReference(this);
var item = items[i];
if (item.Visible && !_items.Contains(item))
{
item.Parent = this;
item.AddReference(this);
_items.Add(item);
}
}
if (selection != null)
{
@@ -276,6 +281,8 @@ namespace FlaxEditor.Content.GUI
// Sort items depending on sortMethod parameter
_children.Sort(((control, control1) =>
{
if (control == null || control1 == null)
return 0;
if (sortType == SortType.AlphabeticReverse)
{
if (control.CompareTo(control1) > 0)
@@ -517,8 +524,8 @@ namespace FlaxEditor.Content.GUI
{
int min = _selection.Min(x => x.IndexInParent);
int max = _selection.Max(x => x.IndexInParent);
min = Mathf.Min(min, item.IndexInParent);
max = Mathf.Max(max, item.IndexInParent);
min = Mathf.Max(Mathf.Min(min, item.IndexInParent), 0);
max = Mathf.Min(Mathf.Max(max, item.IndexInParent), _children.Count - 1);
var selection = new List<ContentItem>(_selection);
for (int i = min; i <= max; i++)
{
@@ -711,7 +718,7 @@ namespace FlaxEditor.Content.GUI
protected override void PerformLayoutBeforeChildren()
{
float width = GetClientArea().Width;
float x = 0, y = 0;
float x = 0, y = 1;
float viewScale = _viewScale * 0.97f;
switch (ViewType)
@@ -722,21 +729,22 @@ namespace FlaxEditor.Content.GUI
int itemsToFit = Mathf.FloorToInt(width / defaultItemsWidth) - 1;
if (itemsToFit < 1)
itemsToFit = 1;
float itemsWidth = width / Mathf.Max(itemsToFit, 1);
int xSpace = 4;
float itemsWidth = width / Mathf.Max(itemsToFit, 1) - xSpace;
float itemsHeight = itemsWidth / defaultItemsWidth * (ContentItem.DefaultHeight * viewScale);
var flooredItemsWidth = Mathf.Floor(itemsWidth);
var flooredItemsHeight = Mathf.Floor(itemsHeight);
x = itemsToFit == 1 ? 0 : itemsWidth / itemsToFit;
x = itemsToFit == 1 ? 1 : itemsWidth / itemsToFit + xSpace;
for (int i = 0; i < _children.Count; i++)
{
var c = _children[i];
c.Bounds = new Rectangle(Mathf.Floor(x), Mathf.Floor(y), flooredItemsWidth, flooredItemsHeight);
x += itemsWidth + itemsWidth / itemsToFit;
x += (itemsWidth + xSpace) + (itemsWidth + xSpace) / itemsToFit;
if (x + itemsWidth > width)
{
x = itemsToFit == 1 ? 0 : itemsWidth / itemsToFit;
y += itemsHeight + 5;
x = itemsToFit == 1 ? 1 : itemsWidth / itemsToFit + xSpace;
y += itemsHeight + 7;
}
}
if (x > 0)
@@ -751,7 +759,7 @@ namespace FlaxEditor.Content.GUI
{
var c = _children[i];
c.Bounds = new Rectangle(x, y, width, itemsHeight);
y += itemsHeight + 5;
y += itemsHeight + 1;
}
y += 40.0f;
@@ -1,144 +1,52 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.Interop;
using FlaxEngine.Tools;
namespace FlaxEngine.Tools
{
partial class AudioTool
{
partial struct Options
{
private bool ShowBtiDepth => Format != AudioFormat.Vorbis;
}
}
}
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Custom editor for <see cref="FlaxEngine.Tools.AudioTool.Options"/>.
/// </summary>
[CustomEditor(typeof(FlaxEngine.Tools.AudioTool.Options)), DefaultEditor]
public class AudioToolOptionsEditor : GenericEditor
{
/// <inheritdoc />
protected override List<ItemInfo> GetItemsForType(ScriptType type)
{
// Show both fields and properties
return GetItemsForType(type, true, true);
}
}
}
namespace FlaxEditor.Content.Import
{
/// <summary>
/// Proxy object to present audio import settings in <see cref="ImportFilesDialog"/>.
/// </summary>
[HideInEditor]
public class AudioImportSettings
{
/// <summary>
/// A custom set of bit depth audio import sizes.
/// The settings data.
/// </summary>
public enum CustomBitDepth
{
/// <summary>
/// The 8.
/// </summary>
_8 = 8,
/// <summary>
/// The 16.
/// </summary>
_16 = 16,
/// <summary>
/// The 24.
/// </summary>
_24 = 24,
/// <summary>
/// The 32.
/// </summary>
_32 = 32,
}
/// <summary>
/// Converts the bit depth to enum.
/// </summary>
/// <param name="f">The bit depth.</param>
/// <returns>The converted enum.</returns>
public static CustomBitDepth ConvertBitDepth(int f)
{
FieldInfo[] fields = typeof(CustomBitDepth).GetFields();
for (int i = 0; i < fields.Length; i++)
{
var field = fields[i];
if (field.Name.Equals("value__"))
continue;
if (f == (int)field.GetRawConstantValue())
return (CustomBitDepth)f;
}
return CustomBitDepth._16;
}
/// <summary>
/// The audio data format to import the audio clip as.
/// </summary>
[EditorOrder(10), DefaultValue(AudioFormat.Vorbis), Tooltip("The audio data format to import the audio clip as.")]
public AudioFormat Format { get; set; } = AudioFormat.Vorbis;
/// <summary>
/// The audio data compression quality. Used only if target format is using compression. Value 0 means the smallest size, value 1 means the best quality.
/// </summary>
[EditorOrder(15), DefaultValue(0.4f), Limit(0, 1, 0.01f), Tooltip("The audio data compression quality. Used only if target format is using compression. Value 0 means the smallest size, value 1 means the best quality.")]
public float CompressionQuality { get; set; } = 0.4f;
/// <summary>
/// Disables dynamic audio streaming. The whole clip will be loaded into the memory. Useful for small clips (eg. gunfire sounds).
/// </summary>
[EditorOrder(20), DefaultValue(false), Tooltip("Disables dynamic audio streaming. The whole clip will be loaded into the memory. Useful for small clips (eg. gunfire sounds).")]
public bool DisableStreaming { get; set; } = false;
/// <summary>
/// Checks should the clip be played as spatial (3D) audio or as normal audio. 3D audio is stored in Mono format.
/// </summary>
[EditorOrder(30), DefaultValue(false), EditorDisplay(null, "Is 3D"), Tooltip("Checks should the clip be played as spatial (3D) audio or as normal audio. 3D audio is stored in Mono format.")]
public bool Is3D { get; set; } = false;
/// <summary>
/// The size of a single sample in bits. The clip will be converted to this bit depth on import.
/// </summary>
[EditorOrder(40), DefaultValue(CustomBitDepth._16), Tooltip("The size of a single sample in bits. The clip will be converted to this bit depth on import.")]
public CustomBitDepth BitDepth { get; set; } = CustomBitDepth._16;
[StructLayout(LayoutKind.Sequential)]
internal struct InternalOptions
{
[MarshalAs(UnmanagedType.I1)]
public AudioFormat Format;
public byte DisableStreaming;
public byte Is3D;
public int BitDepth;
public float Quality;
}
internal void ToInternal(out InternalOptions options)
{
options = new InternalOptions
{
Format = Format,
DisableStreaming = (byte)(DisableStreaming ? 1 : 0),
Is3D = (byte)(Is3D ? 1 : 0),
Quality = CompressionQuality,
BitDepth = (int)BitDepth,
};
}
internal void FromInternal(ref InternalOptions options)
{
Format = options.Format;
DisableStreaming = options.DisableStreaming != 0;
Is3D = options.Is3D != 0;
CompressionQuality = options.Quality;
BitDepth = ConvertBitDepth(options.BitDepth);
}
/// <summary>
/// Tries the restore the asset import options from the target resource file.
/// </summary>
/// <param name="options">The options.</param>
/// <param name="assetPath">The asset path.</param>
/// <returns>True settings has been restored, otherwise false.</returns>
public static bool TryRestore(ref AudioImportSettings options, string assetPath)
{
if (AudioImportEntry.Internal_GetAudioImportOptions(assetPath, out var internalOptions))
{
// Restore settings
options.FromInternal(ref internalOptions);
return true;
}
return false;
}
[EditorDisplay(null, EditorDisplayAttribute.InlineStyle)]
public AudioTool.Options Settings = AudioTool.Options.Default;
}
/// <summary>
@@ -147,7 +55,7 @@ namespace FlaxEditor.Content.Import
/// <seealso cref="AssetImportEntry" />
public partial class AudioImportEntry : AssetImportEntry
{
private AudioImportSettings _settings = new AudioImportSettings();
private AudioImportSettings _settings = new();
/// <summary>
/// Initializes a new instance of the <see cref="AudioImportEntry"/> class.
@@ -157,7 +65,7 @@ namespace FlaxEditor.Content.Import
: base(ref request)
{
// Try to restore target asset Audio import options (useful for fast reimport)
AudioImportSettings.TryRestore(ref _settings, ResultUrl);
Editor.TryRestoreImportOptions(ref _settings.Settings, ResultUrl);
}
/// <inheritdoc />
@@ -166,27 +74,23 @@ namespace FlaxEditor.Content.Import
/// <inheritdoc />
public override bool TryOverrideSettings(object settings)
{
if (settings is AudioImportSettings o)
if (settings is AudioImportSettings s)
{
_settings = o;
_settings.Settings = s.Settings;
return true;
}
if (settings is AudioTool.Options o)
{
_settings.Settings = o;
return true;
}
return false;
}
/// <inheritdoc />
public override bool Import()
{
return Editor.Import(SourceUrl, ResultUrl, _settings);
return Editor.Import(SourceUrl, ResultUrl, _settings.Settings);
}
#region Internal Calls
[LibraryImport("FlaxEngine", EntryPoint = "AudioImportEntryInternal_GetAudioImportOptions", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(StringMarshaller))]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool Internal_GetAudioImportOptions(string path, out AudioImportSettings.InternalOptions result);
#endregion
}
}
@@ -139,7 +139,7 @@ namespace FlaxEditor.Content.Import
var menu = new ContextMenu();
menu.AddButton("Rename", OnRenameClicked);
menu.AddButton("Don't import", OnDontImportClicked);
menu.AddButton("Show in Explorer", OnShowInExplorerClicked);
menu.AddButton(Utilities.Constants.ShowInExplorer, OnShowInExplorerClicked);
menu.Tag = node;
menu.Show(node, location);
}
+79 -15
View File
@@ -323,8 +323,6 @@ namespace FlaxEditor.Content
/// <param name="value">The new path.</param>
internal virtual void UpdatePath(string value)
{
Assert.AreNotEqual(Path, value);
// Set path
Path = StringUtils.NormalizePath(value);
FileName = System.IO.Path.GetFileName(value);
@@ -441,6 +439,9 @@ namespace FlaxEditor.Content
{
get
{
// Skip when hidden
if (!Visible)
return Rectangle.Empty;
var view = Parent as ContentView;
var size = Size;
switch (view?.ViewType ?? ContentViewType.Tiles)
@@ -484,6 +485,30 @@ namespace FlaxEditor.Content
Render2D.FillRectangle(rectangle, Color.Black);
}
/// <summary>
/// Draws the item thumbnail.
/// </summary>
/// <param name="rectangle">The thumbnail rectangle.</param>
/// /// <param name="shadow">Whether or not to draw the shadow. Overrides DrawShadow.</param>
public void DrawThumbnail(ref Rectangle rectangle, bool shadow)
{
// Draw shadow
if (shadow)
{
const float thumbnailInShadowSize = 50.0f;
var shadowRect = rectangle.MakeExpanded((DefaultThumbnailSize - thumbnailInShadowSize) * rectangle.Width / DefaultThumbnailSize * 1.3f);
if (!_shadowIcon.IsValid)
_shadowIcon = Editor.Instance.Icons.AssetShadow128;
Render2D.DrawSprite(_shadowIcon, shadowRect);
}
// Draw thumbnail
if (_thumbnail.IsValid)
Render2D.DrawSprite(_thumbnail, rectangle);
else
Render2D.FillRectangle(rectangle, Color.Black);
}
/// <summary>
/// Gets the amount of references to that item.
/// </summary>
@@ -642,7 +667,6 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override void Draw()
{
// Cache data
var size = Size;
var style = Style.Current;
var view = Parent as ContentView;
@@ -655,9 +679,51 @@ namespace FlaxEditor.Content
{
case ContentViewType.Tiles:
{
var thumbnailSize = size.X - 2 * DefaultMarginSize;
thumbnailRect = new Rectangle(DefaultMarginSize, DefaultMarginSize, thumbnailSize, thumbnailSize);
var thumbnailSize = size.X;
thumbnailRect = new Rectangle(0, 0, thumbnailSize, thumbnailSize);
nameAlignment = TextAlignment.Center;
if (this is ContentFolder)
{
// Small shadow
var shadowRect = new Rectangle(2, 2, clientRect.Width + 1, clientRect.Height + 1);
var color = Color.Black.AlphaMultiplied(0.2f);
Render2D.FillRectangle(shadowRect, color);
Render2D.FillRectangle(clientRect, style.Background.RGBMultiplied(1.25f));
if (isSelected)
Render2D.FillRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
DrawThumbnail(ref thumbnailRect, false);
}
else
{
// Small shadow
var shadowRect = new Rectangle(2, 2, clientRect.Width + 1, clientRect.Height + 1);
var color = Color.Black.AlphaMultiplied(0.2f);
Render2D.FillRectangle(shadowRect, color);
Render2D.FillRectangle(clientRect, style.Background.RGBMultiplied(1.25f));
Render2D.FillRectangle(TextRectangle, style.LightBackground);
var accentHeight = 2 * view.ViewScale;
var barRect = new Rectangle(0, thumbnailRect.Height - accentHeight, clientRect.Width, accentHeight);
Render2D.FillRectangle(barRect, Color.DimGray);
DrawThumbnail(ref thumbnailRect, false);
if (isSelected)
{
Render2D.FillRectangle(textRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
Render2D.DrawRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
}
else if (IsMouseOver)
{
Render2D.FillRectangle(textRect, style.BackgroundHighlighted);
Render2D.DrawRectangle(clientRect, style.BackgroundHighlighted);
}
}
break;
}
case ContentViewType.List:
@@ -665,23 +731,21 @@ namespace FlaxEditor.Content
var thumbnailSize = size.Y - 2 * DefaultMarginSize;
thumbnailRect = new Rectangle(DefaultMarginSize, DefaultMarginSize, thumbnailSize, thumbnailSize);
nameAlignment = TextAlignment.Near;
if (isSelected)
Render2D.FillRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
DrawThumbnail(ref thumbnailRect);
break;
}
default: throw new ArgumentOutOfRangeException();
}
// Draw background
if (isSelected)
Render2D.FillRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
// Draw preview
DrawThumbnail(ref thumbnailRect);
// Draw short name
Render2D.PushClip(ref textRect);
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 0.75f, 0.95f);
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 1f, 0.95f);
Render2D.PopClip();
}
+1 -1
View File
@@ -30,7 +30,7 @@ namespace FlaxEditor.Content
ShowFileExtension = true;
}
private static string FilterScriptName(string input)
internal static string FilterScriptName(string input)
{
var length = input.Length;
var sb = new StringBuilder(length);
@@ -0,0 +1,66 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.IO;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.Content
{
/// <summary>
/// A <see cref="BehaviorTree"/> asset proxy object.
/// </summary>
/// <seealso cref="FlaxEditor.Content.BinaryAssetProxy" />
[ContentContextMenu("New/AI/Behavior Tree")]
public class BehaviorTreeProxy : BinaryAssetProxy
{
/// <inheritdoc />
public override string Name => "Behavior Tree";
/// <inheritdoc />
public override bool CanReimport(ContentItem item)
{
return true;
}
/// <inheritdoc />
public override EditorWindow Open(Editor editor, ContentItem item)
{
return new BehaviorTreeWindow(editor, item as BinaryAssetItem);
}
/// <inheritdoc />
public override Color AccentColor => Color.FromRGB(0x3256A8);
/// <inheritdoc />
public override Type AssetType => typeof(BehaviorTree);
/// <inheritdoc />
public override bool CanCreate(ContentFolder targetLocation)
{
return targetLocation.CanHaveAssets;
}
/// <inheritdoc />
public override void Create(string outputPath, object arg)
{
if (Editor.CreateAsset(Editor.NewAssetType.BehaviorTree, outputPath))
throw new Exception("Failed to create new asset.");
}
/// <inheritdoc />
public override void OnThumbnailDrawBegin(ThumbnailRequest request, ContainerControl guiRoot, GPUContext context)
{
guiRoot.AddChild(new Label
{
Text = Path.GetFileNameWithoutExtension(request.Asset.Path),
Offsets = Margin.Zero,
AnchorPreset = AnchorPresets.StretchAll,
Wrapping = TextWrapping.WrapWords
});
}
}
}
@@ -54,12 +54,7 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request)
{
if (!_preview.HasLoadedAssets)
return false;
// Check if all mip maps are streamed
var asset = (CubeTexture)request.Asset;
return asset.ResidentMipLevels >= Mathf.Max(1, (int)(asset.MipLevels * ThumbnailsModule.MinimumRequiredResourcesQuality));
return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((CubeTexture)request.Asset);
}
/// <inheritdoc />
@@ -62,7 +62,7 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request)
{
return _preview.HasLoadedAssets;
return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((MaterialInstance)request.Asset);
}
/// <inheritdoc />
+1 -1
View File
@@ -106,7 +106,7 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request)
{
return _preview.HasLoadedAssets;
return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((Material)request.Asset);
}
/// <inheritdoc />
+1 -6
View File
@@ -82,12 +82,7 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request)
{
if (!_preview.HasLoadedAssets)
return false;
// Check if asset is streamed enough
var asset = (Model)request.Asset;
return asset.LoadedLODs >= Mathf.Max(1, (int)(asset.LODs.Length * ThumbnailsModule.MinimumRequiredResourcesQuality));
return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((Model)request.Asset);
}
/// <inheritdoc />
@@ -30,6 +30,12 @@ namespace FlaxEditor.Content
return item is SceneItem;
}
/// <inheritdoc />
public override bool AcceptsAsset(string typeName, string path)
{
return (typeName == Scene.AssetTypename || typeName == Scene.EditorPickerTypename) && path.EndsWith(FileExtension, StringComparison.OrdinalIgnoreCase);
}
/// <inheritdoc />
public override bool CanCreate(ContentFolder targetLocation)
{
+1 -1
View File
@@ -29,7 +29,7 @@ namespace FlaxEditor.Content
if (asset)
{
var source = Editor.GetShaderSourceCode(asset);
Utilities.Utils.ShowSourceCodeWindow(source, "Shader Source", item.RootWindow.Window);
Utilities.Utils.ShowSourceCodeWindow(source, "Shader Source", item.RootWindow?.Window);
}
return null;
}
@@ -54,15 +54,7 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request)
{
if (!_preview.HasLoadedAssets)
return false;
// Check if asset is streamed enough
var asset = (SkinnedModel)request.Asset;
var lods = asset.LODs.Length;
if (asset.IsLoaded && lods == 0)
return true; // Skeleton-only model
return asset.LoadedLODs >= Mathf.Max(1, (int)(lods * ThumbnailsModule.MinimumRequiredResourcesQuality));
return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((SkinnedModel)request.Asset);
}
/// <inheritdoc />
+1 -5
View File
@@ -57,11 +57,7 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request)
{
// Check if asset is streamed enough
var asset = (Texture)request.Asset;
var mipLevels = asset.MipLevels;
var minMipLevels = Mathf.Min(mipLevels, 7);
return asset.ResidentMipLevels >= Mathf.Max(minMipLevels, (int)(mipLevels * ThumbnailsModule.MinimumRequiredResourcesQuality));
return ThumbnailsModule.HasMinimumQuality((Texture)request.Asset);
}
/// <inheritdoc />
@@ -125,6 +125,74 @@ namespace FlaxEditor.Content.Thumbnails
}
}
internal static bool HasMinimumQuality(TextureBase asset)
{
var mipLevels = asset.MipLevels;
var minMipLevels = Mathf.Min(mipLevels, 7);
return asset.IsLoaded && asset.ResidentMipLevels >= Mathf.Max(minMipLevels, (int)(mipLevels * MinimumRequiredResourcesQuality));
}
internal static bool HasMinimumQuality(Model asset)
{
if (!asset.IsLoaded)
return false;
var lods = asset.LODs.Length;
var slots = asset.MaterialSlots;
foreach (var slot in slots)
{
if (slot.Material && !HasMinimumQuality(slot.Material))
return false;
}
return asset.LoadedLODs >= Mathf.Max(1, (int)(lods * MinimumRequiredResourcesQuality));
}
internal static bool HasMinimumQuality(SkinnedModel asset)
{
var lods = asset.LODs.Length;
if (asset.IsLoaded && lods == 0)
return true; // Skeleton-only model
var slots = asset.MaterialSlots;
foreach (var slot in slots)
{
if (slot.Material && !HasMinimumQuality(slot.Material))
return false;
}
return asset.LoadedLODs >= Mathf.Max(1, (int)(lods * MinimumRequiredResourcesQuality));
}
internal static bool HasMinimumQuality(MaterialBase asset)
{
if (asset is MaterialInstance asInstance)
return HasMinimumQuality(asInstance);
return HasMinimumQualityInternal(asset);
}
internal static bool HasMinimumQuality(Material asset)
{
return HasMinimumQualityInternal(asset);
}
internal static bool HasMinimumQuality(MaterialInstance asset)
{
if (!HasMinimumQualityInternal(asset))
return false;
var baseMaterial = asset.BaseMaterial;
return baseMaterial == null || HasMinimumQualityInternal(baseMaterial);
}
private static bool HasMinimumQualityInternal(MaterialBase asset)
{
if (!asset.IsLoaded)
return false;
var parameters = asset.Parameters;
foreach (var parameter in parameters)
{
if (parameter.Value is TextureBase asTexture && !HasMinimumQuality(asTexture))
return false;
}
return true;
}
#region IContentItemOwner
/// <inheritdoc />
@@ -338,18 +406,16 @@ namespace FlaxEditor.Content.Thumbnails
for (int i = 0; i < maxChecks; i++)
{
var request = _requests[i];
try
{
if (request.IsReady)
{
return request;
}
}
catch (Exception ex)
{
Editor.LogWarning(ex);
Editor.LogWarning($"Failed to prepare thumbnail rendering for {request.Item.ShortName}.");
Editor.LogWarning(ex);
_requests.RemoveAt(i--);
}
}
@@ -368,7 +434,6 @@ namespace FlaxEditor.Content.Thumbnails
// Create atlas
if (PreviewsCache.Create(path))
{
// Error
Editor.LogError("Failed to create thumbnails atlas.");
return null;
}
@@ -377,7 +442,6 @@ namespace FlaxEditor.Content.Thumbnails
var atlas = FlaxEngine.Content.LoadAsync<PreviewsCache>(path);
if (atlas == null)
{
// Error
Editor.LogError("Failed to load thumbnails atlas.");
return null;
}
@@ -449,7 +513,6 @@ namespace FlaxEditor.Content.Thumbnails
for (int i = 0; i < checks; i++)
{
var request = _requests[i];
try
{
if (request.IsReady)
@@ -463,8 +526,9 @@ namespace FlaxEditor.Content.Thumbnails
}
catch (Exception ex)
{
Editor.LogWarning(ex);
Editor.LogWarning($"Failed to prepare thumbnail rendering for {request.Item.ShortName}.");
Editor.LogWarning(ex);
_requests.RemoveAt(i--);
}
}
@@ -29,7 +29,7 @@ namespace FlaxEditor.Content
//_watcher.Changed += OnEvent;
_watcher.Created += OnEvent;
_watcher.Deleted += OnEvent;
//_watcher.Renamed += OnEvent;
_watcher.Renamed += OnEvent;
}
private void OnEvent(object sender, FileSystemEventArgs e)
@@ -17,6 +17,6 @@ namespace FlaxEditor.Content
}
/// <inheritdoc />
public override string NavButtonLabel => string.Empty;
public override string NavButtonLabel => " /";
}
}
@@ -104,4 +104,19 @@ bool LinuxPlatformTools::OnDeployBinaries(CookingData& data)
return false;
}
void LinuxPlatformTools::OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir)
{
// Pick the first executable file
Array<String> files;
FileSystem::DirectoryGetFiles(files, data.NativeCodeOutputPath, TEXT("*"), DirectorySearchOption::TopDirectoryOnly);
for (auto& file : files)
{
if (FileSystem::GetExtension(file).IsEmpty())
{
executableFile = file;
break;
}
}
}
#endif
@@ -20,6 +20,7 @@ public:
ArchitectureType GetArchitecture() const override;
bool UseSystemDotnet() const override;
bool OnDeployBinaries(CookingData& data) override;
void OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir) override;
};
#endif
@@ -5,6 +5,7 @@
#include "MacPlatformTools.h"
#include "Engine/Platform/File.h"
#include "Engine/Platform/FileSystem.h"
#include "Engine/Platform/CreateProcessSettings.h"
#include "Engine/Platform/Mac/MacPlatformSettings.h"
#include "Engine/Core/Config/GameSettings.h"
#include "Engine/Core/Config/BuildSettings.h"
@@ -16,7 +17,7 @@
#include "Editor/ProjectInfo.h"
#include "Editor/Cooker/GameCooker.h"
#include "Editor/Utilities/EditorUtilities.h"
#include <ThirdParty/pugixml/pugixml.hpp>
#include <ThirdParty/pugixml/pugixml_extra.hpp>
using namespace pugi;
IMPLEMENT_SETTINGS_GETTER(MacPlatformSettings, MacPlatform);
@@ -124,17 +125,35 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
LOG(Error, "Failed to export application icon.");
return true;
}
bool failed = Platform::RunProcess(TEXT("sips -z 16 16 icon_1024x1024.png --out icon_16x16.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 32 32 icon_1024x1024.png --out icon_16x16@2x.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 32 32 icon_1024x1024.png --out icon_32x32.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 64 64 icon_1024x1024.png --out icon_32x32@2x.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 128 128 icon_1024x1024.png --out icon_128x128.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 256 256 icon_1024x1024.png --out icon_128x128@2x.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 256 256 icon_1024x1024.png --out icon_256x256.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 512 512 icon_1024x1024.png --out icon_256x256@2x.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 512 512 icon_1024x1024.png --out icon_512x512.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("sips -z 1024 1024 icon_1024x1024.png --out icon_512x512@2x.png"), tmpFolderPath);
failed |= Platform::RunProcess(TEXT("iconutil -c icns icon.iconset"), iconFolderPath);
CreateProcessSettings procSettings;
procSettings.HiddenWindow = true;
procSettings.FileName = TEXT("/usr/bin/sips");
procSettings.WorkingDirectory = tmpFolderPath;
procSettings.Arguments = TEXT("-z 16 16 icon_1024x1024.png --out icon_16x16.png");
bool failed = false;
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 32 32 icon_1024x1024.png --out icon_16x16@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 32 32 icon_1024x1024.png --out icon_32x32.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 64 64 icon_1024x1024.png --out icon_32x32@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 128 128 icon_1024x1024.png --out icon_128x128.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 256 256 icon_1024x1024.png --out icon_128x128@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 256 256 icon_1024x1024.png --out icon_256x256.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 512 512 icon_1024x1024.png --out icon_256x256@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 512 512 icon_1024x1024.png --out icon_512x512.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 1024 1024 icon_1024x1024.png --out icon_512x512@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.FileName = TEXT("/usr/bin/iconutil");
procSettings.Arguments = TEXT("-c icns icon.iconset");
procSettings.WorkingDirectory = iconFolderPath;
failed |= Platform::CreateProcess(procSettings);
if (failed)
{
LOG(Error, "Failed to export application icon.");
@@ -151,17 +170,17 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
const String plistPath = data.DataOutputPath / TEXT("Info.plist");
{
xml_document doc;
xml_node plist = doc.child_or_append(PUGIXML_TEXT("plist"));
xml_node_extra plist = xml_node_extra(doc).child_or_append(PUGIXML_TEXT("plist"));
plist.append_attribute(PUGIXML_TEXT("version")).set_value(PUGIXML_TEXT("1.0"));
xml_node dict = plist.child_or_append(PUGIXML_TEXT("dict"));
xml_node_extra dict = plist.child_or_append(PUGIXML_TEXT("dict"));
#define ADD_ENTRY(key, value) \
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT(key)); \
dict.append_child(PUGIXML_TEXT("string")).set_child_value(PUGIXML_TEXT(value))
dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT(key)); \
dict.append_child_with_value(PUGIXML_TEXT("string"), PUGIXML_TEXT(value))
#define ADD_ENTRY_STR(key, value) \
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT(key)); \
dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT(key)); \
{ std::u16string valueStr(value.GetText()); \
dict.append_child(PUGIXML_TEXT("string")).set_child_value(pugi::string_t(valueStr.begin(), valueStr.end()).c_str()); }
dict.append_child_with_value(PUGIXML_TEXT("string"), pugi::string_t(valueStr.begin(), valueStr.end()).c_str()); }
ADD_ENTRY("CFBundleDevelopmentRegion", "English");
ADD_ENTRY("CFBundlePackageType", "APPL");
@@ -175,22 +194,22 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
ADD_ENTRY_STR("CFBundleVersion", projectVersion);
ADD_ENTRY_STR("NSHumanReadableCopyright", gameSettings->CopyrightNotice);
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("CFBundleSupportedPlatforms"));
xml_node CFBundleSupportedPlatforms = dict.append_child(PUGIXML_TEXT("array"));
CFBundleSupportedPlatforms.append_child(PUGIXML_TEXT("string")).set_child_value(PUGIXML_TEXT("MacOSX"));
dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("CFBundleSupportedPlatforms"));
xml_node_extra CFBundleSupportedPlatforms = dict.append_child(PUGIXML_TEXT("array"));
CFBundleSupportedPlatforms.append_child_with_value(PUGIXML_TEXT("string"), PUGIXML_TEXT("MacOSX"));
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("LSMinimumSystemVersionByArchitecture"));
xml_node LSMinimumSystemVersionByArchitecture = dict.append_child(PUGIXML_TEXT("dict"));
dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("LSMinimumSystemVersionByArchitecture"));
xml_node_extra LSMinimumSystemVersionByArchitecture = dict.append_child(PUGIXML_TEXT("dict"));
switch (_arch)
{
case ArchitectureType::x64:
LSMinimumSystemVersionByArchitecture.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("x86_64"));
LSMinimumSystemVersionByArchitecture.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("x86_64"));
break;
case ArchitectureType::ARM64:
LSMinimumSystemVersionByArchitecture.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("arm64"));
LSMinimumSystemVersionByArchitecture.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("arm64"));
break;
}
LSMinimumSystemVersionByArchitecture.append_child(PUGIXML_TEXT("string")).set_child_value(PUGIXML_TEXT("10.15"));
LSMinimumSystemVersionByArchitecture.append_child_with_value(PUGIXML_TEXT("string"), PUGIXML_TEXT("10.15"));
#undef ADD_ENTRY
#undef ADD_ENTRY_STR
@@ -210,18 +229,39 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
return false;
GameCooker::PackageFiles();
LOG(Info, "Building app package...");
const String dmgPath = data.OriginalOutputPath / appName + TEXT(".dmg");
const String dmgCommand = String::Format(TEXT("hdiutil create {0}.dmg -volname {0} -fs HFS+ -srcfolder {0}.app"), appName);
const int32 result = Platform::RunProcess(dmgCommand, data.OriginalOutputPath);
if (result != 0)
{
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
return true;
const String dmgPath = data.OriginalOutputPath / appName + TEXT(".dmg");
CreateProcessSettings procSettings;
procSettings.HiddenWindow = true;
procSettings.WorkingDirectory = data.OriginalOutputPath;
procSettings.FileName = TEXT("/usr/bin/hdiutil");
procSettings.Arguments = String::Format(TEXT("create {0}.dmg -volname {0} -fs HFS+ -srcfolder {0}.app"), appName);
const int32 result = Platform::CreateProcess(procSettings);
if (result != 0)
{
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
return true;
}
// TODO: sign dmg
LOG(Info, "Output application package: {0} (size: {1} MB)", dmgPath, FileSystem::GetFileSize(dmgPath) / 1024 / 1024);
}
// TODO: sign dmg
LOG(Info, "Output application package: {0} (size: {1} MB)", dmgPath, FileSystem::GetFileSize(dmgPath) / 1024 / 1024);
return false;
}
void MacPlatformTools::OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir)
{
// Pick the first executable file
Array<String> files;
FileSystem::DirectoryGetFiles(files, data.NativeCodeOutputPath, TEXT("*"), DirectorySearchOption::TopDirectoryOnly);
for (auto& file : files)
{
if (FileSystem::GetExtension(file).IsEmpty())
{
executableFile = file;
break;
}
}
}
#endif
@@ -27,6 +27,7 @@ public:
bool IsNativeCodeFile(CookingData& data, const String& file) override;
void OnBuildStarted(CookingData& data) override;
bool OnPostProcess(CookingData& data) override;
void OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir) override;
};
#endif
@@ -260,15 +260,20 @@ bool iOSPlatformTools::OnPostProcess(CookingData& data)
{
LOG(Info, "Building app package...");
const Char* configuration = data.Configuration == BuildConfiguration::Release ? TEXT("Release") : TEXT("Debug");
String command = String::Format(TEXT("xcodebuild -project FlaxGame.xcodeproj -configuration {} -scheme FlaxGame -archivePath FlaxGame.xcarchive archive"), configuration);
int32 result = Platform::RunProcess(command, data.OriginalOutputPath);
CreateProcessSettings procSettings;
procSettings.HiddenWindow = true;
procSettings.WorkingDirectory = data.OriginalOutputPath;
procSettings.FileName = TEXT("/usr/bin/xcodebuild");
procSettings.Arguments = String::Format(TEXT("-project FlaxGame.xcodeproj -configuration {} -scheme FlaxGame -archivePath FlaxGame.xcarchive archive"), configuration);
int32 result = Platform::CreateProcess(procSettings);
if (result != 0)
{
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
return true;
}
command = TEXT("xcodebuild -exportArchive -archivePath FlaxGame.xcarchive -allowProvisioningUpdates -exportPath . -exportOptionsPlist ExportOptions.plist");
result = Platform::RunProcess(command, data.OriginalOutputPath);
procSettings.FileName = TEXT("/usr/bin/xcodebuild");
procSettings.Arguments = TEXT("-exportArchive -archivePath FlaxGame.xcarchive -allowProvisioningUpdates -exportPath . -exportOptionsPlist ExportOptions.plist");
result = Platform::CreateProcess(procSettings);
if (result != 0)
{
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
@@ -131,7 +131,8 @@ bool DeployDataStep::Perform(CookingData& data)
if (FileSystem::DirectoryExists(dstDotnet))
{
String cachedData;
File::ReadAllText(dotnetCacheFilePath, cachedData);
if (FileSystem::FileExists(dotnetCacheFilePath))
File::ReadAllText(dotnetCacheFilePath, cachedData);
if (cachedData != dotnetCachedValue)
{
FileSystem::DeleteDirectory(dstDotnet);
@@ -360,7 +361,7 @@ bool DeployDataStep::Perform(CookingData& data)
data.AddRootEngineAsset(PRE_INTEGRATED_GF_ASSET_NAME);
data.AddRootEngineAsset(SMAA_AREA_TEX);
data.AddRootEngineAsset(SMAA_SEARCH_TEX);
if (data.Configuration != BuildConfiguration::Release)
if (!buildSettings.SkipDefaultFonts)
data.AddRootEngineAsset(TEXT("Editor/Fonts/Roboto-Regular"));
// Register custom assets (eg. plugins)
@@ -37,6 +37,23 @@ namespace FlaxEditor.CustomEditors
UseDefault = 1 << 2,
}
/// <summary>
/// The interface for Editor context that owns the presenter. Can be <see cref="FlaxEditor.Windows.PropertiesWindow"/> or <see cref="FlaxEditor.Windows.Assets.PrefabWindow"/> or other window/panel - custom editor scan use it for more specific features.
/// </summary>
public interface IPresenterOwner
{
/// <summary>
/// Gets the viewport linked with properties presenter (optional, null if unused).
/// </summary>
public Viewport.EditorViewport PresenterViewport { get; }
/// <summary>
/// Selects the scene objects.
/// </summary>
/// <param name="nodes">The nodes to select</param>
public void Select(List<SceneGraph.SceneGraphNode> nodes);
}
/// <summary>
/// Main class for Custom Editors used to present selected objects properties and allow to modify them.
/// </summary>
@@ -68,8 +85,15 @@ namespace FlaxEditor.CustomEditors
/// <inheritdoc />
public override void Update(float deltaTime)
{
// Update editors
_presenter.Update();
try
{
// Update editors
_presenter.Update();
}
catch (Exception ex)
{
FlaxEditor.Editor.LogWarning(ex);
}
base.Update(deltaTime);
}
@@ -254,7 +278,7 @@ namespace FlaxEditor.CustomEditors
/// <summary>
/// The Editor context that owns this presenter. Can be <see cref="FlaxEditor.Windows.PropertiesWindow"/> or <see cref="FlaxEditor.Windows.Assets.PrefabWindow"/> or other window/panel - custom editor scan use it for more specific features.
/// </summary>
public object Owner;
public IPresenterOwner Owner;
/// <summary>
/// Gets or sets the text to show when no object is selected.
@@ -270,7 +294,24 @@ namespace FlaxEditor.CustomEditors
}
}
/// <summary>
/// Gets or sets the value indicating whether properties are read-only.
/// </summary>
public bool ReadOnly
{
get => _readOnly;
set
{
if (_readOnly != value)
{
_readOnly = value;
UpdateReadOnly();
}
}
}
private bool _buildOnUpdate;
private bool _readOnly;
/// <summary>
/// Initializes a new instance of the <see cref="CustomEditorPresenter"/> class.
@@ -278,7 +319,7 @@ namespace FlaxEditor.CustomEditors
/// <param name="undo">The undo. It's optional.</param>
/// <param name="noSelectionText">The custom text to display when no object is selected. Default is No selection.</param>
/// <param name="owner">The owner of the presenter.</param>
public CustomEditorPresenter(Undo undo, string noSelectionText = null, object owner = null)
public CustomEditorPresenter(Undo undo, string noSelectionText = null, IPresenterOwner owner = null)
{
Undo = undo;
Owner = owner;
@@ -364,6 +405,8 @@ namespace FlaxEditor.CustomEditors
// Restore scroll value
if (parentScrollV > -1)
panel.VScrollBar.Value = parentScrollV;
if (_readOnly)
UpdateReadOnly();
}
/// <summary>
@@ -374,6 +417,16 @@ namespace FlaxEditor.CustomEditors
_buildOnUpdate = true;
}
private void UpdateReadOnly()
{
// Only scrollbars are enabled
foreach (var child in Panel.Children)
{
if (!(child is ScrollBar))
child.Enabled = !_readOnly;
}
}
private void ExpandGroups(LayoutElementsContainer c, bool open)
{
if (c is Elements.GroupElement group)
@@ -0,0 +1,97 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.Gizmo;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Json;
using FlaxEngine.Tools;
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Custom editor for <see cref="Cloth"/>.
/// </summary>
/// <seealso cref="ActorEditor" />
[CustomEditor(typeof(Cloth)), DefaultEditor]
class ClothEditor : ActorEditor
{
private ClothPaintingGizmoMode _gizmoMode;
private Viewport.Modes.EditorGizmoMode _prevMode;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
base.Initialize(layout);
if (Values.Count != 1)
return;
// Add gizmo painting mode to the viewport
var owner = Presenter.Owner;
if (owner == null)
return;
var gizmoOwner = owner as IGizmoOwner ?? owner.PresenterViewport as IGizmoOwner;
if (gizmoOwner == null)
return;
var gizmos = gizmoOwner.Gizmos;
_gizmoMode = new ClothPaintingGizmoMode();
var projectCache = Editor.Instance.ProjectCache;
if (projectCache.TryGetCustomData("ClothGizmoPaintValue", out var cachedPaintValue))
_gizmoMode.PaintValue = JsonSerializer.Deserialize<float>(cachedPaintValue);
if (projectCache.TryGetCustomData("ClothGizmoContinuousPaint", out var cachedContinuousPaint))
_gizmoMode.ContinuousPaint = JsonSerializer.Deserialize<bool>(cachedContinuousPaint);
if (projectCache.TryGetCustomData("ClothGizmoBrushFalloff", out var cachedBrushFalloff))
_gizmoMode.BrushFalloff = JsonSerializer.Deserialize<float>(cachedBrushFalloff);
if (projectCache.TryGetCustomData("ClothGizmoBrushSize", out var cachedBrushSize))
_gizmoMode.BrushSize = JsonSerializer.Deserialize<float>(cachedBrushSize);
if (projectCache.TryGetCustomData("ClothGizmoBrushStrength", out var cachedBrushStrength))
_gizmoMode.BrushStrength = JsonSerializer.Deserialize<float>(cachedBrushStrength);
gizmos.AddMode(_gizmoMode);
_prevMode = gizmos.ActiveMode;
gizmos.ActiveMode = _gizmoMode;
_gizmoMode.Gizmo.SetPaintCloth((Cloth)Values[0]);
// Insert gizmo mode options to properties editing
var paintGroup = layout.Group("Cloth Painting");
var paintValue = new ReadOnlyValueContainer(new ScriptType(typeof(ClothPaintingGizmoMode)), _gizmoMode);
paintGroup.Object(paintValue);
{
var grid = paintGroup.CustomContainer<UniformGridPanel>();
var gridControl = grid.CustomControl;
gridControl.ClipChildren = false;
gridControl.Height = Button.DefaultHeight;
gridControl.SlotsHorizontally = 2;
gridControl.SlotsVertically = 1;
grid.Button("Fill", "Fills the cloth particles with given paint value.").Button.Clicked += _gizmoMode.Gizmo.Fill;
grid.Button("Reset", "Clears the cloth particles paint.").Button.Clicked += _gizmoMode.Gizmo.Reset;
}
}
/// <inheritdoc />
protected override void Deinitialize()
{
// Cleanup gizmos
if (_gizmoMode != null)
{
var gizmos = _gizmoMode.Owner.Gizmos;
if (gizmos.ActiveMode == _gizmoMode)
gizmos.ActiveMode = _prevMode;
gizmos.RemoveMode(_gizmoMode);
var projectCache = Editor.Instance.ProjectCache;
projectCache.SetCustomData("ClothGizmoPaintValue", JsonSerializer.Serialize(_gizmoMode.PaintValue, typeof(float)));
projectCache.SetCustomData("ClothGizmoContinuousPaint", JsonSerializer.Serialize(_gizmoMode.ContinuousPaint, typeof(bool)));
projectCache.SetCustomData("ClothGizmoBrushFalloff", JsonSerializer.Serialize(_gizmoMode.BrushFalloff, typeof(float)));
projectCache.SetCustomData("ClothGizmoBrushSize", JsonSerializer.Serialize(_gizmoMode.BrushSize, typeof(float)));
projectCache.SetCustomData("ClothGizmoBrushStrength", JsonSerializer.Serialize(_gizmoMode.BrushStrength, typeof(float)));
_gizmoMode.Dispose();
_gizmoMode = null;
}
_prevMode = null;
base.Deinitialize();
}
}
}
@@ -0,0 +1,336 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.IO;
using System.Linq;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Custom editor for <see cref="ModelInstanceActor.MeshReference"/>.
/// </summary>
/// <seealso cref="ActorEditor" />
[CustomEditor(typeof(ModelInstanceActor.MeshReference)), DefaultEditor]
public class MeshReferenceEditor : CustomEditor
{
private class MeshRefPickerControl : Control
{
private ModelInstanceActor.MeshReference _value = new ModelInstanceActor.MeshReference { LODIndex = -1, MeshIndex = -1 };
private string _valueName;
private Float2 _mousePos;
public string[][] MeshNames;
public event Action ValueChanged;
public ModelInstanceActor.MeshReference Value
{
get => _value;
set
{
if (_value.LODIndex == value.LODIndex && _value.MeshIndex == value.MeshIndex)
return;
_value = value;
if (value.LODIndex == -1 || value.MeshIndex == -1)
_valueName = null;
else if (MeshNames.Length == 1)
_valueName = MeshNames[value.LODIndex][value.MeshIndex];
else
_valueName = $"LOD{value.LODIndex} - {MeshNames[value.LODIndex][value.MeshIndex]}";
ValueChanged?.Invoke();
}
}
public MeshRefPickerControl()
: base(0, 0, 50, 16)
{
}
private void ShowDropDownMenu()
{
// Show context menu with tree structure of LODs and meshes
Focus();
var cm = new ItemsListContextMenu(200);
var meshNames = MeshNames;
var actor = _value.Actor;
for (int lodIndex = 0; lodIndex < meshNames.Length; lodIndex++)
{
var item = new ItemsListContextMenu.Item
{
Name = "LOD" + lodIndex,
Tag = new ModelInstanceActor.MeshReference { Actor = actor, LODIndex = lodIndex, MeshIndex = 0 },
TintColor = new Color(0.8f, 0.8f, 1.0f, 0.8f),
};
cm.AddItem(item);
for (int meshIndex = 0; meshIndex < meshNames[lodIndex].Length; meshIndex++)
{
item = new ItemsListContextMenu.Item
{
Name = " " + meshNames[lodIndex][meshIndex],
Tag = new ModelInstanceActor.MeshReference { Actor = actor, LODIndex = lodIndex, MeshIndex = meshIndex },
};
if (_value.LODIndex == lodIndex && _value.MeshIndex == meshIndex)
item.BackgroundColor = FlaxEngine.GUI.Style.Current.BackgroundSelected;
cm.AddItem(item);
}
}
cm.ItemClicked += item => Value = (ModelInstanceActor.MeshReference)item.Tag;
cm.Show(Parent, BottomLeft);
}
/// <inheritdoc />
public override void Draw()
{
base.Draw();
// Cache data
var style = FlaxEngine.GUI.Style.Current;
bool isSelected = _valueName != null;
bool isEnabled = EnabledInHierarchy;
var frameRect = new Rectangle(0, 0, Width, 16);
if (isSelected)
frameRect.Width -= 16;
frameRect.Width -= 16;
var nameRect = new Rectangle(2, 1, frameRect.Width - 4, 14);
var button1Rect = new Rectangle(nameRect.Right + 2, 1, 14, 14);
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Draw frame
Render2D.DrawRectangle(frameRect, isEnabled && (IsMouseOver || IsNavFocused) ? style.BorderHighlighted : style.BorderNormal);
// Check if has item selected
if (isSelected)
{
// Draw name
Render2D.PushClip(nameRect);
Render2D.DrawText(style.FontMedium, _valueName, nameRect, isEnabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Near, TextAlignment.Center);
Render2D.PopClip();
// Draw deselect button
Render2D.DrawSprite(style.Cross, button1Rect, isEnabled && button1Rect.Contains(_mousePos) ? style.Foreground : style.ForegroundGrey);
}
else
{
// Draw info
Render2D.DrawText(style.FontMedium, "-", nameRect, isEnabled ? Color.OrangeRed : Color.DarkOrange, TextAlignment.Near, TextAlignment.Center);
}
// Draw picker button
var pickerRect = isSelected ? button2Rect : button1Rect;
Render2D.DrawSprite(style.ArrowDown, pickerRect, isEnabled && pickerRect.Contains(_mousePos) ? style.Foreground : style.ForegroundGrey);
}
/// <inheritdoc />
public override void OnMouseEnter(Float2 location)
{
_mousePos = location;
base.OnMouseEnter(location);
}
/// <inheritdoc />
public override void OnMouseLeave()
{
_mousePos = Float2.Minimum;
base.OnMouseLeave();
}
/// <inheritdoc />
public override void OnMouseMove(Float2 location)
{
_mousePos = location;
base.OnMouseMove(location);
}
/// <inheritdoc />
public override bool OnMouseUp(Float2 location, MouseButton button)
{
// Cache data
bool isSelected = _valueName != null;
var frameRect = new Rectangle(0, 0, Width, 16);
if (isSelected)
frameRect.Width -= 16;
frameRect.Width -= 16;
var nameRect = new Rectangle(2, 1, frameRect.Width - 4, 14);
var button1Rect = new Rectangle(nameRect.Right + 2, 1, 14, 14);
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Deselect
if (isSelected && button1Rect.Contains(ref location))
Value = new ModelInstanceActor.MeshReference { Actor = null, LODIndex = -1, MeshIndex = -1 };
// Picker dropdown menu
if ((isSelected ? button2Rect : button1Rect).Contains(ref location))
ShowDropDownMenu();
return base.OnMouseUp(location, button);
}
/// <inheritdoc />
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
{
Focus();
// Open model editor window
if (_value.Actor is StaticModel staticModel)
Editor.Instance.ContentEditing.Open(staticModel.Model);
else if (_value.Actor is AnimatedModel animatedModel)
Editor.Instance.ContentEditing.Open(animatedModel.SkinnedModel);
return base.OnMouseDoubleClick(location, button);
}
/// <inheritdoc />
public override void OnSubmit()
{
base.OnSubmit();
ShowDropDownMenu();
}
/// <inheritdoc />
public override void OnDestroy()
{
MeshNames = null;
_valueName = null;
base.OnDestroy();
}
}
private ModelInstanceActor _actor;
private CustomElement<FlaxObjectRefPickerControl> _actorPicker;
private CustomElement<MeshRefPickerControl> _meshPicker;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
// Get the context actor to pick the mesh from it
if (GetActor(out var actor))
{
// TODO: support editing multiple values
layout.Label("Different values");
return;
}
_actor = actor;
var showActorPicker = actor == null || ParentEditor.Values.All(x => x is not Cloth);
if (showActorPicker)
{
// Actor reference picker
_actorPicker = layout.Custom<FlaxObjectRefPickerControl>();
_actorPicker.CustomControl.Type = new ScriptType(typeof(ModelInstanceActor));
_actorPicker.CustomControl.ValueChanged += () => SetValue(new ModelInstanceActor.MeshReference { Actor = (ModelInstanceActor)_actorPicker.CustomControl.Value });
}
if (actor != null)
{
// Get mesh names hierarchy
string[][] meshNames;
if (actor is StaticModel staticModel)
{
var model = staticModel.Model;
if (model == null || model.WaitForLoaded())
return;
var materials = model.MaterialSlots;
var lods = model.LODs;
meshNames = new string[lods.Length][];
for (int lodIndex = 0; lodIndex < lods.Length; lodIndex++)
{
var lodMeshes = lods[lodIndex].Meshes;
meshNames[lodIndex] = new string[lodMeshes.Length];
for (int meshIndex = 0; meshIndex < lodMeshes.Length; meshIndex++)
{
var mesh = lodMeshes[meshIndex];
var materialName = materials[mesh.MaterialSlotIndex].Name;
if (string.IsNullOrEmpty(materialName) && materials[mesh.MaterialSlotIndex].Material)
materialName = Path.GetFileNameWithoutExtension(materials[mesh.MaterialSlotIndex].Material.Path);
if (string.IsNullOrEmpty(materialName))
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex}";
else
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex} ({materialName})";
}
}
}
else if (actor is AnimatedModel animatedModel)
{
var skinnedModel = animatedModel.SkinnedModel;
if (skinnedModel == null || skinnedModel.WaitForLoaded())
return;
var materials = skinnedModel.MaterialSlots;
var lods = skinnedModel.LODs;
meshNames = new string[lods.Length][];
for (int lodIndex = 0; lodIndex < lods.Length; lodIndex++)
{
var lodMeshes = lods[lodIndex].Meshes;
meshNames[lodIndex] = new string[lodMeshes.Length];
for (int meshIndex = 0; meshIndex < lodMeshes.Length; meshIndex++)
{
var mesh = lodMeshes[meshIndex];
var materialName = materials[mesh.MaterialSlotIndex].Name;
if (string.IsNullOrEmpty(materialName) && materials[mesh.MaterialSlotIndex].Material)
materialName = Path.GetFileNameWithoutExtension(materials[mesh.MaterialSlotIndex].Material.Path);
if (string.IsNullOrEmpty(materialName))
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex}";
else
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex} ({materialName})";
}
}
}
else
return; // Not supported model type
// Mesh reference picker
_meshPicker = layout.Custom<MeshRefPickerControl>();
_meshPicker.CustomControl.MeshNames = meshNames;
_meshPicker.CustomControl.Value = (ModelInstanceActor.MeshReference)Values[0];
_meshPicker.CustomControl.ValueChanged += () => SetValue(_meshPicker.CustomControl.Value);
}
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
if (_actorPicker != null)
{
GetActor(out var actor);
_actorPicker.CustomControl.Value = actor;
if (actor != _actor)
{
RebuildLayout();
return;
}
}
if (_meshPicker != null)
{
_meshPicker.CustomControl.Value = (ModelInstanceActor.MeshReference)Values[0];
}
}
private bool GetActor(out ModelInstanceActor actor)
{
actor = null;
foreach (ModelInstanceActor.MeshReference value in Values)
{
if (actor == null)
actor = value.Actor;
else if (actor != value.Actor)
return true;
}
return false;
}
}
}
@@ -0,0 +1,165 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.Actions;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using System.Collections.Generic;
namespace FlaxEditor.CustomEditors.Dedicated;
/// <summary>
/// The missing script editor.
/// </summary>
[CustomEditor(typeof(MissingScript)), DefaultEditor]
public class MissingScriptEditor : GenericEditor
{
private DropPanel _dropPanel;
private Button _replaceScriptButton;
private CheckBox _shouldReplaceAllCheckbox;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
if (layout.ContainerControl is not DropPanel dropPanel)
{
base.Initialize(layout);
return;
}
_dropPanel = dropPanel;
_dropPanel.HeaderTextColor = Color.OrangeRed;
var replaceScriptPanel = new Panel
{
Parent = _dropPanel,
Height = 64,
};
_replaceScriptButton = new Button
{
Text = "Replace Script",
TooltipText = "Replaces the missing script with a given script type",
AnchorPreset = AnchorPresets.TopCenter,
Width = 240,
Height = 24,
X = -120,
Y = 0,
Parent = replaceScriptPanel,
};
_replaceScriptButton.Clicked += OnReplaceScriptButtonClicked;
var replaceAllLabel = new Label
{
Text = "Replace all matching missing scripts",
TooltipText = "Whether or not to apply this script change to all scripts missing the same type.",
AnchorPreset = AnchorPresets.BottomCenter,
Y = -34,
Parent = replaceScriptPanel,
};
replaceAllLabel.X -= FlaxEngine.GUI.Style.Current.FontSmall.MeasureText(replaceAllLabel.Text).X;
_shouldReplaceAllCheckbox = new CheckBox
{
TooltipText = replaceAllLabel.TooltipText,
AnchorPreset = AnchorPresets.BottomCenter,
Y = -34,
Parent = replaceScriptPanel,
};
float centerDifference = (_shouldReplaceAllCheckbox.Right - replaceAllLabel.Left) / 2;
replaceAllLabel.X += centerDifference;
_shouldReplaceAllCheckbox.X += centerDifference;
base.Initialize(layout);
}
private void FindActorsWithMatchingMissingScript(List<MissingScript> missingScripts)
{
foreach (Actor actor in Level.GetActors(typeof(Actor)))
{
for (int scriptIndex = 0; scriptIndex < actor.ScriptsCount; scriptIndex++)
{
Script actorScript = actor.Scripts[scriptIndex];
if (actorScript is not MissingScript missingActorScript)
continue;
MissingScript currentMissing = Values[0] as MissingScript;
if (missingActorScript.MissingTypeName != currentMissing.MissingTypeName)
continue;
missingScripts.Add(missingActorScript);
}
}
}
private void RunReplacementMultiCast(List<IUndoAction> actions)
{
if (actions.Count == 0)
{
Editor.LogWarning("Failed to replace scripts!");
return;
}
var multiAction = new MultiUndoAction(actions);
multiAction.Do();
var presenter = ParentEditor.Presenter;
if (presenter != null)
{
presenter.Undo.AddAction(multiAction);
presenter.Control.Focus();
}
}
private void ReplaceScript(ScriptType script, bool replaceAllInScene)
{
var actions = new List<IUndoAction>(4);
var missingScripts = new List<MissingScript>();
if (!replaceAllInScene)
missingScripts.Add((MissingScript)Values[0]);
else
FindActorsWithMatchingMissingScript(missingScripts);
foreach (var missingScript in missingScripts)
actions.Add(AddRemoveScript.Add(missingScript.Actor, script));
RunReplacementMultiCast(actions);
for (int actionIdx = 0; actionIdx < actions.Count; actionIdx++)
{
AddRemoveScript addRemoveScriptAction = (AddRemoveScript)actions[actionIdx];
int orderInParent = addRemoveScriptAction.GetOrderInParent();
Script newScript = missingScripts[actionIdx].Actor.Scripts[orderInParent];
missingScripts[actionIdx].ReferenceScript = newScript;
}
actions.Clear();
foreach (var missingScript in missingScripts)
actions.Add(AddRemoveScript.Remove(missingScript));
RunReplacementMultiCast(actions);
}
private void OnReplaceScriptButtonClicked()
{
var scripts = Editor.Instance.CodeEditing.Scripts.Get();
if (scripts.Count == 0)
{
// No scripts
var cm1 = new ContextMenu();
cm1.AddButton("No scripts in project");
cm1.Show(_dropPanel, _replaceScriptButton.BottomLeft);
return;
}
// Show context menu with list of scripts to add
var cm = new ItemsListContextMenu(180);
for (int i = 0; i < scripts.Count; i++)
cm.AddItem(new TypeSearchPopup.TypeItemView(scripts[i]));
cm.ItemClicked += item => ReplaceScript((ScriptType)item.Tag, _shouldReplaceAllCheckbox.Checked);
cm.SortItems();
cm.Show(_dropPanel, _replaceScriptButton.BottomLeft - new Float2((cm.Width - _replaceScriptButton.Width) / 2, 0));
}
}
@@ -25,9 +25,20 @@ namespace FlaxEditor.CustomEditors.Dedicated
get
{
// All selected particle effects use the same system
var effect = (ParticleEffect)Values[0];
var system = effect.ParticleSystem;
return system != null && Values.TrueForAll(x => (x as ParticleEffect)?.ParticleSystem == system);
var effect = Values[0] as ParticleEffect;
var system = effect ? effect.ParticleSystem : null;
if (system && Values.TrueForAll(x => x is ParticleEffect fx && fx && fx.ParticleSystem == system))
{
// All parameters can be accessed
var parameters = effect.Parameters;
foreach (var parameter in parameters)
{
if (!parameter)
return false;
}
return true;
}
return false;
}
}
@@ -50,7 +50,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
grid.Button("Remove bone").Button.ButtonClicked += OnRemoveBone;
}
if (Presenter.Owner is Windows.PropertiesWindow || Presenter.Owner is Windows.Assets.PrefabWindow)
if (Presenter.Owner != null)
{
// Selection
var grid = editorGroup.CustomContainer<UniformGridPanel>();
@@ -309,10 +309,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
if (node != null)
selection.Add(node);
}
if (Presenter.Owner is Windows.PropertiesWindow propertiesWindow)
propertiesWindow.Editor.SceneEditing.Select(selection);
else if (Presenter.Owner is Windows.Assets.PrefabWindow prefabWindow)
prefabWindow.Select(selection);
Presenter.Owner.Select(selection);
}
}
}
@@ -25,6 +25,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
private DragHandlers _dragHandlers;
private DragScriptItems _dragScripts;
private DragAssets _dragAssets;
private Button _addScriptsButton;
/// <summary>
/// The parent scripts editor.
@@ -40,16 +41,19 @@ namespace FlaxEditor.CustomEditors.Dedicated
AutoFocus = false;
// Add script button
float addScriptButtonWidth = 60.0f;
var addScriptButton = new Button
var buttonText = "Add script";
var textSize = Style.Current.FontMedium.MeasureText(buttonText);
float addScriptButtonWidth = (textSize.X < 60.0f) ? 60.0f : textSize.X + 4;
var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4;
_addScriptsButton = new Button
{
TooltipText = "Add new scripts to the actor",
AnchorPreset = AnchorPresets.MiddleCenter,
Text = "Add script",
Text = buttonText,
Parent = this,
Bounds = new Rectangle((Width - addScriptButtonWidth) / 2, 1, addScriptButtonWidth, 18),
Bounds = new Rectangle((Width - addScriptButtonWidth) / 2, 1, addScriptButtonWidth, buttonHeight),
};
addScriptButton.ButtonClicked += OnAddScriptButtonClicked;
_addScriptsButton.ButtonClicked += OnAddScriptButtonClicked;
}
private void OnAddScriptButtonClicked(Button button)
@@ -82,7 +86,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var size = Size;
// Info
Render2D.DrawText(style.FontSmall, "Drag scripts here", new Rectangle(2, 22, size.X - 4, size.Y - 4 - 20), style.ForegroundDisabled, TextAlignment.Center, TextAlignment.Center);
Render2D.DrawText(style.FontSmall, "Drag scripts here", new Rectangle(2, _addScriptsButton.Height + 4, size.X - 4, size.Y - 4 - 20), style.ForegroundDisabled, TextAlignment.Center, TextAlignment.Center);
// Check if drag is over
if (IsDragOver && _dragHandlers != null && _dragHandlers.HasValidDrag)
@@ -254,27 +258,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// Small image control added per script group that allows to drag and drop a reference to it. Also used to reorder the scripts.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.Image" />
internal class ScriptDragIcon : Image
internal class DragImage : Image
{
private ScriptsEditor _editor;
private bool _isMouseDown;
private Float2 _mouseDownPos;
/// <summary>
/// Gets the target script.
/// Action called when drag event should start.
/// </summary>
public Script Script => (Script)Tag;
/// <summary>
/// Initializes a new instance of the <see cref="ScriptDragIcon"/> class.
/// </summary>
/// <param name="editor">The script editor.</param>
/// <param name="script">The target script.</param>
public ScriptDragIcon(ScriptsEditor editor, Script script)
{
Tag = script;
_editor = editor;
}
public Action<DragImage> Drag;
/// <inheritdoc />
public override void OnMouseEnter(Float2 location)
@@ -287,11 +279,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// <inheritdoc />
public override void OnMouseLeave()
{
// Check if start drag drop
if (_isMouseDown)
{
DoDrag();
_isMouseDown = false;
Drag(this);
}
base.OnMouseLeave();
@@ -300,11 +291,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// <inheritdoc />
public override void OnMouseMove(Float2 location)
{
// Check if start drag drop
if (_isMouseDown && Float2.Distance(location, _mouseDownPos) > 10.0f)
{
DoDrag();
_isMouseDown = false;
Drag(this);
}
base.OnMouseMove(location);
@@ -315,8 +305,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
{
if (button == MouseButton.Left)
{
// Clear flag
_isMouseDown = false;
return true;
}
return base.OnMouseUp(location, button);
@@ -327,21 +317,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
{
if (button == MouseButton.Left)
{
// Set flag
_isMouseDown = true;
_mouseDownPos = location;
return true;
}
return base.OnMouseDown(location, button);
}
private void DoDrag()
{
var script = Script;
_editor.OnScriptDragChange(true, script);
DoDragDrop(DragScripts.GetDragData(script));
_editor.OnScriptDragChange(false, script);
}
}
internal class ScriptArrangeBar : Control
@@ -576,8 +558,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
return;
for (int j = 0; j < e.Length; j++)
{
var t1 = scripts[j]?.TypeName;
var t2 = e[j]?.TypeName;
var t1 = scripts[j] != null ? scripts[j].TypeName : null;
var t2 = e[j] != null ? e[j].TypeName : null;
if (t1 != t2)
return;
}
@@ -639,7 +621,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
_scriptToggles[i] = scriptToggle;
// Add drag button to the group
var scriptDrag = new ScriptDragIcon(this, script)
var scriptDrag = new DragImage
{
TooltipText = "Script reference",
AutoFocus = true,
@@ -650,6 +632,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
Margin = new Margin(1),
Brush = new SpriteBrush(Editor.Instance.Icons.DragBar12),
Tag = script,
Drag = img =>
{
var s = (Script)img.Tag;
OnScriptDragChange(true, s);
img.DoDragDrop(DragScripts.GetDragData(s));
OnScriptDragChange(false, s);
}
};
// Add settings button to the group
@@ -1,9 +1,12 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.Actions;
using FlaxEditor.SceneGraph.Actors;
using System;
using System.Collections.Generic;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEditor.Actions;
using FlaxEditor.SceneGraph;
using FlaxEditor.SceneGraph.Actors;
using FlaxEditor.GUI.Tabs;
namespace FlaxEditor.CustomEditors.Dedicated
{
@@ -14,54 +17,853 @@ namespace FlaxEditor.CustomEditors.Dedicated
[CustomEditor(typeof(Spline)), DefaultEditor]
public class SplineEditor : ActorEditor
{
/// <summary>
/// Storage undo spline data
/// </summary>
private struct UndoData
{
public Spline Spline;
public BezierCurve<Transform>.Keyframe[] BeforeKeyframes;
}
/// <summary>
/// Basis for creating tangent manipulation types for bezier curves.
/// </summary>
private class EditTangentOptionBase
{
/// <summary>
/// Called when user set selected tangent mode.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnSetMode(Spline spline, int index)
{
}
/// <summary>
/// Called when user select a keyframe (spline point) of current selected spline on editor viewport.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnSelectKeyframe(Spline spline, int index)
{
}
/// <summary>
/// Called when user select a tangent of current keyframe selected from spline.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnSelectTangent(Spline spline, int index)
{
}
/// <summary>
/// Called when the tangent in from current keyframe selected from spline is moved on editor viewport.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnMoveTangentIn(Spline spline, int index)
{
}
/// <summary>
/// Called when the tangent out from current keyframe selected from spline is moved on editor viewport.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Current spline selected on editor viewport.</param>
public virtual void OnMoveTangentOut(Spline spline, int index)
{
}
}
/// <summary>
/// Edit curve options manipulate the curve as free mode
/// </summary>
private sealed class FreeTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
if (IsLinearTangentMode(spline, index) || IsSmoothInTangentMode(spline, index) || IsSmoothOutTangentMode(spline, index))
{
SetPointSmooth(spline, index);
}
}
}
/// <summary>
/// Edit curve options to set tangents to linear
/// </summary>
private sealed class LinearTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SetKeyframeLinear(spline, index);
// change the selection to tangent parent (a spline point / keyframe)
SetSelectSplinePointNode(spline, index);
}
}
/// <summary>
/// Edit curve options to align tangents of selected spline
/// </summary>
private sealed class AlignedTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SmoothIfNotAligned(spline, index);
}
/// <inheritdoc/>
public override void OnSelectKeyframe(Spline spline, int index)
{
SmoothIfNotAligned(spline, index);
}
/// <inheritdoc/>
public override void OnMoveTangentIn(Spline spline, int index)
{
SetPointAligned(spline, index, true);
}
/// <inheritdoc/>
public override void OnMoveTangentOut(Spline spline, int index)
{
SetPointAligned(spline, index, false);
}
private void SmoothIfNotAligned(Spline spline, int index)
{
if (!IsAlignedTangentMode(spline, index))
{
SetPointSmooth(spline, index);
}
}
private void SetPointAligned(Spline spline, int index, bool alignWithIn)
{
var keyframe = spline.GetSplineKeyframe(index);
var referenceTangent = alignWithIn ? keyframe.TangentIn : keyframe.TangentOut;
var otherTangent = !alignWithIn ? keyframe.TangentIn : keyframe.TangentOut;
// inverse of reference tangent
otherTangent.Translation = -referenceTangent.Translation.Normalized * otherTangent.Translation.Length;
if (alignWithIn)
keyframe.TangentOut = otherTangent;
if (!alignWithIn)
keyframe.TangentIn = otherTangent;
spline.SetSplineKeyframe(index, keyframe);
}
}
/// <summary>
/// Edit curve options manipulate the curve setting selected point
/// tangent in as smoothed but tangent out as linear
/// </summary>
private sealed class SmoothInTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SetTangentSmoothIn(spline, index);
SetSelectTangentIn(spline, index);
}
}
/// <summary>
/// Edit curve options manipulate the curve setting selected point
/// tangent in as linear but tangent out as smoothed
/// </summary>
private sealed class SmoothOutTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SetTangentSmoothOut(spline, index);
SetSelectTangentOut(spline, index);
}
}
private sealed class IconTab : Tab
{
private sealed class IconTabHeader : Tabs.TabHeader
{
public IconTabHeader(Tabs tabs, Tab tab)
: base(tabs, tab)
{
}
public override bool OnMouseUp(Float2 location, MouseButton button)
{
if (EnabledInHierarchy && Tab.Enabled)
((IconTab)Tab)._action();
return true;
}
public override void Draw()
{
base.Draw();
var tab = (IconTab)Tab;
var enabled = EnabledInHierarchy && tab.EnabledInHierarchy;
var style = FlaxEngine.GUI.Style.Current;
var size = Size;
var textHeight = 16.0f;
var iconSize = size.Y - textHeight;
var iconRect = new Rectangle((Width - iconSize) / 2, 0, iconSize, iconSize);
if (tab._mirrorIcon)
{
iconRect.Location.X += iconRect.Size.X;
iconRect.Size.X *= -1;
}
var color = style.Foreground;
if (!enabled)
color *= 0.6f;
Render2D.DrawSprite(tab._customIcon, iconRect, color);
Render2D.DrawText(style.FontMedium, tab._customText, new Rectangle(0, iconSize, size.X, textHeight), color, TextAlignment.Center, TextAlignment.Center);
}
}
private readonly Action _action;
private readonly string _customText;
private readonly SpriteHandle _customIcon;
private readonly bool _mirrorIcon;
public IconTab(Action action, string text, SpriteHandle icon, bool mirrorIcon = false)
: base(string.Empty, SpriteHandle.Invalid)
{
_action = action;
_customText = text;
_customIcon = icon;
_mirrorIcon = mirrorIcon;
}
public override Tabs.TabHeader CreateHeader()
{
return new IconTabHeader((Tabs)Parent, this);
}
}
private EditTangentOptionBase _currentTangentMode;
private Tabs _selectedPointsTabs, _allPointsTabs;
private Tab _freeTangentTab;
private Tab _linearTangentTab;
private Tab _alignedTangentTab;
private Tab _smoothInTangentTab;
private Tab _smoothOutTangentTab;
private Tab _setLinearAllTangentsTab;
private Tab _setSmoothAllTangentsTab;
private bool _tanInChanged;
private bool _tanOutChanged;
private Vector3 _lastTanInPos;
private Vector3 _lastTanOutPos;
private Spline _selectedSpline;
private SplineNode.SplinePointNode _selectedPoint;
private SplineNode.SplinePointNode _lastPointSelected;
private SplineNode.SplinePointTangentNode _selectedTangentIn;
private SplineNode.SplinePointTangentNode _selectedTangentOut;
private UndoData[] _selectedSplinesUndoData;
private bool HasPointSelected => _selectedPoint != null;
private bool HasTangentsSelected => _selectedTangentIn != null || _selectedTangentOut != null;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
base.Initialize(layout);
if (Values.HasDifferentTypes == false)
_currentTangentMode = new FreeTangentMode();
if (Values.HasDifferentTypes || !(Values[0] is Spline spline))
return;
_selectedSpline = spline;
layout.Space(10);
var tabSize = 46;
var icons = Editor.Instance.Icons;
layout.Header("Selected spline point");
_selectedPointsTabs = new Tabs
{
layout.Space(10);
var grid = layout.CustomContainer<UniformGridPanel>();
grid.CustomControl.SlotsHorizontally = 2;
grid.CustomControl.SlotsVertically = 1;
grid.Button("Set Linear Tangents").Button.Clicked += OnSetTangentsLinear;
grid.Button("Set Smooth Tangents").Button.Clicked += OnSetTangentsSmooth;
Height = tabSize,
TabsSize = new Float2(tabSize),
AutoTabsSize = true,
Parent = layout.ContainerControl,
};
_linearTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedLinear, "Linear", icons.SplineLinear64));
_freeTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedFree, "Free", icons.SplineFree64));
_alignedTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedAligned, "Aligned", icons.SplineAligned64));
_smoothInTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedSmoothIn, "Smooth In", icons.SplineSmoothIn64));
_smoothOutTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedSmoothOut, "Smooth Out", icons.SplineSmoothIn64, true));
_selectedPointsTabs.SelectedTabIndex = -1;
layout.Header("All spline points");
_allPointsTabs = new Tabs
{
Height = tabSize,
TabsSize = new Float2(tabSize),
AutoTabsSize = true,
Parent = layout.ContainerControl,
};
_setLinearAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsLinear, "Set Linear Tangents", icons.SplineLinear64));
_setSmoothAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsSmooth, "Set Smooth Tangents", icons.SplineAligned64));
_allPointsTabs.SelectedTabIndex = -1;
if (_selectedSpline)
_selectedSpline.SplineUpdated += OnSplineEdited;
SetSelectedTangentTypeAsCurrent();
UpdateEditTabsSelection();
UpdateButtonsEnabled();
}
/// <inheritdoc/>
protected override void Deinitialize()
{
if (_selectedSpline)
_selectedSpline.SplineUpdated -= OnSplineEdited;
}
private void OnSplineEdited()
{
UpdateEditTabsSelection();
UpdateButtonsEnabled();
}
/// <inheritdoc/>
public override void Refresh()
{
base.Refresh();
UpdateSelectedPoint();
UpdateSelectedTangent();
if (!CanEditTangent())
return;
var index = _lastPointSelected.Index;
var currentTangentInPosition = _selectedSpline.GetSplineLocalTangent(index, true).Translation;
var currentTangentOutPosition = _selectedSpline.GetSplineLocalTangent(index, false).Translation;
if (_selectedTangentIn != null)
{
_tanInChanged = _lastTanInPos != currentTangentInPosition;
_lastTanInPos = currentTangentInPosition;
}
if (_selectedTangentOut != null)
{
_tanOutChanged = _lastTanOutPos != currentTangentOutPosition;
_lastTanOutPos = currentTangentOutPosition;
}
if (_tanInChanged)
_currentTangentMode.OnMoveTangentIn(_selectedSpline, index);
if (_tanOutChanged)
_currentTangentMode.OnMoveTangentOut(_selectedSpline, index);
currentTangentInPosition = _selectedSpline.GetSplineLocalTangent(index, true).Translation;
currentTangentOutPosition = _selectedSpline.GetSplineLocalTangent(index, false).Translation;
// Update last tangents position after changes
if (_selectedSpline)
_lastTanInPos = currentTangentInPosition;
if (_selectedSpline)
_lastTanOutPos = currentTangentOutPosition;
_tanInChanged = false;
_tanOutChanged = false;
}
private void SetSelectedTangentTypeAsCurrent()
{
if (_lastPointSelected == null || _selectedPoint == null)
return;
if (IsLinearTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeLinear();
else if (IsAlignedTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeAligned();
else if (IsSmoothInTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeSmoothIn();
else if (IsSmoothOutTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeSmoothOut();
else if (IsFreeTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeFree();
}
private void UpdateEditTabsSelection()
{
_selectedPointsTabs.Enabled = CanEditTangent();
if (!_selectedPointsTabs.Enabled)
{
_selectedPointsTabs.SelectedTabIndex = -1;
return;
}
var isFree = _currentTangentMode is FreeTangentMode;
var isLinear = _currentTangentMode is LinearTangentMode;
var isAligned = _currentTangentMode is AlignedTangentMode;
var isSmoothIn = _currentTangentMode is SmoothInTangentMode;
var isSmoothOut = _currentTangentMode is SmoothOutTangentMode;
if (isFree)
_selectedPointsTabs.SelectedTab = _freeTangentTab;
else if (isLinear)
_selectedPointsTabs.SelectedTab = _linearTangentTab;
else if (isAligned)
_selectedPointsTabs.SelectedTab = _alignedTangentTab;
else if (isSmoothIn)
_selectedPointsTabs.SelectedTab = _smoothInTangentTab;
else if (isSmoothOut)
_selectedPointsTabs.SelectedTab = _smoothOutTangentTab;
else
_selectedPointsTabs.SelectedTabIndex = -1;
}
private void UpdateButtonsEnabled()
{
_linearTangentTab.Enabled = CanEditTangent();
_freeTangentTab.Enabled = CanEditTangent();
_alignedTangentTab.Enabled = CanEditTangent();
_smoothInTangentTab.Enabled = CanSetTangentSmoothIn();
_smoothOutTangentTab.Enabled = CanSetTangentSmoothOut();
_setLinearAllTangentsTab.Enabled = CanSetAllTangentsLinear();
_setSmoothAllTangentsTab.Enabled = CanSetAllTangentsSmooth();
}
private bool CanEditTangent()
{
return !HasDifferentTypes && !HasDifferentValues && (HasPointSelected || HasTangentsSelected);
}
private bool CanSetTangentSmoothIn()
{
if (!CanEditTangent())
return false;
return _lastPointSelected.Index != 0;
}
private bool CanSetTangentSmoothOut()
{
if (!CanEditTangent())
return false;
return _lastPointSelected.Index < _selectedSpline.SplinePointsCount - 1;
}
private bool CanSetAllTangentsSmooth()
{
return _selectedSpline != null;
}
private bool CanSetAllTangentsLinear()
{
return _selectedSpline != null;
}
private void SetModeLinear()
{
if (_currentTangentMode is LinearTangentMode)
return;
_currentTangentMode = new LinearTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeFree()
{
if (_currentTangentMode is FreeTangentMode)
return;
_currentTangentMode = new FreeTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeAligned()
{
if (_currentTangentMode is AlignedTangentMode)
return;
_currentTangentMode = new AlignedTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeSmoothIn()
{
if (_currentTangentMode is SmoothInTangentMode)
return;
_currentTangentMode = new SmoothInTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeSmoothOut()
{
if (_currentTangentMode is SmoothOutTangentMode)
return;
_currentTangentMode = new SmoothOutTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void UpdateSelectedPoint()
{
// works only if select one spline
if (_selectedSpline)
{
var currentSelected = Editor.Instance.SceneEditing.Selection[0];
if (currentSelected == _selectedPoint)
return;
if (currentSelected is SplineNode.SplinePointNode selectedPoint)
{
_selectedPoint = selectedPoint;
_lastPointSelected = _selectedPoint;
_currentTangentMode.OnSelectKeyframe(_selectedSpline, _lastPointSelected.Index);
}
else
{
_selectedPoint = null;
}
}
else
{
_selectedPoint = null;
}
SetSelectedTangentTypeAsCurrent();
UpdateEditTabsSelection();
UpdateButtonsEnabled();
}
private void UpdateSelectedTangent()
{
// works only if select one spline
if (_lastPointSelected == null || Editor.Instance.SceneEditing.SelectionCount != 1)
{
_selectedTangentIn = null;
_selectedTangentOut = null;
return;
}
var currentSelected = Editor.Instance.SceneEditing.Selection[0];
if (currentSelected is not SplineNode.SplinePointTangentNode selectedPoint)
{
_selectedTangentIn = null;
_selectedTangentOut = null;
return;
}
if (currentSelected == _selectedTangentIn)
return;
if (currentSelected == _selectedTangentOut)
return;
var index = _lastPointSelected.Index;
if (currentSelected.Transform == _selectedSpline.GetSplineTangent(index, true))
{
_selectedTangentIn = selectedPoint;
_selectedTangentOut = null;
_currentTangentMode.OnSelectTangent(_selectedSpline, index);
return;
}
if (currentSelected.Transform == _selectedSpline.GetSplineTangent(index, false))
{
_selectedTangentOut = selectedPoint;
_selectedTangentIn = null;
_currentTangentMode.OnSelectTangent(_selectedSpline, index);
return;
}
_selectedTangentIn = null;
_selectedTangentOut = null;
}
private void StartEditSpline()
{
if (Presenter.Undo != null && Presenter.Undo.Enabled)
{
// Capture 'before' state for undo
var splines = new List<UndoData>();
for (int i = 0; i < Values.Count; i++)
{
if (Values[i] is Spline spline)
{
splines.Add(new UndoData
{
Spline = spline,
BeforeKeyframes = spline.SplineKeyframes.Clone() as BezierCurve<Transform>.Keyframe[]
});
}
}
_selectedSplinesUndoData = splines.ToArray();
}
}
private void EndEditSpline()
{
// Update buttons state
UpdateEditTabsSelection();
if (Presenter.Undo != null && Presenter.Undo.Enabled)
{
// Add undo
foreach (var splineUndoData in _selectedSplinesUndoData)
{
Presenter.Undo.AddAction(new EditSplineAction(_selectedSpline, splineUndoData.BeforeKeyframes));
SplineNode.OnSplineEdited(splineUndoData.Spline);
Editor.Instance.Scene.MarkSceneEdited(splineUndoData.Spline.Scene);
}
}
}
private void OnSetSelectedLinear()
{
StartEditSpline();
SetModeLinear();
EndEditSpline();
}
private void OnSetSelectedFree()
{
StartEditSpline();
SetModeFree();
EndEditSpline();
}
private void OnSetSelectedAligned()
{
StartEditSpline();
SetModeAligned();
EndEditSpline();
}
private void OnSetSelectedSmoothIn()
{
StartEditSpline();
SetModeSmoothIn();
EndEditSpline();
}
private void OnSetSelectedSmoothOut()
{
StartEditSpline();
SetModeSmoothOut();
EndEditSpline();
}
private void OnSetTangentsLinear()
{
var enableUndo = Presenter.Undo != null && Presenter.Undo.Enabled;
for (int i = 0; i < Values.Count; i++)
{
if (Values[i] is Spline spline)
{
var before = enableUndo ? (BezierCurve<Transform>.Keyframe[])spline.SplineKeyframes.Clone() : null;
spline.SetTangentsLinear();
if (enableUndo)
Presenter.Undo.AddAction(new EditSplineAction(spline, before));
SplineNode.OnSplineEdited(spline);
Editor.Instance.Scene.MarkSceneEdited(spline.Scene);
}
}
StartEditSpline();
_selectedSpline.SetTangentsLinear();
_selectedSpline.UpdateSpline();
EndEditSpline();
}
private void OnSetTangentsSmooth()
{
var enableUndo = Presenter.Undo != null && Presenter.Undo.Enabled;
for (int i = 0; i < Values.Count; i++)
StartEditSpline();
_selectedSpline.SetTangentsSmooth();
_selectedSpline.UpdateSpline();
EndEditSpline();
}
private static bool IsFreeTangentMode(Spline spline, int index)
{
if (IsLinearTangentMode(spline, index) ||
IsAlignedTangentMode(spline, index) ||
IsSmoothInTangentMode(spline, index) ||
IsSmoothOutTangentMode(spline, index))
{
if (Values[i] is Spline spline)
return false;
}
return true;
}
private static bool IsLinearTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
return keyframe.TangentIn.Translation.Length == 0 && keyframe.TangentOut.Translation.Length == 0;
}
private static bool IsAlignedTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
var tangentIn = keyframe.TangentIn.Translation;
var tangentOut = keyframe.TangentOut.Translation;
if (tangentIn.Length == 0 || tangentOut.Length == 0)
return false;
var angleBetweenTwoTangents = Vector3.Dot(tangentIn.Normalized, tangentOut.Normalized);
if (angleBetweenTwoTangents < -0.99f)
return true;
return false;
}
private static bool IsSmoothInTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
return keyframe.TangentIn.Translation.Length > 0 && keyframe.TangentOut.Translation.Length == 0;
}
private static bool IsSmoothOutTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
return keyframe.TangentOut.Translation.Length > 0 && keyframe.TangentIn.Translation.Length == 0;
}
private static void SetKeyframeLinear(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
keyframe.TangentIn.Translation = Vector3.Zero;
keyframe.TangentOut.Translation = Vector3.Zero;
var lastSplineIndex = spline.SplinePointsCount - 1;
if (index == lastSplineIndex && spline.IsLoop)
{
var lastPoint = spline.GetSplineKeyframe(lastSplineIndex);
lastPoint.TangentIn.Translation = Vector3.Zero;
lastPoint.TangentOut.Translation = Vector3.Zero;
spline.SetSplineKeyframe(lastSplineIndex, lastPoint);
}
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static void SetTangentSmoothIn(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
// Auto smooth tangent if's linear
if (keyframe.TangentIn.Translation.Length == 0)
{
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplineTangent(index, false).Translation, 10f);
var previousKeyframe = spline.GetSplineKeyframe(index - 1);
var tangentDirection = keyframe.Value.WorldToLocalVector(previousKeyframe.Value.Translation - keyframe.Value.Translation);
tangentDirection = tangentDirection.Normalized * smoothRange;
keyframe.TangentIn.Translation = tangentDirection;
}
keyframe.TangentOut.Translation = Vector3.Zero;
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static void SetTangentSmoothOut(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
// Auto smooth tangent if's linear
if (keyframe.TangentOut.Translation.Length == 0)
{
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplineTangent(index, false).Translation, 10f);
var nextKeyframe = spline.GetSplineKeyframe(index + 1);
var tangentDirection = keyframe.Value.WorldToLocalVector(nextKeyframe.Value.Translation - keyframe.Value.Translation);
tangentDirection = tangentDirection.Normalized * smoothRange;
keyframe.TangentOut.Translation = tangentDirection;
}
keyframe.TangentIn.Translation = Vector3.Zero;
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static void SetPointSmooth(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
var tangentInSize = keyframe.TangentIn.Translation.Length;
var tangentOutSize = keyframe.TangentOut.Translation.Length;
var isLastKeyframe = index >= spline.SplinePointsCount - 1;
var isFirstKeyframe = index <= 0;
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplinePoint(index), 10f);
// Force smooth it's linear point
if (tangentInSize == 0f)
tangentInSize = smoothRange;
if (tangentOutSize == 0f)
tangentOutSize = smoothRange;
// Try get next / last keyframe
var nextKeyframe = !isLastKeyframe ? spline.GetSplineKeyframe(index + 1) : keyframe;
var previousKeyframe = !isFirstKeyframe ? spline.GetSplineKeyframe(index - 1) : keyframe;
// calc form from Spline.cpp -> SetTangentsSmooth
// get tangent direction
var tangentDirection = (keyframe.Value.Translation - previousKeyframe.Value.Translation + nextKeyframe.Value.Translation - keyframe.Value.Translation).Normalized;
keyframe.TangentIn.Translation = -tangentDirection;
keyframe.TangentOut.Translation = tangentDirection;
keyframe.TangentIn.Translation *= tangentInSize;
keyframe.TangentOut.Translation *= tangentOutSize;
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static SplineNode.SplinePointNode GetSplinePointNode(Spline spline, int index)
{
return (SplineNode.SplinePointNode)SceneGraphFactory.FindNode(spline.ID).ChildNodes[index];
}
private static SplineNode.SplinePointTangentNode GetSplineTangentInNode(Spline spline, int index)
{
var point = GetSplinePointNode(spline, index);
var tangentIn = spline.GetSplineTangent(index, true);
var tangentNodes = point.ChildNodes;
// find tangent in node comparing all child nodes position
for (int i = 0; i < tangentNodes.Count; i++)
{
if (tangentNodes[i].Transform.Translation == tangentIn.Translation)
{
var before = enableUndo ? (BezierCurve<Transform>.Keyframe[])spline.SplineKeyframes.Clone() : null;
spline.SetTangentsSmooth();
if (enableUndo)
Presenter.Undo.AddAction(new EditSplineAction(spline, before));
SplineNode.OnSplineEdited(spline);
Editor.Instance.Scene.MarkSceneEdited(spline.Scene);
return (SplineNode.SplinePointTangentNode)tangentNodes[i];
}
}
return null;
}
private static SplineNode.SplinePointTangentNode GetSplineTangentOutNode(Spline spline, int index)
{
var point = GetSplinePointNode(spline, index);
var tangentOut = spline.GetSplineTangent(index, false);
var tangentNodes = point.ChildNodes;
// find tangent out node comparing all child nodes position
for (int i = 0; i < tangentNodes.Count; i++)
{
if (tangentNodes[i].Transform.Translation == tangentOut.Translation)
{
return (SplineNode.SplinePointTangentNode)tangentNodes[i];
}
}
return null;
}
private static void SetSelectSplinePointNode(Spline spline, int index)
{
Editor.Instance.SceneEditing.Select(GetSplinePointNode(spline, index));
}
private static void SetSelectTangentIn(Spline spline, int index)
{
Editor.Instance.SceneEditing.Select(GetSplineTangentInNode(spline, index));
}
private static void SetSelectTangentOut(Spline spline, int index)
{
Editor.Instance.SceneEditing.Select(GetSplineTangentOutNode(spline, index));
}
}
}
@@ -422,12 +422,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Set control type button
var space = layout.Space(20);
float setTypeButtonWidth = 60.0f;
var buttonText = "Set Type";
var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(buttonText);
float setTypeButtonWidth = (textSize.X < 60.0f) ? 60.0f : textSize.X + 4;
var setTypeButton = new Button
{
TooltipText = "Sets the control to the given type",
AnchorPreset = AnchorPresets.MiddleCenter,
Text = "Set Type",
Text = buttonText,
Parent = space.Spacer,
Bounds = new Rectangle((space.Spacer.Width - setTypeButtonWidth) / 2, 1, setTypeButtonWidth, 18),
};
@@ -88,20 +88,20 @@ namespace FlaxEditor.CustomEditors.Editors
LinkValues = Editor.Instance.Windows.PropertiesWin.ScaleLinked;
// Add button with the link icon
_linkButton = new Button
{
BackgroundBrush = new SpriteBrush(Editor.Instance.Icons.Link32),
Parent = LinkedLabel,
Width = 18,
Height = 18,
AnchorPreset = AnchorPresets.TopLeft,
AnchorPreset = AnchorPresets.MiddleLeft,
};
_linkButton.Clicked += ToggleLink;
ToggleEnabled();
SetLinkStyle();
var x = LinkedLabel.Text.Value.Length * 7 + 5;
_linkButton.LocalX += x;
_linkButton.LocalY += 1;
var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(LinkedLabel.Text.Value);
_linkButton.LocalX += textSize.X + 10;
LinkedLabel.SetupContextMenu += (label, menu, editor) =>
{
menu.AddSeparator();
@@ -33,7 +33,12 @@ namespace FlaxEditor.CustomEditors.Editors
[CustomEditor(typeof(Asset)), DefaultEditor]
public class AssetRefEditor : CustomEditor
{
private AssetPicker _picker;
/// <summary>
/// The asset picker used to get a reference to an asset.
/// </summary>
public AssetPicker Picker;
private bool _isRefreshing;
private ScriptType _valueType;
/// <inheritdoc />
@@ -44,7 +49,7 @@ namespace FlaxEditor.CustomEditors.Editors
{
if (HasDifferentTypes)
return;
_picker = layout.Custom<AssetPicker>().CustomControl;
Picker = layout.Custom<AssetPicker>().CustomControl;
_valueType = Values.Type.Type != typeof(object) || Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]);
var assetType = _valueType;
@@ -66,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
{
// Generic file picker
assetType = ScriptType.Null;
_picker.FileExtension = assetReference.TypeName;
Picker.FileExtension = assetReference.TypeName;
}
else
{
@@ -75,26 +80,30 @@ namespace FlaxEditor.CustomEditors.Editors
assetType = customType;
else if (!Content.Settings.GameSettings.OptionalPlatformSettings.Contains(assetReference.TypeName))
Debug.LogWarning(string.Format("Unknown asset type '{0}' to use for asset picker filter.", assetReference.TypeName));
else
assetType = ScriptType.Void;
}
}
_picker.AssetType = assetType;
_picker.Height = height;
_picker.SelectedItemChanged += OnSelectedItemChanged;
Picker.AssetType = assetType;
Picker.Height = height;
Picker.SelectedItemChanged += OnSelectedItemChanged;
}
private void OnSelectedItemChanged()
{
if (_isRefreshing)
return;
if (typeof(AssetItem).IsAssignableFrom(_valueType.Type))
SetValue(_picker.SelectedItem);
SetValue(Picker.SelectedItem);
else if (_valueType.Type == typeof(Guid))
SetValue(_picker.SelectedID);
SetValue(Picker.SelectedID);
else if (_valueType.Type == typeof(SceneReference))
SetValue(new SceneReference(_picker.SelectedID));
SetValue(new SceneReference(Picker.SelectedID));
else if (_valueType.Type == typeof(string))
SetValue(_picker.SelectedPath);
SetValue(Picker.SelectedPath);
else
SetValue(_picker.SelectedAsset);
SetValue(Picker.SelectedAsset);
}
/// <inheritdoc />
@@ -104,16 +113,18 @@ namespace FlaxEditor.CustomEditors.Editors
if (!HasDifferentValues)
{
_isRefreshing = true;
if (Values[0] is AssetItem assetItem)
_picker.SelectedItem = assetItem;
Picker.SelectedItem = assetItem;
else if (Values[0] is Guid guid)
_picker.SelectedID = guid;
Picker.SelectedID = guid;
else if (Values[0] is SceneReference sceneAsset)
_picker.SelectedItem = Editor.Instance.ContentDatabase.FindAsset(sceneAsset.ID);
Picker.SelectedItem = Editor.Instance.ContentDatabase.FindAsset(sceneAsset.ID);
else if (Values[0] is string path)
_picker.SelectedPath = path;
Picker.SelectedPath = path;
else
_picker.SelectedAsset = Values[0] as Asset;
Picker.SelectedAsset = Values[0] as Asset;
_isRefreshing = false;
}
}
}
@@ -0,0 +1,196 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Utilities;
namespace FlaxEditor.CustomEditors.Editors
{
/// <summary>
/// Custom editor for <see cref="BehaviorKnowledgeSelector{T}"/> and <see cref="BehaviorKnowledgeSelectorAny"/>.
/// </summary>
public sealed class BehaviorKnowledgeSelectorEditor : CustomEditor
{
private ClickableLabel _label;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
_label = layout.ClickableLabel(Path).CustomControl;
_label.RightClick += ShowPicker;
var button = new Button
{
Size = new Float2(16.0f),
Text = "...",
TooltipText = "Edit...",
Parent = _label,
};
button.SetAnchorPreset(AnchorPresets.MiddleRight, false, true);
button.Clicked += ShowPicker;
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
// Update label
_label.Text = _label.TooltipText = Path;
}
private string Path
{
get
{
var v = Values[0];
if (v is BehaviorKnowledgeSelectorAny any)
return any.Path;
if (v is string str)
return str;
var pathField = v.GetType().GetField("Path");
return pathField.GetValue(v) as string;
}
set
{
if (string.Equals(Path, value, StringComparison.Ordinal))
return;
var v = Values[0];
if (v is BehaviorKnowledgeSelectorAny)
v = new BehaviorKnowledgeSelectorAny(value);
else if (v is string)
v = value;
else
{
var pathField = v.GetType().GetField("Path");
pathField.SetValue(v, value);
}
SetValue(v);
}
}
private void ShowPicker()
{
// Get Behavior Knowledge to select from
var behaviorTreeWindow = Presenter.Owner as Windows.Assets.BehaviorTreeWindow;
var rootNode = behaviorTreeWindow?.RootNode;
if (rootNode == null)
return;
var typed = ScriptType.Null;
var valueType = Values[0].GetType();
if (valueType.Name == "BehaviorKnowledgeSelector`1")
{
// Get typed selector type to show only assignable items
typed = new ScriptType(valueType.GenericTypeArguments[0]);
}
// Get customization options
var attributes = Values.GetAttributes();
var attribute = (BehaviorKnowledgeSelectorAttribute)attributes?.FirstOrDefault(x => x is BehaviorKnowledgeSelectorAttribute);
bool isGoalSelector = false;
if (attribute != null)
{
isGoalSelector = attribute.IsGoalSelector;
}
// Create menu with tree-like structure and search box
var menu = Utilities.Utils.CreateSearchPopup(out var searchBox, out var tree, 0, true);
var selected = Path;
// Empty
var noneNode = new TreeNode
{
Text = "<none>",
TooltipText = "Deselect value",
Parent = tree,
};
if (string.IsNullOrEmpty(selected))
tree.Select(noneNode);
if (!isGoalSelector)
{
// Blackboard
SetupPickerTypeItems(tree, typed, selected, "Blackboard", "Blackboard/", rootNode.BlackboardType);
}
// Goals
var goalTypes = rootNode.GoalTypes;
if (goalTypes?.Length != 0)
{
var goalsNode = new TreeNode
{
Text = "Goal",
TooltipText = "List of goal types defined in Blackboard Tree",
Parent = tree,
};
foreach (var goalTypeName in goalTypes)
{
var goalType = TypeUtils.GetType(goalTypeName);
if (goalType == null)
continue;
var goalTypeNode = SetupPickerTypeItems(tree, typed, selected, goalType.Name, "Goal/" + goalTypeName + "/", goalTypeName, !isGoalSelector);
goalTypeNode.Parent = goalsNode;
}
goalsNode.ExpandAll(true);
}
tree.SelectedChanged += delegate(List<TreeNode> before, List<TreeNode> after)
{
if (after.Count == 1)
{
menu.Hide();
Path = after[0].Tag as string;
}
};
menu.Show(_label, new Float2(0, _label.Height));
}
private TreeNode SetupPickerTypeItems(Tree tree, ScriptType typed, string selected, string text, string typePath, string typeName, bool addItems = true)
{
var type = TypeUtils.GetType(typeName);
if (type == null)
return null;
var typeNode = new TreeNode
{
Text = text,
TooltipText = type.TypeName,
Tag = typePath, // Ability to select whole item type data (eg. whole blackboard value)
Parent = tree,
};
if (typed && !typed.IsAssignableFrom(type))
typeNode.Tag = null;
if (string.Equals(selected, (string)typeNode.Tag, StringComparison.Ordinal))
tree.Select(typeNode);
if (addItems)
{
var items = GenericEditor.GetItemsForType(type, type.IsClass, true);
foreach (var item in items)
{
if (typed && !typed.IsAssignableFrom(item.Info.ValueType))
continue;
var itemPath = typePath + item.Info.Name;
var node = new TreeNode
{
Text = item.DisplayName,
TooltipText = item.TooltipText,
Tag = itemPath,
Parent = typeNode,
};
if (string.Equals(selected, itemPath, StringComparison.Ordinal))
tree.Select(node);
// TODO: add support for nested items (eg. field from blackboard structure field)
}
typeNode.Expand(true);
}
return typeNode;
}
}
}
@@ -34,7 +34,9 @@ namespace FlaxEditor.CustomEditors.Editors
}
else
{
element.CheckBox.Checked = (bool)Values[0];
var value = (bool?)Values[0];
if (value != null)
element.CheckBox.Checked = value.Value;
}
}
}
@@ -123,9 +123,9 @@ namespace FlaxEditor.CustomEditors.Editors
{
if (tree.IsLayoutLocked)
return;
root.LockChildrenRecursive();
tree.LockChildrenRecursive();
Utilities.Utils.UpdateSearchPopupFilter(root, searchBox.Text);
root.UnlockChildrenRecursive();
tree.UnlockChildrenRecursive();
menu.PerformLayout();
};
root.ExpandAll(true);
@@ -26,7 +26,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// Describes object property/field information for custom editors pipeline.
/// </summary>
/// <seealso cref="System.IComparable" />
protected class ItemInfo : IComparable
public class ItemInfo : IComparable
{
private Options.GeneralOptions.MembersOrder _membersOrder;
@@ -248,7 +248,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// <param name="useProperties">True if use type properties.</param>
/// <param name="useFields">True if use type fields.</param>
/// <returns>The items.</returns>
protected List<ItemInfo> GetItemsForType(ScriptType type, bool useProperties, bool useFields)
public static List<ItemInfo> GetItemsForType(ScriptType type, bool useProperties, bool useFields)
{
var items = new List<ItemInfo>();
@@ -16,6 +16,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// <inheritdoc />
protected override OptionType[] Options => new[]
{
new OptionType("null", null),
new OptionType("Texture", typeof(TextureBrush)),
new OptionType("Sprite", typeof(SpriteBrush)),
new OptionType("GPU Texture", typeof(GPUTextureBrush)),
@@ -0,0 +1,146 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEngine;
namespace FlaxEditor.CustomEditors.Editors
{
/// <summary>
/// Default implementation of the inspector used to edit input event properties.
/// </summary>
[CustomEditor(typeof(InputEvent)), DefaultEditor]
public class InputEventEditor : CustomEditor
{
private ComboBox _comboBox;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
LinkedLabel.SetupContextMenu += OnSetupContextMenu;
var comboBoxElement = layout.ComboBox();
_comboBox = comboBoxElement.ComboBox;
var names = new List<string>();
foreach (var mapping in Input.ActionMappings)
{
if (!names.Contains(mapping.Name))
names.Add(mapping.Name);
}
_comboBox.Items = names;
if (Values[0] is InputEvent inputEvent && names.Contains(inputEvent.Name))
_comboBox.SelectedItem = inputEvent.Name;
_comboBox.SelectedIndexChanged += OnSelectedIndexChanged;
}
private void OnSetupContextMenu(PropertyNameLabel label, ContextMenu menu, CustomEditor linkededitor)
{
var button = menu.AddButton("Set to null");
button.Clicked += () => _comboBox.SelectedItem = null;
}
private void OnSelectedIndexChanged(ComboBox comboBox)
{
SetValue(comboBox.SelectedItem == null ? null : new InputEvent(comboBox.SelectedItem));
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
if (HasDifferentValues)
{
}
else
{
if (Values[0] is InputEvent inputEvent && _comboBox.Items.Contains(inputEvent.Name))
_comboBox.SelectedItem = inputEvent.Name;
else
_comboBox.SelectedItem = null;
}
}
/// <inheritdoc />
protected override void Deinitialize()
{
if (LinkedLabel != null)
LinkedLabel.SetupContextMenu -= OnSetupContextMenu;
if (_comboBox != null)
_comboBox.SelectedIndexChanged -= OnSelectedIndexChanged;
_comboBox = null;
}
}
/// <summary>
/// Default implementation of the inspector used to edit input axis properties.
/// </summary>
[CustomEditor(typeof(InputAxis)), DefaultEditor]
public class InputAxisEditor : CustomEditor
{
private ComboBox _comboBox;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
LinkedLabel.SetupContextMenu += OnSetupContextMenu;
var comboBoxElement = layout.ComboBox();
_comboBox = comboBoxElement.ComboBox;
var names = new List<string>();
foreach (var mapping in Input.AxisMappings)
{
if (!names.Contains(mapping.Name))
names.Add(mapping.Name);
}
_comboBox.Items = names;
if (Values[0] is InputAxis inputAxis && names.Contains(inputAxis.Name))
_comboBox.SelectedItem = inputAxis.Name;
_comboBox.SelectedIndexChanged += OnSelectedIndexChanged;
}
private void OnSetupContextMenu(PropertyNameLabel label, ContextMenu menu, CustomEditor linkededitor)
{
var button = menu.AddButton("Set to null");
button.Clicked += () => _comboBox.SelectedItem = null;
}
private void OnSelectedIndexChanged(ComboBox comboBox)
{
SetValue(comboBox.SelectedItem == null ? null : new InputAxis(comboBox.SelectedItem));
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
if (HasDifferentValues)
{
}
else
{
if (Values[0] is InputAxis inputAxis && _comboBox.Items.Contains(inputAxis.Name))
_comboBox.SelectedItem = inputAxis.Name;
else
_comboBox.SelectedItem = null;
}
}
/// <inheritdoc />
protected override void Deinitialize()
{
if (LinkedLabel != null)
LinkedLabel.SetupContextMenu -= OnSetupContextMenu;
if (_comboBox != null)
_comboBox.SelectedIndexChanged -= OnSelectedIndexChanged;
_comboBox = null;
}
}
}
@@ -1,6 +1,8 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.Scripting;
using FlaxEngine;
namespace FlaxEditor.CustomEditors.Editors
@@ -13,6 +15,11 @@ namespace FlaxEditor.CustomEditors.Editors
{
private GroupElement _group;
private bool _updateName;
private int _entryIndex;
private bool _isRefreshing;
private MaterialBase _material;
private ModelInstanceActor _modelInstance;
private AssetRefEditor _materialEditor;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
@@ -21,47 +28,124 @@ namespace FlaxEditor.CustomEditors.Editors
var group = layout.Group("Entry");
_group = group;
if (ParentEditor == null)
return;
var entry = (ModelInstanceEntry)Values[0];
var entryIndex = ParentEditor.ChildrenEditors.IndexOf(this);
var materialLabel = new PropertyNameLabel("Material");
materialLabel.TooltipText = "The mesh surface material used for the rendering.";
if (ParentEditor.ParentEditor?.Values[0] is ModelInstanceActor modelInstance)
{
_entryIndex = entryIndex;
_modelInstance = modelInstance;
var slots = modelInstance.MaterialSlots;
if (slots == null || entryIndex >= slots.Length)
return;
if (entry.Material == slots[entryIndex].Material)
{
// Ensure that entry with default material set is set back to null
modelInstance.SetMaterial(entryIndex, null);
}
_material = modelInstance.GetMaterial(entryIndex);
var defaultValue = GPUDevice.Instance.DefaultMaterial;
if (slots[entryIndex].Material)
{
// Use default value set on asset (eg. Model Asset)
defaultValue = slots[entryIndex].Material;
}
// Create material picker
var materialValue = new CustomValueContainer(new ScriptType(typeof(MaterialBase)), _material, (instance, index) => _material, (instance, index, value) => _material = value as MaterialBase);
var materialEditor = (AssetRefEditor)_group.Property(materialLabel, materialValue);
materialEditor.Values.SetDefaultValue(defaultValue);
materialEditor.RefreshDefaultValue();
materialEditor.Picker.SelectedItemChanged += OnSelectedMaterialChanged;
_materialEditor = materialEditor;
}
base.Initialize(group);
}
private void OnSelectedMaterialChanged()
{
if (_isRefreshing)
return;
_isRefreshing = true;
var slots = _modelInstance.MaterialSlots;
var material = _materialEditor.Picker.SelectedAsset as MaterialBase;
var defaultMaterial = GPUDevice.Instance.DefaultMaterial;
var value = (ModelInstanceEntry)Values[0];
var prevMaterial = value.Material;
if (!material)
{
// Fallback to default material
_materialEditor.Picker.SelectedAsset = defaultMaterial;
value.Material = defaultMaterial;
}
else if (material == slots[_entryIndex].Material)
{
// Asset default material
value.Material = null;
}
else if (material == defaultMaterial && !slots[_entryIndex].Material)
{
// Default material while asset has no set as well
value.Material = null;
}
else
{
// Custom material
value.Material = material;
}
if (prevMaterial != value.Material)
SetValue(value);
_isRefreshing = false;
}
/// <inheritdoc />
protected override void SpawnProperty(LayoutElementsContainer itemLayout, ValueContainer itemValues, ItemInfo item)
{
// Skip material member as it is overridden
if (item.Info.Name == "Material" && _materialEditor != null)
return;
base.SpawnProperty(itemLayout, itemValues, item);
}
/// <inheritdoc />
public override void Refresh()
{
// Update panel title to match material slot name
if (_updateName &&
_group != null &&
ParentEditor?.ParentEditor != null &&
ParentEditor.ParentEditor.Values.Count > 0)
{
var entryIndex = ParentEditor.ChildrenEditors.IndexOf(this);
if (ParentEditor.ParentEditor.Values[0] is StaticModel staticModel)
if (ParentEditor.ParentEditor.Values[0] is ModelInstanceActor modelInstance)
{
var model = staticModel.Model;
if (model && model.IsLoaded)
var slots = modelInstance.MaterialSlots;
if (slots != null && slots.Length > entryIndex)
{
var slots = model.MaterialSlots;
if (slots != null && slots.Length > entryIndex)
{
_group.Panel.HeaderText = "Entry " + slots[entryIndex].Name;
_updateName = false;
}
}
}
else if (ParentEditor.ParentEditor.Values[0] is AnimatedModel animatedModel)
{
var model = animatedModel.SkinnedModel;
if (model && model.IsLoaded)
{
var slots = model.MaterialSlots;
if (slots != null && slots.Length > entryIndex)
{
_group.Panel.HeaderText = "Entry " + slots[entryIndex].Name;
_updateName = false;
}
_updateName = false;
_group.Panel.HeaderText = "Entry " + slots[entryIndex].Name;
}
}
}
// Refresh currently selected material
_material = _modelInstance.GetMaterial(_entryIndex);
base.Refresh();
}
/// <inheritdoc />
protected override void Deinitialize()
{
_material = null;
_modelInstance = null;
_materialEditor = null;
base.Deinitialize();
}
}
}
@@ -125,7 +125,7 @@ namespace FlaxEditor.CustomEditors.Editors
}
// Value
var values = new CustomValueContainer(type, (instance, index) => instance, (instance, index, value) => { });
var values = new CustomValueContainer(type, (instance, index) => instance);
values.AddRange(Values);
var editor = CustomEditorsUtil.CreateEditor(type);
var style = editor.Style;
@@ -158,7 +158,8 @@ namespace FlaxEditor.CustomEditors.Editors
if (comboBox.SelectedIndex != -1)
{
var option = _options[comboBox.SelectedIndex];
value = option.Creator(option.Type);
if (option.Type != null)
value = option.Creator(option.Type);
}
SetValue(value);
RebuildLayoutOnRefresh();
@@ -593,9 +593,9 @@ namespace FlaxEditor.CustomEditors.Editors
{
if (tree.IsLayoutLocked)
return;
root.LockChildrenRecursive();
tree.LockChildrenRecursive();
Utilities.Utils.UpdateSearchPopupFilter(root, searchBox.Text);
root.UnlockChildrenRecursive();
tree.UnlockChildrenRecursive();
menu.PerformLayout();
};
@@ -623,13 +623,18 @@ namespace FlaxEditor.CustomEditors.Editors
{
_label = layout.ClickableLabel(GetText(out _)).CustomControl;
_label.RightClick += ShowPicker;
var buttonText = "...";
var button = new Button
{
Size = new Float2(16.0f),
Text = "...",
Text = buttonText,
TooltipText = "Edit...",
Parent = _label,
};
var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(buttonText);
if (textSize.Y > button.Width)
button.Width = textSize.Y + 2;
button.SetAnchorPreset(AnchorPresets.MiddleRight, false, true);
button.Clicked += ShowPicker;
}
@@ -674,9 +679,9 @@ namespace FlaxEditor.CustomEditors.Editors
}
set
{
if (Values[0] is Tag[])
if (Values[0] is Tag[] || Values.Type.Type == typeof(Tag[]))
SetValue(value);
if (Values[0] is List<Tag>)
else if (Values[0] is List<Tag> || Values.Type.Type == typeof(List<Tag>))
SetValue(new List<Tag>(value));
}
}
@@ -464,6 +464,11 @@ namespace FlaxEditor.CustomEditors.Editors
/// </summary>
public class TypeNameEditor : TypeEditorBase
{
/// <summary>
/// Prevents spamming log if Value contains missing type to skip research in subsequential Refresh ticks.
/// </summary>
private string _lastTypeNameError;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
@@ -484,8 +489,19 @@ namespace FlaxEditor.CustomEditors.Editors
{
base.Refresh();
if (!HasDifferentValues && Values[0] is string asTypename)
_element.CustomControl.Value = TypeUtils.GetType(asTypename);
if (!HasDifferentValues && Values[0] is string asTypename &&
!string.Equals(asTypename, _lastTypeNameError, StringComparison.Ordinal))
{
try
{
_element.CustomControl.Value = TypeUtils.GetType(asTypename);
}
finally
{
if (_element.CustomControl.Value == null && asTypename.Length != 0)
_lastTypeNameError = asTypename;
}
}
}
}
}
@@ -22,7 +22,7 @@ namespace FlaxEditor.CustomEditors.Elements
/// <summary>
/// [Deprecated on 26.05.2022, expires on 26.05.2024]
/// </summary>
[System.Obsolete("Deprecated in 1.4")]
[System.Obsolete("Deprecated in 1.4, use ValueBox instead")]
public DoubleValueBox DoubleValue => ValueBox;
/// <summary>
@@ -22,7 +22,7 @@ namespace FlaxEditor.CustomEditors.Elements
/// <summary>
/// [Deprecated on 26.05.2022, expires on 26.05.2024]
/// </summary>
[System.Obsolete("Deprecated in 1.4, ValueBox instead")]
[System.Obsolete("Deprecated in 1.4, use ValueBox instead")]
public FloatValueBox FloatValue => ValueBox;
/// <summary>
@@ -175,7 +175,7 @@ namespace FlaxEditor.CustomEditors.GUI
{
// Clear flag
_mouseOverSplitter = false;
if (_cursorChanged)
{
Cursor = CursorType.Default;
@@ -38,15 +38,12 @@ namespace FlaxEditor.CustomEditors
/// </summary>
/// <param name="valueType">Type of the value.</param>
/// <param name="getter">The value getter.</param>
/// <param name="setter">The value setter.</param>
/// <param name="setter">The value setter (can be null if value is read-only).</param>
/// <param name="attributes">The custom type attributes used to override the value editor logic or appearance (eg. instance of <see cref="LimitAttribute"/>).</param>
public CustomValueContainer(ScriptType valueType, GetDelegate getter, SetDelegate setter, object[] attributes = null)
public CustomValueContainer(ScriptType valueType, GetDelegate getter, SetDelegate setter = null, object[] attributes = null)
: base(ScriptMemberInfo.Null, valueType)
{
if (getter == null || setter == null)
throw new ArgumentNullException();
_getter = getter;
_getter = getter ?? throw new ArgumentNullException();
_setter = setter;
_attributes = attributes;
}
@@ -57,9 +54,9 @@ namespace FlaxEditor.CustomEditors
/// <param name="valueType">Type of the value.</param>
/// <param name="initialValue">The initial value.</param>
/// <param name="getter">The value getter.</param>
/// <param name="setter">The value setter.</param>
/// <param name="setter">The value setter (can be null if value is read-only).</param>
/// <param name="attributes">The custom type attributes used to override the value editor logic or appearance (eg. instance of <see cref="LimitAttribute"/>).</param>
public CustomValueContainer(ScriptType valueType, object initialValue, GetDelegate getter, SetDelegate setter, object[] attributes = null)
public CustomValueContainer(ScriptType valueType, object initialValue, GetDelegate getter, SetDelegate setter = null, object[] attributes = null)
: this(valueType, getter, setter, attributes)
{
Add(initialValue);
@@ -89,6 +86,8 @@ namespace FlaxEditor.CustomEditors
{
if (instanceValues == null || instanceValues.Count != Count)
throw new ArgumentException();
if (_setter == null)
return;
for (int i = 0; i < Count; i++)
{
@@ -105,6 +104,8 @@ namespace FlaxEditor.CustomEditors
throw new ArgumentException();
if (values == null || values.Count != Count)
throw new ArgumentException();
if (_setter == null)
return;
for (int i = 0; i < Count; i++)
{
@@ -120,6 +121,8 @@ namespace FlaxEditor.CustomEditors
{
if (instanceValues == null || instanceValues.Count != Count)
throw new ArgumentException();
if (_setter == null)
return;
for (int i = 0; i < Count; i++)
{
+7
View File
@@ -41,6 +41,11 @@ public class Editor : EditorModule
options.ScriptingAPI.SystemReferences.Add("System.Xml.ReaderWriter");
options.ScriptingAPI.SystemReferences.Add("System.Text.RegularExpressions");
options.ScriptingAPI.SystemReferences.Add("System.ComponentModel.TypeConverter");
options.ScriptingAPI.SystemReferences.Add("System.IO.Compression.ZipFile");
// Enable optimizations for Editor, disable this for debugging the editor
if (options.Configuration == TargetConfiguration.Development)
options.ScriptingAPI.Optimization = true;
options.PublicDependencies.Add("Engine");
options.PrivateDependencies.Add("pugixml");
@@ -102,5 +107,7 @@ public class Editor : EditorModule
files.Add(Path.Combine(FolderPath, "Cooker/GameCooker.h"));
files.Add(Path.Combine(FolderPath, "Cooker/PlatformTools.h"));
files.Add(Path.Combine(FolderPath, "Cooker/Steps/CookAssetsStep.h"));
files.Add(Path.Combine(FolderPath, "Utilities/ScreenUtilities.h"));
files.Add(Path.Combine(FolderPath, "Utilities/ViewportIconsRenderer.h"));
}
}
+76 -27
View File
@@ -3,16 +3,17 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
using FlaxEditor.Content;
using FlaxEditor.Content.Import;
using FlaxEditor.Content.Settings;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.Modules;
using FlaxEditor.Modules.SourceCodeEditing;
using FlaxEditor.Options;
using FlaxEditor.SceneGraph.Actors;
using FlaxEditor.States;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
@@ -152,12 +153,12 @@ namespace FlaxEditor
public ContentFindingModule ContentFinding;
/// <summary>
/// The scripts editing
/// The scripts editing.
/// </summary>
public CodeEditingModule CodeEditing;
/// <summary>
/// The scripts documentation
/// The scripts documentation.
/// </summary>
public CodeDocsModule CodeDocs;
@@ -177,7 +178,7 @@ namespace FlaxEditor
public ProjectCacheModule ProjectCache;
/// <summary>
/// The undo/redo
/// The undo/redo.
/// </summary>
public EditorUndo Undo;
@@ -363,7 +364,7 @@ namespace FlaxEditor
{
foreach (var preview in activePreviews)
{
if (preview == loadingPreview ||
if (preview == loadingPreview ||
(preview.Instance != null && (preview.Instance == control || preview.Instance.HasActorInHierarchy(control))))
{
// Link it to the prefab preview to see it in the editor
@@ -724,8 +725,8 @@ namespace FlaxEditor
// Cleanup
Undo.Dispose();
Surface.VisualScriptSurface.NodesCache.Clear();
Surface.AnimGraphSurface.NodesCache.Clear();
foreach (var cache in Surface.VisjectSurface.NodesCache.Caches.ToArray())
cache.Clear();
Instance = null;
// Invoke new instance if need to open a project
@@ -795,7 +796,6 @@ namespace FlaxEditor
{
if (projectFilePath == null || !File.Exists(projectFilePath))
{
// Error
MessageBox.Show("Missing project");
return;
}
@@ -931,21 +931,11 @@ namespace FlaxEditor
/// The <see cref="FlaxEngine.Animation"/>.
/// </summary>
Animation = 11,
}
/// <summary>
/// Imports the audio asset file to the target location.
/// </summary>
/// <param name="inputPath">The source file path.</param>
/// <param name="outputPath">The result asset file path.</param>
/// <param name="settings">The settings.</param>
/// <returns>True if importing failed, otherwise false.</returns>
public static bool Import(string inputPath, string outputPath, AudioImportSettings settings)
{
if (settings == null)
throw new ArgumentNullException();
settings.ToInternal(out var internalOptions);
return Internal_ImportAudio(inputPath, outputPath, ref internalOptions);
/// <summary>
/// The <see cref="FlaxEngine.BehaviorTree"/>.
/// </summary>
BehaviorTree = 12,
}
/// <summary>
@@ -1274,6 +1264,69 @@ namespace FlaxEditor
Scene.MarkSceneEdited(scenes);
}
/// <summary>
/// Bakes all environmental probes in the scene.
/// </summary>
public void BakeAllEnvProbes()
{
Scene.ExecuteOnGraph(node =>
{
if (node is EnvironmentProbeNode envProbeNode && envProbeNode.IsActive)
{
((EnvironmentProbe)envProbeNode.Actor).Bake();
node.ParentScene.IsEdited = true;
}
else if (node is SkyLightNode skyLightNode && skyLightNode.IsActive && skyLightNode.Actor is SkyLight skyLight && skyLight.Mode == SkyLight.Modes.CaptureScene)
{
skyLight.Bake();
node.ParentScene.IsEdited = true;
}
return node.IsActive;
});
}
/// <summary>
/// Builds CSG for all open scenes.
/// </summary>
public void BuildCSG()
{
var scenes = Level.Scenes;
scenes.ToList().ForEach(x => x.BuildCSG(0));
Scene.MarkSceneEdited(scenes);
}
/// <summary>
/// Builds Nav mesh for all open scenes.
/// </summary>
public void BuildNavMesh()
{
var scenes = Level.Scenes;
scenes.ToList().ForEach(x => Navigation.BuildNavMesh(x, 0));
Scene.MarkSceneEdited(scenes);
}
/// <summary>
/// Builds SDF for all static models in the scene.
/// </summary>
public void BuildAllMeshesSDF()
{
// TODO: async maybe with progress reporting?
Scene.ExecuteOnGraph(node =>
{
if (node is StaticModelNode staticModelNode && staticModelNode.Actor is StaticModel staticModel)
{
if (staticModel.DrawModes.HasFlag(DrawPass.GlobalSDF) && staticModel.Model != null && !staticModel.Model.IsVirtual && staticModel.Model.SDF.Texture == null)
{
Log("Generating SDF for " + staticModel.Model);
if (!staticModel.Model.GenerateSDF())
staticModel.Model.Save();
}
}
return true;
});
}
#endregion
#region Internal Calls
@@ -1579,7 +1632,7 @@ namespace FlaxEditor
private static void RequestStartPlayOnEditMode()
{
if (Instance.StateMachine.IsEditMode)
Instance.Simulation.RequestStartPlay();
Instance.Simulation.RequestStartPlayScenes();
if (Instance.StateMachine.IsPlayMode)
Instance.StateMachine.StateChanged -= RequestStartPlayOnEditMode;
}
@@ -1602,10 +1655,6 @@ namespace FlaxEditor
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool Internal_CloneAssetFile(string dstPath, string srcPath, ref Guid dstId);
[LibraryImport("FlaxEngine", EntryPoint = "EditorInternal_ImportAudio", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(StringMarshaller))]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool Internal_ImportAudio(string inputPath, string outputPath, ref AudioImportSettings.InternalOptions options);
[LibraryImport("FlaxEngine", EntryPoint = "EditorInternal_GetAudioClipMetadata", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(StringMarshaller))]
internal static partial void Internal_GetAudioClipMetadata(IntPtr obj, out int originalSize, out int importedSize);
+3 -1
View File
@@ -36,7 +36,9 @@ namespace FlaxEditor
public static void OnEditorOptionsChanged(Options.EditorOptions options)
{
var param = _highlightMaterial?.GetParameter("Color");
if (!_highlightMaterial)
return;
var param = _highlightMaterial.GetParameter("Color");
if (param != null)
param.Value = options.Visual.HighlightColor;
}
+5
View File
@@ -96,6 +96,11 @@ namespace FlaxEditor
public SpriteHandle Link64;
public SpriteHandle Build64;
public SpriteHandle Add64;
public SpriteHandle ShipIt64;
public SpriteHandle SplineFree64;
public SpriteHandle SplineLinear64;
public SpriteHandle SplineAligned64;
public SpriteHandle SplineSmoothIn64;
// 96px
public SpriteHandle Toolbox96;
+11 -2
View File
@@ -475,22 +475,31 @@ namespace FlaxEditor.GUI
if (_type != ScriptType.Null)
{
// Show asset picker popup
AssetSearchPopup.Show(this, Button1Rect.BottomLeft, IsValid, item =>
var popup = AssetSearchPopup.Show(this, Button1Rect.BottomLeft, IsValid, item =>
{
SelectedItem = item;
RootWindow.Focus();
Focus();
});
if (_selected != null)
{
var selectedAssetName = Path.GetFileNameWithoutExtension(_selected.Path);
popup.ScrollToAndHighlightItemByName(selectedAssetName);
}
}
else
{
// Show content item picker popup
ContentSearchPopup.Show(this, Button1Rect.BottomLeft, IsValid, item =>
var popup = ContentSearchPopup.Show(this, Button1Rect.BottomLeft, IsValid, item =>
{
SelectedItem = item;
RootWindow.Focus();
Focus();
});
if (_selectedItem != null)
{
popup.ScrollToAndHighlightItemByName(_selectedItem.ShortName);
}
}
}
else if (_selected != null || _selectedItem != null)
+65 -24
View File
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FlaxEditor.GUI.ContextMenu;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -396,14 +397,24 @@ namespace FlaxEditor.GUI
_popupMenu.ButtonClicked += btn =>
{
OnItemClicked((int)btn.Tag);
_popupMenu?.Hide();
if (SupportMultiSelect)
{
// Don't hide in multi-select, so user can edit multiple elements instead of just one
UpdateButtons();
_popupMenu?.PerformLayout();
}
else
{
_popupMenu?.Hide();
}
};
}
// Check if menu hs been already shown
if (_popupMenu.Visible)
{
_popupMenu.Hide();
if (!SupportMultiSelect)
_popupMenu.Hide();
return;
}
@@ -412,27 +423,7 @@ namespace FlaxEditor.GUI
// Check if has any items
if (_items.Count > 0)
{
// Setup items list
var itemControls = _popupMenu.Items.ToArray();
foreach (var e in itemControls)
e.Dispose();
if (Sorted)
_items.Sort();
var style = Style.Current;
for (int i = 0; i < _items.Count; i++)
{
var btn = _popupMenu.AddButton(_items[i]);
if (_selectedIndices.Contains(i))
{
btn.Icon = style.CheckBoxTick;
}
if (_tooltips != null && _tooltips.Length > i)
{
btn.TooltipText = _tooltips[i];
}
btn.Tag = i;
}
UpdateButtons();
// Show dropdown list
_popupMenu.MinimumWidth = Width;
@@ -440,6 +431,54 @@ namespace FlaxEditor.GUI
}
}
/// <summary>
/// Updates buttons layout.
/// </summary>
private void UpdateButtons()
{
if (_popupMenu.Items.Count() != _items.Count)
{
var itemControls = _popupMenu.Items.ToArray();
foreach (var e in itemControls)
e.Dispose();
if (Sorted)
_items.Sort();
for (int i = 0; i < _items.Count; i++)
{
var btn = _popupMenu.AddButton(_items[i]);
OnLayoutMenuButton(btn, i, true);
btn.Tag = i;
}
}
else
{
var itemControls = _popupMenu.Items.ToArray();
if (Sorted)
_items.Sort();
for (int i = 0; i < _items.Count; i++)
{
if (itemControls[i] is ContextMenuButton btn)
{
btn.Text = _items[i];
OnLayoutMenuButton(btn, i, true);
}
}
}
}
/// <summary>
/// Called when button is created or updated. Can be used to customize the visuals.
/// </summary>
/// <param name="button">The button.</param>
/// <param name="index">The item index.</param>
/// <param name="construct">true if button is created else it is repainting the button</param>
protected virtual void OnLayoutMenuButton(ContextMenuButton button, int index, bool construct = false)
{
button.Checked = _selectedIndices.Contains(index);
if (_tooltips != null && _tooltips.Length > index)
button.TooltipText = _tooltips[index];
}
/// <summary>
/// Creates the popup menu.
/// </summary>
@@ -460,6 +499,8 @@ namespace FlaxEditor.GUI
_popupMenu = null;
}
if (IsDisposing)
return;
_selectedIndices.Clear();
_selectedIndices = null;
_items.Clear();
@@ -504,7 +545,7 @@ namespace FlaxEditor.GUI
Render2D.DrawRectangle(clientRect.MakeExpanded(-2.0f), borderColor);
// Check if has selected item
if (_selectedIndices.Count > 0)
if (_selectedIndices != null && _selectedIndices.Count > 0)
{
string text = _selectedIndices.Count == 1 ? _items[_selectedIndices[0]] : "Multiple Values";
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FlaxEditor.Options;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -269,6 +270,24 @@ namespace FlaxEditor.GUI.ContextMenu
return item;
}
/// <summary>
/// Adds the button.
/// </summary>
/// <param name="text">The text.</param>
/// <param name="binding">The input binding.</param>
/// <param name="clicked">On button clicked event.</param>
/// <returns>Created context menu item control.</returns>
public ContextMenuButton AddButton(string text, InputBinding binding, Action clicked)
{
var item = new ContextMenuButton(this, text, binding.ToString())
{
Parent = _panel
};
item.Clicked += clicked;
SortButtons();
return item;
}
/// <summary>
/// Gets the child menu (with that name).
/// </summary>
@@ -154,6 +154,7 @@ namespace FlaxEditor.GUI.ContextMenu
}
// Unlock and perform controls update
Location = Float2.Zero;
UnlockChildrenRecursive();
PerformLayout();
@@ -162,7 +163,6 @@ namespace FlaxEditor.GUI.ContextMenu
var dpiSize = Size * dpiScale;
var locationWS = parent.PointToWindow(location);
var locationSS = parentWin.PointToScreen(locationWS);
Location = Float2.Zero;
var monitorBounds = Platform.GetMonitorBounds(locationSS);
var rightBottomLocationSS = locationSS + dpiSize;
bool isUp = false, isLeft = false;
@@ -138,7 +138,7 @@ namespace FlaxEditor.GUI.ContextMenu
// Draw icon
const float iconSize = 14;
var icon = Checked ? Style.Current.CheckBoxTick : Icon;
var icon = Checked ? style.CheckBoxTick : Icon;
if (icon.IsValid)
Render2D.DrawSprite(icon, new Rectangle(-iconSize - 1, (Height - iconSize) / 2, iconSize, iconSize), textColor);
}
@@ -72,7 +72,7 @@ namespace FlaxEditor.GUI.ContextMenu
// Hide parent CM popups and set itself as child
parentContextMenu.ShowChild(ContextMenu, PointToParent(ParentContextMenu, new Float2(Width, 0)));
}
/// <inheritdoc />
public override bool OnMouseUp(Float2 location, MouseButton button)
{
@@ -0,0 +1,95 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using FlaxEngine;
namespace FlaxEditor.GUI.ContextMenu
{
/// <summary>
/// Context menu for a single selectable option from range of values (eg. enum).
/// </summary>
[HideInEditor]
class ContextMenuSingleSelectGroup<T>
{
private struct SingleSelectGroupItem
{
public string Text;
public string Tooltip;
public T Value;
public Action Selected;
public List<ContextMenuButton> Buttons;
}
private List<ContextMenu> _menus = new List<ContextMenu>();
private List<SingleSelectGroupItem> _items = new List<SingleSelectGroupItem>();
private bool _hasSelected = false;
private SingleSelectGroupItem _selectedItem;
public T Selected
{
get => _selectedItem.Value;
set
{
var index = _items.FindIndex(x => x.Value.Equals(value));
if (index != -1 && (!_hasSelected || !_selectedItem.Value.Equals(value)))
{
SetSelected(_items[index]);
}
}
}
public Action<T> SelectedChanged;
public ContextMenuSingleSelectGroup<T> AddItem(string text, T value, Action selected = null, string tooltip = null)
{
var item = new SingleSelectGroupItem
{
Text = text,
Tooltip = tooltip,
Value = value,
Selected = selected,
Buttons = new List<ContextMenuButton>()
};
_items.Add(item);
foreach (var contextMenu in _menus)
AddItemToContextMenu(contextMenu, item);
return this;
}
public ContextMenuSingleSelectGroup<T> AddItemsToContextMenu(ContextMenu contextMenu)
{
_menus.Add(contextMenu);
for (int i = 0; i < _items.Count; i++)
AddItemToContextMenu(contextMenu, _items[i]);
return this;
}
private void AddItemToContextMenu(ContextMenu contextMenu, SingleSelectGroupItem item)
{
var btn = contextMenu.AddButton(item.Text, () => { SetSelected(item); });
if (item.Tooltip != null)
btn.TooltipText = item.Tooltip;
item.Buttons.Add(btn);
if (_hasSelected && item.Equals(_selectedItem))
btn.Checked = true;
}
private void SetSelected(SingleSelectGroupItem item)
{
foreach (var e in _items)
{
foreach (var btn in e.Buttons)
btn.Checked = false;
}
_selectedItem = item;
_hasSelected = true;
SelectedChanged?.Invoke(item.Value);
item.Selected?.Invoke();
foreach (var btn in item.Buttons)
btn.Checked = true;
}
}
}
@@ -319,7 +319,9 @@ namespace FlaxEditor.GUI.Dialogs
protected override void OnShow()
{
// Auto cancel on lost focus
#if !PLATFORM_LINUX
((WindowRootControl)Root).Window.LostFocus += OnCancel;
#endif
base.OnShow();
}
+5 -1
View File
@@ -290,7 +290,11 @@ namespace FlaxEditor.GUI.Dialogs
OnCancel();
return true;
case KeyboardKeys.Tab:
Root?.Navigate(NavDirection.Next);
if (Root != null)
{
bool shiftDown = Root.GetKey(KeyboardKeys.Shift);
Root.Navigate(shiftDown ? NavDirection.Previous : NavDirection.Next);
}
return true;
}
return false;
+19 -20
View File
@@ -44,11 +44,11 @@ namespace FlaxEditor.GUI.Docking
var mousePos = window.MousePosition;
var previousSize = window.Size;
window.Restore();
window.Position = FlaxEngine.Input.MouseScreenPosition - mousePos * window.Size / previousSize;
window.Position = Platform.MousePosition - mousePos * window.Size / previousSize;
}
// Calculate dragging offset and move window to the destination position
var mouseScreenPosition = FlaxEngine.Input.MouseScreenPosition;
var mouseScreenPosition = Platform.MousePosition;
// If the _toMove window was not focused when initializing this window, the result vector only contains zeros
// and to prevent a failure, we need to perform an update for the drag offset at later time which will be done in the OnMouseMove event handler.
@@ -83,6 +83,7 @@ namespace FlaxEditor.GUI.Docking
// Enable hit window presentation
Proxy.Window.RenderingEnabled = true;
Proxy.Window.Show();
Proxy.Window.Focus();
}
/// <summary>
@@ -113,7 +114,7 @@ namespace FlaxEditor.GUI.Docking
var window = _toMove.Window?.Window;
if (window == null)
return;
var mouse = FlaxEngine.Input.MouseScreenPosition;
var mouse = Platform.MousePosition;
// Move base window
window.Position = mouse - _dragOffset;
@@ -193,7 +194,7 @@ namespace FlaxEditor.GUI.Docking
// Move window to the mouse position (with some offset for caption bar)
var window = (WindowRootControl)toMove.Root;
var mouse = FlaxEngine.Input.MouseScreenPosition;
var mouse = Platform.MousePosition;
window.Window.Position = mouse - new Float2(8, 8);
// Get floating panel
@@ -244,7 +245,7 @@ namespace FlaxEditor.GUI.Docking
private void UpdateRects()
{
// Cache mouse position
_mouse = FlaxEngine.Input.MouseScreenPosition;
_mouse = Platform.MousePosition;
// Check intersection with any dock panel
var uiMouse = _mouse;
@@ -270,15 +271,16 @@ namespace FlaxEditor.GUI.Docking
// Cache dock rectangles
var size = _rectDock.Size;
var offset = _rectDock.Location;
float BorderMargin = 4.0f;
float ProxyHintWindowsSize2 = Proxy.HintWindowsSize * 0.5f;
float centerX = size.X * 0.5f;
float centerY = size.Y * 0.5f;
_rUpper = new Rectangle(centerX - ProxyHintWindowsSize2, BorderMargin, Proxy.HintWindowsSize, Proxy.HintWindowsSize) + offset;
_rBottom = new Rectangle(centerX - ProxyHintWindowsSize2, size.Y - Proxy.HintWindowsSize - BorderMargin, Proxy.HintWindowsSize, Proxy.HintWindowsSize) + offset;
_rLeft = new Rectangle(BorderMargin, centerY - ProxyHintWindowsSize2, Proxy.HintWindowsSize, Proxy.HintWindowsSize) + offset;
_rRight = new Rectangle(size.X - Proxy.HintWindowsSize - BorderMargin, centerY - ProxyHintWindowsSize2, Proxy.HintWindowsSize, Proxy.HintWindowsSize) + offset;
_rCenter = new Rectangle(centerX - ProxyHintWindowsSize2, centerY - ProxyHintWindowsSize2, Proxy.HintWindowsSize, Proxy.HintWindowsSize) + offset;
var borderMargin = 4.0f;
var hintWindowsSize = Proxy.HintWindowsSize * Platform.DpiScale;
var hintWindowsSize2 = hintWindowsSize * 0.5f;
var centerX = size.X * 0.5f;
var centerY = size.Y * 0.5f;
_rUpper = new Rectangle(centerX - hintWindowsSize2, borderMargin, hintWindowsSize, hintWindowsSize) + offset;
_rBottom = new Rectangle(centerX - hintWindowsSize2, size.Y - hintWindowsSize - borderMargin, hintWindowsSize, hintWindowsSize) + offset;
_rLeft = new Rectangle(borderMargin, centerY - hintWindowsSize2, hintWindowsSize, hintWindowsSize) + offset;
_rRight = new Rectangle(size.X - hintWindowsSize - borderMargin, centerY - hintWindowsSize2, hintWindowsSize, hintWindowsSize) + offset;
_rCenter = new Rectangle(centerX - hintWindowsSize2, centerY - hintWindowsSize2, hintWindowsSize, hintWindowsSize) + offset;
// Hit test
DockState toSet = DockState.Float;
@@ -428,7 +430,6 @@ namespace FlaxEditor.GUI.Docking
{
if (Window == null)
{
// Create proxy window
var settings = CreateWindowSettings.Default;
settings.Title = "DockHint.Window";
settings.Size = initSize;
@@ -440,12 +441,10 @@ namespace FlaxEditor.GUI.Docking
settings.IsRegularWindow = false;
settings.SupportsTransparency = true;
settings.ShowInTaskbar = false;
settings.ShowAfterFirstPaint = true;
settings.ShowAfterFirstPaint = false;
settings.IsTopmost = true;
Window = Platform.CreateWindow(ref settings);
// Set opacity and background color
Window.Opacity = 0.6f;
Window.GUI.BackgroundColor = Style.Current.DragWindow;
}
@@ -465,7 +464,7 @@ namespace FlaxEditor.GUI.Docking
var settings = CreateWindowSettings.Default;
settings.Title = name;
settings.Size = new Float2(HintWindowsSize);
settings.Size = new Float2(HintWindowsSize * Platform.DpiScale);
settings.AllowInput = false;
settings.AllowMaximize = false;
settings.AllowMinimize = false;
@@ -476,9 +475,9 @@ namespace FlaxEditor.GUI.Docking
settings.ShowInTaskbar = false;
settings.ActivateWhenFirstShown = false;
settings.IsTopmost = true;
settings.ShowAfterFirstPaint = false;
win = Platform.CreateWindow(ref settings);
win.Opacity = 0.6f;
win.GUI.BackgroundColor = Style.Current.DragWindow;
}
@@ -253,6 +253,12 @@ namespace FlaxEditor.GUI.Docking
tabColor = style.BackgroundHighlighted;
Render2D.FillRectangle(tabRect, tabColor);
}
else
{
tabColor = style.BackgroundHighlighted;
Render2D.DrawLine(tabRect.BottomLeft - new Float2(0 , 1), tabRect.UpperLeft, tabColor);
Render2D.DrawLine(tabRect.BottomRight - new Float2(0 , 1), tabRect.UpperRight, tabColor);
}
if (tab.Icon.IsValid)
{
+3 -12
View File
@@ -58,7 +58,6 @@ namespace FlaxEditor.GUI.Drag
{
if (item == null)
throw new ArgumentNullException();
return new DragDataText(DragPrefix + item.ID.ToString("N"));
}
@@ -71,11 +70,9 @@ namespace FlaxEditor.GUI.Drag
{
if (items == null)
throw new ArgumentNullException();
string text = DragPrefix;
foreach (var item in items)
text += item.ID.ToString("N") + '\n';
return new DragDataText(text);
}
@@ -83,9 +80,7 @@ namespace FlaxEditor.GUI.Drag
/// Tries to parse the drag data.
/// </summary>
/// <param name="data">The data.</param>
/// <returns>
/// Gathered objects or empty IEnumerable if cannot get any valid.
/// </returns>
/// <returns>Gathered objects or empty IEnumerable if cannot get any valid.</returns>
public override IEnumerable<Script> FromDragData(DragData data)
{
if (data is DragDataText dataText)
@@ -97,12 +92,9 @@ namespace FlaxEditor.GUI.Drag
var results = new List<Script>(ids.Length);
for (int i = 0; i < ids.Length; i++)
{
// Find element
if (Guid.TryParse(ids[i], out Guid id))
{
var obj = FlaxEngine.Object.Find<Script>(ref id);
// Check it
if (obj != null)
results.Add(obj);
}
@@ -111,11 +103,11 @@ namespace FlaxEditor.GUI.Drag
return results.ToArray();
}
}
return new Script[0];
return Utils.GetEmptyArray<Script>();
}
/// <summary>
/// Tries to parse the drag data to validate if it has valid scripts darg.
/// Tries to parse the drag data to validate if it has valid scripts drag.
/// </summary>
/// <param name="data">The data.</param>
/// <returns>True if drag data has valid scripts, otherwise false.</returns>
@@ -138,7 +130,6 @@ namespace FlaxEditor.GUI.Drag
}
}
}
return false;
}
}
+2 -2
View File
@@ -20,7 +20,7 @@ namespace FlaxEditor.GUI.Input
: this(false, 0, 0)
{
}
/// <summary>
/// Init search box
/// </summary>
@@ -28,7 +28,7 @@ namespace FlaxEditor.GUI.Input
: base(isMultiline, x, y, width)
{
WatermarkText = "Search...";
ClearSearchButton = new Button
{
Parent = this,
+1
View File
@@ -182,6 +182,7 @@ namespace FlaxEditor.GUI.Input
}
SlidingEnd?.Invoke();
Defocus();
Parent?.Focus();
}
/// <inheritdoc />
+29
View File
@@ -265,6 +265,35 @@ namespace FlaxEditor.GUI
_searchBox.Focus();
}
/// <summary>
/// Scrolls the scroll panel to a specific Item
/// </summary>
/// <param name="item">The item to scroll to.</param>
public void ScrollViewTo(Item item)
{
_scrollPanel.ScrollViewTo(item, true);
}
/// <summary>
/// Scrolls to the item and focuses it by name.
/// </summary>
/// <param name="itemName">The item name.</param>
public void ScrollToAndHighlightItemByName(string itemName)
{
foreach (var child in ItemsPanel.Children)
{
if (child is not ItemsListContextMenu.Item item)
continue;
if (string.Equals(item.Name, itemName, StringComparison.Ordinal))
{
// Highlight and scroll to item
item.Focus();
ScrollViewTo(item);
break;
}
}
}
/// <summary>
/// Sorts the items list (by item name by default).
/// </summary>
+13 -1
View File
@@ -292,7 +292,8 @@ namespace FlaxEditor.GUI
return true;
#if PLATFORM_WINDOWS
if (_useCustomWindowSystem)
var child = GetChildAtRecursive(location);
if (_useCustomWindowSystem && child is not Button && child is not MainMenuButton)
{
if (_window.IsMaximized)
_window.Restore();
@@ -304,6 +305,17 @@ namespace FlaxEditor.GUI
return true;
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (base.OnKeyDown(key))
return true;
// Fallback to the edit window for shortcuts
var editor = Editor.Instance;
return editor.Windows.EditWin.InputActions.Process(editor, this, key);
}
/// <inheritdoc />
protected override void PerformLayoutAfterChildren()
{
+1 -6
View File
@@ -50,14 +50,9 @@ namespace FlaxEditor.GUI
{
if (toolstrip == null)
return;
var lastToolstripButton = toolstrip.LastButton;
var parentSize = Parent.Size;
Bounds = new Rectangle
(
new Float2(lastToolstripButton.Right + 8.0f, 0),
new Float2(parentSize.X - X - 8.0f, toolstrip.Height)
);
Bounds = new Rectangle(lastToolstripButton.Right + 8.0f, 0, parentSize.X - X - 8.0f, toolstrip.Height);
}
}
}
@@ -1,7 +1,6 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Utilities;
+4 -1
View File
@@ -101,8 +101,11 @@ namespace FlaxEditor.GUI
if (_isValid(type))
{
var attributes = type.GetAttributes(true);
if (attributes.FirstOrDefault(x => x is HideInEditorAttribute) == null)
if (attributes.FirstOrDefault(x => x is HideInEditorAttribute || x is System.Runtime.CompilerServices.CompilerGeneratedAttribute) == null)
{
var mType = type.Type;
if (mType != null && mType.IsValueType && mType.ReflectedType != null && string.Equals(mType.ReflectedType.Name, "<PrivateImplementationDetails>", StringComparison.Ordinal))
continue;
AddItem(new TypeItemView(type, attributes));
}
}
+4 -1
View File
@@ -37,6 +37,9 @@ namespace FlaxEditor.GUI
: base(0, 0, 100, height)
{
Depth = -1;
if (Height < Style.Current.FontMedium.Height)
Height = Style.Current.FontMedium.Height + 4;
}
/// <inheritdoc />
@@ -238,7 +241,7 @@ namespace FlaxEditor.GUI
{
DoubleClick?.Invoke();
RowDoubleClick?.Invoke(this);
return base.OnMouseDoubleClick(location, button);
}
+9
View File
@@ -77,5 +77,14 @@ namespace FlaxEditor.GUI.Tabs
{
Deselected?.Invoke(this);
}
/// <summary>
/// Factory method for tabs header control (UI for the tabs strip to represent this tab).
/// </summary>
/// <returns>The tab header control.</returns>
public virtual Tabs.TabHeader CreateHeader()
{
return new Tabs.TabHeader((Tabs)Parent, this);
}
}
}
+84 -42
View File
@@ -24,11 +24,6 @@ namespace FlaxEditor.GUI.Tabs
/// </summary>
protected Tabs Tabs;
/// <summary>
/// The index of the tab.
/// </summary>
protected int Index;
/// <summary>
/// The tab.
/// </summary>
@@ -38,21 +33,22 @@ namespace FlaxEditor.GUI.Tabs
/// Initializes a new instance of the <see cref="TabHeader"/> class.
/// </summary>
/// <param name="tabs">The tabs.</param>
/// <param name="index">The tab index.</param>
/// <param name="tab">The tab.</param>
public TabHeader(Tabs tabs, int index, Tab tab)
public TabHeader(Tabs tabs, Tab tab)
: base(Float2.Zero, tabs._tabsSize)
{
Tabs = tabs;
Index = index;
Tab = tab;
}
/// <inheritdoc />
public override bool OnMouseUp(Float2 location, MouseButton button)
{
Tabs.SelectedTabIndex = Index;
Tabs.Focus();
if (EnabledInHierarchy && Tab.Enabled)
{
Tabs.SelectedTab = Tab;
Tabs.Focus();
}
return true;
}
@@ -61,19 +57,20 @@ namespace FlaxEditor.GUI.Tabs
{
base.Draw();
// Cache data
var style = Style.Current;
var enabled = EnabledInHierarchy && Tab.EnabledInHierarchy;
var tabRect = new Rectangle(Float2.Zero, Size);
bool isTabSelected = Tabs._selectedIndex == Index;
bool isMouseOverTab = IsMouseOver;
var textOffset = Tabs._orientation == Orientation.Horizontal ? 0 : 8;
// Draw bar
if (isTabSelected)
if (Tabs.SelectedTab == Tab)
{
var color = style.BackgroundSelected;
if (!enabled)
color *= 0.6f;
if (Tabs._orientation == Orientation.Horizontal)
{
Render2D.FillRectangle(tabRect, style.BackgroundSelected);
Render2D.FillRectangle(tabRect, color);
}
else
{
@@ -84,10 +81,10 @@ namespace FlaxEditor.GUI.Tabs
fillRect.Size.X -= lefEdgeWidth;
fillRect.Location.X += lefEdgeWidth;
Render2D.FillRectangle(fillRect, style.Background);
Render2D.FillRectangle(leftEdgeRect, style.BackgroundSelected);
Render2D.FillRectangle(leftEdgeRect, color);
}
}
else if (isMouseOverTab)
else if (IsMouseOver && enabled)
{
Render2D.FillRectangle(tabRect, style.BackgroundHighlighted);
}
@@ -131,20 +128,15 @@ namespace FlaxEditor.GUI.Tabs
{
base.PerformLayoutBeforeChildren();
// Cache data
var tabsSize = Tabs._tabsSize;
var clientSize = GetClientArea();
tabsSize = Float2.Min(tabsSize, clientSize.Size);
var tabRect = new Rectangle(Float2.Zero, tabsSize);
var tabStripOffset = Tabs._orientation == Orientation.Horizontal ? new Float2(tabsSize.X, 0) : new Float2(0, tabsSize.Y);
// Arrange tab header controls
var pos = Float2.Zero;
var sizeMask = Tabs._orientation == Orientation.Horizontal ? Float2.UnitX : Float2.UnitY;
for (int i = 0; i < Children.Count; i++)
{
if (Children[i] is TabHeader tabHeader)
{
tabHeader.Bounds = tabRect;
tabRect.Offset(tabStripOffset);
tabHeader.Location = pos;
pos += tabHeader.Size * sizeMask;
}
}
}
@@ -160,6 +152,11 @@ namespace FlaxEditor.GUI.Tabs
/// </summary>
protected Float2 _tabsSize;
/// <summary>
/// Automatic tab size based on the fill axis.
/// </summary>
protected bool _autoTabsSizeAuto;
/// <summary>
/// The orientation.
/// </summary>
@@ -174,15 +171,33 @@ namespace FlaxEditor.GUI.Tabs
set
{
_tabsSize = value;
for (int i = 0; i < TabsPanel.ChildrenCount; i++)
if (!_autoTabsSizeAuto)
{
if (TabsPanel.Children[i] is TabHeader tabHeader)
tabHeader.Size = value;
for (int i = 0; i < TabsPanel.ChildrenCount; i++)
{
if (TabsPanel.Children[i] is TabHeader tabHeader)
tabHeader.Size = value;
}
}
PerformLayout();
}
}
/// <summary>
/// Enables automatic tabs size to fill the space.
/// </summary>
public bool AutoTabsSize
{
get => _autoTabsSizeAuto;
set
{
if (_autoTabsSizeAuto == value)
return;
_autoTabsSizeAuto = value;
PerformLayout();
}
}
/// <summary>
/// Gets or sets the orientation.
/// </summary>
@@ -191,11 +206,11 @@ namespace FlaxEditor.GUI.Tabs
get => _orientation;
set
{
if (_orientation == value)
return;
_orientation = value;
if (UseScroll)
TabsPanel.ScrollBars = _orientation == Orientation.Horizontal ? ScrollBars.Horizontal : ScrollBars.Vertical;
PerformLayout();
}
}
@@ -339,14 +354,10 @@ namespace FlaxEditor.GUI.Tabs
// Update tabs headers
TabsPanel.DisposeChildren();
int index = 0;
for (int i = 0; i < Children.Count; i++)
{
if (Children[i] is Tab tab)
{
var tabHeader = new TabHeader(this, index++, tab);
TabsPanel.AddChild(tabHeader);
}
TabsPanel.AddChild(tab.CreateHeader());
}
TabsPanel.IsLayoutLocked = wasLocked;
@@ -371,23 +382,54 @@ namespace FlaxEditor.GUI.Tabs
/// <inheritdoc />
protected override void PerformLayoutBeforeChildren()
{
var tabsSize = _tabsSize;
if (_autoTabsSizeAuto)
{
// Horizontal is default for Toolbox so tabs go to the right
int tabsCount = 0;
for (int i = 0; i < TabsPanel.ChildrenCount; i++)
{
if (TabsPanel.Children[i] is TabHeader)
tabsCount++;
}
if (tabsCount == 0)
tabsCount = 1;
if (_orientation == Orientation.Horizontal)
tabsSize.X = Width / tabsCount;
else
tabsSize.Y = Height / tabsCount;
for (int i = 0; i < TabsPanel.ChildrenCount; i++)
{
if (TabsPanel.Children[i] is TabHeader tabHeader)
tabHeader.Size = tabsSize;
}
}
else if (UseScroll)
{
// If scroll bar is visible it covers part of the tab header so include this in tab size to improve usability
if (_orientation == Orientation.Horizontal && TabsPanel.HScrollBar.Visible)
tabsSize.Y += TabsPanel.HScrollBar.Height;
else if (_orientation == Orientation.Vertical && TabsPanel.VScrollBar.Visible)
tabsSize.X += TabsPanel.VScrollBar.Width;
}
// Fit the tabs panel
TabsPanel.Size = _orientation == Orientation.Horizontal ? new Float2(Width, _tabsSize.Y) : new Float2(_tabsSize.X, Height);
TabsPanel.Size = _orientation == Orientation.Horizontal
? new Float2(Width, tabsSize.Y)
: new Float2(tabsSize.X, Height);
// Hide all pages except selected one
var clientArea = _orientation == Orientation.Horizontal
? new Rectangle(0, _tabsSize.Y, Width, Height - _tabsSize.Y)
: new Rectangle(_tabsSize.X, 0, Width - _tabsSize.X, Height);
for (int i = 0; i < Children.Count; i++)
{
if (Children[i] is Tab tab)
{
// Check if is selected or not
if (i - 1 == _selectedIndex)
{
// Show and fit size
tab.Visible = true;
tab.Bounds = clientArea;
tab.Bounds = _orientation == Orientation.Horizontal
? new Rectangle(0, tabsSize.Y, Width, Height - tabsSize.Y)
: new Rectangle(tabsSize.X, 0, Width - tabsSize.X, Height);
}
else
{
+2 -2
View File
@@ -282,7 +282,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
var x = time * zoom + Timeline.StartOffset;
// Header line
var lineRect = new Rectangle(x - 0.5f, -verticalLinesHeaderExtend + timeAxisHeaderOffset, 1.0f, verticalLinesHeaderExtend);
var lineRect = new Rectangle(x - 0.5f, -verticalLinesHeaderExtend * 0.6f + timeAxisHeaderOffset, 1.0f, verticalLinesHeaderExtend * 0.6f);
Render2D.FillRectangle(lineRect, lineColor);
// Time label
@@ -300,7 +300,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
break;
default: throw new ArgumentOutOfRangeException();
}
var labelRect = new Rectangle(x + 2, -verticalLinesHeaderExtend + timeAxisHeaderOffset, 50, verticalLinesHeaderExtend);
var labelRect = new Rectangle(x + 2, -verticalLinesHeaderExtend * 0.8f + timeAxisHeaderOffset, 50, verticalLinesHeaderExtend);
Render2D.DrawText(style.FontSmall, labelText, labelRect, labelColor, TextAlignment.Near, TextAlignment.Center, TextWrapping.NoWrap, 1.0f, 0.8f);
}
}
@@ -1,5 +1,7 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.Globalization;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -30,11 +32,33 @@ namespace FlaxEditor.GUI.Timeline.GUI
var timeAxisOverlap = Timeline.HeaderTopAreaHeight * 0.5f;
var timeAxisHeaderOffset = -_timeline.MediaBackground.ViewOffset.Y - timeAxisOverlap;
// Time label
string labelText;
switch (_timeline.TimeShowMode)
{
case Timeline.TimeShowModes.Frames:
labelText = _timeline.CurrentFrame.ToString("###0", CultureInfo.InvariantCulture);
break;
case Timeline.TimeShowModes.Seconds:
labelText = _timeline.CurrentTime.ToString("###0.##'s'", CultureInfo.InvariantCulture);
break;
case Timeline.TimeShowModes.Time:
labelText = TimeSpan.FromSeconds(_timeline.CurrentTime).ToString("g");
break;
default: throw new ArgumentOutOfRangeException();
}
var color = (_timeline.IsMovingPositionHandle ? style.ProgressNormal : style.Foreground).AlphaMultiplied(0.6f);
Matrix3x3.RotationZ(Mathf.PiOverTwo, out var m1);
var m2 = Matrix3x3.Translation2D(0, timeAxisHeaderOffset);
Matrix3x3.Multiply(ref m1, ref m2, out var m3);
Render2D.PushTransform(ref m3);
Render2D.DrawSprite(icon, new Rectangle(new Float2(4, -Width), Size), _timeline.IsMovingPositionHandle ? style.ProgressNormal : style.Foreground);
// TODO: Convert to its own sprite or 9 slice
Render2D.DrawSprite(icon, new Rectangle(new Float2(10, -icon.Size.X * 0.5f - 1), Size + new Float2(0, 1)), color);
Render2D.FillRectangle(new Rectangle(new Float2(-6, -icon.Size.Y * 0.5f + 7), new Float2(timeAxisOverlap, 5)), color);
Render2D.PopTransform();
var textMatrix = Matrix3x3.Translation2D(12, timeAxisHeaderOffset);
Render2D.PushTransform(ref textMatrix);
Render2D.DrawText(style.FontSmall, labelText, style.Foreground, new Float2(2, -6));
Render2D.PopTransform();
Render2D.FillRectangle(new Rectangle(Width * 0.5f, Height + timeAxisHeaderOffset, 1, _timeline.MediaPanel.Height - timeAxisHeaderOffset - timeAxisOverlap), _timeline.IsMovingPositionHandle ? style.ProgressNormal : style.Foreground.RGBMultiplied(0.8f));
@@ -33,7 +33,7 @@ namespace FlaxEditor.GUI.Timeline
/// </summary>
public SceneAnimationPlayer Player
{
get => _player;
get => _player != null ? _player : null;
set
{
if (_player == value)
@@ -268,7 +268,7 @@ namespace FlaxEditor.GUI.Timeline
/// <inheritdoc />
public override void OnSeek(int frame)
{
if (_player?.Animation)
if (_player != null && _player.Animation)
{
_player.Animation.WaitForLoaded();
_player.Time = frame / _player.Animation.FramesPerSecond;
+21
View File
@@ -50,6 +50,27 @@ namespace FlaxEditor.GUI.Timeline
}
}
/// <inheritdoc />
public override void OnMouseEnter(Float2 location)
{
base.OnMouseEnter(location);
Cursor = CursorType.Hand;
}
/// <inheritdoc />
public override void OnMouseLeave()
{
Cursor = CursorType.Default;
base.OnMouseLeave();
}
/// <inheritdoc />
public override void Defocus()
{
Cursor = CursorType.Default;
base.Defocus();
}
private void Seek(ref Float2 location)
{
if (_timeline.PlaybackState == PlaybackStates.Disabled)
+1 -1
View File
@@ -167,7 +167,7 @@ namespace FlaxEditor.GUI.Timeline
/// <summary>
/// The header top area height (in pixels).
/// </summary>
public static readonly float HeaderTopAreaHeight = 22.0f;
public static readonly float HeaderTopAreaHeight = 40.0f;
/// <summary>
/// The timeline units per second (on time axis).
@@ -298,7 +298,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
var animEventTypes = Editor.Instance.CodeEditing.All.Get().Where(x => new ScriptType(typeof(AnimEvent)).IsAssignableFrom(x));
foreach (var type in animEventTypes)
{
if (type.IsAbstract || !type.CanCreateInstance)
if (type.IsAbstract || !type.CanCreateInstance || type.HasAttribute(typeof(HideInEditorAttribute), true))
continue;
var add = new ScriptType(typeof(AnimContinuousEvent)).IsAssignableFrom(type) ? addContinuousEvent : addEvent;
var b = add.ContextMenu.AddButton(type.Name);
@@ -307,6 +307,10 @@ namespace FlaxEditor.GUI.Timeline.Tracks
b.Parent.Tag = time;
b.ButtonClicked += OnAddAnimEvent;
}
if (!addEvent.ContextMenu.Items.Any())
addEvent.ContextMenu.AddButton("No Anim Events found").CloseMenuOnClick = false;
if (!addContinuousEvent.ContextMenu.Items.Any())
addContinuousEvent.ContextMenu.AddButton("No Continuous Anim Events found").CloseMenuOnClick = false;
}
@@ -125,6 +125,8 @@ namespace FlaxEditor.GUI.Timeline.Tracks
fov = cam.FieldOfView;
customAspectRatio = cam.CustomAspectRatio;
view.RenderLayersMask = cam.RenderLayersMask;
view.Flags = cam.RenderFlags;
view.Mode = cam.RenderMode;
}
// Try to evaluate camera properties based on the animated tracks
+32 -1
View File
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -23,10 +24,15 @@ namespace FlaxEditor.GUI
public const int DefaultMarginH = 2;
/// <summary>
/// Event fired when button gets clicked.
/// Event fired when button gets clicked with the primary mouse button.
/// </summary>
public Action<ToolStripButton> ButtonClicked;
/// <summary>
/// Event fired when button gets clicked with the secondary mouse button.
/// </summary>
public Action<ToolStripButton> SecondaryButtonClicked;
/// <summary>
/// Tries to get the last button.
/// </summary>
@@ -146,6 +152,11 @@ namespace FlaxEditor.GUI
ButtonClicked?.Invoke(button);
}
internal void OnSecondaryButtonClicked(ToolStripButton button)
{
SecondaryButtonClicked?.Invoke(button);
}
/// <inheritdoc />
protected override void PerformLayoutBeforeChildren()
{
@@ -171,5 +182,25 @@ namespace FlaxEditor.GUI
PerformLayout();
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (base.OnKeyDown(key))
return true;
// Fallback to the owning window for shortcuts
EditorWindow editorWindow = null;
ContainerControl c = Parent;
while (c != null && editorWindow == null)
{
editorWindow = c as EditorWindow;
c = c.Parent;
}
var editor = Editor.Instance;
if (editorWindow == null)
editorWindow = editor.Windows.EditWin; // Fallback to main editor window
return editorWindow.InputActions.Process(editor, this, key);
}
}
}
+36 -21
View File
@@ -20,13 +20,19 @@ namespace FlaxEditor.GUI
private SpriteHandle _icon;
private string _text;
private bool _mouseDown;
private bool _primaryMouseDown;
private bool _secondaryMouseDown;
/// <summary>
/// Event fired when user clicks the button.
/// </summary>
public Action Clicked;
/// <summary>
/// Event fired when user clicks the button.
/// </summary>
public Action SecondaryClicked;
/// <summary>
/// The checked state.
/// </summary>
@@ -63,6 +69,11 @@ namespace FlaxEditor.GUI
}
}
/// <summary>
/// A reference to a context menu to raise when the secondary mouse button is pressed.
/// </summary>
public ContextMenu.ContextMenu ContextMenu;
/// <summary>
/// Initializes a new instance of the <see cref="ToolStripButton"/> class.
/// </summary>
@@ -108,10 +119,11 @@ namespace FlaxEditor.GUI
var iconRect = new Rectangle(DefaultMargin, DefaultMargin, iconSize, iconSize);
var textRect = new Rectangle(DefaultMargin, 0, 0, Height);
bool enabled = EnabledInHierarchy;
bool mouseButtonDown = _primaryMouseDown || _secondaryMouseDown;
// Draw background
if (enabled && (IsMouseOver || IsNavFocused || Checked))
Render2D.FillRectangle(clientRect, Checked ? style.BackgroundSelected : _mouseDown ? style.BackgroundHighlighted : (style.LightBackground * 1.3f));
Render2D.FillRectangle(clientRect, Checked ? style.BackgroundSelected : mouseButtonDown ? style.BackgroundHighlighted : (style.LightBackground * 1.3f));
// Draw icon
if (_icon.IsValid)
@@ -124,13 +136,7 @@ namespace FlaxEditor.GUI
if (!string.IsNullOrEmpty(_text))
{
textRect.Size.X = Width - DefaultMargin - textRect.Left;
Render2D.DrawText(
style.FontMedium,
_text,
textRect,
enabled ? style.Foreground : style.ForegroundDisabled,
TextAlignment.Near,
TextAlignment.Center);
Render2D.DrawText(style.FontMedium, _text, textRect, enabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Near, TextAlignment.Center);
}
}
@@ -155,9 +161,13 @@ namespace FlaxEditor.GUI
{
if (button == MouseButton.Left)
{
// Set flag
_mouseDown = true;
_primaryMouseDown = true;
Focus();
return true;
}
if (button == MouseButton.Right)
{
_secondaryMouseDown = true;
Focus();
return true;
}
@@ -168,12 +178,9 @@ namespace FlaxEditor.GUI
/// <inheritdoc />
public override bool OnMouseUp(Float2 location, MouseButton button)
{
if (button == MouseButton.Left && _mouseDown)
if (button == MouseButton.Left && _primaryMouseDown)
{
// Clear flag
_mouseDown = false;
// Fire events
_primaryMouseDown = false;
if (AutoCheck)
Checked = !Checked;
Clicked?.Invoke();
@@ -181,6 +188,14 @@ namespace FlaxEditor.GUI
return true;
}
if (button == MouseButton.Right && _secondaryMouseDown)
{
_secondaryMouseDown = false;
SecondaryClicked?.Invoke();
(Parent as ToolStrip)?.OnSecondaryButtonClicked(this);
ContextMenu?.Show(this, new Float2(0, Height));
return true;
}
return base.OnMouseUp(location, button);
}
@@ -188,8 +203,8 @@ namespace FlaxEditor.GUI
/// <inheritdoc />
public override void OnMouseLeave()
{
// Clear flag
_mouseDown = false;
_primaryMouseDown = false;
_secondaryMouseDown = false;
base.OnMouseLeave();
}
@@ -197,8 +212,8 @@ namespace FlaxEditor.GUI
/// <inheritdoc />
public override void OnLostFocus()
{
// Clear flag
_mouseDown = false;
_primaryMouseDown = false;
_secondaryMouseDown = false;
base.OnLostFocus();
}
+17 -4
View File
@@ -762,6 +762,10 @@ namespace FlaxEditor.GUI.Tree
// Add/Remove
tree.AddOrRemoveSelection(this);
}
else if (button == MouseButton.Right && tree.Selection.Contains(this))
{
// Do nothing
}
else
{
// Select
@@ -772,11 +776,20 @@ namespace FlaxEditor.GUI.Tree
// Check if mouse hits arrow
if (_mouseOverArrow && HasAnyVisibleChild)
{
// Toggle open state
if (_opened)
Collapse();
if (ParentTree.Root.GetKey(KeyboardKeys.Alt))
{
if (_opened)
CollapseAll();
else
ExpandAll();
}
else
Expand();
{
if (_opened)
Collapse();
else
Expand();
}
}
// Check if mouse hits bar

Some files were not shown because too many files have changed in this diff Show More