Tags » Scripting

Display PowerShell Full Exception Message with (Out-String)

I was requested to write a detailed PowerShell Script that can log the Caught exception as string.

Actually it wasn’t easy as it looks like at first. 87 more words


Maya Python scripting - Getting an Object's world-space transform matrix

Maya 2018

How to get an object transformation matrix in world space coordinates:

from maya.api.OpenMaya import MVector, MMatrix, MPoint
import maya.cmds as cmds

def get_world_transform (obj):
 return MMatrix ( cmds.xform( obj, q=True, matrix=True, ws=True ) )

selected_object = (cmds.ls(sl=1,sn=True))[0]

print ( get_world_transform( selected_object ) )

Random Access MemoROI

The style of this post is going to be a bit different than the usual PA posts, but I though this journey was worth documenting somewhere on the off chance it’s helpful. 1,166 more words


I wish the Delphi language supported multi-line strings

Very often, I see people ask for how to embed multi-line strings in a Delphi source file.

The short answer is: you can’t.

The long answer is: you can’t and if you want you have to hack your way around. 122 more words


Create an index for each Cloudwatch logstream

  1. Go to the AWS Lambda function and search your ElasticSearch lambda function associated with your wanted ES instance. The name of the function should start with: …
  2. 82 more words

In the Dark Mode: a tortuous journey without a map

If you’re lucky/brave enough to be running the developer beta of Mojave, or about to become one of its public beta-testers later this month, Dark Mode will be one of the first things that you’ll want to try out. 520 more words