Page 1 of 1

Determine type of property?

Posted: February 17th, 2020, 5:56 am
by SundancePioneer

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


Re: Determine type of property?

Posted: February 17th, 2020, 6:09 am
by SundancePioneer

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