lacer8 Posted March 21 Share Posted March 21 Hello and thank you for looking. I hope I can explain my question in a way that makes sense. I have a need to break meshes up into a series of fbx's. I'd like to find a way to store and pass the AssetName, the FilePath and the Piece that I'm exporting and automatically populate that into the Output File field of the ROP FBX node. I'm currently splitting the mesh using named primitive groups. Ideally the file path would get populated with something like "FilePath_AssetName_Piece.fbx" but I have no idea how to set that information, call it up and then populate it into the field. If anyone has any suggestions, that'd be amazing! Thank you. Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted March 21 Share Posted March 21 (edited) Hi, suppose you have geometry box with primitive group "box". Create detail string attribute, call it 'dirpath' with value of your desired directory's path to save - "$HIP/geo/" Create detail string attribute, call it 'assetname' with value of your asset name - "box/" Create detail string attribute, call it 'filename' and use expression as attribute value: `primgrouplist(opinputpath(".", 0))`.fbx In ROP FBX Output use expression in Output Path parameter: `details(opinputpath(".", 0), "dirpath") + details(opinputpath(".", 0), "assetname") + details(opinputpath(".", 0), "filename")` I hope it'll help you. Edited March 21 by vicvvsh 1 Quote Link to comment Share on other sites More sharing options...
lacer8 Posted March 21 Author Share Posted March 21 Thank you very much, Victor. That's brilliant, and yet - I'm doing something wrong. I get an error: Error: Unable to evaluate expression (Syntax error (/obj/named_exporter/rop_fbx1/sopoutput)). It seems like the expression in the Output Path is throwing the error, but I don't see any obvious errors there. Thanks again! Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted March 21 Share Posted March 21 (edited) Expression is fine, I just checked that on my computer. Try to type expression by hand, I'm on linux machine and maybe some problems happened with font code while copy-pasting. If you click MMB on Output File parameter name what do you see in the text field? This should be expression result as full path to file. Edited March 21 by vicvvsh 1 Quote Link to comment Share on other sites More sharing options...
lacer8 Posted March 21 Author Share Posted March 21 (edited) I see: details(opinputpath( that's all. I'll try typing by hand. Thanks! Edited March 21 by lacer8 Quote Link to comment Share on other sites More sharing options...
lacer8 Posted March 21 Author Share Posted March 21 No, I'm sorry. I made a mistake, I actually see nothing in the field when I MMB on the parameter name Quote Link to comment Share on other sites More sharing options...
lacer8 Posted March 21 Author Share Posted March 21 Also, I did try hand typing it out. The color coding matched the copy and paste you gave me so it looks the same. I deleted the copied and pasted text, but the error remained. Thanks for your efforts to help on this. Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted March 22 Share Posted March 22 (edited) It strange. For debuging try to past part by part of full expression to check out how it reads each detail attribute. Use MMB on parameter name. How does expression work in others rop nodes? Sometimes it helps to delete node, create a new one and surprisingly all issues are gone. In attached file I'm using same expression in Output Geometry ROP and it works, FBX rop doesn't work in apprentice. How does it work on your side? fbx_output_path.hipnc Edited March 22 by vicvvsh 1 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted March 22 Share Posted March 22 I did a screen cast how it works for me. Screencast 2025-03-22.mp4 1 Quote Link to comment Share on other sites More sharing options...
lacer8 Posted Monday at 05:51 PM Author Share Posted Monday at 05:51 PM Hello Victor and thank you for your help again. I finally just ended up deleting the ROP FBX node and pasting the code into a new one, and it worked! Thanks for that suggestion. I did struggle when i first tried to implement this into a real situation because the asset name part wasn't working. I found that I had a typo. The Attribute create node is setting a name to assetname - but the code in the rop fbx output was looking for assetName. Anyway, this works now and you've been a big help. I don't mean to make this more complex - but I wonder if it's just as easy to get the name of the Null node before the final, filename, attribute create instead of having to dive into the att create to define it. The nice thing about doing it that way would be that you have a visual que if you've named something wrong in those last nodes - which I did, ha ha. Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted Monday at 07:23 PM Share Posted Monday at 07:23 PM I'm glad you found it, happy to help. If it more conveniently for you use expression that return a name of node: `opname("path_of_node")` or `opnodigits(opname(""path_of_node""))` Second expression gets rid from numeric suffix Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.