|
Hi,
I’m trying to create a function in SDK that looks like this in python:
#Find Navigator folder
def findFolder(pName):
for lComp in lScene.Components:
if lComp and lComp.ClassName() == "FBFolder":
if lComp.Name == pName:
return lComp
what I run into is problems how to go about this in OR with the correct component type… any help greatly appreciated.
Cheers,
AV
Choose a job you love, and you will never have to work a day in your life.
|
|
|
|
Hi, not sure if its the right way to do it but it works… Trying to get my head around alot of things at the moment :)
HFBFolder findFolder(char *pName) {
HFBFolder lFolder;
FBSystem mSystem;
// Existing media
int i;
int lCnt = mSystem.Scene->Folders.GetCount();
for(i=0;i<lCnt;i++)
{
lFolder = mSystem.Scene->Folders[i];
FBString lFolderName = (char*)lFolder->Name;
FBString lThisName = pName;
if ( lFolderName == lThisName)
{
return lFolder;
break;
}
}
return false;
};
Cheers,
AV
Choose a job you love, and you will never have to work a day in your life.
|
|
|