Blender_bevy_components_wor.../tools/blenvy/levels/operators.py
kaosat.dev b424a73a46 feat(Blenvy): renaming/coherency & component workflow pass
* all operators, panels etc are now respecting the Blender naming convention
 * tweaks & improvements to some of the component operators
 * clearer naming for the "advanced" tools for components
2024-06-12 12:41:50 +02:00

25 lines
653 B
Python

import os
import bpy
from bpy_types import (Operator)
from bpy.props import (StringProperty)
class BLENVY_OT_level_select(Operator):
"""Select level """
bl_idname = "blenvy.level_select"
bl_label = "Select level"
bl_options = {"UNDO"}
level_name: StringProperty(
name="level name",
description="level to select",
) # type: ignore
def execute(self, context):
if self.level_name:
scene = bpy.data.scenes[self.level_name]
if scene:
# bpy.ops.object.select_all(action='DESELECT')
bpy.context.window.scene = scene
return {'FINISHED'}