python - Why is Maya 2009 TreeView control giving a syntax error on drag? -


I am using TreeView control in Maya 2009, but I'm getting a syntax error on drag and drop. This is as follows (Simplified for brevity) My code is:

  view category (event.Dispatcher): def __init __ (self): self.window = cmds.window () Tree view = cmds.treeView (numberOfButtons = 1, allowReparenting = true, dragAndDropCommand = self.tree_view_onDrag) cmds.showWindow (self.window) tree_view_onDrag (auto, dropped_items, old_parents, old_indexes, new_parent, new_indexes def, item_before, item_after, * args ): Print "work"  

When I drag and drop and the element I execute is done in the following command console:

  & lt; The method bound to View.tree_view_onDrag {"Layer3"} {""} {1} "layer 1" {0} "layer 2";  

and returns the following error:

  // Error: & quot; bound method for View.tree_view_onDrag {"layer3"} {""} {1} "layer 1" {0} // // error : Line 1.1: Syntax Error //  

Edit: It seems that issues were happening due to the tree view, even though the MEL function calls apply To do this, there are most callback programs. The above errors are made by Mel Interpreter As it is being done, it attempts to feed the logic of a command name.

See: Drag Androd Commands is a STRING - You are passing a bound method, using Maya's own reporter I'm not sure, but I suspect that the string has a top-level (module-level) function name Should not be given, a bound method.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -