INNER CODE UNIT · Python

execute

SpectralVectors/RightMouseNavigation · operators.py:127

    def execute(self, context):
        preferences = context.preferences
        addon_prefs = preferences.addons[__package__].preferences
        enable_nodes = addon_prefs.enable_for_node_editors
        disable_camera = addon_prefs.disable_camera_navigation
        navigation_mode = addon_prefs.navigation_mode

        space_type = context.space_data.type

        # Execute is the first thing called in our operator, so we start by
        # calling the appropriate navigation based on user preference
        if space_type == "VIEW_3D":
            view = context.space_data.region_3d.view_perspective
            if not (view == "CAMERA" and disable_camera):
                try:
                    if navigation_mode == "ORBIT":
                        bpy.ops.view3d.rotate("INVOKE_DEFAULT")
                    else:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…