コード例 #1
0
ファイル: NimbleScriptBase.py プロジェクト: sernst/Nimble
    def runAsNimbleScript(self, **kwargs):
        """ Used to call the remote script as an independent operation outside of a MayaRouter, the
            normal method by which the script is executed. Used primarily for unit testing purposes
            and should not be called during normal operation.

            [kwargs]: Script arguments """

        self.kwargs = kwargs if kwargs else nimble.getRemoteKwargs(globals())
        self.response = nimble.createRemoteResponse(globals())
        self.run()
コード例 #2
0
    def runAsNimbleScript(self, **kwargs):
        """ Used to call the remote script as an independent operation outside of a MayaRouter, the
            normal method by which the script is executed. Used primarily for unit testing purposes
            and should not be called during normal operation.

            [kwargs]: Script arguments """

        self.kwargs = kwargs if kwargs else nimble.getRemoteKwargs(globals())
        self.response = nimble.createRemoteResponse(globals())
        self.run()
コード例 #3
0
ファイル: pythonTestScript.py プロジェクト: Gorfaal/Nimble
import nimble
from nimble import cmds

kwargs = nimble.getRemoteKwargs(globals())

result = cmds.polySphere()
name = result[0]

offset = kwargs.get('offset', 10)

cmds.move(offset, offset, offset, name)
cmds.rotate(50, 20, 10, name)
cmds.scale(2, 2, 2, name)

response = nimble.createRemoteResponse(globals())
response.put('name', name)
response.put('offset', offset)
コード例 #4
0
from __future__ import print_function, absolute_import, unicode_literals, division

import nimble
from nimble import cmds

kwargs = nimble.getRemoteKwargs(globals())

result = cmds.polySphere()
name = result[0]

offset = kwargs.get('offset', 10)

cmds.move(offset, offset, offset, name)
cmds.rotate(50, 20, 10, name)
cmds.scale(2, 2, 2, name)

response = nimble.createRemoteResponse(globals())
response.put('name', name)
response.put('offset', offset)