Jump to content

Drag&Drop Contents


alexnet

Recommended Posts

The script implements the ability to drag files of geometry, caches, textures, images right into the viewport. This project was open-source, so I spread it for everyone. Can someone come in handy. Thank you for watching!

Projects:
https://github.com/alexwheezy/python/tree/master/houdini/drag_drop_files
 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

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.

Link to comment
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.

Link to comment
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

 

:(

 

Link to comment
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.

Link to comment
Share on other sites

  • 3 months later...

hello

could you give a hand into making this pipeable ?

 

as in keeping it on a server and having it served via houdini.env ? Not sure about the folder structure/ PYTHONPATH etc I'm trying to keep things clean but not super familiar with the whole pipe'

Link to comment
Share on other sites

  • 11 months later...
On 28.04.2020 at 2:42 AM, fpesantez said:

Hello, does this works on Houdini 18?, I can't make it work on any case, it seems like it's alwyas trying to read a hip file and it errors

Hello!

I'm not sure, but the Python API has changed towards the H18.0 approach to using a new approach using Python States because now the goodies are not at all responsive to what you drag from the file fender to the viewport, as if it stopped tracking these changes.

Link to comment
Share on other sites

I think many of us will be thankful to have it working in h18 while hopefully one day Sidefx understand that its a basic but important usefull feature for lookdev and scene assembly.

And don t tell me Houdini is only for people , i mean full team with python experts TD. Looks at what the Labs team is developing. There are some great tools, but i believe some are much less important than features like this who should be built in.

Or some everyday usefull feature like this addon for example

https://l.facebook.com/l.php?u=https%3A%2F%2Fsites.google.com%2Fview%2Fmicrocitygenerator%2Fextras%2Fbgeo-browser%3Ffbclid%3DIwAR0w0dCGh59PJE8rgFn4YT9-6zKFhXozZpqU7zE5-GpQ_r9fElAe4z0P2B0&h=AT1-tZyWUVUuaXZ5TayjDdOFJ9h1ePiFkwtIE9WYscnXgg3kJD4lWp6-xNehSNq7c7M803J3EID_Us_fBXjxRIt_p2CMZvo2dRdUJNVsTx6oGYGGpv1eCZwnwYJfM3kh44lQVv8vNHsa93u9z1c

Then How many clicks and so do i have to do to build an arnold shader for example too? Why the Labs quick mat sop isn t directly loading the file input assign to the mat shader attached to the object?

Or maybe i missing something?

________________________________________________________________

Vincent Thomas   (VFX and Art since 1998)
 http://fr.linkedin.com/in/vincentthomas

Link to comment
Share on other sites

10 hours ago, vinyvince said:

I think many of us will be thankful to have it working in h18 while hopefully one day Sidefx understand that its a basic but important usefull feature for lookdev and scene assembly.

And don t tell me Houdini is only for people , i mean full team with python experts TD. Looks at what the Labs team is developing. There are some great tools, but i believe some are much less important than features like this who should be built in.

Or some everyday usefull feature like this addon for example

https://l.facebook.com/l.php?u=https%3A%2F%2Fsites.google.com%2Fview%2Fmicrocitygenerator%2Fextras%2Fbgeo-browser%3Ffbclid%3DIwAR0w0dCGh59PJE8rgFn4YT9-6zKFhXozZpqU7zE5-GpQ_r9fElAe4z0P2B0&h=AT1-tZyWUVUuaXZ5TayjDdOFJ9h1ePiFkwtIE9WYscnXgg3kJD4lWp6-xNehSNq7c7M803J3EID_Us_fBXjxRIt_p2CMZvo2dRdUJNVsTx6oGYGGpv1eCZwnwYJfM3kh44lQVv8vNHsa93u9z1c

Then How many clicks and so do i have to do to build an arnold shader for example too? Why the Labs quick mat sop isn t directly loading the file input assign to the mat shader attached to the object?

Or maybe i missing something?

________________________________________________________________

Vincent Thomas   (VFX and Art since 1998)
 http://fr.linkedin.com/in/vincentthomas

https://www.facebook.com/groups/HoudiniArtists/permalink/2935154009933717/

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...