Std UserEditMode: Difference between revisions

From FreeCAD Documentation
(Reduced icon size in "Usage" to 24px.)
(Minor rewording. Remove spaces before colons.)
Line 22: Line 22:
==Usage==
==Usage==


Choose an edit mode among available ones :
Choose an edit mode among available ones:
# [[File:EditModeDefault.svg|24px]] '''Default''' : the object will be edited with its default mode. The edit mode is defined internally to be the most appropriate according the object type : for example, it will be shape properties edition for Part primitives and PartDesign features, placement edition with transform tool for boolean operations, ...
# [[File:EditModeDefault.svg|24px]] '''Default''': the object will be edited with its default mode. The edit mode is defined internally to be the most appropriate according the object type : for example, it will be shape properties edition for Part primitives and PartDesign features, placement edition with transform tool for boolean operations, ...
# [[File:EditModeTransform.svg|24px]] '''Transform''' : the object will have its placement editable with the [[Std_TransformManip|Transform manipulator]]
# [[File:EditModeTransform.svg|24px]] '''Transform''': the object will have its placement editable with the [[Std_TransformManip|Transform manipulator]]
# [[File:EditModeCutting.svg|24px]] '''Cutting''' : ??? this mode is implemented as available but seems to be currently not used by any object in FreeCAD
# [[File:EditModeCutting.svg|24px]] '''Cutting''': ??? this mode is implemented as available but seems to be currently not used by any object in FreeCAD
# [[File:EditModeColor.svg|24px]] '''Color''' : the object will have its individual faces color editable with the [[Part_FaceColors|face color editor]]
# [[File:EditModeColor.svg|24px]] '''Color''': the object will have its individual faces color editable with the [[Part_FaceColors|face color editor]]


==Notes==
==Notes==
Line 36: Line 36:
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


To list existing editing modes :
To list the available edit modes:

{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCADGui
Line 42: Line 43:
}}
}}


To know currently active mode :
To get the active edit mode:

{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCADGui
Line 48: Line 50:
}}
}}


To change active mode :
To set the active edit mode:

{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCADGui

Revision as of 19:36, 2 September 2021

Std UserEditMode

Menu location
Edit → Edit mode
Workbenches
All
Default shortcut
None
Introduced in version
0.20
See also
Std Edit

Description

The Std UserEditMode command allows the user to choose what would be the behavior when editing an object when double-clicking it on the Tree view.

Usage

Choose an edit mode among available ones:

  1. File:EditModeDefault.svg Default: the object will be edited with its default mode. The edit mode is defined internally to be the most appropriate according the object type : for example, it will be shape properties edition for Part primitives and PartDesign features, placement edition with transform tool for boolean operations, ...
  2. File:EditModeTransform.svg Transform: the object will have its placement editable with the Transform manipulator
  3. File:EditModeCutting.svg Cutting: ??? this mode is implemented as available but seems to be currently not used by any object in FreeCAD
  4. File:EditModeColor.svg Color: the object will have its individual faces color editable with the face color editor

Notes

  • Not all objects support all edit modes. In case the selected edit mode isn't supported by the edited object, it will fall back to its default mode

Scripting

See also: FreeCAD Scripting Basics.

To list the available edit modes:

import FreeCADGui
FreeCADGui.listUserEditModes()

To get the active edit mode:

import FreeCADGui
FreeCADGui.getUserEditMode()

To set the active edit mode:

import FreeCADGui
FreeCADGui.setUserEditMode(MODENAME) # With MODENAME a string available in list of modes