Action:
|
Returns the list of input entities for the given annotation entity.
|
|
Filename:
|
kern/kern_scm/anno_scm.cxx
|
|
Syntax:
|
(annotation:inputs entity [no-tags])
|
|
Arg Types:
|
entity
|
entity
|
|
no-tags
|
boolean
|
|
Returns:
|
(entity ...)
|
|
Description:
|
Returns the list of input entities for the given annotation entity. A profile edge is an input to a sweep annotation, for example.
|
|
|
The option for "annotation" should be turned on (#t) in order for the annotations to be created during a sweep or blend operation. Likewise, the option for "unhook_annotations" should be turned off (#f) in order to view the annotations after the operation, otherwise they are automatically cleared out.
|
|
|
entity specifies the annotation entity.
|
|
|
no-tags is an optional argument that specifies whether or not ATTRIB_TAGs is returned. If the value is false (#f), ATTRIB_TAGs is returned. Otherwise, only live
entities are returned.
|
|
Example:
|
; annotation:inputs
|
|
; Turn on annotation options
|
|
(option:set "annotation" #t)
|
|
;; #f
|
|
(option:set "unhook_annotations" #f)
|
|
;; #t
|
|
; Create an ellipse edge.
|
|
(define profile (edge:ellipse
|
|
|
(position 0 0 0) (gvector 0 0 1)
|
|
|
(gvector 1 0 0)))
|
|
;; profile
|
|
; Create a linear edge.
|
|
(define path (edge:linear (position 0 0 0)
|
|
|
(position 0 0 10)))
|
|
;; path
|
|
; Sweep the profile and path.
|
|
(define swp (sweep:law profile path))
|
|
;; swp
|
|
; Get a list of the edges in swp.
|
|
(define edge1 (list-ref (entity:edges swp) 0))
|
|
;; edge1
|
|
; Get a list of the annotation entities attached
|
|
; to edge1.
|
|
(define anno1 (list-ref
|
|
|
(entity:annotations edge1) 0))
|
|
;; anno1
|
|
; Get the list of input entities for anno1.
|
|
(define anno_inputs (annotation:inputs anno1))
|
|
;; anno_inputs
|
|
; Get the lists of annotation names attached to
|
|
; anno_inputs.
|
|
(entity:annotation-names (list-ref anno_inputs 0))
|
|
;; ("profile" "profile")
|
|
(entity:annotation-names (list-ref anno_inputs 1))
|
|
;; ("path" "path" "path")
|