Commit graph

800 commits

Author SHA1 Message Date
Kasen IO
20f5439fa8 Hard tabs converted to 4 length soft tabs. 2020-01-06 08:58:09 -05:00
Kasen IO
8124b7d4a1 Fixed tabs and spaces. 2020-01-06 08:29:01 -05:00
Kasen IO
fb5dbfc52a Disable whitelist on entity_server scripts. 2020-01-05 23:32:28 -05:00
David Rowe
5256f58520 Document callback function signatures for Script.addEventHandler() 2019-12-17 16:17:45 +13:00
David Rowe
bbd16d7544 Fix global print function's JSDoc 2019-12-11 07:42:58 +13:00
Kasen IO
3e6660b633 Updated whitelist debugs for clarity in dev log 2019-12-09 08:30:02 -05:00
Kasen IO
2de388ab3b Fixes bug where empty "" whitespace allows all scripts. 2019-12-09 01:20:04 -05:00
Kasen IO
fe66dc82f3 scriptengine pulls from inferface.json correctly, removed extra debug, fixed QML to load to textarea correctly. 2019-12-08 23:11:21 -05:00
Kasen IO
f49e64b99f Cleaned out extra commented code. 2019-12-08 21:12:20 -05:00
Kasen IO
2e36c40912 added QML + C++ system for whitelists 2019-12-07 21:37:23 -05:00
Kasen IO
edfce861a8 Merge branch 'kasen/core' into v0860-kasen-release+freshstart 2019-12-01 22:56:19 -05:00
Kasen IO
07d706d681 Removed all hardcoded whitelist rules 2019-12-01 22:55:51 -05:00
Kasen IO
0b46c53df1 Merge branch 'kasen/core' into v0860-kasen-release+freshstart 2019-12-01 19:59:59 -05:00
David Rowe
d5e08d19e3 Fix JSDoc for miscellaneous white space issues 2019-09-20 08:17:24 +12:00
Shannon Romano
65d0bb1342
Merge pull request #15906 from kasenvr/kpi-v1-modkit-rc
Kasen Plugin Infrastructure v½ Codename "Modkit Mini"
2019-09-11 13:04:01 -07:00
Sam Gateau
acf51ad217
Merge pull request #16137 from jherico/fix/bugz-1398
BUGZ-1398: Tablet access to local HTML
2019-09-06 09:59:22 -07:00
Brad Davis
0511f87bad BUGZ-1398: Tablet access to local HTML https://youtu.be/7EWQOeQf32U 2019-09-05 11:43:43 -07:00
humbletim
271fac4bca Merge remote-tracking branch 'upstream/master' into kasenvr-kpi-v1-modkit-rc-merge 2019-09-05 09:46:21 -04:00
David Rowe
6474705ca2 Reformat "supported script types" in Entities and Scripts signals 2019-09-04 21:06:30 +12:00
sabrina-shanman
437f6b4096 Only say we're throwing a script error when we mean it 2019-08-28 14:58:57 -07:00
sabrina-shanman
67a06b3a74 Attempt to fix crash from script running too late 2019-08-28 14:28:12 -07:00
Simon Walton
9aacd136b8 Add blocking to script unload for client entity-scripts 2019-08-14 13:51:40 -07:00
Kalila R
28b27a1e48 Merge branch 'v0.83.0-rc' into kasen/core 2019-08-03 15:27:23 -04:00
humbletim
c5b2514e0e fix linux build warning; remove unnecessary code 2019-07-23 12:13:49 -04:00
kasenvr
e9e9607a3b modkit core changes initial commit
whitespace corrections + warnings
updated cmake plugin
rework with focus on JS API integration example
cleanup edit_filter scope
separate-out edit_filter wantsScope stuff
-plugin metadata
split scriptengines out separately
cleanup __url/__filename sets
additional cleanup
fix typo; consolidate ScriptInitializerMixin inits
add more example API protoypes
cleanup pass; fix entity_server / agent init
fix whitespace
remove technically unnessary plugin filtering
+EDIT_FILTER_SCRIPT; cleanup
reorder public/slot/private
use std::count_if
formatting
better debug output; cleanup
fix msvc compiler warning
cleanup
eradicate QtScript references from API Example
updated header comments
Updated KasenAPIExample
2019-07-14 21:35:13 -04:00
Anthony Thibault
6c66f5a37b Fix for DependencyManager crash on shutdown on Mac
On Mac, it is possible to crash when shutting down, it is not clear if this is due to
shutting down the app on another thread during logout or something that can happen
during normal shutdown, because it is so difficult to reproduce.

However, from looking at the stack traces it is possible for a [NSApplication terminate:]
event to get processed while Appliction::aboutToQuit() is calling ScriptEngine::waitTillDoneRunning()
This causes AppKit to invoke the static destructors too early.  Which in turn, causes the
DependencyManager destructor to fire while there are still many dependencies running.
Unfortunatly, the order of destruction is not determinstic, causing them to get shutdown
in an incorrect order.

To workaround this, we delay the call to QCoreApplication::processEvents() as late as possible,
in the Application destructor. Theoretically, this will be a safe time for the static destructors
to be invoked, because it is after all of the DependencyManager's dependencies have been
manually destroyed.

However, this is only a speculative fix, because this is so difficult to reproduce.
2019-07-01 17:37:57 -07:00
David Rowe
b2b7a6ae99 Merge branch 'master' into DOC-79 2019-06-22 12:11:22 +12:00
sabrina-shanman
4fafa2135a Fix potential crash when ending script on main thread 2019-06-21 14:20:15 -07:00
David Rowe
0945bdaac7 Remainder of Entities methods' JSDoc 2019-06-20 15:11:01 +12:00
Anthony J. Thibault
e1534b34b4 Workaround crash in reportAdditionalMemoryCost other platforms 2019-06-04 08:56:07 -07:00
David Rowe
ca7ddece8b Add missing Script JSDoc 2019-05-21 10:32:12 +12:00
Revofire
47af406440 merged 0.80.0-kasen into 0.81.0-kasen, 0.81.0-kasen source ready for build.
various changes, idk, added a whitelist filter to ent script filter
2019-05-01 22:13:51 -04:00
David Rowe
28dfac64ba Merge branch 'master' into M21460
# Conflicts:
#	libraries/image/src/image/Image.h
2019-04-05 17:50:46 +13:00
David Rowe
68f76851fd Updates per doc review 2019-04-05 17:10:52 +13:00
Ryan Huffman
cf3a9b1d48 Fix ScriptEngine not being destroyed on its own thread 2019-04-04 13:28:13 -07:00
David Rowe
9a1bb27034 AnimationCache, ModelCache, SoundCache, and TextureCache JSDoc 2019-03-26 13:58:43 +13:00
SamGondelman
300dd39abf fix script engine shutdown 2019-03-13 12:23:31 -07:00
SamGondelman
f2c248c0a2 disable href and entity script events when in edit mode 2019-03-04 17:10:20 -08:00
David Rowe
5428bb19dc Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
John Conklin II
45ec44423b
Merge pull request #14694 from danteruiz/delete-only-domain-entities
case 20595: case 20563: Do not delete local entities when switching domains.
2019-01-17 11:25:58 -08:00
Antonina Savinova
560c44a74a
Merge pull request #14697 from howard-stearns/more-log-purge
log purge
2019-01-15 16:19:03 -08:00
Dante Ruiz
e7d3844620 making pre review requests 2019-01-14 11:14:57 -08:00
Seth Alves
6ca9ab6fba avoid shutdown crash 2019-01-11 15:53:49 -08:00
Seth Alves
36040597ba rename variable for consistency 2019-01-11 15:53:49 -08:00
Seth Alves
6589db628a fix a couple shutdown crashes and a class of asan warning 2019-01-11 15:53:49 -08:00
Howard Stearns
62ed84aa19 more log purge 2019-01-11 12:34:44 -08:00
unknown
f8f13e974d property range audit - add range info via macros accessible via API, tweak min/max/steps in entityProperties 2019-01-02 11:12:10 -08:00
Clement
7723261cb9 Remove deferred script loading logic 2018-12-05 14:08:30 -08:00
Zach Fox
e0ca535853 CR round 2 2018-11-08 10:08:42 -08:00
Roxanne Skelly
cef7000a72 Case 19754 - Remove logging URLs and related file locations.
The goal is to strip out data that can be used by untoward users in
copying models, avatars, etc.
2018-11-06 16:24:32 -08:00
Sam Gondelman
5b6e7b2566
Merge branch 'master' into scriptvec3 2018-10-02 08:58:04 -07:00
Brad Hefta-Gaub
edd5db7768
Merge pull request #14042 from thoys/perf/create/getMultipleEntities
Speed up Entity List properties fetching by adding Entities.getMultipleEntities API
2018-10-01 16:16:48 -07:00
Seth Alves
f6e57f54b0 don't call enterEntity until script preload has finished 2018-09-21 10:26:55 -07:00
Thijs Wenker
06491ef12f API function for retrieving multiple entity properties with better performance 2018-09-20 19:34:00 +02:00
SamGondelman
c522d1bc93 merge with master 2018-09-14 00:57:13 -07:00
Clement
e6b4ccef16 Add lock around _entityScripts 2018-09-13 15:10:16 -07:00
David Back
3601ade8ba destroy thread from thread finished not scriptEngine destroyed 2018-09-07 18:36:36 -07:00
Sam Gondelman
6730635931
Merge branch 'master' into scriptvec3 2018-08-27 10:43:52 -07:00
SamGondelman
283c0c0311 s i m p l i f y 2018-08-23 11:47:56 -07:00
Stephen Birarda
01e8fd66a3 fix script engine(s) cleanup from ESS 2018-08-22 13:52:37 -07:00
Sam Gondelman
f0986a7f5a Merge branch 'master' into scriptvec3 2018-08-20 10:56:45 -07:00
Stephen Birarda
e686df6fb9
Merge pull request #13720 from Atlante45/feat/test-tool
Stack tester changes
2018-08-08 13:40:05 -04:00
Sam Gondelman
7772e8adf2
Merge branch 'master' into scriptvec3 2018-08-03 14:57:49 -07:00
Clement
9c89aa9f90 Make sure the stack test interface gets cleaned up 2018-08-01 13:29:07 -07:00
Thijs Wenker
74343c71d8 CR fixes 2018-07-31 22:29:53 +02:00
Clement
949c7f8c19 Add automated test tool scripting interface 2018-07-30 17:18:32 -07:00
Thijs Wenker
ba8d445444 fix require by queueing content requests 2018-07-28 00:25:16 +02:00
SamGondelman
5bbd5b9e52 vec2 conversion 2018-07-10 16:32:49 -07:00
Anthony J. Thibault
ac6fcf092c Fix memory corruption via lambdas that capture local variables by reference.
The lambdas in ScriptEngine::fetchModuleSource() were referencing local stack variables by reference.
This could lead to un-expected results including memory corruption.
To workaround this issue the QTimer and QEventLoop variables are allocated on the heap and held onto by a shared_ptr.
This shared_ptr is passed to the lambda.

This will not result in cycles and should result in the QTimer and QEventLoop being destroyed when the BatchLoader
object they are connected to is deleted.
2018-06-28 11:15:25 -07:00
Alexander Ivash
5897c9948d terminate thread if it didn't complete during MAX_SCRIPT_QUITTING_TIME 2018-06-06 03:52:22 +03:00
Gabriel Calero
bb73af7230 Show stats button only in debug mode. Add isDebugMode to Script public interface 2018-05-29 17:21:44 -03:00
David Rowe
e44e7ca35f Fix up Resource and resource cache APIs' JSDoc 2018-05-21 11:57:16 +12:00
Seth Alves
7466d08f1f more suppression of logging 2018-05-09 13:01:49 -07:00
Clement
da9fb9c751 Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
John Conklin II
7a5fce4315
Merge pull request #12991 from luiscuenca/avatarScript
Avatar Scripts
2018-05-02 12:23:13 -07:00
David Rowe
a1fc1c4810 Add JSDoc for Entity preload and unload signals 2018-05-01 21:55:14 +12:00
luiscuenca
50ca09b3b4 minor fixes 2018-04-30 16:26:04 -07:00
luiscuenca
2de982a5a2 Added script types and better script reload 2018-04-30 12:04:35 -07:00
MiladNazeri
9baf02b7a1
Merge pull request #12036 from humbletim/Leopoly_Phase1_003_Asset-Request
Leopoly_Phase1_003_Asset-Request
2018-01-29 11:40:41 -08:00
humbletim
3a735c1fc7 CR feedback and code cleanup 2018-01-23 03:12:26 -05:00
Brad Davis
ceb60f6eba Fix built-in resource loading from scripts 2018-01-16 12:33:09 -08:00
Bradley Austin Davis
282ae7b6f9 Small fixes 2017-12-11 14:42:37 -08:00
Bradley Austin Davis
9df9cf7a47 Adding more libs, ifdefs for android incompatible code 2017-12-11 13:18:23 -08:00
David Rowe
da33c4fcf2 Fix script reload icon not working in Windows developer builds 2017-10-26 11:41:52 +13:00
ZappoMan
44f8bf00bc move remoteCallerID to Script.remoteCallerID 2017-10-22 17:14:11 -07:00
ZappoMan
a7e21d7e76 add remotelyCallable and remoteCallerID to provide additional security to Entities.callEntityServerMethod() 2017-10-22 14:30:58 -07:00
Brad Hefta-Gaub
80f0bd3b79 Merge pull request #11494 from humbletim/add-console-output-basenames
[experiment/feedback] Include script name with all JS/QML debug output
2017-10-06 17:58:19 -07:00
beholder
cc8f1352da 7951 Reload button in Running Scripts dialog stops script 2017-10-02 22:18:03 +03:00
humbletim
fd917917c4 include the source basename in Script.print() && QML/Script console.*() debug output 2017-09-29 14:48:01 -04:00
Seth Alves
8a49edbecb code review 2017-09-15 10:08:35 -07:00
Seth Alves
d89f2b77da rework ScriptEngine lifetimes using 'smart' pointers 2017-09-14 10:42:21 -07:00
burtsloane
d4ae298a8d Merge branch 'master' into midi 2017-07-26 13:59:07 -07:00
Brad Davis
7f1bc07d04 Trying to fix overlay crashes again 2017-07-05 14:30:01 -07:00
Brad Davis
6fc82bb351 Switch to preprocessor macro for blocking invokes to capture function information 2017-06-30 11:36:24 -07:00
Brad Davis
b52dd7b822 Don't use blocking connections on the main thread 2017-06-29 20:45:17 -07:00
Seth Alves
794495c197 make ResourceManager be owned by DependencyManager 2017-06-28 14:18:14 -07:00
Seth Alves
e4a9674614 Merge pull request #10824 from sethalves/fix-script-sleep-busyloop
use QEventLoop and a timer for a less CPU using sleep + event-processing
2017-06-27 21:00:40 -07:00
Seth Alves
4f672f93d2 avoid cast that isn't always available 2017-06-26 16:03:39 -07:00
Seth Alves
bf7da71eaf use QEventLoop and a timer for a less CPU using sleep + event-processing 2017-06-26 15:07:22 -07:00
samcake
c0e8b6c8bc clean up 2017-06-23 14:18:56 -07:00