Thank you very much,xavier.Your answer are always beyond my imagenation.I'm ashamed of not to add property rigth in the mask group just like layer mask.
For question 1,now I realize propertyIndex is quite useful.
For question 2,It is very interesting for me to know autoFixExpression would not work when using single quote.About two weeks ago I completed a script looking through the whole project and all layers to fix expression error caused by opening project with after effects of different languages,I use double quotes but not single quote to match the String.replace(RegExp,""),as the same as the AE.
Thank you too,Alex.As the dashes,Ae hides the property if you did not add them like xavier said.Another thing is that the dashes can be added only 3 times,for the number of hidden dashs is only 3,too.
Xavier,The hidden property is what I'm concerned about recently.I read your paste answer about the hidden attribute and really get a lot,but still have 2 small questions.
The first is that ,Is there a simple way to know the composition is a Ray-traced 3D comp or not? I set thisLayer.environmentLayer= thisLayer.environmentLayer; with try and catch error,and it works fine for solids,However,if it is a text layer or shape layer in Ray-traced 3D composition,it won't return right.I wonder if there is a way to know the composition is a Ray-traced 3D comp or not for all types of layers.Maybe there is no simple way.(Compared with posting a lot words and asking ,setting environmentLayer value is quite easy : D,it is pity text or shape layer or other layer could not be environmentLayer)The child property of Geometry Options can be setExpression and setValue,so I am confused about the Geometry Options.How to get to know Geometry Options are hidden?
The second is that,some attributes that has boolean value like "Cast Shadows","Accept Shadows" can't be easily judged whether they are hidden or not.canSetExpression or canSetEnabled return false.so I still use try catch with setValue(),it works fine too,but is there any other way to handle these boolean attributes?
Sometimes,I just dream about a method called canSetValue(),but the most I dreamed is the "hidden" attribute in the Next AE Scripting Guide.Now script to judge a hidden property is quite painful.
Anyway,thank for all your replies.