2
$\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$
2
  • 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
    Commented Aug 31, 2014 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$
    – JPHarford
    Commented Aug 31, 2014 at 17:44

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .