Skip to content

ArmatureDebugAppState: minor fix and improvements #2531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void initialize(Application app) {
}

private void registerInput() {
inputManager.addMapping(PICK_JOINT, new MouseButtonTrigger(MouseInput.BUTTON_LEFT), new MouseButtonTrigger(MouseInput.BUTTON_RIGHT));
Copy link
Contributor

@codex128 codex128 Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the right mouse button trigger removed?

inputManager.addMapping(PICK_JOINT, new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
inputManager.addMapping(TOGGLE_JOINTS, new KeyTrigger(KeyInput.KEY_F10));
inputManager.addListener(actionListener, PICK_JOINT, TOGGLE_JOINTS);
}
Expand Down Expand Up @@ -248,6 +248,10 @@ private void collectGeometries(Node node, List<Geometry> geometries) {

@Override
public void onAction(String name, boolean isPressed, float tpf) {
if (!isEnabled()) {
return;
}

if (name.equals(PICK_JOINT)) {
if (isPressed) {
// Start counting click delay on mouse press
Expand Down Expand Up @@ -290,22 +294,24 @@ else if (name.equals(TOGGLE_JOINTS) && isPressed) {
}
}

private void printJointInfo(Joint selectedjoint, ArmatureDebugger ad) {
private void printJointInfo(Joint selectedJoint, ArmatureDebugger ad) {
if (enableJointInfoLogging) {
System.err.println("-----------------------");
System.err.println("Selected Joint : " + selectedjoint.getName() + " in armature " + ad.getName());
System.err.println("Root Bone : " + (selectedjoint.getParent() == null));
System.err.println("-----------------------");
System.err.println("Local translation: " + selectedjoint.getLocalTranslation());
System.err.println("Local rotation: " + selectedjoint.getLocalRotation());
System.err.println("Local scale: " + selectedjoint.getLocalScale());
System.err.println("---");
System.err.println("Model translation: " + selectedjoint.getModelTransform().getTranslation());
System.err.println("Model rotation: " + selectedjoint.getModelTransform().getRotation());
System.err.println("Model scale: " + selectedjoint.getModelTransform().getScale());
System.err.println("---");
System.err.println("Bind inverse Transform: ");
System.err.println(selectedjoint.getInverseModelBindMatrix());
String info = "\n-----------------------\n" +
"Selected Joint : " + selectedJoint.getName() + " in armature " + ad.getName() + "\n" +
"Root Bone : " + (selectedJoint.getParent() == null) + "\n" +
"-----------------------\n" +
"Local translation: " + selectedJoint.getLocalTranslation() + "\n" +
"Local rotation: " + selectedJoint.getLocalRotation() + "\n" +
"Local scale: " + selectedJoint.getLocalScale() + "\n" +
"---\n" +
"Model translation: " + selectedJoint.getModelTransform().getTranslation() + "\n" +
"Model rotation: " + selectedJoint.getModelTransform().getRotation() + "\n" +
"Model scale: " + selectedJoint.getModelTransform().getScale() + "\n" +
"---\n" +
"Bind inverse Transform: \n" +
selectedJoint.getInverseModelBindMatrix();

logger.log(Level.INFO, info);
}
}

Expand Down