[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1751] contrib/py/scripts/addons/ game_engine_ragdolls_kit: Update to build 35733.
Marcus Jenkins
funkywyrm at gmail.com
Tue Mar 29 18:27:30 CEST 2011
Revision: 1751
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1751
Author: funkywyrm
Date: 2011-03-29 16:27:29 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Update to build 35733.
Modified Paths:
--------------
contrib/py/scripts/addons/game_engine_ragdolls_kit/__init__.py
contrib/py/scripts/addons/game_engine_ragdolls_kit/brik.py
contrib/py/scripts/addons/game_engine_ragdolls_kit/templates/brik_init_ragdoll.py
contrib/py/scripts/addons/game_engine_ragdolls_kit/templates/brik_load.py
contrib/py/scripts/addons/game_engine_ragdolls_kit/templates/brik_spawn.py
Modified: contrib/py/scripts/addons/game_engine_ragdolls_kit/__init__.py
===================================================================
--- contrib/py/scripts/addons/game_engine_ragdolls_kit/__init__.py 2011-03-29 15:12:43 UTC (rev 1750)
+++ contrib/py/scripts/addons/game_engine_ragdolls_kit/__init__.py 2011-03-29 16:27:29 UTC (rev 1751)
@@ -25,7 +25,7 @@
"version": (0,2),
"blender": (2, 5, 5),
"api": 31965,
- "location": "Tool Shelf",
+ "location": "View 3D > Tool Shelf > BRIK Panel",
"description": "Kit for creating ragdoll structures from armatures and implementing them in the game engine.",
"warning": "Preliminary release for testing purposes. Use with caution on important files.",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
@@ -46,9 +46,11 @@
################################################################################
##### REGISTER #####
def register():
+ bpy.utils.register_module(__name__)
pass
def unregister():
+ bpy.utils.unregister_module(__name__)
pass
if __name__ == "__main__":
Modified: contrib/py/scripts/addons/game_engine_ragdolls_kit/brik.py
===================================================================
--- contrib/py/scripts/addons/game_engine_ragdolls_kit/brik.py 2011-03-29 15:12:43 UTC (rev 1750)
+++ contrib/py/scripts/addons/game_engine_ragdolls_kit/brik.py 2011-03-29 16:27:29 UTC (rev 1751)
@@ -1,4 +1,4 @@
-#BRIK_0_2.py
+#brik_0_2.py
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -22,7 +22,7 @@
# --------------------------------------------------------------------------
"""
-BRIK is the Blender Ragdoll Implementation Kit.
+brik is the Blender Ragdoll Implementation Kit.
It aims to provide a tool kit that enables the easy implementation of ragdolls in Blender.
@@ -49,7 +49,7 @@
named bones can cause some rigid body objects to be removed. This can probably be fixed by
testing for membership of a group. However, similarly named bones should be renamed to a
unique name since bone name and driver object name being similar is essential for correct
- operation of both the BRIK script and the BRIK_Use_doll game engine script.
+ operation of both the brik script and the brik_Use_doll game engine script.
Running Create multiple times on the same armature will recreate the rigid body joints
rather than editing existing ones.
@@ -69,19 +69,19 @@
import mathutils
from mathutils import Vector
-class VIEW3D_PT_BRIK_panel(bpy.types.Panel):
+class VIEW3D_PT_brik_panel(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_context = 'objectmode'
- bl_label = 'BRIK'
+ bl_label = 'brik'
#Draws the panel header in the tools pane
def draw_header(self, context):
layout = self.layout
layout.label(text='', icon='CONSTRAINT_BONE')
- #Draws the BRIK panel in the tools pane
+ #Draws the brik panel in the tools pane
def draw(self, context):
ob = bpy.context.object
@@ -99,40 +99,40 @@
if ob.type == 'ARMATURE':
col = box.column(align=True)
- col.operator('object.BRIK_create_structure', text = 'Create structure')
+ col.operator('object.brik_create_structure', text = 'Create structure')
row = col.row()
- remove_structure_active = 'BRIK_structure_created' in ob.keys() and ob['BRIK_structure_created']
+ remove_structure_active = 'brik_structure_created' in ob.keys() and ob['brik_structure_created']
row.active = remove_structure_active
- row.operator('object.BRIK_destroy_structure', text = 'Remove structure')
+ row.operator('object.brik_destroy_structure', text = 'Remove structure')
col = box.column(align = True)
- col.operator('object.BRIK_create_hit_boxes', text = 'Create hit boxes')
+ col.operator('object.brik_create_hit_boxes', text = 'Create hit boxes')
row = col.row()
- remove_hit_boxes_active = 'BRIK_hit_boxes_created' in ob.keys() and ob['BRIK_hit_boxes_created']
+ remove_hit_boxes_active = 'brik_hit_boxes_created' in ob.keys() and ob['brik_hit_boxes_created']
row.active = remove_hit_boxes_active
- row.operator('object.BRIK_remove_hit_boxes', text = 'Remove hit boxes')
+ row.operator('object.brik_remove_hit_boxes', text = 'Remove hit boxes')
else:
box.label(text='Select armature')
- game_options_active = 'BRIK_structure_created' in ob.keys() and ob['BRIK_structure_created'] \
- and 'BRIK_hit_boxes_created' in ob.keys() and ob['BRIK_hit_boxes_created']
+ game_options_active = 'brik_structure_created' in ob.keys() and ob['brik_structure_created'] \
+ and 'brik_hit_boxes_created' in ob.keys() and ob['brik_hit_boxes_created']
col = box.column(align = True)
col.active = game_options_active
col.label(text='Game options:')
- col.operator('object.BRIK_write_game_file', text = 'Write game file')
- create_logic_active = 'BRIK_file_written' in ob.keys() and ob['BRIK_file_written']
+ col.operator('object.brik_write_game_file', text = 'Write game file')
+ create_logic_active = 'brik_file_written' in ob.keys() and ob['brik_file_written']
row = col.row()
row.active = create_logic_active
- row.operator('object.BRIK_create_game_logic', text = 'Create game logic')
+ row.operator('object.brik_create_game_logic', text = 'Create game logic')
else:
col.label(text='Select an object')
-class BRIK_create_game_logic(bpy.types.Operator):
- bl_label = 'BRIK create game logic operator'
- bl_idname = 'object.BRIK_create_game_logic'
+class brik_create_game_logic(bpy.types.Operator):
+ bl_label = 'brik create game logic operator'
+ bl_idname = 'object.brik_create_game_logic'
bl_description = 'Create the game logic for the created objects.'
bl_options = {'REGISTER', 'UNDO'}
@@ -145,64 +145,64 @@
def set_up_armature_logic(self, armature):
- if not 'BRIK_use_ragdoll' in armature.game.properties:
+ if not 'brik_use_ragdoll' in armature.game.properties:
bpy.ops.object.game_property_new()
prop = armature.game.properties[-1]
- prop.name = 'BRIK_use_ragdoll'
+ prop.name = 'brik_use_ragdoll'
prop.type = 'BOOL'
prop.value = False
bpy.ops.object.game_property_new()
prop = armature.game.properties[-1]
- prop.name = 'BRIK_init_ragdoll'
+ prop.name = 'brik_init_ragdoll'
prop.type = 'BOOL'
prop.value = True
#Logic to spawn the rigid body boxes
- bpy.ops.logic.sensor_add(type='PROPERTY', name='BRIK_use_changed_sens', object=armature.name)
+ bpy.ops.logic.sensor_add(type='PROPERTY', name='brik_use_changed_sens', object=armature.name)
sens = armature.game.sensors[-1]
- sens.property = 'BRIK_use_ragdoll'
+ sens.property = 'brik_use_ragdoll'
sens.evaluation_type = 'PROPCHANGED'
- bpy.ops.logic.controller_add(type='PYTHON', name='BRIK_init_ragdoll_cont', object=armature.name)
+ bpy.ops.logic.controller_add(type='PYTHON', name='brik_init_ragdoll_cont', object=armature.name)
cont = armature.game.controllers[-1]
cont.mode = 'MODULE'
cont.module = 'brik_init_ragdoll.main'
- bpy.ops.logic.actuator_add(type='EDIT_OBJECT', name='BRIK_spawn_boxes_act', object=armature.name)
+ bpy.ops.logic.actuator_add(type='EDIT_OBJECT', name='brik_spawn_boxes_act', object=armature.name)
act = armature.game.actuators[-1]
act.mode = 'ADDOBJECT'
cont.link(sens, act)
- #Logic to change the value of BRIK_use_ragdoll property
- bpy.ops.logic.sensor_add(type='KEYBOARD', name='BRIK_set_use_ragdoll_sens', object=armature.name)
+ #Logic to change the value of brik_use_ragdoll property
+ bpy.ops.logic.sensor_add(type='KEYBOARD', name='brik_set_use_ragdoll_sens', object=armature.name)
sens = armature.game.sensors[-1]
sens.key = 'SPACE'
- bpy.ops.logic.controller_add(type='LOGIC_AND', name='BRIK_set_use_ragdoll_cont', object=armature.name)
+ bpy.ops.logic.controller_add(type='LOGIC_AND', name='brik_set_use_ragdoll_cont', object=armature.name)
cont = armature.game.controllers[-1]
- bpy.ops.logic.actuator_add(type='PROPERTY', name='BRIK_set_use_ragdoll_act', object=armature.name)
+ bpy.ops.logic.actuator_add(type='PROPERTY', name='brik_set_use_ragdoll_act', object=armature.name)
act = armature.game.actuators[-1]
act.mode = 'ASSIGN'
- act.property = 'BRIK_use_ragdoll'
+ act.property = 'brik_use_ragdoll'
act.value = "True"
cont.link(sens, act)
#Logic to use the ragdoll.
- bpy.ops.logic.sensor_add(type='PROPERTY', name='BRIK_use_sens', object=armature.name)
+ bpy.ops.logic.sensor_add(type='PROPERTY', name='brik_use_sens', object=armature.name)
sens = armature.game.sensors[-1]
- sens.property = 'BRIK_use_ragdoll'
+ sens.property = 'brik_use_ragdoll'
sens.value = 'True'
sens.use_pulse_true_level = True
- bpy.ops.logic.controller_add(type='LOGIC_AND', name='BRIK_use_cont', object=armature.name)
+ bpy.ops.logic.controller_add(type='LOGIC_AND', name='brik_use_cont', object=armature.name)
cont = armature.game.controllers[-1]
- bpy.ops.logic.actuator_add(type='ARMATURE', name='BRIK_use_act', object=armature.name)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list