I want to share a tip that I stumbled over due to what seems like backwards logic. When using multiple kFlags for setting parameter properties like “Cannot Automate”, “Is Meta”, etc., those flags need to be “OR’d” together not “AND’d” together.
At first “AND” seemed logical since I wanted flagX and flagY but these values are bits in an overall flag binary. So to get both flags implemented we need to OR the flags like this:
IParam::kFlagMeta | IParam::kFlagCannotAutomate
I originally mistakenly AND’d the flags which caused neither to work (0 AND’d with 1 is 0). So, do not do this:
IParam::kFlagMeta & IParam::kFlagCannotAutomate
as it does not apply either flag!
Just one of those “Oh wait!” lessons learned that I thought I’d post that might help others.