Python API changes in RC1?

Hi @brecht, we’ve just had some feedback from someone using our addon that suggests the python api has changed. They gave us their log output and its looks like the attributes for lights are different to the beta builds from about a week or so ago.

I looked through the change log https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API but didn’t see anything obvious.

Here’s the attribute that caused the problem,

:_BlendData::Scene_Scene::Light_Object::Light_PointLight is missing attribute :use_limited_texture_context

Can you confirm what has been changed?

Thanks!

James

I’m not aware of any recent changes like that.

A property named like that used to exist in 2.79. But it was removed more than a year ago, and was not related to point lights.
https://docs.blender.org/api/2.79/bpy.types.SpaceProperties.html?highlight=use_limited_texture_context#bpy.types.SpaceProperties.use_limited_texture_context

Hmmmmmm, ok, well then I suspect this person might have mixed 2.79 with 2.80 in his render farm then. I’ll ask and report back.

Thanks for checking btw :smiley:

I’m developing an addon I can confirm that something changed in the API very recently (I’m building almost every day).
I was positioning the nodes in the compositor using
tree.nodes[“Composite”].viewLocation
But it stopped functioning.
Using CTL+Space in the console I found out the property was renamed to .location
Apparently that fixed it.
Will be more changes like that before the final release?
Just to know. This is not a complain.
You devs are making an amazing job, thank you for everything

1 Like

Hi @brecht, we’ve checked, it seems that the first report was impossible for us to reproduced, however, we’ve since had the same user report another problem which we did reproduce, it seems that scene.update has been removed?

I’m echoing @g3ntile 's concerns here. Are there more changes like this coming? If so, is there any way we can find out before hand? This way we can adapt our addon before the changes hit the current download.

Thanks!!

James :slight_smile:

scene.update was removed just before the intended python api freeze on May 9th: https://developer.blender.org/rBe693918d40741b0839cea84d2e0c386cc262e0c3

You can find API changes here:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Scene_and_Object_API

# Update scene in 2.7
scene=bpy.context.scene
scene.update()

has been replaced with

# Update view layer in 2.8
layer = bpy.context.view_layer
layer.update()

There was no property named viewLocation on nodes. We don’t use camel case for property names, and there was no view_location for nodes either.

There have been no API breaking changes for two months as far as I know, the API is frozen for 2.80.

Thanks guys for the links, we are aware of the wiki page for the api, the only wish we have is that it would be awesome to have a mailing list or a way to subscribe to when these resources are updated for changes to the API. Otherwise I guess we could just check it often, but then the question is how often?
We’ve been testing pretty heavily since May 9th and for some reason this only showed up now. Had we known there were new changes on that date, we’d have specifically tested this and fixed it easily.

I think you might have used the viewLocation property that Animation Nodes created.

I understand.
So maybe I relied in using the feedback from the info panel to get that property, instead of reading the API docs. Somehow it worked for a while, then it was suddenly broken.
Lesson learned: check with the docs everything you copy/paste from the info/console…
Thanks everyone!