Jump to content
Sign in to follow this  
Anatol

Point String Attribute to a FILE_NAME in a FILE SOP

Recommended Posts

Hi guys.

I have an array of points with an attribute @mesh_path and @map_path

@mesh_path = "/mnt/projects/model/mesh.001.proxy.OBJ"

and File SOP connected below

I can't read file if I use attribute in a FILE_SOP text Field.

`@mesh_path`

Is there any possibility to use string variable in FILE SOP text field to read the file?

Edited by Anatol

Share this post


Link to post
Share on other sites

you can use Instance SOP for that, just put your mesh_path in the Instance Attribute field

Share this post


Link to post
Share on other sites

whooh!!! Thanks a lot

Edited by Anatol

Share this post


Link to post
Share on other sites

Thank you, Anim! I'm Using ForEach for an array of points to load a geometry to a scene. This really works )) Now I'll try to make some scatter on this ))

Edited by Anatol

Share this post


Link to post
Share on other sites

no need for foreach as it is copying different file on every point

if you want even more optimized solution, have a look here:

 

Share this post


Link to post
Share on other sites

I've got it. Looks like Instance SOP really doesn't needed for ForEach.

Watching attached scene, Dived inside Instance SOP

I still have a problem with a string attributes or stamping attributes in TextField. Same story but another attribute @map_path. I need to read attributes loaded from Attribfrommap SOP for each piece of geometry wich corresponds to certain point :(

Edited by Anatol

Share this post


Link to post
Share on other sites

What exactly is the problem? Can you post a file? 

Share this post


Link to post
Share on other sites

Problem Solved. Problem was in expression. point("../node", 0, '"attr", 0) doesnt support for string attributes. Instead of this I've used points() expression function.

I've incerted this expression in the FILE_SOP textfield >>>   `poins("../node", 0, "path_attr")`

Now I able to load the pieces I needed and load any attribute for corresponding piece of geoometry with Attribfrommap SOP.

I cant upload work project here, but I try to prepare and upload scene here a bit later.

Thank you :)

 

Edited by Anatol

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  

×