Skip to content
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

Fix #2424 Cache sampler output #2427

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,20 +201,15 @@ def __convert_keyframes(armature_uuid, bone_name, channel, keyframes, action_nam
component_type = gltf2_io_constants.ComponentType.Float
data_type = gltf2_io_constants.DataType.vec_type_from_num(len(keyframes[0].value))

output = gltf2_io.Accessor(
buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type),
byte_offset=None,
component_type=component_type,
count=len(values) // gltf2_io_constants.DataType.num_elements(data_type),
extensions=None,
extras=None,
max=None,
min=None,
name=None,
normalized=None,
sparse=None,
type=data_type
)

output = gather_accessor(
gltf2_io_binary_data.BinaryData.from_list(values, component_type),
component_type,
len(values) // gltf2_io_constants.DataType.num_elements(data_type),
None,
None,
data_type,
export_settings)

return input, output

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,14 @@ def __convert_keyframes(blender_type_data, blender_id, channel, keyframes, actio
else:
data_type = gltf2_io_constants.DataType.vec_type_from_num(1)

output = gltf2_io.Accessor(
buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type),
byte_offset=None,
component_type=component_type,
count=len(values) // gltf2_io_constants.DataType.num_elements(data_type),
extensions=None,
extras=None,
max=None,
min=None,
name=None,
normalized=None,
sparse=None,
type=data_type
output = gather_accessor(
gltf2_io_binary_data.BinaryData.from_list(values, component_type),
component_type,
len(values) // gltf2_io_constants.DataType.num_elements(data_type),
None,
None,
data_type,
export_settings
)

return input, output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,15 @@ def __convert_keyframes(obj_uuid: str, channel: str, keyframes, action_name: str
component_type = gltf2_io_constants.ComponentType.Float
data_type = gltf2_io_constants.DataType.vec_type_from_num(len(keyframes[0].value))

output = gltf2_io.Accessor(
buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type),
byte_offset=None,
component_type=component_type,
count=len(values) // gltf2_io_constants.DataType.num_elements(data_type),
extensions=None,
extras=None,
max=None,
min=None,
name=None,
normalized=None,
sparse=None,
type=data_type

output = gather_accessor(
gltf2_io_binary_data.BinaryData.from_list(values, component_type),
component_type,
len(values) // gltf2_io_constants.DataType.num_elements(data_type),
None,
None,
data_type,
export_settings
)

return input, output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,14 @@ def __convert_keyframes(obj_uuid, keyframes, action_name: str, export_settings):
component_type = gltf2_io_constants.ComponentType.Float
data_type = gltf2_io_constants.DataType.Scalar

output = gltf2_io.Accessor(
buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type),
byte_offset=None,
component_type=component_type,
count=len(values) // gltf2_io_constants.DataType.num_elements(data_type),
extensions=None,
extras=None,
max=None,
min=None,
name=None,
normalized=None,
sparse=None,
type=data_type
output = gather_accessor(
gltf2_io_binary_data.BinaryData.from_list(values, component_type),
component_type,
len(values) // gltf2_io_constants.DataType.num_elements(data_type),
None,
None,
data_type,
export_settings
)

return input, output
Expand Down
Loading