Jump to content
alexnet

Drag&Drop Contents

Recommended Posts

Thank's it work

Edited by VTL

Share this post


Link to post
Share on other sites

I was excited to try this, but after installing in my scripts directory and testing with dropping in an abc file I got two error messages:

 - Load failed for <abc file path> (but it still renames the current scene to that abc path)

&

- File Drag/Drop Errors ImportError: No module named type_extensions

Then I copy/pasted the contents of the  type_extensions.py and the nodes_color.py into the externaldragdrop.py and it works. Weird.

Share this post


Link to post
Share on other sites
On 2/11/2019 at 11:38 PM, kleer001 said:

- File Drag/Drop Errors ImportError: No module named type_extensions

Then I copy/pasted the contents of the  type_extensions.py and the nodes_color.py into the externaldragdrop.py and it works. Weird.

I think that the $HOUDINI_SCRIPT_PATH variable may simply not look in the folder with these scripts, maybe you didn’t have a typical Houdini installation. 

 

On 2/11/2019 at 11:38 PM, kleer001 said:

 - Load failed for <abc file path> (but it still renames the current scene to that abc path)

And what was the exact error there? I'll fix the script.

Share this post


Link to post
Share on other sites

The scripts are all right next to each other. No way externaldraganddrop.py could have loaded one and not seen the other two (nodes_color and type_extensions).

The exact error is:
 

File Drag/Drop Errors

Traceback (most recent call last):

File "<stdin>",line 4, in <module>

ImportError: No module named type_extensions

 

And, if I comment out that import line I then get the same error for nodes_color

 

:(

 

Share this post


Link to post
Share on other sites

The nodes_color.py and type_extensions.py should NOT be in the same folder as the externaldragdrop.py.

Houdini will use houdini/scripts to find scripts, not Python modules.  Since externaldragdrop.py is a script it belongs in there.  The other files (as per the instructions) on the should be in houdini/scripts/python, which Houdini will automagically add to sys.path if it exists and then externaldragdrop will be able to import those two modules.

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

×