def _extend( p, n, d ):
#{
+ nonlocal collection
+
uid = _new_uid()
tree = {}
tree["uid"] = uid
tree["obj"] = n
tree["parent"] = p
n.cv_data.uid = uid
-
+
# Descend into amature
#
if n.type == 'ARMATURE':
tree["bones"] = [None] # None is the root transform
tree["ik_count"] = 0
tree["collider_count"] = 0
+ tree["compile_animation"] = collection.cv_data.animations
# Here also collects some information about constraints, ik and
# counts colliders for the armature.
#
for obj1 in n.children:
#{
- nonlocal collection
for c1 in obj1.users_collection:
#{
if c1 == collection:
# extra info
node_def['anim_start'] = len(animdata)
node_def['anim_count'] = 0
-
+
+ if not node_def['compile_animation']:
+ #{
+ return
+ #}
+
# Compile anims
#
if obj.animation_data:
class CV_COLLECTION_SETTINGS(bpy.types.PropertyGroup):
#{
pack_textures: bpy.props.BoolProperty( name="Pack Textures", default=False )
+ animations: bpy.props.BoolProperty( name="Export animation", default=True)
#}
class CV_MATERIAL_SETTINGS(bpy.types.PropertyGroup):
#{
box.label( text=col.name + ".mdl" )
box.prop( col.cv_data, "pack_textures" )
+ box.prop( col.cv_data, "animations" )
box.operator( "carve.compile_this" )
#}
else: