added layout attribute for setting the operator execution context.
[blender.git] / source / blender / editors / interface / interface_layout.c
index 7144e9b866f9d924760a9974e99945dcb4054631..723e48e59700b60f9ac315d11ad40ffe1398c3c3 100644 (file)
@@ -1951,6 +1951,12 @@ uiBlock *uiLayoutGetBlock(uiLayout *layout)
        return layout->root->block;
 }
 
        return layout->root->block;
 }
 
+int uiLayoutGetOperatorContext(uiLayout *layout)
+{
+       return layout->root->opcontext;
+}
+
+
 void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout)
 {
        block->curlayout= layout;
 void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout)
 {
        block->curlayout= layout;