def _set_vector_fill(self, value): """ :type value: T <= AbstractVectorFill """ vs.SetPrefLongInt( {HatchVectorFill: 530, TileVectorFill: 528, GradientVectorFill: 508, ImageVectorFill: 518}.get(type(value)), vs.Name2Index(value.name) * -1)
def __SetCurtainStyle( self ): isSuccessful, objName, objHand, recHand, wallHand = vs.GetCustomObjectInfo() if isSuccessful: if vs.IsNewCustomObject( objName ): refNum = -1 else: refNum = vs.Name2Index( vs.GetRField( objHand, objName, "__CurtainTexture" ) ) textureObj = Texture( vs.GetPluginString( 4020 ), refNum, self.__fColor, self.__fOpacity ) textureIndex, textureName = textureObj.GetTexture() for pieceH in self.__fPiecesHandles: if pieceH: vs.SetTextureRef( pieceH, textureIndex, 0 ) vs.SetRField( objHand, objName, "__CurtainTexture", textureName )
def __CreateTexture( self ): counter = 1 textureName = self.__fDefaultName while vs.GetObject( textureName ) != vs.Handle(): textureName = self.__fDefaultName + '-' + vs.Num2Str( 0, counter ) counter += 1 curtainTexture = vs.CreateTexture() vs.CreateShaderRecord( curtainTexture, kColorFamilyIndex, kPlainColorIndex ) recHand = vs.CreateShaderRecord( curtainTexture, kTransparencyFamilyIndex, kPlainTransparencyIndex ) vs.SetName( curtainTexture, textureName ) self.__fTextureHand = curtainTexture self.__SetColor() self.__SetOpacity( recHand ) self.__fRefNum = vs.Name2Index( textureName ) return textureName
def _set_vector_line(self, value): """ :type value: T <= AbstractVectorLine """ vs.SetLSN(self._object_handle, vs.Name2Index(value.name) * -1)
def _set_vector_fill(self, value): """ :type value: T <= AbstractVectorFill """ vs.SetObjectVariableLongInt(self._object_handle, 695, vs.Name2Index(value.name) * -1)
def _set_vector_line(self, value): """ :type value: T <= AbstractVectorLine """ vs.PenPatN(vs.Name2Index(value.name) * -1)
def _set_vector_line(self, value): """ :type value: T <= AbstractVectorLine """ vs.SetClLSN(self._clazz_name, vs.Name2Index(value.name) * -1)