Class AssetLibraryReference


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

    Class Documentation

    Blender Source Code

    Information to identify an asset library. May be either one of the predefined types (current 'Main', builtin library, project library), or a custom type as defined in the Preferences.

    If the type is set to ASSET_LIBRARY_CUSTOM must be set to identify the custom library. Otherwise it is not used.

    • Field Detail

      • __DNA__SDNA_INDEX

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

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

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

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

        Field Documentation

        Blender Source Code

        eAssetLibraryType

        Pointer Arithmetics

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

         AssetLibraryReference assetlibraryreference = ...;
         CPointer<Object> p = assetlibraryreference.__dna__addressof(AssetLibraryReference.__DNA__FIELD__type);
         CPointer<Short> p_type = p.cast(new Class[]{Short.class});
         

        Metadata

        • Field: 'type'
        • Signature: 'short'
        • Actual Size (32bit/64bit): 2/2
      • __DNA__FIELD___pad1

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

        Pointer Arithmetics

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

         AssetLibraryReference assetlibraryreference = ...;
         CPointer<Object> p = assetlibraryreference.__dna__addressof(AssetLibraryReference.__DNA__FIELD___pad1);
         CPointer<CArrayFacade<Byte>> p__pad1 = p.cast(new Class[]{CArrayFacade.class, Byte.class});
         

        Metadata

        • Field: '_pad1'
        • Signature: 'char[2]'
        • Actual Size (32bit/64bit): 2/2
      • __DNA__FIELD__custom_library_index

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

        Field Documentation

        Blender Source Code

        If showing a custom asset library (ASSET_LIBRARY_CUSTOM ), this is the index of the bUserAssetLibrary within UserDef.getAsset_libraries() . Should be ignored otherwise (but better set to -1 then, for sanity and debugging).

        Pointer Arithmetics

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

         AssetLibraryReference assetlibraryreference = ...;
         CPointer<Object> p = assetlibraryreference.__dna__addressof(AssetLibraryReference.__DNA__FIELD__custom_library_index);
         CPointer<Integer> p_custom_library_index = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'custom_library_index'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
    • Constructor Detail

      • AssetLibraryReference

        public AssetLibraryReference​(long __address,
                                     Block __block,
                                     BlockTable __blockTable)
    • Method Detail

      • getType

        public short getType()
                      throws java.io.IOException
        Get method for struct member 'type'.

        Field Documentation

        Blender Source Code

        eAssetLibraryType

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__type
      • setType

        public void setType​(short type)
                     throws java.io.IOException
        Set method for struct member 'type'.

        Field Documentation

        Blender Source Code

        eAssetLibraryType

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__type
      • get_pad1

        public CArrayFacade<java.lang.Byte> get_pad1()
                                              throws java.io.IOException
        Get method for struct member '_pad1'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad1
      • set_pad1

        public void set_pad1​(CArrayFacade<java.lang.Byte> _pad1)
                      throws java.io.IOException
        Set method for struct member '_pad1'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad1
      • getCustom_library_index

        public int getCustom_library_index()
                                    throws java.io.IOException
        Get method for struct member 'custom_library_index'.

        Field Documentation

        Blender Source Code

        If showing a custom asset library (ASSET_LIBRARY_CUSTOM ), this is the index of the bUserAssetLibrary within UserDef.getAsset_libraries() . Should be ignored otherwise (but better set to -1 then, for sanity and debugging).

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__custom_library_index
      • setCustom_library_index

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

        Field Documentation

        Blender Source Code

        If showing a custom asset library (ASSET_LIBRARY_CUSTOM ), this is the index of the bUserAssetLibrary within UserDef.getAsset_libraries() . Should be ignored otherwise (but better set to -1 then, for sanity and debugging).

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__custom_library_index