Code Monkey home page Code Monkey logo

blender-tools's Introduction

๐Ÿต Embark Blender Tools

Embark Embark Build Status

A Blender add-on containing workflow tools for game development, created and maintained by Embark Studios.

The add-on includes tools for standardized import/export workflow, 3D modelling and new object types.

We welcome Pull Requests - if you would like to contribute, please check out the Contributing section.

Prerequisites

Installation

  1. Download the latest release of the addon from Github!
  2. Launch Blender and navigate to Edit -> Preferences, then choose the Add-ons section:

Screenshot of Preferences menu

  1. Click Install in the top right of the Preferences window
  2. Use the file browser to navigate to the file you downloaded, then click Install Add-on:

Screenshot of file browser with Install Add-on option

  1. Find the Embark Addon in the add-ons list, and ensure that the checkbox is checked:

Screenshot showing Embark Addon with active checkbox

Updating the add-on

The tools contain built-in update functionality, so you should only need to run through this process once!

If you don't want the add-on to auto-update, please disable the Automatically check for updates checkbox in the Preferences section of the Embark Addon.

Tools

Below is a concise list of some of the functionality offered by the Embark Blender Tools.

Export Collections

Export Collections are used to define lists of objects that will be exported to a single model file. The tools all use FBX for exports to game engines like Unreal, and OBJ for highpoly objects for baking.

Working with Export Collections

There are a few things to keep in mind when working with the Embark Export Collection tools:

  1. You must configure your Project source folder in the Embark Addon's Preferences panel, as shown below.

    Screenshot showing Embark Addon Preferences

    This sets the absolute root for exporting, and all export paths will be stored as paths relative to this.

  2. All Blender scenes must be saved relative to the Project source folder

  3. Export Collections will fail to export if your scene is not saved, or is saved under a path outside of the Project source folder!

Creating a new Export Collection

You can create a new Export Collection from selected objects as shown here:

  1. Select one or more objects that you would like to export
  2. Click on the Embark tab to the right of the 3D View
  3. Click on Create New Export Collection

Screenshot showing how to create an Export Collection from selected objects

  1. In the File Browser that pops up, select the location and name for your new export.

    • On the right, you will see some settings:

      <img alt="Screenshot showing Export Collection settings" src="./images/export_collection_settings.png"/>
      
    • Select the preset that is appropriate for your asset type - this will enforce some naming conventions

    • If you disable Export Immediately, the Export Collection will be created, but not exported

You will now see a new Collection in the outliner, named to match the export file name you chose.

Modifying an existing Export Collection

Export Collections are stored in the Blender scene, and can be modified and exported at any time.

All Export Collections are shown in the Embark panel, and Export Collections that contain the selected object will be auto-expanded.

You can use the fields on each Export Collection to modify:

  • Output file name
  • Export type
  • Output folder (relative to your Embark Addon's configured Project source folder)

Screenshot showing Export Collection buttons in the Embark panel

Each Export Collection shown in the panel also has convenience functionality on the icon buttons shown above:

  • Select objects contained in this Export Collection
  • Add selected objects to this Export Collection
  • Remove selected objects from this Export Collection
  • Export this Export Collection
  • Delete this Export Collection from the scene
    • Note that the objects it contained will remain in the scene!

Exporting objects and Export Collections

You can always press the Export All button from the Embark panel, and you can also use the Embark -> Export All Collections menu item if you aren't in a context that shows the panel. This will export every Export Collection in the current scene.

If you are working on a particular object, you can use the Export by Selection button from the Embark panel. This is also accessible via the Embark -> Export Collection(s) by Selection menu item. This will export only those Export Collections that contain any of the currently selected objects.

These commands can all be bound to hotkeys or added to the Quick menu by right-clicking on them from the Embark menu.

Import

Accessed from the Embark -> Import menu item.

Imports objects (FBX, OBJ, PLY) using hard-coded standard settings to enforce consistency.

Spiral Curve

Accessed from the Embark -> Spiral menu item, or the 3D viewport's Add -> Curve -> Spiral menu item.

Adds a parametric spiral curve object to the scene.

Connect Contextual

Mesh editing, connects verts/edges/faces depending on selection.

Frame Contextual

Accessed from the 3D viewport's View -> Frame Contextual menu item.

Frames the selection in the 3D viewport, or frames the whole scene if nothing is selected.

Contributing

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

blender-tools's People

Contributors

drewcassidy avatar garmofgnipahellir avatar lpil avatar moppius avatar soniasingla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender-tools's Issues

Trying to Install Embark Addon v1.7.0 to Blender 2.90.1

Describe the bug
A clear and concise description of what the bug is.

After installing the addon, when I try to click and Enable v1.7.0 of the addon, I receive the following error:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 382, in enable
mod.register()
File "C:\Users\evans\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\blender-tools-main_init_.py", line 37, in register
register_recursive(REGISTER_CLASSES)
File "C:\Users\evans\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\blender-tools-main\utils_init_.py", line 60, in register_recursive
register_recursive(obj.REGISTER_CLASSES)
File "C:\Users\evans\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\blender-tools-main\utils_init_.py", line 56, in register_recursive
bpy.utils.register_class(obj)
ValueError: register_class(...): already registered as a subclass 'EmbarkAddonPreferences'

To Reproduce
Steps to reproduce the behavior:

  1. Go to Addons
  2. Click Install, and select from disk the latest 1.7.0 zip file of the Embark Addon
  3. Click Enable checkbox for addon
  4. See error

Expected behavior
Addon to install with no error message.

Screenshots

image

Device:

  • Windows 10
  • Blender Version 2.90.1

Additional context
n/a

Implement hot-reloading of entire addon

Is your feature request related to a problem? Please describe.
When working on addon development, it would be useful to cleanly reload the entire Embark Addon module and add-on without restarting Blender.
This would also be useful if it can be used for reloading the add-on after an update.

Describe the solution you'd like
Using importlib seems like a common approach to reload the module and its submodules. The reload order is important, though, since imports may try to bring in objects from submodules that haven't been reloaded yet.

Describe alternatives you've considered
The obvious alternative is just telling people to always restart Blender, but this isn't great for iteration when developing, or the user experience when updating.
However, if we want to hot-reload, it must be reliable!
We are currently in a somewhat unstable middle-ground, where the addon may fail to reload after certain types of updates, and then the user needs to restart Blender anyway.

Additional context
There is a commented-out section in the reload_addon() method defined i then utils submodule - during testing this was causing Blender crashes. It may need to move somewhere else (e.g. main module initialization).
There is also the bpy.ops.script.reload() operator from Blender, but this does not fully reload the entire add-on module, only the top-level init.py.

Embark Addon can crash Blender after auto-updating

Describe the bug
After running the "auto-update" option when a new version is released, Blender may crash after the addon has been updated.

To Reproduce
Steps to reproduce the behavior:

  1. Install an older release of the Embark Addon (e.g. 1.6.0)
  2. Click on Embark -> Check for Updates...
  3. Click Update when prompted that a newer version is available
  4. Blender may crash after the notification is dismissed

Expected behavior
Blender does not crash, and the Addon is updated and reloaded.

Device:

  • OS: Windows 10
  • Blender Version: 2.82

Exporting creates no files on macOS or Linux

Describe the bug
Attempting to export collections does not create files in the correct place, without any error. If there are files produced, I do not know where.

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin
  2. Set project directory to a directory above the current file
  3. make an export collection and try to export it

Expected behavior
an fix file is produced at the chosen path

Screenshots
Screen Shot 2020-05-19 at 10 24 03 PM
Screen Shot 2020-05-19 at 10 23 44 PM

Device:

  • OS: macOS Catalina
  • Blender 2.82

Additional context
Is this due to the backslash at the beginning of the file path? I don't know why thats there but it must be escaping something, and I cant delete it, the plugin puts it back

Broken FBX skeletal mesh export

Describe the bug
Skeleton/armatures won't get exported with FBX.

To Reproduce
Steps to reproduce the behavior:

  1. Create a skeletal mesh export collection with an armature
  2. Export it
  3. It won't have a skeleton

Expected behavior
Export should contain the skeleton.

Device:

  • OS: Windows 10
  • Blender Version: 2.91

Additional context
I suspect the export settings is at fault:

def export_fbx(filepath):
    """Export an FBX with standardized settings."""
    return bpy.ops.export_scene.fbx(
        filepath=filepath,
        check_existing=False,
        use_selection=True,
        global_scale=1.0,
        apply_unit_scale=True,
        apply_scale_options='FBX_SCALE_NONE',
        bake_space_transform=True,
        object_types={'EMPTY', 'MESH', 'OTHER'}, # <-- Shouldn't this contain 'ARMATURE' as well?
        use_armature_deform_only=True,
        mesh_smooth_type='FACE',
        add_leaf_bones=False,
        embed_textures=False,
        axis_forward='-Z',
        axis_up='Y',
    )

I'll have a fix for this in my fork if this is in fact a bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.