Motion transfer setup #1
6
nodes.py
6
nodes.py
@ -228,6 +228,7 @@ class AbstractPowerShipNode(bpy.types.Node):
|
||||
|
||||
def run(self, depsgraph: bpy.types.Depsgraph) -> None:
|
||||
assert not self.has_run, "a node can only run once, reset it first"
|
||||
|
||||
if self.mute:
|
||||
# Skip execution of this node, it's muted.
|
||||
self._first_input_to_output()
|
||||
@ -270,6 +271,7 @@ class AbstractPowerShipNode(bpy.types.Node):
|
||||
|
||||
def _first_input_to_output(self) -> None:
|
||||
"""Copy the first input's default value to the output, if the sockets are compatible."""
|
||||
|
||||
cgtinker marked this conversation as resolved
Outdated
|
||||
if not self.inputs or not self.outputs:
|
||||
return
|
||||
|
||||
@ -976,7 +978,6 @@ class SetBoneNode(AbstractPowerShipNode):
|
||||
arm_eval: bpy.types.Object = arm_ob.evaluated_get(depsgraph)
|
||||
arm_matrix = arm_eval.matrix_world
|
||||
bone_mat_world: Matrix = arm_matrix @ bone.matrix
|
||||
|
||||
loc, rot, scale = bone_mat_world.decompose()
|
||||
|
||||
if control_location is not None:
|
||||
@ -1369,8 +1370,7 @@ _register, _unregister = bpy.utils.register_classes_factory(classes)
|
||||
|
||||
def register() -> None:
|
||||
_register()
|
||||
nodeitems_utils.register_node_categories(
|
||||
"POWERSHIP_NODES", node_categories)
|
||||
nodeitems_utils.register_node_categories("POWERSHIP_NODES", node_categories)
|
||||
|
||||
|
||||
def unregister() -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user
Keep formatting changes out of the patch. You can use
git gui
or some other tool to cherry-pick which lines you do (not) want to include in a commit. That way you can exclude such changes, commit the rest, then revert the unwanted formatting changes to get rid of them.