

Just on into the model file, on the very first line, set a parent block. Sometimes a block needs to have a specific parent to work correctly. Issue Description: 'This file is a child of builtin/generated and does not contain a model' This warning appear when trying to load Java block/item models that use 'builtin/generated' as the parent. If you run rails console from main app, you will see relationships will have been set properly. You can go into ' Display ' next to ' Paint ' in Blockbench, but an even easier fix is just opening up the model file and setting a parent.


By using this method you just need to add a setting to the engine initializer in your mainapp and the engine will handle the rest. Raise "er_class must be set in main_app blog.rb initializer"Īpp/initializers/blog.rb er_class = User A more robust, although more complicated, solution would be to use the decorator pattern in the engine so that the engine will auto-configure mainapp's parent model with the relationships it needs. You can paint directly on the model in 3D space, use the 2D texture editor, or connect your favorite external image editor. Blockbench can automatically create a UV map and template for your model so that you can start painting right away. Create or import palettes, paint, or draw shapes.
#Blockbench parent model install
So each time you add the engine to one your main_apps you would have to go into the main_apps models and set up all required relationships by hand.Ī more robust, although more complicated, solution would be to use the decorator pattern in the engine so that the engine will auto-configure main_app's parent model with the relationships it needs.īy using this method you just need to add a setting to the engine initializer in your main_app and the engine will handle the rest.ī s.add_dependency 'decorators' #this will install the decorators gem for use in engineĬlass Engine "Blog::Article", :foreign_key => "user_id"Īpp/decorators/lib/blog/user_class_decorator.rb if er_class Blockbench has a number of built-in formats that optimize the interface and workflow for specific exports. Create, edit and paint texture right inside the program.
#Blockbench parent model manual
The accepted answer requires manual modification of main_app's parent model in order to set the has_many relationships to the engine's child model.
