@@ -67,9 +67,9 @@ def draw(self, context):
6767 # keyframed playback
6868 if objSettings .frameMode == '4' :
6969 row = col .row ()
70- if objSettings .curMeshIdx <= 0 or objSettings .curMeshIdx > objSettings .numMeshes - 1 :
70+ if objSettings .curKeyframeMeshIdx <= 0 or objSettings .curKeyframeMeshIdx > objSettings .numMeshes - 1 :
7171 row .alert = True
72- row .prop (objSettings , "curMeshIdx " )
72+ row .prop (objSettings , "curKeyframeMeshIdx " )
7373 # all other playback modes
7474 else :
7575 col .prop (objSettings , "startFrame" )
@@ -97,6 +97,39 @@ def draw(self, context):
9797 col .prop (objSettings , "streamDuringPlayback" )
9898
9999
100+ class SMO_PT_MeshSequenceExportPanel (bpy .types .Panel ):
101+ bl_label = 'Export'
102+ bl_parent_id = "OBJ_SEQUENCE_PT_properties"
103+ bl_space_type = 'PROPERTIES'
104+ bl_region_type = 'WINDOW'
105+ bl_options = {'DEFAULT_CLOSED' }
106+
107+ @classmethod
108+ def poll (cls , context ):
109+ return context .object .mesh_sequence_settings .initialized == True
110+
111+ def draw (self , context ):
112+ layout = self .layout
113+ objSettings = context .object .mesh_sequence_settings
114+ inObjectMode = context .mode == 'OBJECT'
115+ inSculptMode = context .mode == 'SCULPT'
116+
117+ if objSettings .isImported is True :
118+ # non-imported sequences won't have a fileName or dirPath and cannot be exported (for now)
119+ row = layout .row ()
120+ row .enabled = inObjectMode or inSculptMode
121+ row .prop (objSettings , "autoExportChanges" )
122+
123+ row = layout .row ()
124+ row .enabled = inObjectMode or inSculptMode
125+ row .prop (objSettings , "overwriteSrcDir" )
126+
127+ row = layout .row ()
128+ row .enabled = (inObjectMode or inSculptMode ) and objSettings .overwriteSrcDir is False
129+ row .alert = objSettings .exportDir == '' and objSettings .overwriteSrcDir is False
130+
131+ row .prop (objSettings , "exportDir" )
132+
100133class SMO_PT_MeshSequenceAdvancedPanel (bpy .types .Panel ):
101134 bl_label = 'Advanced'
102135 bl_parent_id = "OBJ_SEQUENCE_PT_properties"
@@ -139,6 +172,8 @@ def draw(self, context):
139172 row = layout .row ()
140173 row .enabled = inObjectMode
141174 row .operator ("ms.bake_sequence" )
175+
176+
142177
143178 row = layout .row ()
144179 row .enabled = inObjectMode
@@ -455,11 +490,11 @@ def execute(self, context):
455490 msObj .mesh_sequence_settings .frameMode = '4'
456491
457492 # create a keyframe for this mesh at the current frame
458- msObj .mesh_sequence_settings .curMeshIdx = 1
459- msObj .keyframe_insert (data_path = 'mesh_sequence_settings.curMeshIdx ' , frame = context .scene .frame_current )
493+ msObj .mesh_sequence_settings .curKeyframeMeshIdx = 1
494+ msObj .keyframe_insert (data_path = 'mesh_sequence_settings.curKeyframeMeshIdx ' , frame = context .scene .frame_current )
460495
461496 # make the interpolation constant for the first keyframe
462- meshIdxCurve = next ((curve for curve in msObj .animation_data .action .fcurves if 'curMeshIdx ' in curve .data_path ), None )
497+ meshIdxCurve = next ((curve for curve in msObj .animation_data .action .fcurves if 'curKeyframeMeshIdx ' in curve .data_path ), None )
463498 keyAtFrame = next ((keyframe for keyframe in meshIdxCurve .keyframe_points if keyframe .co .x == context .scene .frame_current ), None )
464499 keyAtFrame .interpolation = 'CONSTANT'
465500
@@ -489,8 +524,8 @@ def execute(self, context):
489524 self .report ({'ERROR' }, "The selected object is not a mesh sequence" )
490525 return {'CANCELLED' }
491526
492- # if the object doesn't have a 'curMeshIdx ' fcurve, we can't add a mesh to it
493- meshIdxCurve = next ((curve for curve in obj .animation_data .action .fcurves if 'curMeshIdx ' in curve .data_path ), None )
527+ # if the object doesn't have a 'curKeyframeMeshIdx ' fcurve, we can't add a mesh to it
528+ meshIdxCurve = next ((curve for curve in obj .animation_data .action .fcurves if 'curKeyframeMeshIdx ' in curve .data_path ), None )
494529 if meshIdxCurve is None :
495530 self .report ({'ERROR' }, "The selected mesh sequence has no keyframe curve" )
496531 return {'CANCELLED' }
@@ -510,8 +545,8 @@ def execute(self, context):
510545 meshIdx = addMeshToSequence (obj , newMesh )
511546
512547 # add a new keyframe at this frame number for the new mesh
513- obj .mesh_sequence_settings .curMeshIdx = meshIdx
514- obj .keyframe_insert (data_path = 'mesh_sequence_settings.curMeshIdx ' , frame = context .scene .frame_current )
548+ obj .mesh_sequence_settings .curKeyframeMeshIdx = meshIdx
549+ obj .keyframe_insert (data_path = 'mesh_sequence_settings.curKeyframeMeshIdx ' , frame = context .scene .frame_current )
515550
516551 # make the interpolation constant for this keyframe
517552 newKeyAtFrame = next ((keyframe for keyframe in meshIdxCurve .keyframe_points if keyframe .co .x == context .scene .frame_current ), None )
0 commit comments