jMonkeyEngine / jMonkeyEngine/sdk

[Netbeans Node API] Nodes don't refresh recursively

Open
#83 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Contribution welcome
Dominant language
Java
Stars
348
Forks
104
Avg merge
4d 13h
Merged PRs (30d)
3

Description

So Netbeans has the Nodes API to display it's hiearchic structures like you see the SceneGraph in the Scene Explorer.

Now we have that "AbstractSceneExplorerNode" which is the Base-Class to many Nodes.
It features a refresh method which contains the following:

//TODO: refresh does not work
public void refresh(boolean immediate) {
   if (jmeChildren instanceof JmeSpatialChildren) {
      ((JmeSpatialChildren) jmeChildren).refreshChildren(immediate);
   }
}

The Problem here actually is, that those jmeChildren itself don't seem to trigger it's nodes.
I tried to add the following code, but for some reason, the children don't seem to have any nodes attached to. I don't have the time to work into the Nodes API again, though.

Maybe you can read everything in the Commits regarding the MotionEvent Implementation, maybe those update as they should. They also use the Parent/Children Stuff, but it's not JmeSpatialChildren, of course.

for (Node n : nodes) { // TODO: Why is nodes always empty? What about the Children's Children?
  if (n instanceof AbstractSceneExplorerNode) {
     ((AbstractSceneExplorerNode)n).refresh(immediate);
  }
}

(JmeSpatialChildren:refreshChildren)

Ohh, and the AnimationControl Stuff has the same API regarding Children and Nodes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AbstractSceneExplorerNode.refresh(boolean) and JmeSpatialChildren.refreshChildren(immediate), then compare the Parent/Children handling in the MotionEvent implementation. Also inspect the AnimationControl children API mentioned in the issue. Done means scene and animation child nodes refresh recursively when their contents change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.