diff --git a/TODO.md b/TODO.md index 2499c21..b959563 100644 --- a/TODO.md +++ b/TODO.md @@ -370,6 +370,7 @@ PRE ALPHA1 RELEASE: - [x] blender add-on - [x] barebones bevy test - [x] hot reload => some of it works, the rest not anymore ? (see bug https://github.com/bevyengine/bevy/issues/14698) +- [x] add "right click to edit blueprint" - [ ] merge blenvy branch into main - [ ] push to crates.io - [ ] tag @@ -386,7 +387,6 @@ BEVY: - [ ] make a fleshed out demo BLENDER: -- [ ] add "right click to edit blueprint" - [ ] overall cleanup - [ ] review wonky logic for cross file components injections - [ ] update & fix tests diff --git a/tools/blenvy/README.md b/tools/blenvy/README.md index ede27de..cdcf29f 100644 --- a/tools/blenvy/README.md +++ b/tools/blenvy/README.md @@ -158,6 +158,11 @@ Take a look at the [relevant](../../examples/demo/) example for more [details](. - for a detailed overview of blueprints please see [here](./README-blueprints.md) +> [!TIP] +> you can right click on a Blueprint instance in your level scenes or press SHIFT + F to edit a Blueprint in a seperate temprary scene ! +> you can right click or press SHIFT + F to create a new empty Blueprint and an instance of it from your main scenes +> right click again & select the option to stop editing it, or + ## Development - I highly recomend (if you are using vscode like me) to use diff --git a/tools/blenvy/core/ui/menus_and_shortcuts.py b/tools/blenvy/core/ui/menus_and_shortcuts.py index 4ef6097..145ce0c 100644 --- a/tools/blenvy/core/ui/menus_and_shortcuts.py +++ b/tools/blenvy/core/ui/menus_and_shortcuts.py @@ -28,24 +28,27 @@ def edit_or_create_blueprint_menu(self, context): blenvy = context.window_manager.blenvy # type: BlenvyManager selected_objects = context.selected_objects selected_object = selected_objects[0] if len(selected_objects) > 0 else None - text = "" + text = "Start editing Blueprint" if selected_object is not None and selected_object.instance_collection: if blenvy.edit_blueprint_current_scene != "": # if there is already editing in progress, close it first text = "Exit editing previous Blueprint and start editing Blueprint" else: text = "Start editing Blueprint" + self.layout.operator(BLENVY_OT_ui_blueprint_create_or_edit.bl_idname, text=text) + else: prev_scene = bpy.data.scenes.get(blenvy.edit_blueprint_previous_scene) if prev_scene is not None: text = "Exit editing Blueprint" + self.layout.operator(BLENVY_OT_ui_blueprint_create_or_edit.bl_idname, text=text) else: if len(selected_objects) == 0: # do not go into creation mode if any object was selected if blenvy.edit_blueprint_current_scene != "": # if there is already editing in progress, close it first text = "Exit editing previous Blueprint and start editing new Blueprint" else: text = "Create & start editing Blueprint" + self.layout.operator(BLENVY_OT_ui_blueprint_create_or_edit.bl_idname, text=text) - self.layout.operator(BLENVY_OT_ui_blueprint_create_or_edit.bl_idname, text=text) # for camera save & reset def find_area():