1
$\begingroup$

I keep happening across information that seems blatantly wrong, and it makes me wonder if error messages are terrible or if it's the documentation. Here's an example:

However, while the script runs you may want to access the updated values.

This can be done by calling bpy.types.Scene.update after modifying values which recalculates all data that is tagged to be updated.

This is quoted from the "Gotchas" page.

Upon following that advice...

AttributeError: type object 'Scene' has no attribute 'update'

Just to be clear, the documentation authors seem pretty convinced that it does.

Most of the bad information I've found so far comes from forum posts some place where a user just guessed at how to do something off the top of their head. However, the official docs aren't really helpful for practical tasks, and seem to have bad information lurking about as well.

$\endgroup$
  • 1
    $\begingroup$ types is only used for documentation. See this page Also, the 2.62 docs are pretty old by now. This link always redirects to the latest version. $\endgroup$ – gandalf3 Aug 31 '14 at 17:32
  • 1
    $\begingroup$ Excellent! Thank you very much. If you post that as an answer, I can uptick it so others see it more easily. Learning Python through the Blender API can be confusing due to the abundance of old documentation out there. $\endgroup$ – user2813810 Aug 31 '14 at 17:44
3
$\begingroup$

The types module is only used for documentation. See this page for tips on finding actual datapaths.

Make sure you are using the latest API documentation too, see Where can the latest API documentation be found?

$\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.