Commit graph

154 commits

Author SHA1 Message Date
Moritz Brückner 0f3233d829 Implement optional profiling for export 2020-10-31 01:09:33 +01:00
Moritz Brückner 60ea88658c Improve handling of deprecated nodes 2020-10-28 20:29:01 +01:00
E1e5en 5451b3e7e2 Added settings for building APK
Added a panel with settings:
- Building APK After Publish - to start the build after the project has been successfully published (False by default). Disabled if SDK path is not specified;
- Emulator - list of installed emulators in Android Studio (AVD Manager). At the start of Blender, the list is always empty, to fill and update it, you must click the Refresh button. To start the emulator, if you wish, you need to press the "Start" button (the list of emulators is obtained with the emulator -list-avds command, the launch is performed with the emulator -avd [name] command). The "Start" button is disabled if the name of the emulator is not selected from the list;
- Run Emulator After Building APK - launch the emulator after successfully building the APK file. Disabled if no APK build is installed or no emulator name selected.

To perform these operations, you need to specify the ANDROID_SDK_ROOT environment variable, if it is not specified in the OS, then the "Android SDK Path" setting is read and set as the environment variable os.environ ['ANDROID_SDK_ROOT'] to perform operations.
If no value is specified, then the user receives a corresponding message to the console. If the specified value is incorrect, then the user will receive messages from the corresponding programs.
2020-10-22 19:19:03 +03:00
Moritz Brückner 863ec518f8 Set file encoding to utf-8 2020-10-18 17:50:35 +02:00
Lubos Lenco e9c351c7e0
Merge pull request #1936 from E1e5en/add-android-settings
Add Android Settings + LN Set Vibrate
2020-10-18 11:59:35 +02:00
E1e5en 1a34e202a7 Add Android Settings + LN Set Vibrate
1. For the new settings to fully function, you need to update the submodules so that this Pull Request (https://github.com/Kode/kincmake/pull/100) gets into armsdk. Extended settings via khafile.js.

2. Added Android Settings panel:
- invisible until the target platform android-hl is added to the list;
- inactive until the target platform android-hl is selected in the list.
Options:
- Orientation;
- Compile Version SDK - from 26 to 30, default 29;
- Minimal Version SDK - from 14 to 30, default 14;
- Target Version SDK - from 26 to 30, default 29;
- Permissions - a list of permissions. If I will duplicate entries in the list, then only unique entries will be included during export. By default, the list is empty;
- Android ABI Filters - a list of platforms to build for (arm64-v8a, armeabi-v7a, x86, x86_64). If I will duplicate entries in the list, then only unique entries will be included during export. By default, the list is empty. If the list is empty, then all platforms will be used (as before).

3. The enum (names of permissions) and the function have been added to the utils.py modules, which adds the specified value to the list of permissions. Feature added for ease of use from different locations (different logical nodes).

4. List of permissions:
- ACCESS_COARSE_LOCATION - Allows an app to access approximate location;
- ACCESS_NETWORK_STATE - Allows applications to access information about networks;
- ACCESS_FINE_LOCATION - Allows an app to access precise location;
- ACCESS_WIFI_STATE - Allows applications to access information about Wi-Fi network;
- BLUETOOTH - Allows applications to connect to paired bluetooth devices;
- BLUETOOTH_ADMIN - Allows applications to discover and pair bluetooth devices;
- CAMERA - Required to be able to access the camera device;
- EXPAND_STATUS_BAR - Allows an application to expand or collapse the status bar;
- FOREGROUND_SERVICE - Allows a regular application to use Service.startForeground;
- GET_ACCOUNTS - Allows access to the list of accounts in the Accounts Service;
- INTERNET - Allows applications to open network sockets';
- READ_EXTERNAL_STORAGE - Allows an application to read from external storage;
- VIBRATE - Allows access to the vibrator;
- WRITE_EXTERNAL_STORAGE - Allows an application to write to external storage.

5. Added logical node Set Vibrate:
Category: Native
Pulses the vibration hardware on the device for time in milliseconds, if such hardware exists.
Input parameters:
- Milliseconds - time in milliseconds (data type Int, default value 100).
When adding the logical node Set Vibrate, the permission is automatically added to the list, even if the target android-hl has not been added to the export list (using a function from utils.py).
2020-10-17 16:47:54 +03:00
Moritz Brückner 203da296ad Make arm.utils.folder() work with every folder 2020-10-17 15:08:56 +02:00
Moritz Brückner 6dcc2f3fe8 Add arm.utils.get_arm_preferences() 2020-10-17 15:08:20 +02:00
Lubos Lenco 20c8be3d0d
Merge pull request #1924 from MoritzBrueckner/world-nodes
World nodes support and nodes parsing refactor
2020-10-11 20:23:53 +02:00
Moritz Brückner c2cf227989 Autocompletion for rpdat 2020-10-10 20:34:39 +02:00
E1e5en 305878db42 Add Debug Console settings
1. Adding the ability to customize display, scale (size), shortcuts to the DebugConsole class.
2. Adding a function to utils.py to get Debug Console settings from Render: Armory.
3. Added Debug Console settings to the Armory Project interface:
- Enable (default value - False);
- Position (Left, Center, Right, default value - Right);
- Scale Console (from 0.3 to 10);
- Visible.
4. Added transfer of Debug Console settings to exporter.py.
5. Added logical nodes to control DebugConsole while the application is running.
2020-10-10 13:10:34 +03:00
N8n5h ee2764b877 Add two context menu options for logic nodes
The two new context menu options will let the user inspect the source code
of the node. For the haxe source the existing operator was used (ArmOpenNodeSource),
but it was modified because I thought it made more sense to guess the version the user has based on their last commit instead of master.
for python __module__ was used to obtain the relative path.

The options were appended to the existing menu instead of being its own class because I couldn't find how to implement it that way without redrawing.

- Added a way to obtain the last commit in utils without git cli
2020-09-30 17:42:35 -03:00
Moritz Brückner fd4fcff19f Implement context manager for safer cwd changing 2020-09-25 21:20:11 +02:00
Moritz Brückner 3c6f853605 Port lz4 compression from Armorpaint 2020-08-20 22:34:52 +02:00
Valentín Barros 61b2d008e3 Fixes wrong rsplit usages trying to discard file extensions [fixes #1805]
Otherwise would fail if path contained any other dot.
2020-08-19 09:28:07 +02:00
Moritz Brückner d18a9917aa Fix sub-package export 2020-07-12 16:08:52 +02:00
Moritz Brückner 26bdba9092 Fix fetching scripts from sub-packages 2020-07-12 15:36:18 +02:00
Moritz Brückner 4ca340024a Fix logger usage 2020-07-07 22:43:51 +02:00
tong 9389c5f44d Fix unset object prop 2020-07-04 23:02:33 +02:00
tong a7f9acd606 Use regexp to validate haxe module name 2020-06-14 23:04:49 +02:00
tong 5ff56e6464 Filter haxe modules with invalid names 2020-06-14 21:08:06 +02:00
tong bba3b924c0 Allow to set custom play scene 2020-05-23 12:18:07 +02:00
Moritz Brückner ce96f19be1
Merge branch 'master' into refactor-exporter 2020-04-16 23:48:32 +02:00
Moritz Brückner c6bfad710c utils.py: add docstring + annotations to safestr() 2020-04-16 00:34:03 +02:00
Moritz Brückner deba93d3da Refactor bone processing 2020-04-12 21:16:16 +02:00
Moritz Brückner 22faa147b2 Fix possible error with sublime text project generation 2020-04-12 20:05:03 +02:00
Moritz Brückner 0cac8fa987 Fix ResourceWarning for open_folder() 2020-03-03 22:13:44 +01:00
Moritz Brückner ac544889ab Fix bool type trait properties 2020-02-07 19:29:55 +01:00
Moritz Brückner 2d8c86ac98 Improved warnings 2020-01-08 17:17:18 +01:00
Moritz Brückner 2c13f0c78c Fix unused @prop recognition 2020-01-08 17:06:32 +01:00
Moritz Brückner 7245c83313 Better vector recognition 2020-01-08 16:37:33 +01:00
Moritz Brückner c4b3d82fbb Add warning for static properties 2020-01-07 22:06:32 +01:00
Moritz Brückner 05baf7b39f Support for different object types 2020-01-07 22:00:45 +01:00
Moritz Brückner e7d631f9da Support object prop type 2020-01-07 21:09:39 +01:00
Moritz Brückner f76c903614 Improved vector recognition 2020-01-07 20:45:45 +01:00
Moritz Brückner ab76f31346 Add support for vector properties 2020-01-07 20:26:12 +01:00
Moritz Brückner da16b0e0ac Show warnings caused by invalid trait props 2020-01-07 13:15:21 +01:00
Moritz Brückner 5b60533251 Fix property type change 2020-01-07 13:12:35 +01:00
Moritz Brückner 60914da401 Fix String recognition 2020-01-07 13:06:18 +01:00
Moritz Brückner 049911504c Refactor trait prop system and support different prop types 2020-01-07 12:35:38 +01:00
Moritz Brückner 71ba39f653 Reorganize (PEP8) and remove unused imports 2020-01-07 11:44:33 +01:00
Lubos Lenco 2d61a06f78
Merge pull request #1525 from MoritzBrueckner/gen-tex-export
Add support for generated image textures
2019-12-22 12:44:17 +01:00
Moritz Brückner c035f15896 Small utils.py improvements 2019-12-21 20:25:58 +01:00
Moritz Brückner 2f1cf3f53e utils convert_image(): get image quality from UI setting 2019-12-21 20:23:30 +01:00
Moritz Brückner 71287e442f Allow @prop for final keyword too 2019-12-21 14:21:19 +01:00
Moritz Brückner be43f35ee2 Don't show _themes.json in trait list 2019-12-06 22:10:25 +01:00
Moritz Brückner 377cf055c2 Fix open_folder() on windows 2019-09-26 16:50:35 +02:00
Moritz Brückner 07bc1b8257 Fix open_folder()
Project folder was opened twice on windows and mac
2019-09-26 16:46:18 +02:00
luboslenco 2229ff8103 Remove mklink functions from utils 2019-09-25 09:44:37 +02:00
Zeeshan Abid 426eb912d4 open folder button support 2019-09-24 16:23:49 +01:00