Jump to content
Sign in to follow this  
leytonian

Python code in the channels?

Recommended Posts

Hi

 

How do I return values in a channel like those we can with simple hscript commands?

 

For instance, I wan to modify the file path of a file sop with inline code. I know I can modify it with global scripts or with a python sop by setting the parms directly but i cant seem to figure out how to do that inline.

 

thanks

Share this post


Link to post
Share on other sites
Posted (edited)

Stick a return statement at the end to return your value

 

file= r'C:\myFolder\myFile.bgeo.sc'

return file

Edited by garf

Share this post


Link to post
Share on other sites

Thanks for the replies.

 

@Garf I would have never thought that I could just use a return without function. I actually tried a main function with a return before as king here. Thanks for the tip.

 

@BO RAIN

I cant exactly tell how your tool works but basically I am trying to export all groups as separate meshed. I can actaully do that using a python sop with a file saver inside a foreach loop. I was just trying to just even bypass an extra node if possible

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×