Issues with custom node registration (annotation issue) #60382

Closed
opened 2019-01-10 06:05:58 +01:00 by Jonathan Dent · 7 comments

Having some confusing issues trying to port our appleseed exporter to 2.8

During registration I see a number of reports like the following:

"make annotation: AppleseedasAreaLightNode.in_intensity"

Which is all good. But for some reason I also see this:

"Warning: class AppleseedasAreaLightNode contains a properties which should be an annotation!"

Now it doesn't tell me which property it's keying on for that, and all node properties are listed with "make annotation" messages. I do have a number of internal variables which are using default Python types (as they are not adjustable or accessible to users), but according to the release notes these do not need to be annotations since they aren't bpy.props variables. In any case I have no idea what the properties are that supposedly need to be an annotation. Some additional feedback prompts would help here.

Having some confusing issues trying to port our appleseed exporter to 2.8 During registration I see a number of reports like the following: "make annotation: AppleseedasAreaLightNode.in_intensity" Which is all good. But for some reason I also see this: "Warning: class AppleseedasAreaLightNode contains a properties which should be an annotation!" Now it doesn't tell me which property it's keying on for that, and all node properties are listed with "make annotation" messages. I do have a number of internal variables which are using default Python types (as they are not adjustable or accessible to users), but according to the release notes these do not need to be annotations since they aren't bpy.props variables. In any case I have no idea what the properties are that supposedly need to be an annotation. Some additional feedback prompts would help here.
Author

Added subscriber: @jdent02

Added subscriber: @jdent02
Author

Or am I reading it wrong in that I need to make that property an annotation? If so, this new requirement completely breaks our node creation system, which is based on dynamically creating the node classes based on OSL shader metadata

Or am I reading it wrong in that I need to make that property an annotation? If so, this new requirement completely breaks our node creation system, which is based on dynamically creating the node classes based on OSL shader metadata
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Afaics the ...contains a properties which should be an annotation warning is printed as a summary for all the other make annotation: ... warnings.
So you get this once and then all the specific ones for each property.

So are you saying you get a warning also for properties which are not from bpy.props?

Afaics the `...contains a properties which should be an annotation` warning is printed as a summary for all the other `make annotation: ...` warnings. So you get this once and then all the specific ones for each property. So are you saying you get a warning also for properties which are not from `bpy.props`?
Author

No, it appears I misread the warnings by thinking they were status messages instead. The properties in question are dynamically created during module registration using setattr, apparently that no longer works? Is there an alternative?

We build the node dynamically based on the OSL shaders that are available to appleseed so we don't want to hard code our properties beforehand.

No, it appears I misread the warnings by thinking they were status messages instead. The properties in question are dynamically created during module registration using setattr, apparently that no longer works? Is there an alternative? We build the node dynamically based on the OSL shaders that are available to appleseed so we don't want to hard code our properties beforehand.
Author

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Jonathan Dent self-assigned this 2019-01-11 13:40:53 +01:00
Author

User error, not a bug.

User error, not a bug.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#60382
No description provided.