Ezz Posted September 8, 2009 Share Posted September 8, 2009 (edited) Hi dear folks! I wonder if its possible to import a textdocument into houdini and how to acceses it. The fileSOP does not support anything else than geometryformats - wich is kind of logical. Thanks a lot Erik Edited September 8, 2009 by Ezz Quote Link to comment Share on other sites More sharing options...
sam.h Posted September 8, 2009 Share Posted September 8, 2009 Hi dear folks! I wonder if its possible to import a textdocument into houdini and how to acceses it. The fileSOP does not support anything else than geometryformats - wich is kind of logical. Thanks a lot Erik What about using python? http://www.penzilla.net/tutorials/python/fileio/ What would you be using it for? Quote Link to comment Share on other sites More sharing options...
SpencerL Posted September 8, 2009 Share Posted September 8, 2009 What about using python? http://www.penzilla.net/tutorials/python/fileio/ What would you be using it for? did this awhile back, check out this thread. Quote Link to comment Share on other sites More sharing options...
Ezz Posted September 8, 2009 Author Share Posted September 8, 2009 Thanks for your replies and links. I have looked at som Python and this code works: import os f = os.path.join("c:\\","Documents and Settings","administrator.VFX-3D","My Documents","test.txt") file = open(f,"r").readline() print file My problem is I cant figur out how to implement Python in houdini. Lets say I wanted a string in an attribute to be read from a file then Im lost Erik Quote Link to comment Share on other sites More sharing options...
sam.h Posted September 9, 2009 Share Posted September 9, 2009 How it is implemented depends on where you want to use your string. Attached an example of one possible way of using a string. To write a python expression: http://www.sidefx.com/docs/houdini9.5/hom/expressions Quote Link to comment Share on other sites More sharing options...
sam.h Posted September 9, 2009 Share Posted September 9, 2009 I can't edit my last post, so here is the file I forgot to attach textOnPoints.hip 1 Quote Link to comment Share on other sites More sharing options...
Ezz Posted September 9, 2009 Author Share Posted September 9, 2009 Thanks Sam. I´ll look into it. Cheers Erik Quote Link to comment Share on other sites More sharing options...
Ezz Posted September 14, 2009 Author Share Posted September 14, 2009 Hi again. I figured it out thanks to Sams post. I even managed to count the number of words in a text, so its 100% procedural. Thanks a lot everyone :-) Erik textOnPoints.hip 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.