Hi,
I don’t understand how this example should work correctly: $HH/viewer_states/examples/state_dragdrop_demo.hip
I did everything according to the instructions, but attempts from the file manager to drag any text document into the Houdini viewport fails, the persistent error “Invalid drag drop source”.
What needs to be done to make the drag and drop work?
[Python State] Drag and Drop
1248 3 0- alexwheezy
- Member
- 201 posts
- Joined: Jan. 2013
- Online
- mabelzile
- Staff
- 397 posts
- Joined: Feb. 2018
- Offline
- alexwheezy
- Member
- 201 posts
- Joined: Jan. 2013
- Online
mabelzile
Did you try different text files ? Maybe the one you are using contains some bad characters ? You can edit the demo and remove the validation step if you need to. What version are you using ?
Debian GNU/Linux 9.11 (stretch)
Houdini 18.0.355
I tried different methods of creating a text file through the terminal and using the built-in or online text editors (Nano, Sublime, Google Docs) with saving the file with the extension txt or docx or without any extension at all. In all the files that I created, I wrote only two words “Hello, World!”
If you remove the validation check for MIME type data as text/plain, I get the following error.
ERROR Traceback (most recent call last): File "/opt/hfs18.0.355/houdini/python2.7libs/viewerstate/utils.py", line 1147, in wrapper return func(*args,**kwargs) File "/opt/hfs18.0.355/houdini/python2.7libs/viewerstate/interface.py", line 278, in onDragTest return state.onDragTest(kwargs["args"]) File "opdef:/Object/state_dragdrop_demo?ViewerStateModule", line 48, in onDragTest File "/opt/hfs18.0.355/python/lib/python2.7/genericpath.py", line 37, in isfile st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found
- alexwheezy
- Member
- 201 posts
- Joined: Jan. 2013
- Online
-
- Quick Links