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

1010 Commits

Author SHA1 Message Date
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
febfb3dd42 Fix issue with corrupted texture cache
If the texture cache doesn't return images in exactly the order or way
that libHSPlasma is expecting, it raises a RuntimeError. We can detect
that we used a cached image and regenerate the data in that case...
instead of just outright failing with "image data size mismatch".
2018-12-20 19:34:19 -05:00
cb54141af7 Fix :trollface: typo 2018-12-19 23:01:32 -05:00
ad99f496f0 Fix memleak in _korlib.create_bump_LUT() 2018-12-19 19:33:59 -05:00
070db331fb Merge pull request #125 from Hoikas/envmap
Environment Map Improvements
2018-12-19 19:32:27 -05:00
718791fff8 Fix some wording issues and typos 2018-12-19 18:26:11 -05:00
151c31f2e9 Implement cubemap generate operator
This operator takes a file as an argument and builds a cubemap from it.
Valid options are to supply the output from Plasma's
Graphics.Renderer.GrabCubeMap console command. The operator will find
the other five files and generate a cubemap with the faces saved by
Plasma. Otherwise, any arbitrary image can be supplied. If the filenames
do not fit the expected format, any missing faces will be replaced by
the face specified in the file selector. This will generally result in a
cubemap with six identical faces.
2018-12-14 22:59:57 -05:00
4a48f0da8d Implement cubemap export 2018-12-13 18:56:36 -05:00
035d79a7f6 Refactor image data handling for cube maps
Previously, we allowed OpenGL to generate all of the mip levels for us
in a mipmap. This was pretty doggone fast and worked reasonably well.
However, with cube maps, we will need to use images that are not always
backed in Blender... this is because Blender stores cube maps as one
single image instead of one image per face. So, we need to be able to
generate those mip levels, preferably without touching Blender's
`Image.pixels`, which is slower than Christmas...

Also of note... `Image.gl_load()` will actually scale the iamge to a POT
when Blender is using OpenGL ES... but not on other platforms. So, now,
we just ask Blender to load the image and deal with the POT-izing later.

The con here is that the pure python implementation of the image scaling
function is SLOOOOOOOW. We're talking ~40 seconds to process a 1024x1024
mipmap. No one should be using the reference implementation, however,
and the C++ implementation shows no noticable slowdown over the OpenGL
code.

Whew.
2018-12-13 18:38:07 -05:00
3ea2f973e2 Allow the image cache to store many images for one texture
Cube maps in Plasma are six separate images; however, Blender expects to
be supplied with one image that encompasses all of the cube faces.
Therefore, our texture cache needs to be able to support many images for
one request.
2018-12-13 18:38:07 -05:00
f9842789bf Add the ability to control dynamic envmap export
This provides the artist the ability to disable exporting layers that
would be DynamicCamMap (fast) in MOUL but DynamicEnvMap (slow) in PotS
in one fell swoop. Please note that disabling env map exporting will NOT
prevent waveset environment maps from exporting.
2018-12-13 18:38:06 -05:00
e7a42e6c2e Add enable/disable envmap toolbox operators 2018-12-13 18:38:06 -05:00
8c0396839b Fix issue with verbose logger not logging when there is no backing file 2018-12-13 18:36:58 -05:00
d75fd16b24 Fix some noisy tracebacks in the UI draw code 2018-12-11 00:00:22 -05:00
f95a9d34d6 Fix empty profile log files 2018-12-10 01:03:35 -05:00
eae02c133d Fix traceback introduced by 742baf3 when exporting to PotS 2018-12-06 20:39:18 -05:00
742baf338e Fix #116 2018-12-04 23:16:32 -05:00
c876e41ba7 Merge pull request #123 from Hoikas/mod-copypasta
Modifier CopyPasta
2018-10-23 19:40:57 -04:00
af16d58be5 Refactor some silly mod searches 2018-09-22 22:41:52 -04:00
e307c36a7d Fix #119
This adds the ability to copy and paste all modifiers (or a single
modifier) to another object.
2018-09-22 22:41:52 -04:00
0c8e333ad5 Fix overly explicit collider vertex export 2018-09-22 21:36:30 -04:00
3e90ac4727 Fix lightmap preview operator devilry
The "Preview Lightmap" operator no longer changes the active selected
objects or the active layer selection.
2018-09-18 20:41:14 -04:00
d16f064043 Fix incorrect path logic introduced in b588c87 2018-09-18 19:52:32 -04:00
734eb58819 Fix noisy tracebacks when not in Korman mode
Blender used to not specify COMPAT_ENGINES on the physics panels. It
does now, and the new poll methods are incompatible with ours. This
results in lots of noisy errors being raised when in Blender Render mode
with the Korman addon active.
2018-09-16 18:30:52 -04:00
b588c87234 Fix issue with texcache files on stale HDDs 2018-09-15 18:31:19 -04:00