Skip to content

Commit 84fa66e

Browse files
committed
Make compatible with Blender 4.2
1 parent 318d55b commit 84fa66e

File tree

14 files changed

+31
-36
lines changed

14 files changed

+31
-36
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# BoneJuice
22
Armature utility plugin for Blender, for niche cases I encounter where it would be a lot nicer to have something do the work for me!
33

4-
Version 0.1.1 which supports Blender 4.2+
5-
- May be backwards compatible, but the latest changes are untested on previous versions
4+
Version 1.0.0 which supports Blender 4.2, using the extension system. See **Releases** on sidebar for legacy versions.
65

76
Feature List (click on the links to see how-to/examples):
87
- Object Mode
@@ -23,11 +22,9 @@ Feature List (click on the links to see how-to/examples):
2322
- **[Curl Bones](docs/examples/curl_bones.md)** - Offsets Euler rotations of all selected pose bones by the given rotation. Currently only works in Euler rotation mode.
2423
- Animation
2524
- **Bake All Actions** - Bakes all scene actions for the given armature.
26-
- Rendering
27-
- **(Work In Progress) Batch Render NLA Tracks** - Individually render out each animated NLA track inside of all selected objects. Renders from all selected cameras. Great for game animation previews or spritesheets.
2825

2926
# Installation
30-
Download the zip file from the releases area on GitHub, and then go to `Edit > Preferences > Add-ons` and then click `Install` in the top right, and select the zip file. Make sure the plugin it points to is enabled.
27+
Download the zip file from the releases area on GitHub, and then go to `Edit > Preferences > Add-ons` and then click `Install from Disk` in the top right dropdown, and select the zip file. Make sure the plugin it points to is enabled.
3128

3229
If you want the latest version, use `$ make` (Linux-only) inside this folder to get a zip file, or simply zip up the `src` folder and install that instead.
3330

build.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cd src
22
REM "C:\Program Files\Blender Foundation\Blender 4.2\blender.exe" --command extension validate
33
"C:\Program Files\Blender Foundation\Blender 4.2\blender.exe" --command extension build
4+
REM "C:\Program Files\Blender Foundation\Blender 4.2\blender.exe" --command extension validate build/bonejuice-0.1.1.zip
45
cd ..
56
move src\*.zip build\

src/__init__.py

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import bpy
22
from .utility import getPreferences
33
from .registrator import registerClass, unregisterClass, registerMenu, unregisterMenu
4-
from .luchadores import registerLuchadores, unregisterLuchadores
4+
# from .luchadores import registerLuchadores, unregisterLuchadores
55
from .index import BINDINGS, BINDINGS_EXPERIMENTAL, MENUBINDINGS
66
from .globals import BoneJuiceGlobals
77

@@ -10,19 +10,19 @@
1010
from bpy.props import BoolProperty
1111

1212
class BoneJuicePreferences(AddonPreferences):
13-
bl_idname: str = __name__
13+
bl_idname: str = __package__
1414

1515
def toggleExperimental(self, context: bpy.types.Context):
1616
if self.enableExperimental and (not BoneJuiceGlobals.experimentalRegistered):
1717
registerExperimental()
1818
elif (not self.enableExperimental) and BoneJuiceGlobals.experimentalRegistered:
1919
unregisterExperimental()
2020

21-
def toggleLuchadores(self, context: bpy.types.Context):
22-
if self.enableLuchadores and (not BoneJuiceGlobals.luchadoresRegistered):
23-
registerLuchadoresHelper()
24-
elif (not self.enableLuchadores) and BoneJuiceGlobals.luchadoresRegistered:
25-
unregisterLuchadoresHelper()
21+
# def toggleLuchadores(self, context: bpy.types.Context):
22+
# if self.enableLuchadores and (not BoneJuiceGlobals.luchadoresRegistered):
23+
# registerLuchadoresHelper()
24+
# elif (not self.enableLuchadores) and BoneJuiceGlobals.luchadoresRegistered:
25+
# unregisterLuchadoresHelper()
2626

2727
enableExperimental: BoolProperty(
2828
name="Enable Experimental Tools",
@@ -31,27 +31,27 @@ def toggleLuchadores(self, context: bpy.types.Context):
3131
update=toggleExperimental
3232
)
3333

34-
enableLuchadores: BoolProperty(
35-
name="Enable Luchadores Workflow",
36-
description="Enables tools for annotating and exporting armatures to the Luchadores engine",
37-
default=False,
38-
update=toggleLuchadores
39-
)
34+
# enableLuchadores: BoolProperty(
35+
# name="Enable Luchadores Workflow",
36+
# description="Enables tools for annotating and exporting armatures to the Luchadores engine",
37+
# default=False,
38+
# update=toggleLuchadores
39+
# )
4040

4141
def draw(self, context):
4242
layout = self.layout
4343
layout.label(text="BoneJuice Preferences")
4444
layout.prop(self, "enableExperimental")
45-
layout.prop(self, "enableLuchadores")
45+
# layout.prop(self, "enableLuchadores")
4646

4747
## REGISTER
48-
def registerLuchadoresHelper():
49-
BoneJuiceGlobals.luchadoresRegistered = True
50-
registerLuchadores()
48+
# def registerLuchadoresHelper():
49+
# BoneJuiceGlobals.luchadoresRegistered = True
50+
# registerLuchadores()
5151

52-
def unregisterLuchadoresHelper():
53-
BoneJuiceGlobals.luchadoresRegistered = False
54-
unregisterLuchadores()
52+
# def unregisterLuchadoresHelper():
53+
# BoneJuiceGlobals.luchadoresRegistered = False
54+
# unregisterLuchadores()
5555

5656
def registerExperimental():
5757
BoneJuiceGlobals.experimentalRegistered = True
@@ -68,8 +68,8 @@ def register():
6868
registerClass(item[0], item[1], item[2])
6969
if getPreferences(bpy.context).enableExperimental:
7070
registerExperimental()
71-
if getPreferences(bpy.context).enableLuchadores:
72-
registerLuchadoresHelper()
71+
# if getPreferences(bpy.context).enableLuchadores:
72+
# registerLuchadoresHelper()
7373
for item in MENUBINDINGS:
7474
registerMenu(item[0], item[1], item[2])
7575

@@ -80,9 +80,6 @@ def unregister():
8080
unregisterClass(item[0], item[1], item[2])
8181
if BoneJuiceGlobals.experimentalRegistered:
8282
unregisterExperimental()
83-
if BoneJuiceGlobals.luchadoresRegistered:
84-
unregisterLuchadoresHelper()
83+
# if BoneJuiceGlobals.luchadoresRegistered:
84+
# unregisterLuchadoresHelper()
8585
bpy.utils.unregister_class(BoneJuicePreferences)
86-
87-
if __name__ == "__main__":
88-
register()

src/blender_manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ schema_version = "1.0.0"
22

33
# TOML template from https://docs.blender.org/manual/en/4.2/extensions/getting_started.html
44
id = "bonejuice"
5-
version = "0.1.1"
5+
version = "1.0.0"
66
name = "BoneJuice"
77
tagline = "Armature utility plugin for Blender"
88
maintainer = "Alan O'Cull <alanocull.com>"

src/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .mesh.clean_and_combine import *
55
from .mesh.merge_vertex_groups import *
66
from .armature.pose_ops import *
7-
from .render.batch import *
7+
# from .render.batch import *
88
from .armature.reduce_rig import *
99
from .armature.transer_animations import *
1010
from .armature.spline_from_curve import *
@@ -34,6 +34,6 @@
3434
]
3535

3636
BINDINGS_EXPERIMENTAL: list = [
37-
(BoneJuice_BatchRenderActions, [bpy.types.TOPBAR_MT_render], []),
37+
# (BoneJuice_BatchRenderActions, [bpy.types.TOPBAR_MT_render], []),
3838
(BoneJuice_TransferAnimations, [bpy.types.VIEW3D_MT_object_animation], []),
3939
]

src/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def lerpVector(a: Vector, b: Vector, alpha: float) -> Vector:
142142

143143
def getPreferences(context: bpy.types.Context) -> AddonPreferences:
144144
print(context.preferences.addons)
145-
return context.preferences.addons["BoneJuice"].preferences
145+
return context.preferences.addons[__package__].preferences
146146

147147
def vectorToFloatList(inp: Vector) -> List[float]:
148148
return [inp.x, inp.y, inp.z]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)