TreeView draganddropcommand syntax error

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  05 May 2009
TreeView draganddropcommand syntax error

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

     class View(event.Dispatcher):
     	def __init__(self):
     		self.window = cmds.window()
     		tree_view = cmds.treeView(
     	def tree_view_onDrag(self, dropped_items, old_parents, old_indexes, new_parent, new_indexes, item_before, item_after, *args):
     		print "worked"

When I drag and drop and element I get the following command is executed in the console:

<bound method View.tree_view_onDrag of  {"layer 3"} {""} {1} "layer 1"  {0} "" "layer 2";

And get the following error:

// Error: <bound method View.tree_view_onDrag of  {"layer 3"} {""} {1} "layer 1"  {0} // 
     // Error: Line 1.1: Syntax error // 

I've tried adjusting my callback method by only accepting *args, as well as making it a function rather than a method, but nothing is working.
  05 May 2009
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:44 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.