Vizard 8 » Command Index » Vizard modules » viz » <viz>.blendLinkable
8.0

<viz>.blendLinkable

Creates a linkable object that blends between two linkables by a specified blend amount

<viz>.blendLinkable(  
begin  
end  
)  
begin
A linkable object that provides the begin blend values.
end
A linkable object that provides the end blend values.

Remarks

This command creates a new linkable object that blends between a specified begin and end linkable objects. When the blend amount is 0, the blend linkable will use 100% of the begin linkable. When the blend amount is 1, the blend linkable will use 100% of the end linkable. For blend values between 0 and 1, the blend linkable will interpolate between the two linkables.

Return Value

A VizBlendLinkable object which provides the following methods, in addition to the standard VizLinkable methods:

Method

Description

setBeginLinkable(begin)

Set the begin linkable object.

getBeginLinkable()

Get the begin linkable object.

setEndLinkable(end)

Set the end linkable object.

getEndLinkable()

Get the end linkable object.

setBlend(blend, mask=viz.LINK_ALL)

Set the blend percentage amount for the specified mask.

getBlend(mask=viz.LINK_ALL)

Get the blend percentage amount for the specified mask.

Example

import viz
import vizact
import vizshape
viz.go()

#Create begin object
begin = vizshape.addAxes(length = 0.2,pos=(-2,0,8))
begin.add(vizact.sequence(vizact.moveTo(pos=(-2,0,8),speed=2),vizact.moveTo(pos=(-2,2,8),speed=2),viz.FOREVER))

#Create end object
end = vizshape.addAxes(length = 0.2,pos=(2,2,8))
end.add(vizact.sequence(vizact.moveTo((2,2,8),speed=2),vizact.moveTo((2,0,8),speed=2),viz.FOREVER))

#Create blend linkable
blend = viz.blendLinkable(begin, end)
blend.setBlend(0.25)

#Create marker to attach to blend linkable
arrow = vizshape.addArrow()
link = viz.link(blend,arrow,mask=viz.LINK_ALL)

See also

<viz>.link
<viz>.mergeLinkable