Action nodes handling
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import bpy
|
||||
import mathutils
|
||||
|
||||
ACTION_PROPS = ["name", "action", "action_text", "height", "radius", "tags"]
|
||||
FURNITURE_PROPS = ["name", "furniture_tags"]
|
||||
@@ -25,8 +26,9 @@ class TEST_OT_LinkAndPlay(bpy.types.Operator):
|
||||
# 2. Add to scene and create Override
|
||||
rig_obj = None
|
||||
for obj in data_to.objects:
|
||||
offset = mathutils.Matrix.Translation((0, -0.1, 0))
|
||||
bpy.context.collection.objects.link(obj)
|
||||
obj.matrix_world = target.matrix_world
|
||||
obj.matrix_world = target.matrix_world @ offset
|
||||
if obj.type == 'ARMATURE':
|
||||
rig_obj = obj
|
||||
if obj.library:
|
||||
|
||||
@@ -116,8 +116,8 @@ def export_root_objects_to_gltf(output_dir):
|
||||
if "type" in schild:
|
||||
position["type"] = schild["type"]
|
||||
position["position_x"] = local_pos[0]
|
||||
position["position_y"] = local_pos[2]
|
||||
position["position_z"] = local_pos[1]
|
||||
position["position_y"] = local_pos[1]
|
||||
position["position_z"] = local_pos[2]
|
||||
position["rotation_w"] = local_rot[0]
|
||||
position["rotation_x"] = local_rot[1]
|
||||
position["rotation_y"] = local_rot[2]
|
||||
@@ -137,8 +137,8 @@ def export_root_objects_to_gltf(output_dir):
|
||||
if "type" in child:
|
||||
position["type"] = child["type"]
|
||||
position["position_x"] = local_pos[0]
|
||||
position["position_y"] = local_pos[2]
|
||||
position["position_z"] = local_pos[1]
|
||||
position["position_y"] = local_pos[1]
|
||||
position["position_z"] = local_pos[2]
|
||||
position["rotation_w"] = local_rot[0]
|
||||
position["rotation_x"] = local_rot[1]
|
||||
position["rotation_y"] = local_rot[2]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user