mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 13:32:32 +00:00
d1b5d2627d
- replaced the various crates with a single one - replaced the Blender add-ons with a single one - this is an alpha release ! - for features etc see the various docs
25 lines
653 B
Python
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'}
|
|
|