Get Tool ID with an expression?

User avatar
Midgardsormr
Fusionista
Posts: 745
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 76 times
Contact:

Get Tool ID with an expression?

#1

Post by Midgardsormr » Mon Aug 06, 2018 5:10 pm

I'm working on a macro that needs to change its behavior based on the Tool ID of an input. Although I can get the id using tool.ID in the console, it doesn't seem to work in an expression.

For the time being, I'm keying off of the tool's name, but the instant a user changes "GridWarp3" to "WarpFace", it's going to break.

Here's my current expression: iif(string.find(MT_WarpPercent:GetSourceTool("InputWarp").Name, "GridWarp"), 0, 1)

Ideas?

User avatar
PeterLoveday
Fusioneer
Posts: 126
Joined: Sun Sep 14, 2014 6:09 pm
Been thanked: 10 times

Re: Get Tool ID with an expression?

#2

Post by PeterLoveday » Mon Aug 06, 2018 8:30 pm

try .RegNode.m_ID

User avatar
Midgardsormr
Fusionista
Posts: 745
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 76 times
Contact:

Re: Get Tool ID with an expression?

#3

Post by Midgardsormr » Tue Aug 07, 2018 10:37 am

That works! Thank you!