ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

Python Callback inside scriptCtx does not work #290

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Doing anything other than a mel string callback inside of "scriptCtx" doesn't 
seem to work.

I am using Maya 2013 64-bit on Windows 7 64-bit

I am using pymel version 1.0.4

Here is some basic code to reproduce the problem:

_________________________________________

from pymel.core import *

def custom_print(*args):
    print(args)

custom_select = scriptCtx(
    title="custom_select",
    fcs=custom_print,
    locator=True,
    totalSelectionSets=1, 
    setAutoToggleSelection=True, 
    setSelectionCount=1, 
    setAutoComplete=True,
    cumulativeLists=True,
    expandSelectionList=True)

setToolTo(custom_select)

___________________________

The result is this:

select -r locator1 ;
{  string $Selection1[]; $Selection1[0] = "locatorShape1"; 
<function callback at 0x000000001052C668>;  };
// Error: <function callback at 0x000000001052C668>;  }; // 
// Error: Line 2.1: Syntax error // 

Original issue reported on code.google.com by theonlyd...@hotmail.com on 1 Nov 2012 at 12:42