I have an enum property and a callback function defined like so:

def asset_callback(scene, context):

    # Function that return properly formatted list of items
    items = get_assets()

    return items

class PipelineProperties(bpy.types.PropertyGroup):

    asset_categories = bpy.props.EnumProperty(
        name="Asset Categories",
        description="Categories for Project Specific Assets",

Setting up my Enum Property with a function meant to generate a dynamic list and populate the enum with this list, forces scene update continuously. I only want this function to run once, and then I plan on using a persistent handler bpy.app.handlers.load_post, only execute the callback after the file is loaded.

Is there a way around the forced scene update trigger on the callback function for an EnumProperty?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.