Add curve follow path creation and management
2.1.0 - added: 3 actions buttons: - create curve with follow path and go into curve edit - go back to object - got to curve edit (if follow path constraint exists with a curve target) - if follow path exists, button to remove constraint
This commit is contained in:
+13
-1
@@ -224,7 +224,19 @@ class GPTB_PT_anim_manager(Panel):
|
||||
|
||||
## Follow curve path
|
||||
row = col.row(align=True)
|
||||
row.operator('object.create_follow_path_curve', text='Create Curve', icon='CURVE_BEZCURVE')
|
||||
# row.operator('object.create_follow_path_curve', text='Create Curve', icon='CURVE_BEZCURVE')
|
||||
|
||||
if context.object and context.object.type == 'CURVE' and context.mode in ('OBJECT', 'EDIT_CURVE'):
|
||||
row.operator('object.object_from_curve', text='Back To Object', icon='LOOP_BACK')
|
||||
|
||||
elif (follow_const := context.object.constraints.get('Follow Path')) and follow_const.target:
|
||||
row.operator('object.edit_curve', text='Edit Curve', icon='OUTLINER_DATA_CURVE')
|
||||
row.operator('object.remove_follow_path', text='', icon='X')
|
||||
col.label(text=f'{context.object.name} -> {follow_const.target.name}', icon='CON_FOLLOWPATH')
|
||||
|
||||
else:
|
||||
col.operator('object.create_follow_path_curve', text='Create Curve', icon='CURVE_BEZCURVE')
|
||||
|
||||
|
||||
## This can go in an extra category...
|
||||
col = layout.column()
|
||||
|
||||
Reference in New Issue
Block a user