diff --git a/.gitignore b/.gitignore index 87a2326..84c2670 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ exports/ # Ignore Krita and Blender backups *.*~ + +# Ignore development files +pipeline/blender_autocomplete/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..aefbd80 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "jacqueslucke.blender-development", + "blenderfreetimeprojects.blender-python-code-templates", + "ms-python.vscode-pylance", + "ms-python.python" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c540aca --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "python.autoComplete.extraPaths": [ + "pipeline/blender_autocomplete/3.6" + ], + "python.linting.pylintArgs": [ + "--init-hook", + "import sys; sys.path.append('pipeline/blender_autocomplete/3.6')" + ], + "python.analysis.extraPaths": [ + "pipeline/blender_autocomplete/3.6" + ], + "blender.addon.moduleName": "BoneJuice", + "blender.addon.loadDirectory": "pipeline", + "blender.addon.reloadOnSave": true, + "blender.addon.sourceDirectory": "pipeline", + "python.analysis.diagnosticSeverityOverrides": { + "reportInvalidTypeForm": "none" + } +} \ No newline at end of file diff --git a/README.md b/README.md index 13820c9..42fec2f 100644 --- a/README.md +++ b/README.md @@ -63,5 +63,7 @@ If you need results from an automated process, see the `pipeline` directory. Eac For animations, please include the `pipeline/export_anims.py` script in your Blender file. This allows one-click exporting of FBX animations (may be fully automated with a script later). +See [automation docs](docs/automation.md) + ## Questions If there are any questions or feedback on these guidelines and conventions, please poke Alan with a sharp, pointy stick. diff --git a/animations/infantry/Shelby/anims-shelby.blend b/animations/infantry/Shelby/anims-shelby.blend new file mode 100644 index 0000000..b77c9e0 --- /dev/null +++ b/animations/infantry/Shelby/anims-shelby.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc329b0211e072b4f85dc75d73132219bfc2448fec68b695e6c4024977f6db7a +size 8401228 diff --git a/animations/infantry/anims-alan.blend b/animations/infantry/anims-alan.blend index 4ad97d2..772b49a 100644 --- a/animations/infantry/anims-alan.blend +++ b/animations/infantry/anims-alan.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2bfcbb68a409261c659b674e630f91f624708f997d10c6065a6c0d5e45ef34b -size 3414388 +oid sha256:0c2f61a1922d2dff5eda8c6515f549fbbcace13867b6a391a57163e9b838fe75 +size 3520104 diff --git a/animations/infantry/anims-shelby.blend b/animations/infantry/anims-shelby.blend new file mode 100644 index 0000000..98cad06 --- /dev/null +++ b/animations/infantry/anims-shelby.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3e742bfced70f5d2a85183cf80304355ccf2e8d32d0de90403efe47767334e4 +size 8401228 diff --git a/animations/insurrectionist/anims-shelby.blend b/animations/insurrectionist/anims-shelby.blend index d2657b1..2bb6588 100644 --- a/animations/insurrectionist/anims-shelby.blend +++ b/animations/insurrectionist/anims-shelby.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e290382716b07e3fb624bc494a0be41fdf1978507091a37c97bd5fc7c246737 -size 3260308 +oid sha256:9ff900cb839c2bd2475521902e30b787eb8eb10175edd91bb5da5f8c37c1eef2 +size 6866956 diff --git a/characters/infantry/cfg_ironpress.json b/characters/infantry/cfg_ironpress.json new file mode 100644 index 0000000..4eaaf53 --- /dev/null +++ b/characters/infantry/cfg_ironpress.json @@ -0,0 +1,15 @@ +{ + "out": "..\\..\\export\\infantry\\textures", + "in": "textures", + "flip_normals": false, + "materials": { + "mat_cleave": { + "res_out": 1024, + "channels": [ + "basecolor", + "arm", + "normal" + ] + } + } +} diff --git a/characters/infantry/models/body/cleave.fbx b/characters/infantry/models/body/cleave.fbx new file mode 100644 index 0000000..2cfc7f1 --- /dev/null +++ b/characters/infantry/models/body/cleave.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3a24a949bf69716644f88547d81686f713d14705900dfce46606580e3f82d8b +size 15436 diff --git a/characters/infantry/p10-rigging.blend b/characters/infantry/p10-rigging.blend index 1334837..4c600dd 100644 --- a/characters/infantry/p10-rigging.blend +++ b/characters/infantry/p10-rigging.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d112e5658a7f53def98948e98f80acdc467de52e722e8e704b78e324e1e7b20e -size 5753878 +oid sha256:639162a97d4d1d6e1d6eee85670e899017fc81a0944b7c27986e839a97b4e6c1 +size 6299985 diff --git a/characters/infantry/textures/mat_cleave_arm.png b/characters/infantry/textures/mat_cleave_arm.png new file mode 100644 index 0000000..d4882f9 --- /dev/null +++ b/characters/infantry/textures/mat_cleave_arm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b28cddd761575b454d56a887d595e4222b0adcaa5c59261f925bf21286cffc16 +size 1991476 diff --git a/characters/infantry/textures/mat_cleave_basecolor.png b/characters/infantry/textures/mat_cleave_basecolor.png new file mode 100644 index 0000000..26a4103 --- /dev/null +++ b/characters/infantry/textures/mat_cleave_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d36b5a43c107b1689bb9cfaa13382ff2eb2d81a6c4704be228cb3b5a343f7bca +size 2736081 diff --git a/characters/infantry/textures/mat_cleave_normal.png b/characters/infantry/textures/mat_cleave_normal.png new file mode 100644 index 0000000..5bdb66b --- /dev/null +++ b/characters/infantry/textures/mat_cleave_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58adbce7e12be5a5966d85486170924d5ade01ca246cbb822b9fd0bc61b29e09 +size 9540776 diff --git a/docs/automation.md b/docs/automation.md new file mode 100644 index 0000000..43a0005 --- /dev/null +++ b/docs/automation.md @@ -0,0 +1,15 @@ +# Automation + +## Setup +- Ensure you have Blender 3.6 installed (hopefully at the location: `C:\Program Files\Blender Foundation\Blender 3.6`) +- Run the script located at `pipeline/export_all_anims.cmd` + +## Editing +- Ensure Python is installed on your machine +- Ensure you have Visual Studio Code installed +- Open this directory in VS Code and install the recommended plugins +- Open terminal, `cd` into `pipeline`, and run the following command: `$ git clone https://github.com/Korchy/blender_autocomplete.git` +- Your workspace is now set up! + +## Resources +- [Blender as a Python Module](https://pypi.org/project/bpy/) diff --git a/pipeline/export_all_anims.cmd b/pipeline/export_all_anims.cmd new file mode 100644 index 0000000..2ee13b3 --- /dev/null +++ b/pipeline/export_all_anims.cmd @@ -0,0 +1,9 @@ +set PATH=%PATH%;"C:\Program Files\Blender Foundation\Blender 3.6" + +REM Insurrectionist Animations +blender ..\animations\insurrectionist\anims-alan.blend --background --python export_anims.py +blender ..\animations\insurrectionist\anims-shelby.blend --background --python export_anims.py + +REM Infantry Animations +blender ..\animations\infantry\anims-alan.blend --background --python export_anims.py +blender ..\animations\infantry\anims-shelby.blend --background --python export_anims.py diff --git a/pipeline/export_anims.py b/pipeline/export_anims.py index 48eba69..b9905a2 100644 --- a/pipeline/export_anims.py +++ b/pipeline/export_anims.py @@ -1,4 +1,58 @@ import bpy +from bpy.types import LayerCollection, Object, NlaTrack + +# Enter object mode +bpy.ops.object.mode_set(mode='OBJECT') + +# FIRST, toggle collections +collections_exportable = [ + "insurrectionist", "infantry", "rigging", "geometry", "grapple", "baton", "helmet", "gun", "jetpack" +] +def toggle_collection(coll: LayerCollection): + # Iterate over all child LayerCollections + for child in coll.children.values(): + c: LayerCollection = child + + # Force include/exclude character-related collections so they're included/excluded from export + c.exclude = not (c.name in collections_exportable) + if c.name == "insurrectionist" or c.name == "infantry": + bpy.context.view_layer.active_layer_collection = c +toggle_collection(bpy.context.view_layer.layer_collection) + +# Find rig to make it active, and select all objects +for objBase in bpy.context.scene.objects: + obj: Object = objBase + if obj.type == 'ARMATURE': + bpy.context.view_layer.objects.active = obj + if obj.visible_get(): + obj.select_set(True) + + +# EXTREMELY UGLY HACK TO EXIT TWEAK MODE +# see: https://blender.stackexchange.com/questions/316547/how-to-override-context-area-using-script-when-running-blender-using-command-lin +# and https://blender.stackexchange.com/questions/6101/poll-failed-context-incorrect-example-bpy-ops-view3d-background-image-add +def get_view_nla(): # Get any window + for window_manager in bpy.data.window_managers: + for window in window_manager.windows: + for area in window.screen.areas: + area.type = 'NLA_EDITOR' + for region in area.regions: + if region.type == 'WINDOW': + return dict(window=window, workspace=window.workspace, screen=window.screen, area=area, region=region) + raise Exception('NLA context not found.') + +# Forcibly override context to a window so we can access NLA editor +with bpy.context.temp_override(**get_view_nla()): + if bpy.context.scene.is_nla_tweakmode: + bpy.ops.nla.tweakmode_exit() # Exit tweakmode + + +# Go through all NLA tracks, unstar them and mute them +bpy.context.active_object.animation_data.nla_tracks.active = None # Make track inactive +for trackBase in bpy.context.active_object.animation_data.nla_tracks: + track: NlaTrack = trackBase + track.mute = True # Mute all tracks + track.is_solo = False # Disable solo view for all tracks # Get export directory path: str = bpy.data.filepath.replace('\\Shelby', '').replace('\\Tommy', '') @@ -74,22 +128,4 @@ bpy.ops.pose.transforms_clear() # Clear all transforms bpy.ops.object.mode_set(mode='OBJECT') ## FOR DEBUGGING, see https://blender.stackexchange.com/questions/93728/blender-script-run-print-to-console -# from bpy import context -# import builtins as __builtin__ -# def console_print(*args, **kwargs): -# for a in context.screen.areas: -# if a.type == 'CONSOLE': -# c = {} -# c['area'] = a -# c['space_data'] = a.spaces.active -# c['region'] = a.regions[-1] -# c['window'] = context.window -# c['screen'] = context.screen -# s = " ".join([str(arg) for arg in args]) -# for line in s.split("\n"): -# bpy.ops.console.scrollback_append(c, text=line) - -# def print(*args, **kwargs): -# """Console print() function.""" -# console_print(*args, **kwargs) # to py consoles -# __builtin__.print(*args, **kwargs) # to system console +# exit() diff --git a/pipeline/pipeline_infantry.cmd b/pipeline/pipeline_infantry.cmd new file mode 100644 index 0000000..b74fad0 --- /dev/null +++ b/pipeline/pipeline_infantry.cmd @@ -0,0 +1,3 @@ +REM Insurrectionist textures +ironpress.exe ..\characters\infantry\cfg_ironpress.json +pause > nul \ No newline at end of file diff --git a/promotional/itch/cover1.png b/promotional/itch/cover1.png new file mode 100644 index 0000000..4f0b98e --- /dev/null +++ b/promotional/itch/cover1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28033605eac94ad4742adcedf7da3a20bac5af1a7dae2abff780b6d3da017a7d +size 426997 diff --git a/promotional/itch/cover1_bright.png b/promotional/itch/cover1_bright.png new file mode 100644 index 0000000..6d20a0b --- /dev/null +++ b/promotional/itch/cover1_bright.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c86bb1184e31e3e836abf576838868016f02322dfa1838f6670d3693bd37f5f7 +size 539504 diff --git a/props/OldPc/Monitor.fbx b/props/OldPc/Monitor.fbx index b260561..b9b0625 100644 --- a/props/OldPc/Monitor.fbx +++ b/props/OldPc/Monitor.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2fdc060128b9fadf68504bf6b59a99d30e7b9b25389d1d3be485e078848f959 -size 61184 +oid sha256:c3f6c00da23d4555415e9e69b52276a5ecbd0cbb0ba813e8909723b5cc0ff620 +size 71712 diff --git a/props/OldPc/Textures/mat_Monitor_Emissive.png b/props/OldPc/Textures/mat_Monitor_Emissive.png new file mode 100644 index 0000000..677565a --- /dev/null +++ b/props/OldPc/Textures/mat_Monitor_Emissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:931ebf3a65735c651c90473d0fa17e74ffe9a2d7ad11a3f93afe270922b30b67 +size 15107 diff --git a/props/OldPc/Textures/mat_Monitor_basecolor.png b/props/OldPc/Textures/mat_Monitor_basecolor.png index a336854..f79be58 100644 --- a/props/OldPc/Textures/mat_Monitor_basecolor.png +++ b/props/OldPc/Textures/mat_Monitor_basecolor.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8a81ecc35f2e511a423f532719447d15f34e5a09ffbb1d63ac34cc537df8d28 -size 263031 +oid sha256:3fd76f9ea085f277e08548ec99276da8efb931b7fcb3a5b4ffde34b3d16b6975 +size 273986 diff --git a/props/button/mesh_button.fbx b/props/button/mesh_button.fbx new file mode 100644 index 0000000..58c367b --- /dev/null +++ b/props/button/mesh_button.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13c3974426faf23e8a75548b07066d48bc3987a760fd4cc10e15fe4959302545 +size 46544 diff --git a/props/button/texture/mat_button_arm.png b/props/button/texture/mat_button_arm.png new file mode 100644 index 0000000..0e09ca4 --- /dev/null +++ b/props/button/texture/mat_button_arm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc088847926098375a1038982bc531a30cba2824815e74300d8c78e0fd84439d +size 2636183 diff --git a/props/button/texture/mat_button_basecolor.png b/props/button/texture/mat_button_basecolor.png new file mode 100644 index 0000000..b9614b1 --- /dev/null +++ b/props/button/texture/mat_button_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b798928846bd04aaabd27b19e087ffa947b586e342d6a5db92df3f856e59f926 +size 2816441 diff --git a/props/button/texture/mat_button_emissive.png b/props/button/texture/mat_button_emissive.png new file mode 100644 index 0000000..2e22e7d --- /dev/null +++ b/props/button/texture/mat_button_emissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbd51ac41532777d4517535aefc308e30cc6ee20a10518f98d900f32f93ad9d8 +size 57066 diff --git a/props/button/texture/mat_button_normal.png b/props/button/texture/mat_button_normal.png new file mode 100644 index 0000000..cf4e84e --- /dev/null +++ b/props/button/texture/mat_button_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:597348a486fde2dc9ab2a65c8ed90fca6294aaba01720288062badbeb9511e09 +size 2892487 diff --git a/ui/T_BossHealthBar_Mask.png b/ui/T_BossHealthBar_Mask.png new file mode 100644 index 0000000..ea07743 --- /dev/null +++ b/ui/T_BossHealthBar_Mask.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:769d5f6a94b2cfb51b03485090d1b2d795e7016513e1c5b5426de68bbbe8cd5e +size 2229