4
4
mirror of https://github.com/H-uru/korman.git synced 2025-07-13 18:17:38 -04:00
Commit Graph

934 Commits

Author SHA1 Message Date
ba1d55b7b6 Fix #147 2019-10-20 00:20:11 -04:00
5fd9564e93 Fix the previous fix.
`pClass` is a class, not an object instance...
2019-10-02 20:10:54 -04:00
04d1b84849 Fix MultiModifiers not being added to new SceneObjects. 2019-10-02 18:36:50 -04:00
cc55c422d0 Fix exporting internal SDL files.
Previously, we would use the current working directory as the SDL file
path. This would crash when we attempted to see if that file is
encrypted.
2019-10-02 17:05:25 -04:00
01b6d0a907 Fix #141 2019-04-01 16:20:35 -04:00
bb8554091c Improve handling of cp-1252 encoded journals
We now export the journal anyway, replacing any illegal characters with
the replacement character.
2019-04-01 16:16:34 -04:00
80a7a06de9 Don't close the global stdout handle
Despite how the rest of the Win32 API expects for you to close handles,
this will apparently trash the global state. See https://devblogs.microsoft.com/oldnewthing/20130307-00/?p=5033
2019-04-01 15:52:20 -04:00
1df5b10671 Fix #142 2019-04-01 15:50:24 -04:00
715079f930 Fix #139 2019-03-07 00:11:41 -05:00
b5d3f87c66 Fix #137
Unfortunately, this does not prevent "DAG zero..." from appearing
period. Rather, it just overwrites any junk printed to the console
during the export. The ANSI version is rather limited compared to the
Windows version and completely untested...
2019-02-28 20:11:35 -05:00
e9ee49c8a6 Fix #138
Due to memory management issues, it is likely impossible to remove a
node in its own init() callback without crashing Blender. Now, we will
deactivate any output node operators if an output node is already
present in the tree.
2019-02-27 22:53:22 -05:00
377d771b84 Ignore more IDE specific junk 2019-02-27 21:32:27 -05:00
12c2f8a33d Fix issue causing PFMs to crash in PotS
Recall that PFMs are added as modules to the global modules dict.
Therefore, module names must be valid Python 2.x identifiers. This is
handled well for age names, but we've been neglecting to handle it for
PFM names. So, when Blender adds ".001" as a suffix to a duplicated
object, any attached PFMs will go down in a firey dust explosion.
Generally, with the unhelpful error message: "NULL result without
error in PyObject_Call".
2019-02-12 19:34:53 -05:00
95dd0341f0 Merge pull request #130 from Hoikas/journal-loc
Fix #129
v0.08
2019-01-30 20:47:35 -05:00
5d1bf5d1b1 Cleanup export button layout 2019-01-28 20:07:28 -05:00
ad2b463d71 Implement localization export operator
This is like the Package Python operator in that the artist can now
export the loc data independent of the rest of the age. The difference
is that due to the extremely different loc formats from PotS+UAM to
MOUL, we can't easily allow the user to specify where the data will be
exported to. So, we only allow this operation in the context of a game.
2019-01-28 19:47:02 -05:00
4f7f8a05fe Fix #129 2019-01-28 19:47:02 -05:00
1234d548a1 Fix typo 2019-01-27 19:52:32 -05:00
a37dcf5180 Merge pull request #133 from Hoikas/lm-mats
Fix #132
2019-01-27 19:50:35 -05:00
f5d5be256b Don't use add_object in material converter 2019-01-26 21:42:07 -05:00
83afcf57d8 Better single user name generation 2019-01-26 21:42:07 -05:00
df73d26896 Fix if-in-dict antipattern in material code 2019-01-26 20:59:14 -05:00
cb45d5979d Enforce lightmap material uniqueness and fix other issues
Two problems were fixed here:
- Materials were always exported unconditionally, meaning that we were
wasting time processing the same data over and over. This could have
generated "interesting" data (eg multiple hsGMaterials and friends with
the same name) that Plasma would have barfed on.
- Lightmaps were being applied to the incorrect materials
2019-01-26 20:56:47 -05:00
2c0a6f9d33 Improve PyFile node file picker 2019-01-21 16:00:59 -05:00
18d515887b Fix bug with PyFile node open button
The file was opened but would not be set in the node if the file had not
been loaded into Blender previously.
2019-01-21 15:43:46 -05:00
934accc304 Allow usage of dependency files from the client 2019-01-21 15:43:16 -05:00
51b5a44bf5 Improve whitespace generation in progress monitor 2019-01-14 21:38:43 -05:00
ce6cd0811e C Korlib code de-duplication
Moves all PyHSPlasma struct definitions into a private header file.
Also adds move constructor and assignment support to PyObjectRef.
2019-01-14 20:50:24 -05:00
a3ed2f0178 Fix potential Python File Node upgrade crash 2019-01-14 20:48:24 -05:00
e329e5619b Don't NTD encrypt age/fni files 2019-01-14 16:50:22 -05:00
520520796e Welcome to HAXLand. Population: Hoikas.
See the comment for details. I've been seeing this crash since we
started doing fancy idprop stuff. Of course, my test blend has always
had bleeding edge junk and has crashed left, right, and center. For more
fun, follow the progress on D4196.
2019-01-12 15:37:29 -05:00
8dff482789 LOGICWIZ: don't leave junk node trees behind 2019-01-11 15:06:48 -05:00
f2c87c9d4e Merge pull request #128 from Hoikas/python-pak
Python Packing
2019-01-11 14:17:27 -05:00
e650b4eef4 Fix improper usage of files on disk in export
If a file's data is already available in Blender, it might be changed.
For example, an internal text datablock or a changed text file. We need
to use those overrides.
2019-01-11 00:43:26 -05:00
574aa82301 Group game properties in Korman Preferences 2019-01-11 00:43:26 -05:00
e4e1e97eb4 Allow generation of empty Python paks 2019-01-11 00:43:26 -05:00
6c4aedb17a Replace fancy AgeSDL Python meta hacks
Path of the Shell did not like my fancy metaprogramming tricks for
defining an AgeSDL Python class that contained characters that are
illegal in Python identifiers. So, now, we revert to just using a
standard class declaration.

That means that we need to strip out any illegal identifiers from the
age name first. A legal Python 2.x identifier is constrained to the
ASCII alphanumeric characters and the underscore with the stipulation
that the first character cannot be a number. To illustrate this to the
artist, we alert the age name property field if an illegal character is
found in the age name. We also alert on the underscore, which is now
used as a very very special replacement character. In the case of an
illegal character, an error message is shown in the UI with the correct
AgeSDL name.

Of course, I hope no one really uses those illegal characters and this
is just more fulmination on my part...
2019-01-11 00:43:26 -05:00
6929c37ed7 Don't crash if a dependency file is missing 2019-01-11 00:43:26 -05:00
4b5f061ac6 Fix Python paks being written into "dat" 2019-01-11 00:43:25 -05:00
1bee0b1736 Ensure "secure" files are encrypted 2019-01-11 00:43:25 -05:00
09d5fbdeb7 Validate user specified Python installs in the UI
This adds a user visible hint to whether or not the Python executable
(or outright junk) they specify is even valid.
2019-01-11 00:43:25 -05:00
46889aca36 Add Python 2.2 to the installer 2019-01-11 00:43:25 -05:00
ec2070a000 Pack the doggone Python in the exporter
No, I don't want to talk about it...
2019-01-11 00:43:25 -05:00
e78978c21a Ensure text file data is encoded correctly 2019-01-11 00:43:25 -05:00
b2120aba10 Add new "nonfatal error" handling for exporter
There are some cases where errors, while bad, are not the end of the
world. I'm thinking namely about compyling the age python. The age still
exports just fine, but the ancillary data is flawed. This new system
collects nonfatal errors until the export is done, then raises them all
at once.
2019-01-11 00:43:25 -05:00
b6c9551883 PythonFile Node v2
Version 2 of the python file node is now backed by a `bpy.types.Text`
datablock in the case of a file whose attributes are updated from a
backing file.
2019-01-11 00:43:25 -05:00
e5b79bf6b5 Add Python packing operator
Implements the boilerplate code for compiling Python code in arbitrary
python versions and packing the marshalled data into Cyan's Python.pak
format. Since this is a lot of bp, a separate operator has been added
to both test the resulting mayhem and provide age creators an easy way
to export only their needed Python.

The only python that is packed currently is the age sdl hook file, if
any. In order for that part to happen, Python File nodes need to be
upgraded from having a string path to actually using the new text_id
field.
2019-01-11 00:43:24 -05:00
288058aa38 Refactor output file generation
Age output files are now handled in all aspects by a singleton manager.
This allows us to track all generated files and external dependency
files and ensure they are correctly copied over to the target game... Or
not, in the case of an age/prp export from the File > Export menu.
Currently only SFX files are handled as an external dependency. TODO are
python and SDL files.

Further, because we have an output file manager, we can bundle all the
files into a zip archive for releasing the age in one step. Wow such
amazing. ^_^
2019-01-10 19:50:01 -05:00
4d7c1cb58b Move Plasma Games to addon User Preferences
Plasma game installs are a per-user config item and should not be stored
in a blend file. Considering that we will be adding more per-user
configs, namely Python 2.[2|3|7] install directories, it seems like a
good move to go ahead and move the games over.
2019-01-10 19:50:01 -05:00
bb62fa7a4e Implement Korlib API versioning
A common error when developing with Korman and Korlib is to forget to
recompile _korlib on changes in the upstream C++ code. This will prevent
the errors from being catastrophic and will revert the user to the
python reference implementation with a minimum of fuss.
2018-12-21 22:58:57 -05:00