I have properties pi like bpy.props.PointerProperty, this is very useful to me, I often use them to refer to the scene in use, but I'm having to create new scenes and all references to other scenes when I add a new scene return to the default value (rightly) I was wondering if there was a way to avoid having to create a function that copies these values (since they are many) The current example is the one I have, that is properties that refer to bpy.context.scene:

class MySceneProperty(bpy.types.PropertyGroup):

    my_bool: BoolProperty(default=false)
    my_int: IntProperty(default=0)
    my_float: FloatProperty(default=0.0)

def register():

    bpy.types.Scene.scene_prop = bpy.props.PointerProperty(type=MySceneProperty)

This is usually very convenient, but currently I am dealing with the creation of new scenes and it creates the problem that these values return to the default state, there is something above bpy.types.Scene?

Edit: I was trying to copy the properties from one scene to another but I realize I can't, this should happen when bpy.data.scenes.new is created


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.