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

15 Commits

Author SHA1 Message Date
d07592a3a9 Fix potential crash when converting images exported by GIMP. 2021-04-26 20:40:37 -04:00
3897dfa1c2 Fix #126.
Warning: Korlib C API change. Version bumped.
2019-10-25 11:39:19 -04: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
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
2a49634e43 Update korlib for texture caching
Previously, the C korlib used a custom buffer class to avoid a memcpy
operation. However, pyMipmap expects binary string (PyBytes) objects, so
this changes the code to use them. Future work would be to continue
using PyBytes and removing the copy. For now, there are bigger fish to
fry...
2018-09-05 19:24:31 -04:00
cca1a90d1c Fix __exit__ binding to wrong method, and enable the GCC warnings that
could catch this kind of thing (unused static function).
2017-12-05 13:18:41 -08:00
6a3b09b747 Refactor export logging
The export logger and export reporter have been merged together to form
an eventually much more powerful export analysis feature. For now, the
benefit is that general log messages don't have to be so fiddly with
print statements and string formatting. You're welcome.
2017-06-12 15:36:03 -04:00
83d95356d7 Fix case on GL include path 2016-12-26 13:17:16 -08:00
319b43814f Implement detail fading for Plasma Layers
Yes, this was shamelessly stolen from the max plugin. So shoot me. It's an
awesome feature.
2016-06-29 22:47:28 -04:00
cb6541675a Change to Blender 2.77 style bpy.types.Image.bindcode.
This idiotic change was introduced in stealth mode from 2.76 to 2.77. It has something to do with 3d textures, supposedly. I think the person who made this change is simply an asshat...
2016-05-21 20:13:59 -04:00
9e66db01a0 Flip the flopped images
Export all images right-side up. OpenGL flips them because fail, so we
have to do a bit of work to correct that. Thankfully, this operation is
not as slow as I thought.

NOTE TO SELF: remember, texture page updating would be nice to have...
2016-01-30 22:11:59 -05:00
f0ee39b1c3 Fix issues resulting from incorrect korlib merge
I merged the version with access violations related to textures not
actually being set in OpenGL. Dang! Here is the correct version.
2015-07-17 16:55:13 -04:00
3e811f58c1 Implement C korlib
NOTE: This is mostly a curiosity atm. There are many undiagnosed access
violations...
2015-07-17 13:38:04 -04:00