QAttribute#

Defines an attribute and how data should be read from a QBuffer . More

Inheritance diagram of PySide6.Qt3DCore.Qt3DCore.QAttribute

Synopsis#

Properties#

Functions#

Slots#

Signals#

Static functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

There are 3 types of attributes.

  • VertexAttribute : used to define data to be read on a per vertex basis

  • IndexAttribute : used to define vertex indices when indexed draw calls are to be used

  • DrawIndirectAttribute : used to specify the DrawIndirect buffer to be used when indirect draw calls are to be used

Note

when an attribute is of type DrawIndirectAttribute , only count, stride and offset are relevant.

When providing your own attributes, it may make sense to name your attribute using helpers such as defaultPositionAttributeName() as that will ensure your geometry will be compatible with picking and the various materials provided in the Qt3DExtras module.

See also

QBuffer

class PySide6.Qt3DCore.Qt3DCore.QAttribute(buf, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])#

PySide6.Qt3DCore.Qt3DCore.QAttribute(buf, name, vertexBaseType, vertexSize, count[, offset=0[, stride=0[, parent=None]]])

PySide6.Qt3DCore.Qt3DCore.QAttribute([parent=None])

Parameters:

Constructs a new QAttribute from buf of type, dataSize, count, offset, and stride with parent.

Constructs a new QAttribute named name from buf of type, dataSize, count, offset, and stride with parent.

Constructs a new QAttribute with parent.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.attributeType: AttributeType#

Holds the attribute type.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.buffer: PySide6.Qt3DCore.Qt3DCore.QBuffer#

Holds the buffer.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffset: uint#

Holds the byte offset.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.byteStride: uint#

Holds the byte stride.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.count: uint#

Holds the count.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultColorAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointIndicesAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointWeightsAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultNormalAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultPositionAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTangentAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate1AttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate2AttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinateAttributeName: str#
Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.divisor: uint#

Holds the divisor.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.name: str#

Holds the name.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseType: VertexBaseType#

Holds the data type.

Access functions:
property PᅟySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSize: uint#

Holds the data size, it can only be 1 to 4 units (scalars and vectors), 9 units (3x3 matrices) or 16 units (4x4 matrices).

Access functions:
PySide6.Qt3DCore.Qt3DCore.QAttribute.AttributeType#

The type of the attribute.

Constant

Description

Qt3DCore.QAttribute.VertexAttribute

Qt3DCore.QAttribute.IndexAttribute

Qt3DCore.QAttribute.DrawIndirectAttribute

PySide6.Qt3DCore.Qt3DCore.QAttribute.VertexBaseType#

The type of the data.

Constant

Description

Qt3DCore.QAttribute.Byte

Qt3DCore.QAttribute.UnsignedByte

Qt3DCore.QAttribute.Short

Qt3DCore.QAttribute.UnsignedShort

Qt3DCore.QAttribute.Int

Qt3DCore.QAttribute.UnsignedInt

Qt3DCore.QAttribute.HalfFloat

Qt3DCore.QAttribute.Float

Qt3DCore.QAttribute.Double

PySide6.Qt3DCore.Qt3DCore.QAttribute.attributeType()#
Return type:

AttributeType

Getter of property attributeType .

PySide6.Qt3DCore.Qt3DCore.QAttribute.attributeTypeChanged(attributeType)#
Parameters:

attributeTypeAttributeType

Notification signal of property attributeType .

PySide6.Qt3DCore.Qt3DCore.QAttribute.buffer()#
Return type:

PySide6.Qt3DCore.Qt3DCore.QBuffer

See also

setBuffer()

Getter of property buffer .

PySide6.Qt3DCore.Qt3DCore.QAttribute.bufferChanged(buffer)#
Parameters:

bufferPySide6.Qt3DCore.Qt3DCore.QBuffer

Notification signal of property buffer .

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffset()#
Return type:

uint

See also

setByteOffset()

Getter of property byteOffset .

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteOffsetChanged(byteOffset)#
Parameters:

byteOffsetuint

Notification signal of property byteOffset .

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteStride()#
Return type:

uint

See also

setByteStride()

Getter of property byteStride .

PySide6.Qt3DCore.Qt3DCore.QAttribute.byteStrideChanged(byteStride)#
Parameters:

byteStrideuint

Notification signal of property byteStride .

PySide6.Qt3DCore.Qt3DCore.QAttribute.count()#
Return type:

uint

See also

setCount()

Getter of property count .

PySide6.Qt3DCore.Qt3DCore.QAttribute.countChanged(count)#
Parameters:

countuint

Notification signal of property count .

PySide6.Qt3DCore.Qt3DCore.QAttribute.dataSizeChanged(vertexSize)#
Parameters:

vertexSizeuint

The signal is emitted with vertexSize when the dataSize changes.

PySide6.Qt3DCore.Qt3DCore.QAttribute.dataTypeChanged(vertexBaseType)#
Parameters:

vertexBaseTypeVertexBaseType

The signal is emitted with vertexBaseType when the dataType changed.

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultColorAttributeName()#
Return type:

str

QAttribute::defaultColorAttributeName Returns the name of the default color attribute

Getter of property defaultColorAttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointIndicesAttributeName()#
Return type:

str

QAttribute::defaultJointIndicesAttributeName Returns the name of the default joint indices attribute

Getter of property defaultJointIndicesAttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultJointWeightsAttributeName()#
Return type:

str

defaultJointIndicesAttributeName Returns the name of the default joint weights attribute

Getter of property defaultJointWeightsAttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultNormalAttributeName()#
Return type:

str

QAttribute::defaultNormalAttributeName Returns the name of the default normal attribute

Getter of property defaultNormalAttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultPositionAttributeName()#
Return type:

str

QAttribute::defaultPositionAttributeName Returns the name of the default position attribute

Getter of property defaultPositionAttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTangentAttributeName()#
Return type:

str

QAttribute::defaultTangentAttributeName Returns the name of the default tangent attribute

Getter of property defaultTangentAttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate1AttributeName()#
Return type:

str

QAttribute::defaultTextureCoordinate1AttributeName Returns the name of the default attribute for the second layer of texture coordinates

Getter of property defaultTextureCoordinate1AttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinate2AttributeName()#
Return type:

str

QAttribute::defaultTextureCoordinate2AttributeName Returns the name of the default attribute for the third layer of texture coordinates

Getter of property defaultTextureCoordinate2AttributeName .

static PySide6.Qt3DCore.Qt3DCore.QAttribute.defaultTextureCoordinateAttributeName()#
Return type:

str

QAttribute::defaultTextureCoordinateAttributeName Returns the name of the default texture coordinate attribute

Getter of property defaultTextureCoordinateAttributeName .

PySide6.Qt3DCore.Qt3DCore.QAttribute.divisor()#
Return type:

uint

See also

setDivisor()

Getter of property divisor .

PySide6.Qt3DCore.Qt3DCore.QAttribute.divisorChanged(divisor)#
Parameters:

divisoruint

Notification signal of property divisor .

PySide6.Qt3DCore.Qt3DCore.QAttribute.name()#
Return type:

str

See also

setName()

Getter of property name .

PySide6.Qt3DCore.Qt3DCore.QAttribute.nameChanged(name)#
Parameters:

name – str

Notification signal of property name .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setAttributeType(attributeType)#
Parameters:

attributeTypeAttributeType

See also

attributeType()

Setter of property attributeType .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setBuffer(buffer)#
Parameters:

bufferPySide6.Qt3DCore.Qt3DCore.QBuffer

See also

buffer()

Setter of property buffer .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setByteOffset(byteOffset)#
Parameters:

byteOffsetuint

See also

byteOffset()

Setter of property byteOffset .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setByteStride(byteStride)#
Parameters:

byteStrideuint

See also

byteStride()

Setter of property byteStride .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setCount(count)#
Parameters:

countuint

See also

count()

Setter of property count .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setDivisor(divisor)#
Parameters:

divisoruint

See also

divisor()

Setter of property divisor .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setName(name)#
Parameters:

name – str

See also

name()

Setter of property name .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setVertexBaseType(type)#
Parameters:

typeVertexBaseType

See also

vertexBaseType()

Setter of property vertexBaseType .

PySide6.Qt3DCore.Qt3DCore.QAttribute.setVertexSize(size)#
Parameters:

sizeuint

See also

vertexSize()

Setter of property vertexSize .

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseType()#
Return type:

VertexBaseType

Getter of property vertexBaseType .

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexBaseTypeChanged(vertexBaseType)#
Parameters:

vertexBaseTypeVertexBaseType

Notification signal of property vertexBaseType .

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSize()#
Return type:

uint

See also

setVertexSize()

Getter of property vertexSize .

PySide6.Qt3DCore.Qt3DCore.QAttribute.vertexSizeChanged(vertexSize)#
Parameters:

vertexSizeuint

Notification signal of property vertexSize .