Last active
January 28, 2016 14:48
-
-
Save lukpazera/ae0bad4cb997e2a6e88a to your computer and use it in GitHub Desktop.
One way to pass item argument to command. Doing the same by using lx.eval and passing item ident is much easier though.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import modo | |
item = modo.Scene().selected[0] | |
cmdSvc = lx.service.Command() | |
cmd = cmdSvc.Spawn(lx.symbol.iCTAG_NULL, 'texture.reference') | |
attr = lx.object.Attributes(cmd) | |
val = attr.Value(attr.Lookup("item"), True) | |
valRef = lx.object.ValueReference(val) | |
valRef.SetObject(item) | |
cmd.Execute(lx.symbol.fCMD_EXEC_DEFAULT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment