fix property list and arguments error
This commit is contained in:
parent
acefab7b9a
commit
e12fc221ae
|
@ -203,14 +203,14 @@ def infoHandle(target, tag):
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
existedSet = set()
|
existedSet = set()
|
||||||
if tag == 0:
|
if tag == '0':
|
||||||
# call from cell
|
# call from cell
|
||||||
cur.execute("SELECT * FROM info WHERE [target] == ?", (target, ))
|
cur.execute("SELECT * FROM info WHERE [target] == ?", (target, ))
|
||||||
elif tag == 1:
|
elif tag == '1':
|
||||||
# call from bb
|
# call from bb
|
||||||
cur.execute("SELECT * FROM info WHERE [attach_bb] == ?", (target, ))
|
cur.execute("SELECT * FROM info WHERE [attach_bb] == ?", (target, ))
|
||||||
else:
|
else:
|
||||||
return []
|
return {}
|
||||||
# get data
|
# get data
|
||||||
for i in cur.fetchall():
|
for i in cur.fetchall():
|
||||||
if i[0] in existedSet:
|
if i[0] in existedSet:
|
||||||
|
@ -220,7 +220,7 @@ def infoHandle(target, tag):
|
||||||
data[i[0]] = {
|
data[i[0]] = {
|
||||||
'name': i[3],
|
'name': i[3],
|
||||||
'is_setting': True if i[2] != 0 else False,
|
'is_setting': True if i[2] != 0 else False,
|
||||||
'data': []
|
'data': [(i[4], i[5])]
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -6,14 +6,14 @@ import sys
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv, "hi:o:e:f")
|
opts, args = getopt.getopt(sys.argv[1:], "hi:o:e:f")
|
||||||
except getopt.GetoptError:
|
except getopt.GetoptError:
|
||||||
print('Wrong arguments!')
|
print('Wrong arguments!')
|
||||||
print('python SuperScriptViewer.py -i <export.db> -o <decorated.db> -e <env.db> -f')
|
print('python SuperScriptViewer.py -i <export.db> -o <decorated.db> -e <env.db> -c <codec_name> -f')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
for opt, arg in opts:
|
for opt, arg in opts:
|
||||||
if opt == '-h':
|
if opt == '-h':
|
||||||
print('python SuperScriptViewer.py -i <export.db> -o <decorated.db> -e <env.db> -f')
|
print('python SuperScriptViewer.py -i <export.db> -o <decorated.db> -e <env.db> -c <codec_name> -f')
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
elif opt == '-i':
|
elif opt == '-i':
|
||||||
CustomConfig.export_db = arg
|
CustomConfig.export_db = arg
|
||||||
|
@ -21,6 +21,8 @@ for opt, arg in opts:
|
||||||
CustomConfig.decorated_db = arg
|
CustomConfig.decorated_db = arg
|
||||||
elif opt == '-e':
|
elif opt == '-e':
|
||||||
CustomConfig.env_db = arg
|
CustomConfig.env_db = arg
|
||||||
|
elif opt == '-c':
|
||||||
|
CustomConfig.database_encoding = arg
|
||||||
elif opt == '-f':
|
elif opt == '-f':
|
||||||
CustomConfig.force_regenerate = True
|
CustomConfig.force_regenerate = True
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
<Name>SuperScriptViewer</Name>
|
<Name>SuperScriptViewer</Name>
|
||||||
<RootNamespace>SuperScriptViewer</RootNamespace>
|
<RootNamespace>SuperScriptViewer</RootNamespace>
|
||||||
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
||||||
<CommandLineArguments>
|
<CommandLineArguments>-f</CommandLineArguments>
|
||||||
</CommandLineArguments>
|
|
||||||
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
|
|
@ -37,8 +37,8 @@ function doQuery(fieldIndex, queryTag) {
|
||||||
for(var i = 0; i < data['data'].length; i++) {
|
for(var i = 0; i < data['data'].length; i++) {
|
||||||
$("#resultTable_" + fieldIndex).append("<tr></tr>");
|
$("#resultTable_" + fieldIndex).append("<tr></tr>");
|
||||||
for(var j = 0; j < data['data'][i].length; j++) {
|
for(var j = 0; j < data['data'][i].length; j++) {
|
||||||
$("#resultTable_" + fieldIndex + " tr:last-child").append("<td></td>");
|
$("#resultTable_" + fieldIndex + " tr:last").append("<td></td>");
|
||||||
$("#resultTable_" + fieldIndex + " tr:last-child td:last-child").text(data['data'][i][j]);
|
$("#resultTable_" + fieldIndex + " tr:last td:last").text(data['data'][i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -91,9 +91,10 @@ pre.propertyItem {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 5px;
|
|
||||||
background: #3f3f3f;
|
background: #3f3f3f;
|
||||||
color: white;
|
color: white;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
code.propertyItem {
|
code.propertyItem {
|
||||||
|
|
|
@ -48,22 +48,22 @@ function localstorageAssist_Set(index, value) {
|
||||||
//=======================================internal event
|
//=======================================internal event
|
||||||
previousHighlight = "";
|
previousHighlight = "";
|
||||||
function highlightLink(target) {
|
function highlightLink(target) {
|
||||||
realTarget = ".target" + target
|
realTarget = ".target" + target;
|
||||||
|
|
||||||
if (previousHighlight != "") {
|
if (previousHighlight != "") {
|
||||||
//need restore
|
//need restore
|
||||||
$(previousHighlight).each(function () {
|
$(previousHighlight).each(function () {
|
||||||
if ($(this).hasClass("link-blink")) {
|
if ($(this).hasClass("link-blink")) {
|
||||||
$(this).attr("stroke", "black")
|
$(this).attr("stroke", "black");
|
||||||
}
|
}
|
||||||
if ($(this).hasClass("link-blinkDelay")) {
|
if ($(this).hasClass("link-blinkDelay")) {
|
||||||
$(this).attr("fill", "black")
|
$(this).attr("fill", "black");
|
||||||
}
|
}
|
||||||
if ($(this).hasClass("link-plink")) {
|
if ($(this).hasClass("link-plink")) {
|
||||||
$(this).attr("stroke", "blue")
|
$(this).attr("stroke", "blue");
|
||||||
}
|
}
|
||||||
if ($(this).hasClass("link-elink")) {
|
if ($(this).hasClass("link-elink")) {
|
||||||
$(this).attr("stroke", "cyan")
|
$(this).attr("stroke", "cyan");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -76,20 +76,20 @@ function highlightLink(target) {
|
||||||
//apply new highlight
|
//apply new highlight
|
||||||
$(realTarget).each(function () {
|
$(realTarget).each(function () {
|
||||||
if ($(this).hasClass("link-blink")) {
|
if ($(this).hasClass("link-blink")) {
|
||||||
$(this).attr("stroke", "yellow")
|
$(this).attr("stroke", "yellow");
|
||||||
}
|
}
|
||||||
if ($(this).hasClass("link-blinkDelay")) {
|
if ($(this).hasClass("link-blinkDelay")) {
|
||||||
$(this).attr("fill", "yellow")
|
$(this).attr("fill", "yellow");
|
||||||
}
|
}
|
||||||
if ($(this).hasClass("link-plink")) {
|
if ($(this).hasClass("link-plink")) {
|
||||||
$(this).attr("stroke", "orange")
|
$(this).attr("stroke", "orange");
|
||||||
}
|
}
|
||||||
if ($(this).hasClass("link-elink")) {
|
if ($(this).hasClass("link-elink")) {
|
||||||
$(this).attr("stroke", "orange")
|
$(this).attr("stroke", "orange");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
previousHighlight = realTarget
|
previousHighlight = realTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
//cancel event seperate
|
//cancel event seperate
|
||||||
|
@ -110,12 +110,15 @@ function queryInfo(type, obj) {
|
||||||
target: obj
|
target: obj
|
||||||
},
|
},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
|
//set target
|
||||||
|
$("#sidepanel-properties-target b").text(obj);
|
||||||
|
|
||||||
//set data
|
//set data
|
||||||
$("#sidepanel-properties-container").empty()
|
$("#sidepanel-properties-container").empty();
|
||||||
for (var key in data) {
|
for (var key in data) {
|
||||||
$("#sidepanel-properties-container").append("<div class=\"propertyItem\"></div>");
|
$("#sidepanel-properties-container").append("<div class=\"propertyItem\"></div>");
|
||||||
|
|
||||||
var box = $("#sidepanel-properties-container div:last-child");
|
var box = $("#sidepanel-properties-container div:last");
|
||||||
if (data[key]["is_setting"])
|
if (data[key]["is_setting"])
|
||||||
$(box).append("<p><code class=\"propertyItem\">S</code><b></b><i></i></p>");
|
$(box).append("<p><code class=\"propertyItem\">S</code><b></b><i></i></p>");
|
||||||
else
|
else
|
||||||
|
@ -125,9 +128,9 @@ function queryInfo(type, obj) {
|
||||||
$(box).find("p i").text("(" + key + ")");
|
$(box).find("p i").text("(" + key + ")");
|
||||||
|
|
||||||
for (var i = 0; i < data[key]['data'].length; i++) {
|
for (var i = 0; i < data[key]['data'].length; i++) {
|
||||||
$(box).append("<p></p><pre class=\"propertyItem\"></pre>")
|
$(box).append("<p></p><pre class=\"propertyItem\"></pre>");
|
||||||
$(box).find("p:last-child").text(data[key]['data'][0])
|
$(box).find("p:last").text(data[key]['data'][i][0]);
|
||||||
$(box).find("pre:last-child").text(data[key]['data'][1])
|
$(box).find("pre:last").text(data[key]['data'][i][1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -88,12 +88,13 @@
|
||||||
<div id="tabnavigation_1_3" class="tabnavigation_1 tabitem-deactivated" style="height: 100%; width: 33.33%; text-align: center;" onclick="tabControlSwitcher(1, 3);"><b style="margin: 0;">Tools</b></div>
|
<div id="tabnavigation_1_3" class="tabnavigation_1 tabitem-deactivated" style="height: 100%; width: 33.33%; text-align: center;" onclick="tabControlSwitcher(1, 3);"><b style="margin: 0;">Tools</b></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tabpanel_1_1" class="tabpanel_1" style="display: flex; flex-flow: column;width: 100%; height: 100%; display: flex; flex-flow: column;">
|
<div id="tabpanel_1_1" class="tabpanel_1" style="display: flex; flex-flow: column;width: 100%; height: 100%; display: flex; flex-flow: column; overflow-x: hidden;">
|
||||||
|
<p style="margin: 5px;" id="sidepanel-properties-target">Selected target: <b></b></p>
|
||||||
<div id="sidepanel-properties-container" style="width: 100%; height: 100%; overflow: scroll;">
|
<div id="sidepanel-properties-container" style="width: 100%; height: 100%; overflow: scroll;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tabpanel_1_2" class="tabpanel_1" id="sidepanel-display" style="width: 100%; height: 100%; display: flex; flex-flow: column; overflow: scroll; display: none;">
|
<div id="tabpanel_1_2" class="tabpanel_1" id="sidepanel-display" style="width: 100%; height: 100%; display: flex; flex-flow: column; overflow: scroll; overflow-x: hidden; display: none;">
|
||||||
<p style="margin: 5px;">Render:<br />
|
<p style="margin: 5px;">Render:<br />
|
||||||
<input type="checkbox" id="sidepanel-display-plink" value="1" onclick="settingChange("plink");">Show pLink and eLink</input>
|
<input type="checkbox" id="sidepanel-display-plink" value="1" onclick="settingChange("plink");">Show pLink and eLink</input>
|
||||||
</p>
|
</p>
|
||||||
|
@ -104,7 +105,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tabpanel_1_3" class="tabpanel_1" style="width: 100%; height: 100%; display: flex; flex-flow: column; overflow: scroll; display: none;">
|
<div id="tabpanel_1_3" class="tabpanel_1" style="width: 100%; height: 100%; display: flex; flex-flow: column; overflow: scroll; overflow-x: hidden; display: none;">
|
||||||
<p style="margin: 5px;">Object finder:<br />
|
<p style="margin: 5px;">Object finder:<br />
|
||||||
<input type="text" id="sidepanel-tools-objfinder"></input><br />
|
<input type="text" id="sidepanel-tools-objfinder"></input><br />
|
||||||
<button style="height: 30px; margin: 10px 0 10px 0;">Find</button>
|
<button style="height: 30px; margin: 10px 0 10px 0;">Find</button>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user