mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 21:37:01 +00:00
f9cb6de4bc
* added basic logic, ui, level selector operator etc * fixed issues with asset dialog * added experimental "always_export" flags for collections & scenes to enable always exporting on save for select blueprints & levels (no logic yet, just UI) * various tweaks & minor experiments
26 lines
654 B
Python
26 lines
654 B
Python
import os
|
|
import bpy
|
|
from bpy_types import (Operator)
|
|
from bpy.props import (StringProperty)
|
|
|
|
class OT_select_level(Operator):
|
|
"""Select level """
|
|
bl_idname = "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'}
|
|
|