Is it possible to modify the filename of the Image Texture from Iron for this node ?
(for example, using armory script2d example,
—>>you set the filename via the ui like in this picture;
–>> We can find the “project.addAssets(“assets/checker_rough.png”);” line inside the khafile.js
–>> Thus in your UITrait.hx you have a h.text that contains the filename of your image (see code below );
...
if (ui.window(Id.handle(), 20, 20, 230, 600, true)) {
// Make panel in this window
if (ui.panel(Id.handle({selected: true}), "montest")) {
ui.indent();
// ouverture fichier
var h = Id.handle();
ui.row([1/2, 1/2]);
ui.button("Cancel");
if (ui.button("Load")) {
// le h.text contient notre fichier image
trace(h.text);
Thus the question is how can we then use this h.text to set the filename in the Shader Node inside the UITrait.hx where we have got the h.text ?