Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_rigidbody.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index c885aa662da..a9cb7b2145d 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
+from bl_ui.properties_physics_common import effector_weights_ui
class PHYSICS_PT_rigidbody_panel():
@@ -136,5 +137,23 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
col.prop(rbo, "linear_damping", text="Translation")
col.prop(rbo, "angular_damping", text="Rotation")
+class PHYSICS_PT_rigid_body_field_weights(PHYSICS_PT_rigidbody_panel, Panel):
+ bl_label = "Rigid Body Field Weights"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+ @classmethod
+ def poll(cls, context):
+ obj = context.object
+ return (obj and obj.rigid_body and
+ obj.rigid_body.type == 'ACTIVE' and
+ (not context.scene.render.use_game_engine))
+
+ def draw(self, context):
+ ob = context.object
+ rbo = ob.rigid_body
+
+ effector_weights_ui(self, context, rbo.effector_weights, 'RIGID_BODY')
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)