Model > Look

Reset Overrides

Puts back the model colors, transparency, hidden items, moved items or required and frozen flags you choose, all in one undo step.

Tab and panelModel > Look
KindButton
Live whenA model is open

Status

Untested Never executed inside Navisworks. Passed the headless checks only.

The public ask

No public source is on record for this tool.

Installs with

Reset Overrides sits in a stack, so installing it also installs:

Events it listens to

None. It runs only when you click it.

Files

Paths are relative to the Playground.extension folder.

  • Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/bundle.yaml
  • Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/icon.dark.png
  • Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/icon.png
  • Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/icon.small.dark.png
  • Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/icon.small.png
  • Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/script.py

Install

  1. Only this tool. In Navisworks, click pyNavis > Playground, search for Reset Overrides, tick it and click Install.
  2. The whole extension. Download Playground.extension.zip, unzip it, put the Playground.extension folder in %APPDATA%\pyNavis\extensions\, and click pyNavis > Reload. Reset Overrides is on the Model tab, Look panel.

You need pyNavis 1.3.0 or later.

Tried it? Tell us whether it worked or not. That report is what moves a tool up the status ladder.

Report

Source

The tool's own files, word for word as published in pynavis/Playground. Paths are relative to the Playground.extension folder.

script.py

The script that runs on a click.

Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/script.py View on GitHub
"""Resets the chosen kinds of override (colors, hidden items, moves, flags) in one undo step."""
from namo import explode, look_ghost, look_tools, ui
from pynavis import doc as nwdoc
from pynavis import forms, script, toast

TITLE = 'Reset Overrides'
DEFAULTS = {'kinds': list(look_tools.RESET_DEFAULT)}


def run():
    document = nwdoc.get_doc()
    if document.Models.Count == 0:
        toast.info('No model open', 'Open a model, then run Reset Overrides again.')
        return
    cfg = script.get_config(DEFAULTS)
    values = ui.form(TITLE, look_tools.reset_fields(cfg.get('kinds')), ok='Reset')
    if values is None:
        return
    kinds = look_tools.normalize_kinds(values['kinds'])
    if 'transforms' in kinds and not forms.confirm(
            'Put every moved or rotated item back where its source file has it? This also undoes '
            'moves made on purpose, such as a model aligned by hand.', title=TITLE):
        return
    cfg['kinds'] = kinds
    script.save_config(cfg)
    look_tools.reset(kinds, document)
    if 'transforms' in kinds and explode.load_record(document) is not None:
        explode.save_record(None, document)       # nothing is exploded any more
    if 'materials' in kinds and look_ghost.load_record(document) is not None:
        look_ghost.save_record(None, document)    # nothing is ghosted any more
    if 'temporary' in kinds:
        detail = 'Ctrl+Z undoes it in one step, except the temporary colors, which Navisworks does not keep.'
    else:
        detail = 'Ctrl+Z undoes it in one step.'
    toast.success(look_tools.reset_summary(kinds), detail)


run()

Library modules this tool uses

From the shared namo library, which installs with every tool. Each name opens the module on GitHub.

  • namo.explodeExploded View: pull objects (or whole models) apart from their common centre.
  • namo.look_ghostTrade Ghost: one or more trades stay solid, every other model fades.
  • namo.look_toolsThe small Look tools: Match Appearance, Reset All Overrides and Background.
  • namo.uiWPF building blocks for Playground tools, themed from the pyNavis design system.

bundle.yaml

The bundle contract: the keys pyNavis reads for this tool.

Model.tab/Look.panel/View_Tools.stack/Reset_All_Overrides.pushbutton/bundle.yaml View on GitHub
title: Reset Overrides
tooltip: Puts back the model colors, transparency, hidden items, moved items or required and frozen flags you choose, all in one undo step.
context: doc