HowTo:Manage your variables

From POV-Wiki
Jump to navigation Jump to search

Naming variables to facilitate reuse by other people

The requirements page for the POV-Ray Object Collection has some good recommendations:

Variable names exposed to the user should also be prefixed with the contribution name or the unique prefix and should be directly followed by an underscore ('_'). This includes named objects, textures, pigments, normals etc. For example the 'Netball' object exposes the NB_BallRadius variable to enable the radius of the ball to be controlled. You may use the #local directive to define variables with a local context within macros etc., in which case you are not obliged to adhere to this naming standard within those macros, because the local context should avoid naming conflicts.

By following these recommendations you ensure that your objects can be used in others' scenes with minimal modification.