Class WorkSpaceDataRelation


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

    Class Documentation

    Blender Source Code

    Generic (and simple/primitive) struct for storing a history of assignments/relations of workspace data to non-workspace data in a listbase inside the workspace.

    Using this we can restore the old state of a workspace if the user switches back to it.

    . More concretely:

    • There are two windows, win1 and win2.

    • Both show workspace ws1, but both also had workspace ws2 activated at some point before.

    • Last time ws2 was active in win1, screen-layout sl1 was activated.

    • Last time ws2 was active in win2, screen-layout sl2 was activated.

    • When changing from ws1 to ws2 in win1, screen-layout sl1 should be activated again.

    • When changing from ws1 to ws2 in win2, screen-layout sl2 should be activated again. So that means we have to store the active screen-layout in a per workspace, per window relation. This struct is used to store an active screen-layout for each window within the workspace. To find the screen-layout to activate for this window-workspace combination, simply lookup the WorkSpaceDataRelation with the workspace-hook of the window set as parent.

    There are two windows, win1 and win2. Both show workspace ws1, but both also had workspace ws2 activated at some point before. Last time ws2 was active in win1, screen-layout sl1 was activated. Last time ws2 was active in win2, screen-layout sl2 was activated. When changing from ws1 to ws2 in win1, screen-layout sl1 should be activated again. When changing from ws1 to ws2 in win2, screen-layout sl2 should be activated again. So that means we have to store the active screen-layout in a per workspace, per window relation. This struct is used to store an active screen-layout for each window within the workspace. To find the screen-layout to activate for this window-workspace combination, simply lookup the WorkSpaceDataRelation with the workspace-hook of the window set as parent.

    • Field Detail

      • __DNA__SDNA_INDEX

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

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

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

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

        Pointer Arithmetics

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

         WorkSpaceDataRelation workspacedatarelation = ...;
         CPointer<Object> p = workspacedatarelation.__dna__addressof(WorkSpaceDataRelation.__DNA__FIELD__next);
         CPointer<CPointer<WorkSpaceDataRelation>> p_next = p.cast(new Class[]{CPointer.class, WorkSpaceDataRelation.class});
         

        Metadata

        • Field: 'next'
        • Signature: 'WorkSpaceDataRelation*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__prev

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

        Pointer Arithmetics

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

         WorkSpaceDataRelation workspacedatarelation = ...;
         CPointer<Object> p = workspacedatarelation.__dna__addressof(WorkSpaceDataRelation.__DNA__FIELD__prev);
         CPointer<CPointer<WorkSpaceDataRelation>> p_prev = p.cast(new Class[]{CPointer.class, WorkSpaceDataRelation.class});
         

        Metadata

        • Field: 'prev'
        • Signature: 'WorkSpaceDataRelation*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__parent

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

        Field Documentation

        Blender Source Code

        The data used to identify the relation (e.g. to find screen-layout (= value) from/for a hook). NOTE: Now runtime only.

        Pointer Arithmetics

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

         WorkSpaceDataRelation workspacedatarelation = ...;
         CPointer<Object> p = workspacedatarelation.__dna__addressof(WorkSpaceDataRelation.__DNA__FIELD__parent);
         CPointer<CPointer<Object>> p_parent = p.cast(new Class[]{CPointer.class, Object.class});
         

        Metadata

        • Field: 'parent'
        • Signature: 'void*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__value

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

        Field Documentation

        Blender Source Code

        The value for this parent-data/workspace relation.

        Pointer Arithmetics

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

         WorkSpaceDataRelation workspacedatarelation = ...;
         CPointer<Object> p = workspacedatarelation.__dna__addressof(WorkSpaceDataRelation.__DNA__FIELD__value);
         CPointer<CPointer<Object>> p_value = p.cast(new Class[]{CPointer.class, Object.class});
         

        Metadata

        • Field: 'value'
        • Signature: 'void*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__parentid

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

        Field Documentation

        Blender Source Code

        Reference to the actual parent window, wmWindow->winid. Used in read/write code.

        Pointer Arithmetics

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

         WorkSpaceDataRelation workspacedatarelation = ...;
         CPointer<Object> p = workspacedatarelation.__dna__addressof(WorkSpaceDataRelation.__DNA__FIELD__parentid);
         CPointer<Integer> p_parentid = p.cast(new Class[]{Integer.class});
         

        Metadata

        • Field: 'parentid'
        • Signature: 'int'
        • Actual Size (32bit/64bit): 4/4
      • __DNA__FIELD___pad_0

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

        Pointer Arithmetics

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

         WorkSpaceDataRelation workspacedatarelation = ...;
         CPointer<Object> p = workspacedatarelation.__dna__addressof(WorkSpaceDataRelation.__DNA__FIELD___pad_0);
         CPointer<CArrayFacade<Byte>> p__pad_0 = p.cast(new Class[]{CArrayFacade.class, Byte.class});
         

        Metadata

        • Field: '_pad_0'
        • Signature: 'char[4]'
        • Actual Size (32bit/64bit): 4/4
    • Constructor Detail

      • WorkSpaceDataRelation

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

      • getParent

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

        Field Documentation

        Blender Source Code

        The data used to identify the relation (e.g. to find screen-layout (= value) from/for a hook). NOTE: Now runtime only.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__parent
      • setParent

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

        Field Documentation

        Blender Source Code

        The data used to identify the relation (e.g. to find screen-layout (= value) from/for a hook). NOTE: Now runtime only.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__parent
      • getValue

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

        Field Documentation

        Blender Source Code

        The value for this parent-data/workspace relation.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__value
      • setValue

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

        Field Documentation

        Blender Source Code

        The value for this parent-data/workspace relation.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__value
      • getParentid

        public int getParentid()
                        throws java.io.IOException
        Get method for struct member 'parentid'.

        Field Documentation

        Blender Source Code

        Reference to the actual parent window, wmWindow->winid. Used in read/write code.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__parentid
      • setParentid

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

        Field Documentation

        Blender Source Code

        Reference to the actual parent window, wmWindow->winid. Used in read/write code.

        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__parentid
      • get_pad_0

        public CArrayFacade<java.lang.Byte> get_pad_0()
                                               throws java.io.IOException
        Get method for struct member '_pad_0'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad_0
      • set_pad_0

        public void set_pad_0​(CArrayFacade<java.lang.Byte> _pad_0)
                       throws java.io.IOException
        Set method for struct member '_pad_0'.
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD___pad_0