Determine type of property?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
SundancePioneer
Posts: 7
Joined: February 28th, 2017, 4:04 am

Hey there,

i am currently working on a Script where it would be very helpful to determine the "type" of the selected property - is it a Slider, Dropdown, Layer Control, Point Control, etc. - the biggest problem might be that i want it to work for third party tools as well (best case).

Is there a way to test this using Scripts? Maybe to check which type of input the property accepts? I couldn't find anything related in the property object..

Maybe two examples of the desired outcome:

- the users has selected the opacity of a layer - on script run, i want to know that it accepts numbers/float (it doesnt matter that they are clamped from 0 to 100 in this case)
- the user has selected the scale of a layer - on script run, i want to know that it accepts an array of two values, so i can create a control-set accordingly

Any help is greatly appreciated - Thank you!

Kind regards

Sundance

SundancePioneer
Posts: 7
Joined: February 28th, 2017, 4:04 am

I actually overlooked

Code: Select all

Property.propertyValueType

, which seems to do most of what i want.

If anyone has an idea how to drive third party custom properties that fall out of this range, i'd greatly appreciated any help :)

Thanks

Sundance

Post Reply