Code Monkey home page Code Monkey logo

premake-findfbx's Introduction

Premake - Find FBX SDK

A premake add-on module helps to find the most suitable fbx sdk location to use.

Tested Platforms

  • Windows

Currently, you can reference CI status in project CatDogEngine/AssetPipeline.

Motivation

Autodesk FBX is an industry standard 3D model file format but FBX SDK is under a commericial license. Maybe not friendly to integrate sdk to your project directly.

Parse FBX ASCII file is also a solution to avoid sdk integration, such as Godot FBX importer and nem0/OpenFBX. But it costs much time and efforts.

How to use

  • Put this module under Premake Search Paths

  • Integrate it in your premake script

    find_fbxsdk = require("premake-findfbx")
  • In module scope

    -- [Optional] config module options
    find_fbxsdk.dump_information = true
    
    -- Check if module can find a valid sdk locatiion
    local sdkLocation = find_fbxsdk.get_sdk_location()
    local isValid = sdkLocation ~= nil and os.isdir(sdkLocation)

    Note that if you don't install fbxsdk in default location such as "C:\Program Files\Autodesk\FBX\FBX SDK\xxxx.x.x" in Windows. You have to use custom_sdk_directory option.

    find_fbxsdk.custom_sdk_directory = "D:/fbx"
  • In project scope

    -- Default options
    find_fbxsdk.project_config()
    
    -- With options
    -- find_fbxsdk.config_project({ static_runtime = false })

Then it will generate includedirs, libdirs, links, postbuildcommands which copy fbxsdk shared libs to your project build target's output directory.

Module Options

  • custom_sdk_directory
    • type : string
      • A valid abosulte directory path
    • default : nil
      • Search this path at first if not nil. Fallback to search system installed directories.
  • dump_information
    • type : boolean
    • default : true
      • true : Dump useful information such as include directories, link library paths for debug purpose.
      • false : No Dump

Project Options

  • copy_shared_libs
    • type : boolean
    • default : true
      • true : Copy shared libararies to your project build target's output directory.
      • false : No Copy
  • static_runtime
    • type : boolean
    • default : true
      • true : /MT
      • false : /MD

premake-findfbx's People

Contributors

t-rvw avatar

Watchers

 avatar

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.