@@ -27,38 +27,44 @@ ExtArmature.GenNodeByData = function (data, parent) {
2727 node._className = ExtArmature.name
2828 ExtArmature.SetBaseNodeProp(node, data)
2929 // data.ignoreSetProp = true
30- if(data.uuid) {
31- node.uuid = data.uuid;
30+ if (data.uuid) {
31+ node.uuid = data.uuid
3232 }
3333 var fullImagePath = getFullPathForName(data.imagePath)
3434 var fullPlistPath = getFullPathForName(data.plistPath)
3535 var fullConfigPath = getFullPathForName(data.configFilePath)
3636 if (!fullImagePath || !fullPlistPath || !fullConfigPath || !data.actionName) {
3737 return node
3838 }
39-
40- cc.loader.load([fullImagePath, fullPlistPath, fullConfigPath],
41- function (results, count, loadedCount) {
42- if(count == loadedCount + 1) {
43-
39+ // cc.loader.load([fullImagePath, fullPlistPath, fullConfigPath],
40+ // function (results, count, loadedCount) {
41+ // if (count == loadedCount + 1) {
42+ // }
43+ // }, function () {
44+ ccs.armatureDataManager.addArmatureFileInfo(fullImagePath, fullPlistPath, fullConfigPath)
45+ // if(!node.getParent() && parent) {
46+ // parent.addChild(node)
47+ // }
48+ node.init(data.actionName)
49+ if (node.getAnimation()) {
50+ node.getAnimation().play('stand', -1, 1)
4451 }
45-
46- }, function () {
47- ccs.armatureDataManager.addArmatureFileInfo(fullImagePath, fullPlistPath, fullConfigPath);
48- node.init(data.actionName);
49- if(node.getAnimation()) {
50- node.getAnimation().play('stand', -1, 1)
51- }
52- // var newNode = new ccs.Armature(data.actionName)
53- // newNode._className = ExtArmature.name
54- // node.uuid = data.uuid || gen_uuid();
55- // data.uuid = node.uuid
56- // node.ignoreAddToParent = true
57- // newNode.getAnimation().play('stand', -1, 1)
58- // cocosGenNodeByData(data, parent, newNode)
59- // ReplaceNode(node, newNode, parent)
60- // ExtArmature.SetBaseNodeProp(newNode, data)
61- })
52+
53+ console.log("parent111 = ", parent)
54+ console.log("parent = ", node.getParent())
55+ console.log("getNodeToParentTransform = ", node.getNodeToParentTransform())
56+ console.log("_offsetPoint = ", node._offsetPoint)
57+ cocosGenNodeByDataBase(data, node, parent)
58+ // var newNode = new ccs.Armature(data.actionName)
59+ // newNode._className = ExtArmature.name
60+ // node.uuid = data.uuid || gen_uuid()
61+ // data.uuid = node.uuid
62+ // node.ignoreAddToParent = true
63+ // newNode.getAnimation().play('stand', -1, 1)
64+ // cocosGenNodeByData(data, parent, newNode)
65+ //
66+ // ExtArmature.SetBaseNodeProp(newNode, data)
67+ // })
6268 return node
6369}
6470
@@ -86,9 +92,19 @@ ExtArmature.ExportNodeData = function (node, data) {
8692 node.imagePath && (data.imagePath = node.imagePath)
8793 node.plistPath && (data.plistPath = node.plistPath)
8894 node.configFilePath && (data.configFilePath = node.configFilePath)
89-
90- data['anchorX'] = node.anchorX
95+
96+ data['anchorX'] = node.anchorX
9197 data['anchorY'] = node.anchorY
98+
99+ // data['anchorX'] = null
100+ // data['anchorY'] = null
101+ }
102+
103+ ExtArmature.PropCantChange = function (node, path, value, target) {
104+ // if(path == "anchor.x" || path == "anchor.y") {
105+ // return true
106+ // }
107+ return false
92108}
93109
94110ExtArmature.SetPropChange = function (control, path, value, target) {
@@ -97,6 +113,10 @@ ExtArmature.SetPropChange = function (control, path, value, target) {
97113 ExtArmature.ResetPropByData(control, data)
98114}
99115
116+ ExtArmature.GetLoadImages = function(data) {
117+ return [data['imagePath'], data['plistPath'], data['configFilePath']]
118+ }
119+
100120ExtArmature.NodifyPropChange = function (control) {
101121 SetNodifyPropChange(control)
102122}
0 commit comments