1
$\begingroup$

In this simple script below, i created a duplicata of the context editor into a new screen. all i want is to know the context.screen.name of both editors.

import bpy 
print(bpy.context.screen.name)
bpy.ops.screen.area_dupli('INVOKE_DEFAULT')
print(bpy.context.screen.name) #still the context of the old screen 

when trying this script, all it print is the same context.screen.name twice. How can i access future event like this?

$\endgroup$
1
$\begingroup$
bpy.context.window_manager.windows[-1].screen.name 

will be the name of the last created screen.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.