-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import custom attributes with GLTFDocumentExtension #97756
base: master
Are you sure you want to change the base?
Conversation
I'm having a hard time understanding the extension. Can you link or write a proposal in https://github.com/godotengine/godot-proposals? Something like: I have a game workflow that uses blender I want the vertex attributes to import from blender, but it needs this pr. I can use the attributes for a shader effect. |
d58f372
to
b43538a
Compare
Refactored and removed like a hundred duplicate lines of code. _decode_accessor_as_floats();
_decode_accessor_as_ints();
_decode_accessor_as_vec2();
_decode_accessor_as_vec3();
_decode_accessor_as_color();
_decode_accessor_as_quaternion();
_decode_accessor_as_xform2d();
_decode_accessor_as_basis();
_decode_accessor_as_xform();
// VVV
_decode_accessor<T>(); Multi-element scalars are now decoded with _decode_accessor<T, N>() array[Mesh::ARRAY_TANGENT] = _decode_accessor<float, 4>(p_state, a["TANGENT"], true, indices_mapping); |
Since this PR alters the accessor code, it will have to wait until after #94165 which also touches this code. |
b43538a
to
5acc5ad
Compare
PR in question was just merged so we should be good to continue here. |
@huwpascoe Many people think this is a good enhancement. Would you happen to have time to rebase it? <3 |
Would it be better to keep as an extension or promote it to import options? There are trade-offs for each. |
I am trending towards promoting it to import options |
5acc5ad
to
afab154
Compare
Remember to take this PR out of draft if it's ready :) |
Don't worry! I haven't forgotten.
Right, I've determined that the UI approach is just too much of a mess for what is a technical feature. So I'll be moving forward with the original plan to add the method to DocumentExtension. |
fd4dff7
to
4db4bdb
Compare
4db4bdb
to
19491dc
Compare
Proposal
Import ARRAY_CUSTOM# attributes with GLTFDocumentExtension using a function to specify layer name. Also added "Export Attributes" checkbox to the blender importer.
godotengine/godot-proposals#10892
Test Project
custom_attrib_test.zip
changes
Supported attributes