diff --git a/Sources/armory/trait/internal/Navigation.hx b/Sources/armory/trait/internal/Navigation.hx new file mode 100644 index 00000000..5d98b605 --- /dev/null +++ b/Sources/armory/trait/internal/Navigation.hx @@ -0,0 +1,4 @@ +// TODO: Deprecated - use armory.trait.navigation +package armory.trait.internal; + +typedef Navigation = armory.trait.navigation.Navigation; diff --git a/Sources/armory/trait/internal/PhysicsConstraint.hx b/Sources/armory/trait/internal/PhysicsConstraint.hx new file mode 100644 index 00000000..9fb96c7c --- /dev/null +++ b/Sources/armory/trait/internal/PhysicsConstraint.hx @@ -0,0 +1,4 @@ +// TODO: Deprecated - use armory.trait.physics +package armory.trait.internal; + +typedef PhysicsConstraint = armory.trait.physics.PhysicsConstraint; diff --git a/Sources/armory/trait/internal/PhysicsHook.hx b/Sources/armory/trait/internal/PhysicsHook.hx new file mode 100644 index 00000000..c2a7c26a --- /dev/null +++ b/Sources/armory/trait/internal/PhysicsHook.hx @@ -0,0 +1,4 @@ +// TODO: Deprecated - use armory.trait.physics +package armory.trait.internal; + +typedef PhysicsHook = armory.trait.physics.PhysicsHook; diff --git a/Sources/armory/trait/internal/PhysicsWorld.hx b/Sources/armory/trait/internal/PhysicsWorld.hx new file mode 100644 index 00000000..3bf849fe --- /dev/null +++ b/Sources/armory/trait/internal/PhysicsWorld.hx @@ -0,0 +1,4 @@ +// TODO: Deprecated - use armory.trait.physics +package armory.trait.internal; + +typedef PhysicsWorld = armory.trait.physics.PhysicsWorld; diff --git a/Sources/armory/trait/internal/RigidBody.hx b/Sources/armory/trait/internal/RigidBody.hx new file mode 100644 index 00000000..2ff1963a --- /dev/null +++ b/Sources/armory/trait/internal/RigidBody.hx @@ -0,0 +1,4 @@ +// TODO: Deprecated - use armory.trait.physics +package armory.trait.internal; + +typedef RigidBody = armory.trait.physics.RigidBody; diff --git a/Sources/armory/trait/internal/SoftBody.hx b/Sources/armory/trait/internal/SoftBody.hx new file mode 100644 index 00000000..62097209 --- /dev/null +++ b/Sources/armory/trait/internal/SoftBody.hx @@ -0,0 +1,4 @@ +// TODO: Deprecated - use armory.trait.physics +package armory.trait.internal; + +typedef SoftBody = armory.trait.physics.SoftBody; diff --git a/blender/arm/exporter.py b/blender/arm/exporter.py index a397fb43..5416e34e 100755 --- a/blender/arm/exporter.py +++ b/blender/arm/exporter.py @@ -2693,7 +2693,8 @@ class ArmoryExporter: self.output['traits'] = [] x = {} x['type'] = 'Script' - x['class_name'] = 'armory.trait.physics.PhysicsWorld' + pkg = 'bullet' if bpy.data.worlds['Arm'].arm_physics == 'Bullet' else 'oimo' + x['class_name'] = 'armory.trait.physics.' + pkg + '.PhysicsWorld' self.output['traits'].append(x) if wrd.arm_navigation != 'Disabled' and ArmoryExporter.export_navigation: if not 'traits' in self.output: @@ -2876,7 +2877,8 @@ class ArmoryExporter: body_mass = rb.mass x = {} x['type'] = 'Script' - x['class_name'] = 'armory.trait.physics.RigidBody' + pkg = 'bullet' if bpy.data.worlds['Arm'].arm_physics == 'Bullet' else 'oimo' + x['class_name'] = 'armory.trait.physics.' + pkg + '.RigidBody' x['parameters'] = [str(body_mass), str(shape), str(rb.friction), str(rb.restitution)] if rb.use_margin: x['parameters'].append(str(rb.collision_margin)) @@ -2904,7 +2906,8 @@ class ArmoryExporter: assets.add_khafile_def('arm_physics_soft') cloth_trait = {} cloth_trait['type'] = 'Script' - cloth_trait['class_name'] = 'armory.trait.physics.SoftBody' + pkg = 'bullet' if bpy.data.worlds['Arm'].arm_physics == 'Bullet' else 'oimo' + cloth_trait['class_name'] = 'armory.trait.physics.' + pkg + '.SoftBody' if soft_type == 0: bend = soft_mod.settings.bending_stiffness elif soft_type == 1: @@ -3068,7 +3071,8 @@ class ArmoryExporter: def add_hook_trait(self, o, bobject, target_name, group_name): hook_trait = {} hook_trait['type'] = 'Script' - hook_trait['class_name'] = 'armory.trait.physics.PhysicsHook' + pkg = 'bullet' if bpy.data.worlds['Arm'].arm_physics == 'Bullet' else 'oimo' + hook_trait['class_name'] = 'armory.trait.physics.' + pkg + '.PhysicsHook' verts = [] if group_name != '': group = bobject.vertex_groups[group_name].index @@ -3084,7 +3088,8 @@ class ArmoryExporter: def add_constraint_trait(self, o, rb1, rb2): constr_trait = {} constr_trait['type'] = 'Script' - constr_trait['class_name'] = 'armory.trait.physics.PhysicsConstraint' + pkg = 'bullet' if bpy.data.worlds['Arm'].arm_physics == 'Bullet' else 'oimo' + constr_trait['class_name'] = 'armory.trait.physics.' + pkg + '.PhysicsConstraint' constr_trait['parameters'] = ["'" + rb1.name + "'", "'" + rb2.name + "'"] o['traits'].append(constr_trait)