-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bug Fixes and Undo #471
base: v0_8
Are you sure you want to change the base?
Bug Fixes and Undo #471
Conversation
Duplication can now be undone, and a couple of minor bugs have been fixed to do with zsort and node names.
source/creator/panels/nodes.d
Outdated
l.insertInPlace(l.countUntil!(c => c is n)+1,x); | ||
l=l[0..$-1]; | ||
} | ||
incAddChildWithHistory(x,n.parent,n.name~(" Copy")); | ||
incActivePuppet().rescanNodes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the IncActivePuppet().rescanNodes();
can be removed?
inochi-creator/source/creator/actions/node.d
Lines 319 to 333 in 85c2f6b
void incAddChildWithHistory(Node n, Node to, string name=null) { | |
if (to is null) to = incActivePuppet().root; | |
// Push action to stack | |
incActionPush(new NodeMoveAction( | |
[n], | |
to | |
)); | |
n.insertInto(to, Node.OFFSET_START); | |
n.localTransform.clear(); | |
if (name is null) n.name = _("Unnamed ")~_(n.typeId()); | |
else n.name = name; | |
incActivePuppet().rescanNodes(); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, along with a little transform bug this introduced
Some other suggestions, maybe you can confirm whether the |
Inc add child was clearing the transform of the node
There are some cases where i don't think we want a deep copy. For example, references to masks(Which still has some undesirable behavior for internal masks to the duplicated tree at the moment) and especially texture references, which is the main goal of this. So that we don't need duplicates in the texture atlass. That being said, I'm not sure how to interact with serialization. |
Meshes weren't being duplicated correctly
Duplication can now be undone, and a couple of minor bugs have been fixed to do with zsort and node names.