Class CustomData


  • public class CustomData
    extends CFacade
    Generated facet for DNA struct type 'CustomData'.

    Class Documentation

    Blender Source Code

    Structure which stores custom element data associated with mesh elements (vertices, edges or faces). The custom data is organized into a series of layers, each with a data type (e.g. MTFace , MDeformVert , etc.).

    • Field Detail

      • __DNA__SDNA_INDEX

        public static final int __DNA__SDNA_INDEX
        This is the sdna index of the struct CustomData.

        It is required when allocating a new block to store data for CustomData.

        See Also:
        StructDNA, BlockTable, Constant Field Values
      • __DNA__FIELD__layers

        public static final long[] __DNA__FIELD__layers
        Field descriptor (offset) for struct member 'layers'.

        Field Documentation

        Blender Source Code

        CustomDataLayers, ordered by type.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__layers);
         CPointer<CPointer<CustomDataLayer>> p_layers = p.cast(new Class[]{CPointer.class, CustomDataLayer.class});
         

        Metadata

        • Field: 'layers'
        • Signature: 'CustomDataLayer*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__typemap

        public static final long[] __DNA__FIELD__typemap
        Field descriptor (offset) for struct member 'typemap'.

        Field Documentation

        Blender Source Code

        runtime only! - maps types to indices of first layer of that type, MUST be >= CD_NUMTYPES, but we can't use a define here. Correct size is ensured in CustomData_update_typemap assert().

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__typemap);
         CPointer<CArrayFacade<Integer>> p_typemap = p.cast(new Class[]{CArrayFacade.class, Integer.class});
         

        Metadata

        • Field: 'typemap'
        • Signature: 'int[52]'
        • Actual Size (32bit/64bit): 208/208
      • __DNA__FIELD___pad

        public static final long[] __DNA__FIELD___pad
        Field descriptor (offset) for struct member '_pad'.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD___pad);
         CPointer<CArrayFacade<Byte>> p__pad = p.cast(new Class[]{CArrayFacade.class, Byte.class});
         

        Metadata

        • Field: '_pad'
        • Signature: 'char[4]'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__totlayer

        public static final long[] __DNA__FIELD__totlayer
        Field descriptor (offset) for struct member 'totlayer'.

        Field Documentation

        Blender Source Code

        Number of layers, size of layers array.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__totlayer);
         CPointer<Integer> p_totlayer = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'totlayer'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__maxlayer

        public static final long[] __DNA__FIELD__maxlayer
        Field descriptor (offset) for struct member 'maxlayer'.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__maxlayer);
         CPointer<Integer> p_maxlayer = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'maxlayer'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__totsize

        public static final long[] __DNA__FIELD__totsize
        Field descriptor (offset) for struct member 'totsize'.

        Field Documentation

        Blender Source Code

        In editmode, total size of all data layers.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__totsize);
         CPointer<Integer> p_totsize = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'totsize'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD__pool

        public static final long[] __DNA__FIELD__pool
        Field descriptor (offset) for struct member 'pool'.

        Field Documentation

        Blender Source Code

        (BMesh Only): Memory pool for allocation of blocks.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__pool);
         CPointer<CPointer<Object>> p_pool = p.cast(new Class[]{CPointer.class, Object.class});
         

        Metadata

        • Field: 'pool'
        • Signature: 'BLI_mempool*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__external

        public static final long[] __DNA__FIELD__external
        Field descriptor (offset) for struct member 'external'.

        Field Documentation

        Blender Source Code

        External file storing customdata layers.

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         CustomData customdata = ...;
         CPointer<Object> p = customdata.__dna__addressof(CustomData.__DNA__FIELD__external);
         CPointer<CPointer<CustomDataExternal>> p_external = p.cast(new Class[]{CPointer.class, CustomDataExternal.class});
         

        Metadata

        • Field: 'external'
        • Signature: 'CustomDataExternal*'
        • Actual Size (32bit/64bit): 4/8
    • Constructor Detail

      • CustomData

        public CustomData​(long __address,
                          Block __block,
                          BlockTable __blockTable)
      • CustomData

        protected CustomData​(CustomData that)
    • Method Detail

      • getLayers

        public CPointer<CustomDataLayer> getLayers()
                                            throws java.io.IOException
        Get method for struct member 'layers'.

        Field Documentation

        Blender Source Code

        CustomDataLayers, ordered by type.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__layers
      • setLayers

        public void setLayers​(CPointer<CustomDataLayer> layers)
                       throws java.io.IOException
        Set method for struct member 'layers'.

        Field Documentation

        Blender Source Code

        CustomDataLayers, ordered by type.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__layers
      • getTypemap

        public CArrayFacade<java.lang.Integer> getTypemap()
                                                   throws java.io.IOException
        Get method for struct member 'typemap'.

        Field Documentation

        Blender Source Code

        runtime only! - maps types to indices of first layer of that type, MUST be >= CD_NUMTYPES, but we can't use a define here. Correct size is ensured in CustomData_update_typemap assert().

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__typemap
      • setTypemap

        public void setTypemap​(CArrayFacade<java.lang.Integer> typemap)
                        throws java.io.IOException
        Set method for struct member 'typemap'.

        Field Documentation

        Blender Source Code

        runtime only! - maps types to indices of first layer of that type, MUST be >= CD_NUMTYPES, but we can't use a define here. Correct size is ensured in CustomData_update_typemap assert().

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__typemap
      • get_pad

        public CArrayFacade<java.lang.Byte> get_pad()
                                             throws java.io.IOException
        Get method for struct member '_pad'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad
      • set_pad

        public void set_pad​(CArrayFacade<java.lang.Byte> _pad)
                     throws java.io.IOException
        Set method for struct member '_pad'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad
      • getTotlayer

        public int getTotlayer()
                        throws java.io.IOException
        Get method for struct member 'totlayer'.

        Field Documentation

        Blender Source Code

        Number of layers, size of layers array.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__totlayer
      • setTotlayer

        public void setTotlayer​(int totlayer)
                         throws java.io.IOException
        Set method for struct member 'totlayer'.

        Field Documentation

        Blender Source Code

        Number of layers, size of layers array.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__totlayer
      • getMaxlayer

        public int getMaxlayer()
                        throws java.io.IOException
        Get method for struct member 'maxlayer'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__maxlayer
      • setMaxlayer

        public void setMaxlayer​(int maxlayer)
                         throws java.io.IOException
        Set method for struct member 'maxlayer'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__maxlayer
      • getTotsize

        public int getTotsize()
                       throws java.io.IOException
        Get method for struct member 'totsize'.

        Field Documentation

        Blender Source Code

        In editmode, total size of all data layers.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__totsize
      • setTotsize

        public void setTotsize​(int totsize)
                        throws java.io.IOException
        Set method for struct member 'totsize'.

        Field Documentation

        Blender Source Code

        In editmode, total size of all data layers.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__totsize
      • getPool

        public CPointer<java.lang.Object> getPool()
                                           throws java.io.IOException
        Get method for struct member 'pool'.

        Field Documentation

        Blender Source Code

        (BMesh Only): Memory pool for allocation of blocks.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__pool
      • setPool

        public void setPool​(CPointer<java.lang.Object> pool)
                     throws java.io.IOException
        Set method for struct member 'pool'.

        Field Documentation

        Blender Source Code

        (BMesh Only): Memory pool for allocation of blocks.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__pool
      • getExternal

        public CPointer<CustomDataExternal> getExternal()
                                                 throws java.io.IOException
        Get method for struct member 'external'.

        Field Documentation

        Blender Source Code

        External file storing customdata layers.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__external
      • setExternal

        public void setExternal​(CPointer<CustomDataExternal> external)
                         throws java.io.IOException
        Set method for struct member 'external'.

        Field Documentation

        Blender Source Code

        External file storing customdata layers.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__external
      • __io__addressof

        public CPointer<CustomData> __io__addressof()
        Instantiates a pointer on this instance.