Commit graph

184 commits

Author SHA1 Message Date
QuantumCoderQC 83a60e7462 Implement shape key conditions 2021-11-02 15:59:15 +01:00
QuantumCoderQC 6c0d4bdead fix error when all shape keys muted 2021-11-02 13:42:09 +01:00
QuantumCoderQC edeaf488b9 remove debug prints 2021-11-02 13:42:08 +01:00
QuantumCoderQC 1d0eaf9371 debug prints 2021-11-02 13:42:07 +01:00
QuantumCoderQC 3814cd9da7 methods to get if vertex colors and if shapekey present 2021-11-02 13:42:06 +01:00
Moritz Brückner 36e42ad736 Fix exporting textures from linked libraries 2021-10-25 19:43:13 +02:00
Lubos Lenco c7cba9d792
Merge pull request #2353 from MoritzBrueckner/debug-renderpath
Allow to set default renderpath for debugging
2021-10-05 11:01:00 +02:00
Moritz Brückner 7f5d382131 Allow to set default renderpath for debugging 2021-10-03 22:40:29 +02:00
Moritz Brückner c40fd26c20 Fix CPU count parameter for cmft 2021-09-27 23:13:30 +02:00
tong d1fe4d6686 Fix invalid fp when using local sdk 2021-09-17 13:21:36 +02:00
Moritz Brückner c56a0c3a72 Fix accidental module reloading caused by name conflicts of global vars 2021-08-11 14:32:21 +02:00
Moritz Brückner ea8c13686c Implement basic addon reloading 2021-08-04 22:56:11 +02:00
Moritz Brückner 5f2dce140e Windows: fix arm.utils.get_fp() if the project path is a drive root 2021-07-26 23:40:47 +02:00
Moritz Brückner 549040fc09 Fix publishing with live patch enabled 2021-07-25 20:13:47 +02:00
Moritz Brückner cca82a69bf
Merge branch 'master' into live-patch 2021-07-25 16:47:32 +02:00
tong cfa941eab4 Fix fetch trait prop type 2021-07-17 18:49:37 +02:00
Moritz Brückner 96aa0ee890 Use custom sockets for default data types
This allows to listen for socket updates for the live patch system
2021-07-10 21:46:44 +02:00
Moritz Brückner 22a557162f Update Blender version information to 2.93 LTS 2021-05-01 00:04:25 +02:00
Moritz Brückner de8073732a Replace ' and " characters in asset names 2021-03-27 00:30:05 +01:00
Moritz Brückner b7fef30b70 Further improve handling of final trait props 2021-03-14 15:50:27 +01:00
Moritz Brückner 4ad68304e5 Improve @prop warning messages 2021-03-13 21:22:42 +01:00
Moritz Brückner 7d9c6ce7c7 Make @prop recognition much more robust 2021-03-13 21:12:12 +01:00
tong 725520081a Normalize sdk path 2021-01-26 16:38:49 +01:00
E1e5en d084a8297e Windows Settings – Publish and action after
Windows Settings:
Visual Studio Version - select the studio version for which the project will be exported. Options: 2010, 2012, 2013, 2015, 2017, 2019. Default: 2019.
Update - checks the installed versions of Visual Studio on the PC and adds (installed) to the version in the list if available (for information). Example:
sample_vs_2
Action After Publishing - select an action after a successful publication. Options:
Nothing - do nothing. Default value;
Open In Visual Studio - open the project in the corresponding studio version;
Compile - compilation of the project;
Compile and Run - compile and run the project. Then the executable file will be copied to the windows-hl folder (where the resources are located).
Mode - compilation mode. Options: Debug, Release. Default: Debug.
Architecture - the architecture for which the application will be built. Options: x86, x64. Default: version of the user’s PC architecture.
Compile Log Parameter - setting the output of messages during compilation:
Summary - show the error and warning summary at the end. Default value;
No Summary - don \ 't show the error and warning summary at the end;
Warnings and Errors Only - show only warnings and errors;
Warnings Only - show only warnings;
Errors Only - show only errors.
More details can be found here - MSBuild command-line reference (I took only part of the settings).
Count CPU - specifies the maximum number of concurrent processes to use when building. More details can be found here - MSBuild command-line reference. The default is 1. Maximum value: the number of CPUs in the system (function multiprocessing.cpu_count()).
Open Build Directory - open the folder with the application after a successful build. If the Compile and Run option is selected, then the executable file will be copied to the windows-hl folder (where the resources are located) and this folder will open. Otherwise, the folder where the given Visual Studio file is going will open.
The user will also receive a message if the studio version selected for export and for opening in the studio or compilation is not on the PC. And a list of installed ones will be issued. Example:

Visual Studio 2017 (version 15) not found.
The following are installed on the PC:
- Visual Studio Community 2019 (version 16.8.30711.63)
To obtain information about the installed versions of Visual Studio, use the vswhere.exe utility (open source) included in Kha (located in the …\ArmorySDK\Kha\Kinc\Tools\kincmake\Data\windows).
2020-11-24 20:41:50 +03:00
E1e5en 4b3aea0513
Merge branch 'master' into html5-settings 2020-11-14 15:12:20 +03:00
E1e5en 2bd08722a1 HTML5 Settings
Added Armory Exporter - HTML5 Settings panel:
- Copy Files To Specified Folder - copy files to the folder specified in the settings after publish. The name of the folder where the result will be copied is formed based on the name of the project and version. Sample, test-1.0.5.
- Run Browser After Copy - run browser after copy. The url is formed from the one specified in the settings and the directory with the project where it was copied. Sample, http: //localhost/test-1.0.5.

Added settings in Render: Armory:
- HTML5 Copy Path - path to copy project after successfully publish (directory on local web-server).
- Url To Web Server - url that runs the local server.
2020-11-13 21:45:31 +03:00
E1e5en 65dd6b701f Exporter Panel - Project Settings
1. Processing data entry into fields:
- Name - the field must not be empty. If the user tries to set an empty value, then this field specifies the name of the blend file (this is how it is implemented during assembly). The default is the name of the blend file.
- Package - the field must not be empty, it must not consist only of numbers and start with a number. The . symbol is replaced with _. The default is arm.
- Bundle - the field must be filled in according to the mask [string].[string]. Each part must not be empty, contain numbers, or start with a number. The default is org.armory3d. Previously, this field was blank, in which case the current default was used.
- Version.
Input in the Version field is processed and only allows input by masks:
- 0.0
- 0.0.0
- 0.0.0.0
In any case, the value is ignored and the previous value remains.

If the (Auto-increment Build Number) checkbox is checked and when performing the operation, Build and Publish will be automatically incremented by one after the version value.
Examples:
it was 1.0 - it is 1.1,
it was 1.9 - it is 1.10,
it was 1.0.1 - it is 1.0.2,
it was 0.1.1.2 - it is 0.1.1.3.

Defaults:
- Version - 1.0.0
- Auto-increment Build Number - enabled.

For all fields, special characters ([] / \ ;,> <& *:% = + @! # ^ () |? ^) Are also replaced with _.

2. Fixed display of Android Settings panel.
2020-11-13 20:36:27 +03:00
E1e5en ab3d64d651 Android Settings More
Panel Armory Exporter - Android Settings - Build APK:
1. Rename APK To Project Name
Renames the APK file from app-debug.apk to [project-name]-[version] .apk. Example, for the project example_ball.blend, the result will be the name example-ball-1.0.apk.
2. Copy APK To Specified Folder
Copies the final file to the folder specified in Preferences.

Preferences Render: Armory:
1. Copy APK To Folder
The path to the folder where the final APK file will be copied.
2. Open Directory After Copy
Open this folder after copying.

Console messages:
Rename APK to example-ball-1.0.5.apk
Copy APK to C:\IDE\Test

Use-case:
These settings will allow you to have unique names for files, as well as copy them to the required folder for uploading to the device or to the cloud.
2020-11-12 22:09:55 +03:00
E1e5en 9fbd29b143 Checking Blender version for Armory
- Added compare function to utils.py module
- Added check of Blender version and display of a message about incorrectness during Play, Build, Publish operations
2020-11-01 21:10:44 +03:00
Moritz Brückner 25ed2059f1 Simplify get_pref_or_default 2020-10-31 13:18:05 +01:00
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