Added Scenes folder with (readonly) display of scene frames

This commit is contained in:
Jindra Petřík
2023-12-29 18:40:23 +01:00
parent f09d4affa5
commit 85ba45cbb3
15 changed files with 333 additions and 10 deletions

View File

@@ -29,6 +29,7 @@ All notable changes to this project will be documented in this file.
- FLA export - show export time
- [#2138] Morphshapes - detect classic easing
- FLA export - option to disable fixing of shapes
- Scenes folder with (readonly) display of scene frames
### Fixed
- [#2021], [#2000] Caret position in editors when using tabs and / or unicode

View File

@@ -0,0 +1,92 @@
/*
* Copyright (C) 2010-2023 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.timeline;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.treeitems.Openable;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
import java.util.Objects;
/**
*
* @author JPEXS
*/
public class Scene implements TreeItem {
private SWF swf;
public int startFrame;
public int endFrame;
public String name;
public Scene(SWF swf, int startFrame, int endFrame, String name) {
this.swf = swf;
this.startFrame = startFrame;
this.endFrame = endFrame;
this.name = name;
}
public int getSceneFrameCount() {
return endFrame - startFrame + 1;
}
public SceneFrame getSceneFrame(int sceneFrameIndex) {
if (sceneFrameIndex >= getSceneFrameCount()) {
throw new IndexOutOfBoundsException("Invalid sceneframe index");
}
return new SceneFrame(swf, this, startFrame + sceneFrameIndex);
}
@Override
public Openable getOpenable() {
return swf;
}
@Override
public boolean isModified() {
return false; //??
}
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + Objects.hashCode(this.swf);
hash = 97 * hash + this.startFrame;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Scene other = (Scene) obj;
if (this.startFrame != other.startFrame) {
return false;
}
return Objects.equals(this.swf, other.swf);
}
@Override
public String toString() {
return name;
}
}

View File

@@ -0,0 +1,87 @@
/*
* Copyright (C) 2010-2023 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.timeline;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.treeitems.Openable;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
import java.util.Objects;
/**
*
* @author JPEXS
*/
public class SceneFrame implements TreeItem {
private final SWF swf;
private final Scene scene;
private final int realFrameIndex;
public SceneFrame(SWF swf, Scene scene, int realFrameIndex) {
this.swf = swf;
this.scene = scene;
this.realFrameIndex = realFrameIndex;
}
public int getSceneFrameIndex() {
return realFrameIndex - scene.startFrame;
}
public Frame getFrame() {
return swf.getTimeline().getFrame(realFrameIndex);
}
@Override
public String toString() {
return "scene frame " + (getSceneFrameIndex() + 1);
}
@Override
public Openable getOpenable() {
return swf;
}
@Override
public boolean isModified() {
return getFrame().isModified();
}
@Override
public int hashCode() {
int hash = 5;
hash = 47 * hash + Objects.hashCode(this.scene);
hash = 47 * hash + this.realFrameIndex;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final SceneFrame other = (SceneFrame) obj;
if (this.realFrameIndex != other.realFrameIndex) {
return false;
}
return Objects.equals(this.scene, other.scene);
}
}

View File

@@ -128,6 +128,8 @@ public class Timeline {
private boolean initialized = false;
private Map<String, Integer> labelToFrame = new HashMap<>();
private List<Scene> scenes = new ArrayList<>();
public static final int DRAW_MODE_ALL = 0;
public static final int DRAW_MODE_SHAPES = 1;
@@ -282,6 +284,8 @@ public class Timeline {
Frame frame = new Frame(this, frameIdx++);
frame.layersChanged = true;
boolean newFrameNeeded = false;
scenes = new ArrayList<>();
Scene prevScene = null;
for (Tag t : timelined.getTags()) {
newFrameNeeded = true;
boolean isNested = ShowFrameTag.isNestedTagType(t.getId());
@@ -290,6 +294,20 @@ public class Timeline {
}
frame.allInnerTags.add(t);
if (id == 0 && (t instanceof DefineSceneAndFrameLabelDataTag)) {
DefineSceneAndFrameLabelDataTag sceneData = (DefineSceneAndFrameLabelDataTag) t;
scenes = new ArrayList<>();
for (int i = 0; i < sceneData.sceneNames.length; i++) {
int ioffset = (int) sceneData.sceneOffsets[i];
Scene currentScene = new Scene(swf, ioffset, -1, sceneData.sceneNames[i]);
scenes.add(currentScene);
if (prevScene != null) {
prevScene.endFrame = ioffset - 1;
}
prevScene = currentScene;
}
}
if (t instanceof ASMSourceContainer) {
ASMSourceContainer asmSourceContainer = (ASMSourceContainer) t;
if (!asmSourceContainer.getSubItems().isEmpty()) {
@@ -445,6 +463,10 @@ public class Timeline {
if (newFrameNeeded) {
frames.add(frame);
}
if (prevScene != null) {
prevScene.endFrame = frames.size() - 1;
}
maxDepth = getMaxDepthInternal();
@@ -1521,4 +1543,9 @@ public class Timeline {
return false;
}
public List<Scene> getScenes() {
ensureInitialized();
return new ArrayList<>(scenes);
}
}

View File

@@ -27,6 +27,8 @@ import com.jpexs.decompiler.flash.tags.base.DrawableTag;
import com.jpexs.decompiler.flash.tags.base.ImageTag;
import com.jpexs.decompiler.flash.tags.base.RenderContext;
import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.timeline.Scene;
import com.jpexs.decompiler.flash.timeline.SceneFrame;
import com.jpexs.decompiler.flash.timeline.Timeline;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
import com.jpexs.decompiler.flash.types.RECT;
@@ -294,6 +296,12 @@ public class FolderPreviewPanel extends JPanel {
Matrix m = new Matrix();
double ow = 1;
double oh = 1;
if (treeItem instanceof Scene) {
treeItem = ((Scene) treeItem).getSceneFrame(0);
}
if (treeItem instanceof SceneFrame) {
treeItem = ((SceneFrame) treeItem).getFrame();
}
if (treeItem instanceof Frame) {
Frame fn = (Frame) treeItem;
RECT rect = swf.displayRect;

View File

@@ -192,6 +192,8 @@ import com.jpexs.decompiler.flash.tags.text.TextParseException;
import com.jpexs.decompiler.flash.timeline.AS3Package;
import com.jpexs.decompiler.flash.timeline.DepthState;
import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.timeline.Scene;
import com.jpexs.decompiler.flash.timeline.SceneFrame;
import com.jpexs.decompiler.flash.timeline.SoundStreamFrameRange;
import com.jpexs.decompiler.flash.timeline.TagScript;
import com.jpexs.decompiler.flash.timeline.Timeline;
@@ -5737,6 +5739,14 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
boolean internalViewer = !isAdobeFlashPlayerEnabled();
Frame frameTreeItem = null;
if (treeItem instanceof Frame) {
frameTreeItem = (Frame) treeItem;
}
if (treeItem instanceof SceneFrame) {
frameTreeItem = ((SceneFrame) treeItem).getFrame();
}
if ((treeItem instanceof AS3Package) && ((AS3Package) treeItem).isCompoundScript()) {
final ScriptPack scriptLeaf = ((AS3Package) treeItem).getCompoundInitializerPack();
if (Main.isInited() && (!Main.isWorking() || Main.isDebugging())) {
@@ -5810,8 +5820,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
} else {
showDetail(DETAILCARDEMPTYPANEL);
}
} else if (treeItem instanceof Frame) {
Frame frame = (Frame) treeItem;
} else if (frameTreeItem != null) {
Frame frame = frameTreeItem;
Set<Integer> needed = new LinkedHashSet<>();
frame.getNeededCharacters(needed);
@@ -5850,6 +5860,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
} else if (treeItem instanceof SWF) {
showPreview(treeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
} else if (treeItem instanceof Scene) {
showFolderPreviewList(treePath);
} else if (treeItem instanceof MetadataTag) {
showPreview(treeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
@@ -5874,8 +5886,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
} else if ((treeItem instanceof TextTag) && internalViewer) {
showPreview(treeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
} else if (treeItem instanceof Frame && internalViewer) {
showPreview(treeItem, previewPanel, -1, null);
} else if (frameTreeItem != null && internalViewer) {
showPreview(frameTreeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
} else if (treeItem instanceof ShowFrameTag && internalViewer) {
showPreview(treeItem, previewPanel, getFrameForTreeItem(treeItem), getTimelinedForTreeItem(treeItem));
@@ -5883,9 +5895,11 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
} else if ((treeItem instanceof SoundTag)) { //&& isInternalFlashViewerSelected() && (Arrays.asList("mp3", "wav").contains(((SoundTag) tagObj).getExportFormat())))) {
showPreview(treeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
} else if ((treeItem instanceof Frame) || (treeItem instanceof CharacterTag) || (treeItem instanceof FontTag) || (treeItem instanceof SoundStreamHeadTypeTag)) {
} else if (frameTreeItem != null) {
showPreview(frameTreeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
} else if ((treeItem instanceof CharacterTag) || (treeItem instanceof FontTag) || (treeItem instanceof SoundStreamHeadTypeTag)) {
showPreview(treeItem, previewPanel, -1, null);
showCard(CARDPREVIEWPANEL);
} else if (treeItem instanceof PlaceObjectTypeTag) {
showPreview(treeItem, previewPanel, getFrameForTreeItem(treeItem), null);
@@ -6027,6 +6041,9 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
}
}
break;
case TagTreeModel.FOLDER_SCENES:
folderPreviewItems.addAll(timelined.getTimeline().getScenes());
break;
}
}
@@ -6044,6 +6061,12 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
folderPreviewPanel.setItems(folderPreviewItems);
showCard(CARDFOLDERPREVIEWPANEL);
}
private void showFolderPreviewList(TreePath path) {
List<TreeItem> items = new ArrayList<>(getCurrentTree().getFullModel().getAllChildren((TreeItem) path.getLastPathComponent()));
folderPreviewPanel.setItems(items);
showCard(CARDFOLDERPREVIEWPANEL);
}
private void showFolderList(TreePath path) {
List<TreeItem> items = new ArrayList<>(getCurrentTree().getFullModel().getAllChildren((TreeItem) path.getLastPathComponent()));

View File

@@ -44,6 +44,7 @@ public enum TreeNodeType {
AS_INIT,
PACKAGE,
FRAME,
SCENE,
SHOW_FRAME,
MOVIE,
SOUND,

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1250,4 +1250,7 @@ error.wrong.packer = %item%\r\nCannot unpack binary data with %packer%.\r\nThe d
contextmenu.copyTagToReplaceByClass = Copy tag to (replace by class name)
contextmenu.copyTagToReplaceByExportName = Copy tag to (replace by export name)
button.breakpointList = Show breakpoint list
button.breakpointList = Show breakpoint list
node.scenes = scenes
contextmenu.showInFramesFolder = Show in frames folder

View File

@@ -1225,4 +1225,7 @@ error.wrong.packer = %item%\r\nNelze rozbalit bin\u00e1rn\u00ed data pomoc\u00ed
contextmenu.copyTagToReplaceByClass = Kop\u00edrovat tag do (nahradit podle n\u00e1zvu t\u0159\u00eddy)
contextmenu.copyTagToReplaceByExportName = Kop\u00edrovat tag do (nahradit podle exportovan\u00e9ho n\u00e1zvu)
button.breakpointList = Zobrazit seznam breakpoint\u016f
button.breakpointList = Zobrazit seznam breakpoint\u016f
node.scenes = sc\u00e9ny
contextmenu.showInFramesFolder = Zobrazit ve slo\u017ece sn\u00edmk\u016f

View File

@@ -90,6 +90,8 @@ import com.jpexs.decompiler.flash.timeline.AS2Package;
import com.jpexs.decompiler.flash.timeline.AS3Package;
import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.timeline.FrameScript;
import com.jpexs.decompiler.flash.timeline.Scene;
import com.jpexs.decompiler.flash.timeline.SceneFrame;
import com.jpexs.decompiler.flash.timeline.SoundStreamFrameRange;
import com.jpexs.decompiler.flash.timeline.TagScript;
import com.jpexs.decompiler.flash.treeitems.FolderItem;
@@ -376,8 +378,13 @@ public abstract class AbstractTagTree extends JTree {
}
if ((t instanceof Frame)
|| (t instanceof FrameScript)) {
|| (t instanceof FrameScript)
|| (t instanceof SceneFrame)) {
return TreeNodeType.FRAME;
}
if (t instanceof Scene) {
return TreeNodeType.SCENE;
}
if (t instanceof ShowFrameTag) {

View File

@@ -95,6 +95,8 @@ import com.jpexs.decompiler.flash.timeline.AS3Package;
import com.jpexs.decompiler.flash.timeline.DepthState;
import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.timeline.FrameScript;
import com.jpexs.decompiler.flash.timeline.Scene;
import com.jpexs.decompiler.flash.timeline.SceneFrame;
import com.jpexs.decompiler.flash.timeline.TagScript;
import com.jpexs.decompiler.flash.timeline.Timeline;
import com.jpexs.decompiler.flash.timeline.Timelined;
@@ -275,6 +277,8 @@ public class TagTreeContextMenu extends JPopupMenu {
private JMenuItem showInTagListViewTagMenuItem;
private JMenuItem showInHexDumpViewTagMenuItem;
private JMenuItem showInFramesFolderMenuItem;
private JMenuItem addFramesMenuItem;
@@ -501,6 +505,11 @@ public class TagTreeContextMenu extends JPopupMenu {
importSymbolClassMenuItem.setIcon(View.getIcon("importsymbolclass16"));
add(importSymbolClassMenuItem);
showInFramesFolderMenuItem = new JMenuItem(mainPanel.translate("contextmenu.showInFramesFolder"));
showInFramesFolderMenuItem.addActionListener(this::showInFramesFolderActionPerformed);
showInFramesFolderMenuItem.setIcon(View.getIcon("frame16"));
add(showInFramesFolderMenuItem);
showInResourcesViewTagMenuItem = new JMenuItem(mainPanel.translate("contextmenu.showInResources"));
showInResourcesViewTagMenuItem.addActionListener(this::showInResourcesViewActionPerformed);
showInResourcesViewTagMenuItem.setIcon(View.getIcon("folder16"));
@@ -515,7 +524,7 @@ public class TagTreeContextMenu extends JPopupMenu {
showInHexDumpViewTagMenuItem.addActionListener(this::showInHexDumpViewActionPerformed);
showInHexDumpViewTagMenuItem.setIcon(View.getIcon("viewhex16"));
add(showInHexDumpViewTagMenuItem);
addTagInsideMenu = new JMenu(mainPanel.translate("contextmenu.addTagInside"));
addTagInsideMenu.setIcon(View.getIcon("addtag16"));
add(addTagInsideMenu);
@@ -1130,6 +1139,7 @@ public class TagTreeContextMenu extends JPopupMenu {
showInResourcesViewTagMenuItem.setVisible(false);
showInTagListViewTagMenuItem.setVisible(false);
showInHexDumpViewTagMenuItem.setVisible(false);
showInFramesFolderMenuItem.setVisible(false);
addFramesMenuItem.setVisible(false);
addFramesBeforeMenuItem.setVisible(false);
addFramesAfterMenuItem.setVisible(false);
@@ -1369,6 +1379,10 @@ public class TagTreeContextMenu extends JPopupMenu {
|| (firstItem instanceof TagScript)) {
showInHexDumpViewTagMenuItem.setVisible(true);
}
if ((firstItem instanceof Scene) || (firstItem instanceof SceneFrame)) {
showInFramesFolderMenuItem.setVisible(true);
}
if (firstItem instanceof SWF) {
importImagesMenuItem.setVisible(true);
@@ -1695,6 +1709,14 @@ public class TagTreeContextMenu extends JPopupMenu {
if (item instanceof SWF) {
return;
}
if (item instanceof Scene) {
return;
}
if (item instanceof SceneFrame) {
return;
}
if (item instanceof Frame) {
insideFrame = true;
@@ -3563,6 +3585,18 @@ public class TagTreeContextMenu extends JPopupMenu {
logger.log(Level.SEVERE, null, ex);
}
}
private void showInFramesFolderActionPerformed(ActionEvent evt) {
TreeItem item = getCurrentItem();
if (item instanceof SceneFrame) {
item = ((SceneFrame) item).getFrame();
}
if (item instanceof Scene) {
item = ((Scene) item).getSceneFrame(0).getFrame();
}
mainPanel.setTagTreeSelectedNode(mainPanel.tagTree, item);
mainPanel.updateMenu();
}
private void showInResourcesViewActionPerformed(ActionEvent evt) {
TreeItem item = getCurrentItem();
@@ -3578,6 +3612,12 @@ public class TagTreeContextMenu extends JPopupMenu {
if (item instanceof TagScript) {
item = ((TagScript) item).getTag();
}
if (item instanceof SceneFrame) {
item = ((SceneFrame) item).getFrame();
}
if (item instanceof Scene) {
item = ((Scene) item).getSceneFrame(0).getFrame();
}
mainPanel.setTagTreeSelectedNode(mainPanel.tagListTree, item);
mainPanel.updateMenu();
}

View File

@@ -40,6 +40,8 @@ import com.jpexs.decompiler.flash.timeline.AS2Package;
import com.jpexs.decompiler.flash.timeline.AS3Package;
import com.jpexs.decompiler.flash.timeline.Frame;
import com.jpexs.decompiler.flash.timeline.FrameScript;
import com.jpexs.decompiler.flash.timeline.Scene;
import com.jpexs.decompiler.flash.timeline.SceneFrame;
import com.jpexs.decompiler.flash.timeline.SoundStreamFrameRange;
import com.jpexs.decompiler.flash.timeline.TagScript;
import com.jpexs.decompiler.flash.timeline.Timeline;
@@ -91,6 +93,8 @@ public class TagTreeModel extends AbstractTagTreeModel {
public static final String FOLDER_OTHERS = "others";
public static final String FOLDER_SCRIPTS = "scripts";
public static final String FOLDER_SCENES = "scenes";
private final List<TreeModelListener> listeners = new ArrayList<>();
@@ -261,6 +265,10 @@ public class TagTreeModel extends AbstractTagTreeModel {
for (int i = 0; i < frameCount; i++) {
frames.add(timeline.getFrame(i));
}
List<TreeItem> scenes = new ArrayList<>();
List<Scene> sceneList = timeline.getScenes();
scenes.addAll(sceneList);
for (int i = sounds.size() - 1; i >= 0; i--) {
TreeItem sound = sounds.get(i);
@@ -285,6 +293,7 @@ public class TagTreeModel extends AbstractTagTreeModel {
addFolderItem(nodeList, emptyFolders, addAllFolders, translate("node.fonts"), FOLDER_FONTS, swf, fonts);
addFolderItem(nodeList, emptyFolders, addAllFolders, translate("node.binaryData"), FOLDER_BINARY_DATA, swf, binaryData);
addFolderItem(nodeList, emptyFolders, addAllFolders, translate("node.frames"), FOLDER_FRAMES, swf, frames);
addFolderItem(nodeList, emptyFolders, addAllFolders, translate("node.scenes"), FOLDER_SCENES, swf, scenes);
addFolderItem(nodeList, emptyFolders, true /*always add*/, translate("node.others"), FOLDER_OTHERS, swf, others);
Map<Tag, TagScript> currentTagScriptCache = new HashMap<>();
@@ -418,6 +427,15 @@ public class TagTreeModel extends AbstractTagTreeModel {
}
}
if (obj instanceof SceneFrame && n instanceof SceneFrame) {
// SceneFrames are always recreated, so compare them by frame and swf
SceneFrame nds = (SceneFrame) n;
SceneFrame objs = (SceneFrame) obj;
if (objs.getFrame().frame == nds.getFrame().frame && objs.getOpenable() == nds.getOpenable()) {
return newPath;
}
}
if (obj instanceof FolderItem && n instanceof FolderItem) {
// FolderItems are always recreated, so compare them by name and swf
FolderItem nds = (FolderItem) n;
@@ -521,6 +539,13 @@ public class TagTreeModel extends AbstractTagTreeModel {
return ((OpenableList) parentNode).items;
} else if (parentNode instanceof SWF) {
return getSwfFolders((SWF) parentNode);
} else if (parentNode instanceof Scene) {
Scene scene = (Scene) parentNode;
List<SceneFrame> sceneFrames = new ArrayList<>();
for (int i = 0; i < scene.getSceneFrameCount(); i++) {
sceneFrames.add(scene.getSceneFrame(i));
}
return sceneFrames;
} else if (parentNode instanceof FolderItem) {
return ((FolderItem) parentNode).subItems;
} else if (parentNode instanceof Frame) {
@@ -614,6 +639,8 @@ public class TagTreeModel extends AbstractTagTreeModel {
return ((OpenableList) parentNode).items.get(index);
} else if (parentNode instanceof SWF) {
return getSwfFolders((SWF) parentNode).get(index);
} else if (parentNode instanceof Scene) {
return ((Scene) parentNode).getSceneFrame(index);
} else if (parentNode instanceof FolderItem) {
return ((FolderItem) parentNode).subItems.get(index);
} else if (parentNode instanceof Frame) {
@@ -687,6 +714,8 @@ public class TagTreeModel extends AbstractTagTreeModel {
return mappedSize + ((OpenableList) parentNode).items.size();
} else if (parentNode instanceof SWF) {
return mappedSize + getSwfFolders((SWF) parentNode).size();
} else if (parentNode instanceof Scene) {
return mappedSize + ((Scene) parentNode).getSceneFrameCount();
} else if (parentNode instanceof HeaderItem) {
return mappedSize + 0;
} else if (parentNode instanceof FolderItem) {
@@ -763,6 +792,8 @@ public class TagTreeModel extends AbstractTagTreeModel {
return indexOfAdd(baseIndex, ((OpenableList) parentNode).items.indexOf(childNode));
} else if (parentNode instanceof SWF) {
return indexOfAdd(baseIndex, getSwfFolders((SWF) parentNode).indexOf(childNode));
} else if (parentNode instanceof Scene) {
return getAllChildren(parentNode).indexOf(childNode);
} else if (parentNode instanceof FolderItem) {
return indexOfAdd(baseIndex, ((FolderItem) parentNode).subItems.indexOf(childNode));
} else if (parentNode instanceof Frame) {