1
$\begingroup$

I'm just getting started with trying to script with Blender (currently in 2.8), but, in the very first steps I'm really confused why the command directly copied from the info header doesn't work. It is the code that Blender ran, and it's not working in the interactive console.

enter image description here

EDIT: It seems that the interactive console is giving the wrong context while we switch our mouse location from the properties panel to the interactive console, i.e. the context changes when we change our mouse location to various viewports of the blender file. So, How do we set the context for the specific parts of the viewport? In this case, to the properties panel. If possible please provide a list of all the possible values that can be input, or possibly a link to it.

$\endgroup$
1
$\begingroup$

That's just how it is. It is not perfect. Some operations reported in the Info panel require a specific context to run and will not work in scripts or from the Python Console, then there are a few that get reported incorrectly there as well. It is often helpful to see the info panel, but there are limits to its usefulness. See the documentation if you need to find a specific function or ask another more specific question describing what you want to do here if you cannot find the answer elsewhere online first.

$\endgroup$
  • $\begingroup$ it seems the moment I click on the interactive console, the context seems to change, so for the above command to work we need a way to set the context relating to the properties window rather than the interactive console. Do you have any tips on doing that? $\endgroup$ – juztcode Jul 31 at 7:45
  • $\begingroup$ I've edited my quesiton. $\endgroup$ – juztcode Jul 31 at 8:03

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.