1
0
Fork 0

- make ufo import only static objects with a minimum of defined data

- turn off specular on the sign placeholder model
This commit is contained in:
mfranz 2006-04-21 19:49:44 +00:00
parent 5e192df677
commit 543be9df3f
2 changed files with 23 additions and 14 deletions

View file

@ -1,6 +1,6 @@
AC3Db
MATERIAL "legend" rgb 1 1 1 amb 1 1 1 emis 1 1 1 spec 0 0 0 shi 72 trans 0
MATERIAL "black" rgb 0.3 0.3 0.3 amb 0.3 0.3 0.3 emis 0 0 0 spec 1 1 1 shi 72 trans 0
MATERIAL "black" rgb 0.3 0.3 0.3 amb 0.3 0.3 0.3 emis 0 0 0 spec 0 0 0 shi 72 trans 0
OBJECT world
kids 3
OBJECT poly

View file

@ -676,19 +676,28 @@ ModelMgr = {
}
},
import : func {
var models = props.globals.getNode("models", 1);
var tmp = props.Node.new();
props.copy(models, tmp);
models.removeChildren("model");
foreach (var m; tmp.getChildren("model")) {
append(me.static, Static.new(m.getNode("path").getValue(),
m.getNode("legend", 1).getValue(),
m.getNode("longitude-deg", 1).getValue(),
m.getNode("latitude-deg", 1).getValue(),
m.getNode("elevation-ft", 1).getValue(),
m.getNode("heading-deg", 1).getValue(),
m.getNode("pitch-deg", 1).getValue(),
m.getNode("roll-deg", 1).getValue()));
var mandatory = ["path", "longitude-deg", "latitude-deg", "elevation-ft"];
foreach (var m; props.globals.getNode("models", 1).getChildren("model")) {
var ok = 1;
foreach (var a; mandatory) {
if (m.getNode(a) == nil or m.getNode(a).getType() == "NONE") {
ok = 0;
}
}
if (ok) {
var tmp = props.Node.new({"heading-deg":0, "pitch-deg":0, "roll-deg":0});
prop.copy(m, tmp);
m.getParent().removeChild(m.getName(), m.getIndex());
append(me.static, Static.new(
m.getNode("path").getValue(),
m.getNode("legend").getValue(),
m.getNode("longitude-deg").getValue(),
m.getNode("latitude-deg").getValue(),
m.getNode("elevation-ft").getValue(),
m.getNode("heading-deg").getValue(),
m.getNode("pitch-deg").getValue(),
m.getNode("roll-deg").getValue()));
}
}
me.select();
},