Clarified type refinement, simplified API, custom exception for get_pointer
Type refinement is now only done with BlendFileBlock.refine_type(), and no longer with sdna_index_refine parameters to various functions. This simplifies the API at the expense of having to call two simple functions instead of one more complex one.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from . import BlendFileBlock
|
||||
|
||||
|
||||
def listbase(block: BlendFileBlock) -> BlendFileBlock:
|
||||
"""Generator, yields all blocks in the ListBase linked list."""
|
||||
while block:
|
||||
yield block
|
||||
next_ptr = block[b'next']
|
||||
block = block.bfile.find_block_from_address(next_ptr)
|
||||
Reference in New Issue
Block a user