Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender_nif_plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
blender_nif_plugin
Commits
e0c30774
Commit
e0c30774
authored
11 years ago
by
Ghost
Browse files
Options
Downloads
Patches
Plain Diff
Slight adjustment to collision import ordering.
parent
731b08dc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
io_scene_nif/collisionsys/collision_import.py
+14
-10
14 additions, 10 deletions
io_scene_nif/collisionsys/collision_import.py
with
14 additions
and
10 deletions
io_scene_nif/collisionsys/collision_import.py
+
14
−
10
View file @
e0c30774
...
...
@@ -150,17 +150,16 @@ class bhkshape_import():
for
b_col_obj
in
collision_objs
:
'''
What are these used for
ob.rbFlags = (
Blender.Object.RBFlags.ACTOR |
Blender.Object.RBFlags.DYNAMIC |
Blender.Object.RBFlags.RIGIDBODY |
Blender.Object.RBFlags.BOUNDS)
'''
#if bhkshape == NifFormat.bhkRigidBody:
Blender.Object.RBFlags.RIGIDBODY
Blender.Object.RBFlags.ACTOR
'''
bpy
.
ops
.
rigidbody
.
object_add
(
type
=
'
ACTIVE
'
)
'''
Blender.Object.RBFlags.DYNAMIC
'''
b_col_obj
.
rigid_body
.
enabled
=
True
''''
Blender.Object.RBFlags.BOUNDS)
'''
bpy
.
ops
.
object
.
modifier_add
(
type
=
'
COLLISION
'
)
bpy
.
ops
.
object
.
forcefield_toggle
()
#b_col_obj.rigid_body = b_col_obj_rigidbody
if
bhkshape
.
mass
>
0.0001
:
# for physics emulation
...
...
@@ -179,13 +178,18 @@ class bhkshape_import():
b_col_obj
.
niftools
.
upb
=
self
.
nif_import
.
upbflags
except
:
pass
b_col_obj
.
rotation_quaternion
.
x
=
bhkshape
.
rotation
.
x
b_col_obj
.
rotation_quaternion
.
y
=
bhkshape
.
rotation
.
y
b_col_obj
.
rotation_quaternion
.
z
=
bhkshape
.
rotation
.
z
b_col_obj
.
rotation_quaternion
.
w
=
bhkshape
.
rotation
.
w
# note: also imported as rbMass, but hard to find by users
# so we import it as a property, and this is also what will
# be re-exported
b_col_obj
.
rigid_body
.
mass
=
bhkshape
.
mass
/
len
(
collision_objs
)
b_col_obj
.
rigid_body
.
enabled
=
True
b_col_obj
.
rigid_body
.
use_deactivation
=
True
b_col_obj
.
rigid_body
.
friction
=
bhkshape
.
friction
b_col_obj
.
rigid_body
.
restitution
=
bhkshape
.
restitution
#b_col_obj.rigid_body. = bhkshape.
b_col_obj
.
rigid_body
.
linear_damping
=
bhkshape
.
linear_damping
b_col_obj
.
rigid_body
.
angular_damping
=
bhkshape
.
angular_damping
...
...
@@ -198,7 +202,7 @@ class bhkshape_import():
#b_col_obj.field.distance_min = bhkshape.
b_col_obj
.
field
.
use_max_distance
=
True
#
b_col_obj.field.distance_max = bhkshape.
b_col_obj
.
field
.
distance_max
=
bhkshape
.
max_linear_velocity
b_col_obj
.
field
.
falloff_power
=
bhkshape
.
motion_system
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment