Is the path to your FBX COMP correct in your op('your fbx') call? Your error indicates op(..) returned None, probably because an OP doesn’t exist at the path.
Thank you for your response. The ‘your fbx’ in op(‘your fbx’) was intended as a placeholder for the actual path to the imported FBX file. Rest assured, the path is correct. As evidence, other scripts like fbx.par.importscale = 10 execute without any issues.
I’ve done some further testing using the sample FBX files located in C:/Program Files/Derivative/TouchDesigner/Samples/FBX. Interestingly, the error does not occur when using these sample files. This leads me to believe that there may be specific conditions related to the FBX files that trigger this error. I’ll continue to investigate this issue further.
I’ve identified the cause and the steps to reproduce the issue. It appears to be a rare case that occurs when monitoring an FBX’s Material using an expression in an opexecuteDAT.
Steps to Reproduce:
Create an FBX COMP (it should be named ‘fbx1’ by default).
Create an opexecuteDAT and enter the expression op('fbx1/group1').par.material into the “Monitor OPs” parameter.
So it’s a bit convoluted but what’s happening here is that group1 is deleted during the import process when the import method is “Full Replacement”, meaning the expression op('fbx1/group1').par.material fails because op(..) returns None. The error is captured by the text DAT’s context.
One workaround to this would be to use the “Merge with Existing” import method so that OPs persist through import, or you could change your expression to handle the None case. But I guess that depends what you’re trying to actually do with the OP execute DAT. The onImport callback of the FBX COMP may be a better option.
Thank you for the detailed report. I was able to circumvent the issue by modifying the Monitor OPs parameter in opexecuteDAT to return an empty string (’ ') when None is encountered.