Object Operations
Basic Operations
Objects in OSL provide various ways to access and modify their properties:
Object Methods
Object Merging
The ++
operator combines objects, preserving values from the left operand:
Using Self Reference
Objects can reference their own properties using self
:
Computed Properties
Objects can include computed values when created:
Important Notes
Properties can be accessed using dot or bracket notation
The
++
operator preserves left operand values in conflictsUse
self
to reference object's own properties.contains()
checks for property existence.getKeys()
and.getValues()
return arraysComputed properties are evaluated at creation time
Objects can contain methods using
def() ->
Last updated
Was this helpful?