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

410 Commits

Author SHA1 Message Date
94dd8b1de3 Merge pull request #70 from dpogue/detail-blend
Set kBlendDetail flag on detail blends
2017-10-02 20:17:58 -04:00
acc9aa54b1 Set kBlendDetail flag on detail blends 2017-10-01 17:27:36 -07:00
8f65ce2fac Merge pull request #66 from Hoikas/hulls
Convex Hull Improvement
2017-10-01 17:13:37 -04:00
71fe4dcdba Fix adding sounds to Sound Emitter mods
This was not completely converted to the new ID Property scheme, it
appears. We have to use an intermediate string property so we can have
get/set callbacks. :(
2017-10-01 14:04:28 -04:00
9029b2b792 Merge pull request #67 from Hoikas/moar_toolbox
Moar Toolbox Schtuff
2017-09-30 23:28:02 -04:00
5eef79223f Add a Disable All tool for Plasma Objects 2017-09-30 23:27:44 -04:00
5ac7ac149a Add a Plasma Object toggle tool for dendwaler 2017-09-30 23:27:43 -04:00
13d6b94e3f Add a more useful PyPRP->Korman Plasma Object tool
This actually inspects the old style page_num property and will put the
objects into the correct page if the page has been created by the
artist. Fancy.
2017-09-30 23:27:43 -04:00
b6b065e253 Fix op_toolbox.py ordering 2017-09-30 22:35:35 -04:00
b7ac558035 Fix verbose logging crash
It appears that when the progress logger was broken up into separate
classes, the progress_end function was not properly split and some
threading functionality remained in the base class.
2017-09-30 21:15:47 -04:00
84f43a024c Use Blender's convex hull baking for hull bounds
This moves convex hull generation from the file serialization stage to
the object export stage. No longer are we dependent on spotty library
support for proper convex hulls.
2017-09-30 20:52:11 -04:00
a9e94d8254 Fix node class/idname mismatch. 2017-08-26 17:34:15 -07:00
368c49aca3 Merge pull request #56 from Hoikas/idprops
ID Datablock Properties
2017-08-19 17:05:13 -07:00
d8dd3cc8b0 Ensure node trees are upgraded properly 2017-08-19 19:59:35 -04:00
484b16925a Convert the rest of the message nodes to ID props 2017-08-19 19:59:35 -04:00
9f158c3726 Update Texture props to ID properties 2017-08-19 19:59:35 -04:00
6c5dff5d56 Update RT Lights to IDProps 2017-08-19 19:59:35 -04:00
5344a652c4 Convert python nodes to ID props 2017-08-19 19:59:35 -04:00
ebe1b1bdb5 Convert more logic nodes to newfangled ID props 2017-08-19 19:59:35 -04:00
1b3afbe8d4 Convert sound modifiers to newfangled ID Props
Unfortunately, sound indices do not match up directly with sound ID
blocks, therefore, those remain string properties.
2017-08-19 19:59:35 -04:00
b6418a557b Update Render mods to new ID props 2017-08-19 19:59:35 -04:00
4de9ca0727 Update SoftVolumes to newfangled ID properties 2017-08-19 19:59:35 -04:00
9ec511493a Update Logic Modifiers to ID props 2017-08-19 19:59:35 -04:00
1fe8ecc02d Update Avatar Modifiers and Condition Nodes 2017-08-19 19:59:35 -04:00
904f9b8f77 Update anim modifiers to ID props 2017-08-19 19:59:35 -04:00
7503676d74 Convert water modifier fake-ID props to ID props
I have also added some poll helpers to the idprops module so every time
we use an ID Datablock Property, we won't have to reinvent the wheel. I
also noticed that PointerProperties have to be a direct descendent of
`bpy.types.ID` otherwise Blender crashes. This kind of makes sense and
is not a huge issue to have to work around.
2017-08-19 19:59:35 -04:00
2d3d9495dd Implement an object name -> ID Property converter
This effectively bumps the minimum requirement to Blender 2.79.
Furthermore, any blendfiles saved with ID Datablock properties will
crash earlier versions of Blender. You have been warned...

After approximately 24 hours of writing, rewriting, and cursing Blender,
this appears to be the most flexible way of magically upgrading our old
string properties to ID Datablock properties. The general hacky-ness is
due to limitations in Blender's API.

Here's how it works... In your property group (node, modifier, etc) you
will need to implement the classmethod `_idprop_mapping`. This will map
new ID Datablock property attribute names to old string property
attribute names. Further, you will need to implement the
`_idprop_sources` method. This will map string property attribute names
to a collection to fetch the ID from. If you have specific filtering
rules to follow, they can be implemented here :).

To ensure code sanity, any attempts to access string properties that
have been marked as converted will now fail with an AttributeError.
Happy haxxoring!
2017-08-19 19:59:35 -04:00
c0f2e97a50 Fix swim current python nodes oversight 2017-06-17 14:38:31 -04:00
7243e1bbcd Merge pull request #58 from Hoikas/progress
Improved export progress logging
2017-06-17 00:15:49 -04:00
be7e9427c4 Blender 2.77 on Win32 fails with ctypes
So we bump the version requirement to Blender 2.78
2017-06-12 15:51:52 -04:00
80ce28ddc8 Show the console during exports
The only major issue with the console based progress solution is that
the user would have to remember to press "Toggle System Console" before
the export. This button corresponds to the operator
`bpy.ops.wm.console_toggle`. Unfortunately, Blender does not expose a
way for us to query the console state. So, we have to get nasty and use
ctypes to ask the OS if the console window is active. The user may
already have it open and hidden behind Blender's UI, after all.

This changeset causes the console to open during the export (unless
disabled in the export operator). If the console was closed before the
export, it closes again once the export is finished, unless there is an
error. If the console was open, it remains open.

Unfortunately, this only works on Windows. But, according to the source
code of `bpy.ops.wm.console_toggle`, Blender's `ghost_toggleConsole`
only functions on the Win32 subsystem... SDL, X11, and Cocoa are all
no-ops. Future work would include a patch submitted to Blender adding an
enum property to the console operator to avoid this code duplication.
2017-06-12 15:36:03 -04:00
5c8a9253fe Sirius said he liked watching the PyPRP log...
... So now he can watch the Korman log in real time
2017-06-12 15:36:03 -04:00
d465b86f9c Handle errors better in the progress manager
Now the progress display will recognize errors using the `__exit__`
magic method and print out an error header with the actual error
message. This is useful because when the mouse leaves the Blender
operator's report error, the error "window" is destroyed. This led to
potential silent failures.
2017-06-12 15:36:03 -04:00
4842731a44 Better long-running progress report behavior
For sanity, I stripped the progress manager into a subclass. From there,
I moved all of the progress printing into a thread so that we can accept
signals for step progress. If there is no step progress for a time, we
show the user a rolling set of ellipses to prove we're not dead (yet).
2017-06-12 15:36:03 -04:00
98d5480024 Implement rudimentary progress reporter
A common complaint that I have heard (and have nyself) is that there is
little indication of what Korman is doing in the background. In PyPRP,
the raw export log was dumped to the console, and many liked to watch it
travel by as an indicator of progress. As such, I have implemented a
rudimentary progress monitor that outputs to the console into the export
logger.

Unfortunately, there is no "easy" way to show progress in the Blender UI
currently. Korman makes the assumption that nothing will touch
Blender's context while it is executing. Attempts to mvoe the exporter
into a background thread have all resulted in spectacular failures. So,
this will have to do for now.
2017-06-12 15:36:03 -04: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
f5b5e329ae Merge pull request #50 from dpogue/bumpmaps
WIP: Normal Maps/Bumpmapping
2017-06-11 23:49:43 -04:00
a998c676f5 Merge pull request #1 from Hoikas/bumpmaps
Bumpmap Cleanups
2017-06-11 20:45:11 -07:00
08d93dd797 Update GeoVertex UV touching for HSPlasma changes
plGeometrySpan.TempVertex.uvs now returns an immutable tuple, so we have
to convert that to a list. Furthermore, I took the liberty of changing
to code to avoid spin-washing on the first encounter of a bumpmapped
vertex.
2017-06-09 16:09:37 -04:00
64369b836d Update some bumpmap variables to obey The Zen 2017-06-09 16:09:37 -04:00
c52335fb47 Don't preempt UVChannel sanity checks in bumpmaps
This makes UV channel calculations and errors a little bit more sane.
2017-06-09 15:53:48 -04:00
1a58ef2ea2 Fix Lamp Animation error introduced by #54
The changeset referenced makes the assumption that
`grouped_fcurves[chan]` is a dict. We really can't assume anything about
types this deep inside the animation converter.
2017-06-06 23:33:19 -04:00
959cde78b7 Fix #55 2017-06-06 23:00:50 -04:00
8c525dca02 Update C korlib to link with string_theory 2017-06-06 22:33:08 -04:00
fc4229d4c4 Force layers after a bumpmap to their own pass 2017-02-18 22:17:05 -08:00
b1dc8a7dfe Fix for compiling with Python 3.6
Ported from libHSPlasma
2017-02-18 22:17:05 -08:00
887700f472 Move create_bump_LUT to top level korlib 2017-02-18 22:17:04 -08:00
3753714cd6 Cleanup the C++ code 2017-02-18 22:17:04 -08:00
2a693a03c2 More cleanups 2017-02-18 22:17:04 -08:00
00536bb7cb Clean up the easy bits of mesh exporting 2017-02-18 22:17:04 -08:00