Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
193 stars 9 forks source link

Automation of Steps with Recordable Macros #92

Open MR-Alex42 opened 6 years ago

MR-Alex42 commented 6 years ago

I was wondering if it would be possible to automate some workflow steps with recordable macros. Example: I want to attach a grabbable component to a number of objects.

  1. Create an empty object in developer mode
  2. Start the recording (could be an action in the radial menu)
  3. Add a grabbable component to the empty object
  4. Stop the recording (could be an action in the radial menu)
  5. Save the macro under a name like "Make grabbable" which is creating a macro object in Neos with the name of the macro visible
  6. Load the macro object to a macro gun (similar to how the material and geometry gun works)
  7. Shoot at an object with the macro gun to make them grabbable

Technically the recording could monitor the data tree of the object and save all changes between the start of the recording and the end. If the macro is executed it would apply the same changes to the object the gun was shooting at.

Frooxius commented 6 years ago

I like this idea! I think it might also be done together with the Undo/Redo (https://github.com/Frooxius/NeosPublic/issues/7) feature, since that requires storing information about being able to repeat certain action.

I'm not fully sure how well it would work by monitoring the data tree, it might be a bit unclear how to transfer changes from one to another , like for objects that have different structure or multiple of the same type of component and so on.

Another alternative could be offered by the dynamic scripting though, although that'd be more involved. You could write arbitrary script to perform something on the object.

MR-Alex42 commented 6 years ago

Yes. Combining the with the Undo/Redo feature makes a lot of sense. I was also thinking of recording the macro steps in an actual scripting language (C#, Lua) like you do it in Microsoft Office which creates VBA scripts. Doing so would enalbe easy enhancements and parameterization of the macros and would allow beginners to understand scripting in Neos.

Frooxius commented 6 years ago

Oh yeah. I actually really like what Blender does, where most tools actually execute Python commands and you can open up the history to see which ones were ran. You can use that to figure out how to automate the tasks and also internally to re-run the same actions. For undo they'd need to log commands to undo the specific action as well.

However it would mean postponing the implementation until the dynamic scripting is allowed (and sandbox is integrated) or re-implementing it after it's there.

MR-Alex42 commented 6 years ago

I'd rather wait for the sandbox and dynamic scripting to be available before implementing this feature.