Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
XPlane2Blender 3.20.6 to 3.20.7 manipulator type fix
'''
This script fixes manipulator types in blends that have been created with XPlane2Blender <= 3.20.6.
Usage: Select the objects with wrongly assigned manipulator types and then run this script in Blender's text-editor.
'''
import bpy
for object in bpy.context.selected_objects:
if object.xplane.manip.enabled:
if object.xplane.manip.type == 'command':
object.xplane.manip.type == 'drag_axis_pix'
elif object.xplane.manip.type == 'command_axis':
object.xplane.manip.type == 'command'
elif object.xplane.manip.type == 'push':
object.xplane.manip.type == 'command_axis'
elif object.xplane.manip.type == 'delta':
object.xplane.manip.type == 'push'
elif object.xplane.manip.type == 'wrap':
object.xplane.manip.type == 'delta'
elif object.xplane.manip.type == 'toggle':
object.xplane.manip.type == 'wrap'
elif object.xplane.manip.type == 'noop':
object.xplane.manip.type == 'toggle'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment