entity:lose-attribs
List of: Scheme Extensions
Subjects: Debugging
Contents: Kernel

Action: Removes selected attributes from an entity and it's subparts.

Filename: kern/kern_scm/ent_scm.cxx

Syntax: (entity:lose-attribs entity [save-name])

Arg Types: entity entity

save-name string

Returns: unspecified

Description: Scans the given entity and entities reachable from it for attributes and loses them.


This routine does not lose the ID_ATTRIB or DISPLAY_ATTRIB used by the Scheme AIDE. This is because ID_ATTRIB and DISPLAY_ATTRIB are non-copyable and are not included in the scan. Similarly, other non-copyable attributes cannot be lost by this routine.


entity specifies the entity whose attributes has to be deleted.


If save-name is specified losing is restricted to attribs whose name, as it appears in a SAT file, matches the given name.

Example: ; entity:lose-attribs

; Create a block.

(define b (solid:block (position -10 -10 -10)


(position 10 10 10)))

;; b

; Attach color attributes to selected face and edge.

(entity:set-color (pick:face


(ray (position 0 0 0) (gvector 0 1 0))) 1)

;; ()

(entity:set-color (pick:edge (ray (position 0 0 0)


(gvector 2 2 0))) 3)

;; ()

; Lose the color attributes.

(entity:lose-attribs b)

;; ()

(render:rebuild)

;; ()
PDF/KERN/12SCA.PDF
HTM/DATA/KERN/KERN/12SCA/0091.HTM