I can log the item.description, so I know there are information available.
And despite the label saying, Description not inherited, the tree_item.inherit_description variable is True.
I thought I might change the dialog.py file, so that it fits my needs.
I added the following code into the _create_item_details method:
context_item = self.ui.items_tree.topLevelItem(1) # item after summary_item in tree
for child_index in range(context_item.childCount()):
if tree_item is context_item.child(child_index):
tree_item.inherit_description = False
break
But then there are other problems so far. For example that child-tasks do not inherit, whatever is set in the nuke.session item. Only when I change the ui manually, it shows up correctly.
If I omit the check if the tree_item is the first after the context and set the tree_item.inherit_description variable to False right away, the ui is correct on startup, but not when I enter something manually.
Is this a bug or is it not planned to have a default/previously saved item.description? Is there a way to set the inheritance of the tree items in the hook, because it may be the case you want a default description on a different level?
Also maybe a check on the dialog startup would be great, if an item.description is present and set it accordingly to not interfer with manual ui changes.
No dice I’ve tried this in the accept, and validate portions of the hook:
item.description = 'THIS IS A TEST'
item.parent.description = 'THIS IS A TEST'
nothing seems to reach the description box in the UI. I’ve also tried setting the description within the collection stage on the newly created item and still nada.