pymel.core.context.targetWeldCtx¶
- targetWeldCtx(*args, **kwargs)¶
Create a new context to weld vertices together on a poly object. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties exists / ex bool
Returns true or false depending upon whether the specified object exists. Other flags are ignored. image1 / i1 unicode
First of three possible icons representing the tool associated with the context. image2 / i2 unicode
Second of three possible icons representing the tool associated with the context. image3 / i3 unicode
Third of three possible icons representing the tool associated with the context. mergeToCenter / mtc bool
If mergeToCenter is set to true then the source and target vertices’s will be moved to the center before doing the merge. If set to false the source vertex will be moved to the target vertex before doing the merge. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.targetWeldCtx
Example:
import pymel.core as pm # To create a new target weld context: pm.targetWeldCtx() # Result: u'targetWeldCtx1' # # To query if it is set to merge to the center: pm.targetWeldCtx('targetWeldCtx1', q=True, mergeToCenter=True ) # Result: 0 # # To set it to merge at the target: pm.targetWeldCtx('targetWeldCtx1', e=True, mergeToCenter=False ) # Result: u'targetWeldCtx1' #