Coder Social home page Coder Social logo

Comments (10)

EdyJ avatar EdyJ commented on August 16, 2024 1

Thank you so much for the AssetPostProcessor example! Also, thank you for the pull request. I'll check it out, but most likely I'll just enable use_custom_props parameter internally. I can't see any reason for disabling it.

from blender-to-unity-fbx-exporter.

EdyJ avatar EdyJ commented on August 16, 2024

I'm definitely interested in this. Could you provide an example file with those custom properties? Also, please describe how to read them in Unity.

from blender-to-unity-fbx-exporter.

Crikster avatar Crikster commented on August 16, 2024

Sure no problem, here a link with a blender file, and some screenshots.
https://www.dropbox.com/sh/l3sm891mncvzxaj/AADCgZ6MFXqgTavGCQl7lXMla?dl=0
So basically the custom properties are just Generic properties the user can define, in my case i am using it for filtering of objects. to create different variations.
in the screenshots:

Blender:
-object custom properties ubication.
-blender default fbx export location of custom properties.

Unity:
-Unity screenshot of my custom script to load this custom properties and filter dynamically.

hope this helps! and thanks for the interest!

from blender-to-unity-fbx-exporter.

EdyJ avatar EdyJ commented on August 16, 2024

Thank you for the file and the screenshots! In your custom script, which Unity API methods are you using to access the custom properties? I'll write a simple script to test they work.

from blender-to-unity-fbx-exporter.

Crikster avatar Crikster commented on August 16, 2024

HI sorry for my delayed answer, is a custom script done by another company :(

from blender-to-unity-fbx-exporter.

EdyJ avatar EdyJ commented on August 16, 2024

I shouldn't need the entire script, only the Unity API methods and properties being used. Please understand that I need to be able to reproduce the case in Unity in order to fix it.

from blender-to-unity-fbx-exporter.

EdyJ avatar EdyJ commented on August 16, 2024

Closing this issue, as I have no way to reproduce it in Unity.

from blender-to-unity-fbx-exporter.

swingingtom avatar swingingtom commented on August 16, 2024

@EdyJ thanks for the plugin 👍. I was struggling with nested empties

I can confirm that custom properties are lost during export.
The way to check it in unity is to make a AssetPostProcessor script that post process models, similar to what is there https://docs.unity3d.com/ScriptReference/AssetPostprocessor.OnPostprocessGameObjectWithUserProperties.html

Here is one, paste it in a unity asset folder. It simply lists all custom properties found in FBX.
FBXCustomPropertiesListing

using System;
using UnityEditor;
using UnityEngine;

    public class FBXCustomPropertiesListing: AssetPostprocessor
    {
        void OnPostprocessGameObjectWithUserProperties(GameObject go, string[] propNames, System.Object[] values)
        {
            for (int i = 0; i < propNames.Length; i++)
            {
                string propName = propNames[i];
                System.Object value = (System.Object)values[i];
                Debug.Log("Propname: " + propName + " value: " + values[i]);
            }
        }
    }

If you need a complete unity project with files and scripts, I can provide it too.

from blender-to-unity-fbx-exporter.

swingingtom avatar swingingtom commented on August 16, 2024

From the blender fbx exporter, this is use_custom_props parameter
https://docs.blender.org/api/current/bpy.ops.export_scene.html

from blender-to-unity-fbx-exporter.

swingingtom avatar swingingtom commented on August 16, 2024

After asking the request, I felt guilty for not even trying to dive into the source, and I had many excuses, you know, never write python before, that's not my library, not aware of blender plugins, whatever...

But at the end, I manage to, and that was pretty satisfying :)

from blender-to-unity-fbx-exporter.

Related Issues (20)

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.