Hi, i'm new on this forum but i've read many brilliant solutions to very various problems, so here is mine:
I would like to customize an SFileIn node in order to gather automatically a number of CG passes for each element in the scene. To do that i need to implement the FileIn with some variables that could define that specific element according to a very strict project naming convention (such projectpath, scene, shot, department etc.). I'm afraid i'm missing the whole "timing" part, which leads me to a big problem: i can't move it on the timeline, i can't set the starting frame and obviously retime it. Anyone has a tip or advice how to correctly write this tool? That's what i wrote so far (i'm not a programmer, that's clear
):
Any help is highly welcome
-----------------------------.h file:
image temp(
//------------------------
const char *projectname="PROJECT",
const char *projectpath="/Volumes/PROJECT/renderout/",
const char *scene="000",
const char *shot="000",
const char *version="01",
const char *dept="rndr",
const char *element_passes="element01_all",
const char *element="element01",
const char *artist= "xx",
string pass="uclamp",
//--------------
float timeShift=0,
float inPoint=1, //i tried autoInPoint here but it doesnt work 
float outPoint=100, //same with autoOutPoint here
string inMode="Freeze",
string outMode="Freeze",
const char *imageName=projectpath+"/"+scene+"/"+shot+"/"+scene+"_"+shot+"_"+dept+"_"+element_passes+"_v"+version+"_"+artist+"/"+scene+"_"+shot+"_"+dept+"_"+element+"."+pass+"_v"+version+"_"+artist+".#.exr",
const char *baseFile=projectpath+"/"+scene+"/"+shot+"/"+scene+"_"+shot+"_"+dept+"_"+element_passes+"_v"+version+"_"+artist+"/"+scene+"_"+shot+"_"+dept+"_"+element+"."+pass+"_v"+version+"_"+artist+".#.exr",
float baseScale=1,
float baseRatio=1,
const char *baseFileType="Auto",
float firstFrame=1,
float lastFrame=20,
float increment=1,
const char *fileFormat="Auto",
int autoAlpha=0,
int deInterlacing=0,
const char *proxy1File="",
float proxy1Scale=1,
float proxy1Ratio=1,
const char *proxy1FileType="Auto",
float speed=1,
const char *rChannel="R",
const char *gChannel="G",
const char *bChannel="B",
const char *aChannel="Not Active",
const char *zChannel="Not Active"
)
{
temp = SFileIn(baseFile, baseFileType, autoAlpha, deInterlacing, "v1.1", "0", "");
return temp;
}
--------------------------------UI file:
nuiPushMenu("Tools");
nuiPushToolBox("PROJECT");
nuiToolBoxItem("@temp",temp());
nuiPopToolBox();
nuiPopMenu();
nuiPushControlGroup("temp.timing");
nuiDefSlider("temp.timeShift",-100,100,1);
nuiDefControlAlias("temp.timeShift","timeShift");
nuiDefSlider("temp.inPoint",-1e+07,1e+07,1);
nuiDefControlAlias("temp.inPoint","inPoint");
nuiDefSlider("temp.outPoint",-1e+07,1e+07,1);
nuiDefControlAlias("temp.outPoint","outPoint");
nuiDefControlAlias("temp.inMode","inMode");
nuiDefControlAlias("temp.outMode","outMode");
nuiDefControlAlias("temp.imageName","imageName");
nuiDefControlAlias("temp.baseFile","baseFile");
nuiDefSlider("temp.baseScale",0,1,0);
nuiDefSlider("temp.baseRatio",0,1,0);
nuiDefControlAlias("temp.baseFileType","baseFileType");
nuiDefSlider("temp.firstFrame",-1e+07,1e+07,1);
nuiDefControlAlias("temp.firstFrame","firstFrame");
nuiDefSlider("temp.lastFrame",-1e+07,1e+07,1);
nuiDefControlAlias("temp.lastFrame","lastFrame");
nuiDefSlider("temp.increment",0,5,1);
nuiDefControlAlias("temp.increment","increment");
nuiDefControlAlias("temp.fileFormat","fileFormat");
nuiDefSlider("temp.autoAlpha",0,1,0);
nuiDefControlAlias("temp.autoAlpha","autoAlpha");
nuiDefSlider("temp.deInterlacing",0,2,1);
nuiDefControlAlias("temp.deInterlacing","deInterlacing");
nuiDefControlAlias("temp.proxy1File","proxy1File");
nuiDefSlider("temp.proxy1Scale",0,1,0);
nuiDefControlAlias("temp.proxy1Scale","proxy1Scale");
nuiDefSlider("temp.proxy1Ratio",0,1,0);
nuiDefControlAlias("temp.proxy1Ratio","proxy1Ratio");
nuiDefControlAlias("temp.proxy1FileType","proxy1FileType");
nuiDefSlider("temp.speed",0,10,0);
nuiDefControlAlias("temp.speed","speed");
nuiDefControlAlias("temp.rChannel","rChannel");
nuiDefControlAlias("temp.gChannel","gChannel");
nuiDefControlAlias("temp.bChannel","bChannel");
nuiDefControlAlias("temp.aChannel","aChannel");
nuiDefControlAlias("temp.zChannel","zChannel");
nuxDefMultiChoice("temp.pass", "atm|bg|caus|diff|diffcol|diffraw|gi|giraw|matid|matx|nor|objid|refl|reflcol|refraw|refr|refrcol|rndrid|shadraw|sillum|spec|uclamp|vlcty|wire|z");