draftviewproviders.view_base.ViewProviderDraft Class Reference

Public Member Functions

def attach (self, vobj)
 
def claimChildren (self)
 
def execute (self, vobj)
 
def getDefaultDisplayMode (self)
 
def getDisplayModes (self, vobj)
 
def getIcon (self)
 
def onChanged (self, vobj, prop)
 
def setDisplayMode (self, mode)
 
def setEdit (self, vobj, mode=0)
 
def unsetEdit (self, vobj, mode=0)
 
def updateData (self, obj, prop)
 

Public Attributes

 Object
 
 texcoords
 
 texture
 

Detailed Description

The base class for Draft view providers.

Parameters
----------
vobj : a base C++ view provider
    The view provider of the scripted object (`obj.ViewObject`),
    which commonly may be of types `PartGui::ViewProvider2DObjectPython`,
    `PartGui::ViewProviderPython`, or `Gui::ViewProviderPythonFeature`.

    A basic view provider is instantiated during the creation
    of the base C++ object, for example,
    `Part::Part2DObjectPython`, `Part::FeaturePython`,
    or `App::FeaturePython`.

        >>> obj = App.ActiveDocument.addObject('Part::Part2DObjectPython')
        >>> vobj = obj.ViewObject
        >>> ViewProviderDraft(vobj)

    This view provider class instance is stored in the `Proxy` attribute
    of the base view provider.
    ::
        vobj.Proxy = self

Attributes
----------
Object : the base C++ object
    The scripted document object that is associated
    with this view provider, which commonly may be of types
    `Part::Part2DObjectPython`, `Part::FeaturePython`,
    or `App::FeaturePython`.

texture : coin.SoTexture2
    A texture that could be added to this object.

texcoords : coin.SoTextureCoordinatePlane
    The coordinates defining a plane to use for aligning the texture.

These class attributes are accessible through the `Proxy` object:
`vobj.Proxy.Object`, `vobj.Proxy.texture`, etc.

Member Function Documentation

◆ attach()

def draftviewproviders.view_base.ViewProviderDraft.attach (   self,
  vobj 
)
Set up the scene sub-graph of the view provider.

This method should always be defined, even if it does nothing.

Override this method to set up a custom scene.

Parameters
----------
vobj : the view provider of the scripted object.
    This is `obj.ViewObject`.

Reimplemented in draftviewproviders.view_wire.ViewProviderWire.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), Mod.Test.Document.DocumentBasicCases.Object, App::VRMLObject.onChanged(), FemGui::ViewProviderFemPostPlaneFunction.onChanged(), Part::Circle.onChanged(), Part::Vertex.onChanged(), Part::Line.onChanged(), Part::Ellipse.onChanged(), PartDesignGui::ViewProviderDatumCoordinateSystem.onChanged(), Surface::GeomFillSurface.onChanged(), PartDesign::Chamfer.onChanged(), Sketcher::SketchObject.onChanged(), TechDrawGui::ViewProviderBalloon.onChanged(), TechDrawGui::ViewProviderDimension.onChanged(), TechDrawGui::ViewProviderLeader.onChanged(), TechDrawGui::ViewProviderRichAnno.onChanged(), TechDrawGui::ViewProviderWeld.onChanged(), Gui::ViewProvider.onChanged(), Gui::ViewProviderAnnotation.onChanged(), Gui::ViewProviderAnnotationLabel.onChanged(), Gui::ViewProviderGeometryObject.onChanged(), Gui::ViewProviderMeasureDistance.onChanged(), Gui::ViewProviderOrigin.onChanged(), Gui::ViewProviderOriginFeature.onChanged(), Gui::ViewProviderPythonFeatureImp.onChanged(), Gui::ViewProviderTextDocument.onChanged(), Drawing::FeatureClip.onChanged(), Drawing::FeaturePage.onChanged(), Drawing::FeatureViewSymbol.onChanged(), Fem::Constraint.onChanged(), Fem::ConstraintBearing.onChanged(), Fem::ConstraintContact.onChanged(), Fem::ConstraintDisplacement.onChanged(), Fem::ConstraintFixed.onChanged(), Fem::ConstraintFluidBoundary.onChanged(), Fem::ConstraintForce.onChanged(), Fem::ConstraintGear.onChanged(), Fem::ConstraintHeatflux.onChanged(), Fem::ConstraintInitialTemperature.onChanged(), Fem::ConstraintPlaneRotation.onChanged(), Fem::ConstraintPressure.onChanged(), Fem::ConstraintPulley.onChanged(), Fem::ConstraintSpring.onChanged(), Fem::ConstraintTemperature.onChanged(), Fem::ConstraintTransform.onChanged(), Fem::FemMeshObject.onChanged(), Fem::FemPostClipFilter.onChanged(), Fem::FemPostDataAlongLineFilter.onChanged(), Fem::FemPostDataAtPointFilter.onChanged(), Fem::FemPostScalarClipFilter.onChanged(), Fem::FemPostWarpVectorFilter.onChanged(), Fem::FemPostCutFilter.onChanged(), Fem::FemPostFunctionProvider.onChanged(), Fem::FemPostPlaneFunction.onChanged(), Fem::FemPostSphereFunction.onChanged(), Fem::FemPostPipeline.onChanged(), FemGui::ViewProviderFemConstraint.onChanged(), FemGui::ViewProviderFemMesh.onChanged(), FemGui::ViewProviderFemPostFunctionProvider.onChanged(), FemGui::ViewProviderFemPostFunction.onChanged(), FemGui::ViewProviderFemPostObject.onChanged(), InspectionGui::ViewProviderInspection.onChanged(), Mesh::Feature.onChanged(), MeshGui::ViewProviderMesh.onChanged(), MeshGui::ViewProviderMeshCurvature.onChanged(), MeshGui::ViewProviderMeshDefects.onChanged(), MeshGui::ViewProviderMeshNode.onChanged(), Part::Mirroring.onChanged(), Part::Box.onChanged(), Part::RuledSurface.onChanged(), Part::Loft.onChanged(), Part::Sweep.onChanged(), Part::Helix.onChanged(), Part::Spiral.onChanged(), Part::Wedge.onChanged(), PartGui::ViewProvider2DObjectGrid.onChanged(), PartGui::ViewProviderCustom.onChanged(), PartGui::ViewProviderPartReference.onChanged(), PartDesign::Line.onChanged(), PartDesign::Plane.onChanged(), PartDesign::FeatureBase.onChanged(), PartDesign::DressUp.onChanged(), PartDesign::Helix.onChanged(), PartDesign::Hole.onChanged(), PartDesign::ProfileBased.onChanged(), PartDesignGui::ViewProviderDatumPoint.onChanged(), Path::Feature.onChanged(), PathGui::ViewProviderPath.onChanged(), Points::Feature.onChanged(), PointsGui::ViewProviderPoints.onChanged(), Robot::Edge2TracObject.onChanged(), Robot::RobotObject.onChanged(), Robot::TrajectoryDressUpObject.onChanged(), Robot::TrajectoryObject.onChanged(), RobotGui::ViewProviderRobotObject.onChanged(), Sandbox::SandboxObject.onChanged(), SketcherGui::ViewProviderCustom.onChanged(), Spreadsheet::Sheet.onChanged(), TechDraw::DrawParametricTemplate.onChanged(), TechDraw::DrawRichAnno.onChanged(), TechDraw::DrawSVGTemplate.onChanged(), TechDraw::DrawTemplate.onChanged(), TechDraw::DrawTile.onChanged(), TechDraw::DrawTileWeld.onChanged(), TechDraw::DrawViewAnnotation.onChanged(), TechDraw::DrawViewClip.onChanged(), TechDraw::DrawViewCollection.onChanged(), TechDraw::DrawViewDimExtent.onChanged(), TechDraw::DrawViewSpreadsheet.onChanged(), TechDraw::DrawWeldSymbol.onChanged(), TechDrawGui::ViewProviderImage.onChanged(), TechDrawGui::ViewProviderProjGroup.onChanged(), TechDrawGui::ViewProviderViewPart.onChanged(), TechDrawGui::ViewProviderViewSection.onChanged(), Gui::ViewProviderDocumentObject.onChanged(), Gui::ViewProviderLink.onChanged(), Gui::ViewProviderPart.onChanged(), Gui::ViewProviderPlacement.onChanged(), Gui::ViewProviderPythonFeatureT< ViewProviderT >.onChanged(), Part::BodyBase.onChanged(), Part::Revolution.onChanged(), Part::Feature.onChanged(), Part::Primitive.onChanged(), PartGui::ViewProviderPartExt.onChanged(), PartDesign::Body.onChanged(), PartDesign::Point.onChanged(), PartDesign::Boolean.onChanged(), PartDesign::FeaturePrimitive.onChanged(), PartDesign::ShapeBinder.onChanged(), PartDesign::SubShapeBinder.onChanged(), PartDesignGui::ViewProvider.onChanged(), PartDesignGui::ViewProviderBody.onChanged(), PartDesignGui::ViewProviderBoolean.onChanged(), PartDesignGui::ViewProviderSubShapeBinder.onChanged(), SketcherGui::ViewProviderSketch.onChanged(), Surface::Extend.onChanged(), TechDraw::DrawGeomHatch.onChanged(), TechDraw::DrawHatch.onChanged(), TechDraw::DrawLeaderLine.onChanged(), TechDraw::DrawPage.onChanged(), TechDraw::DrawProjGroup.onChanged(), TechDraw::DrawProjGroupItem.onChanged(), TechDraw::DrawView.onChanged(), TechDraw::DrawViewBalloon.onChanged(), TechDraw::DrawViewDetail.onChanged(), TechDraw::DrawViewDimension.onChanged(), TechDraw::DrawViewImage.onChanged(), TechDraw::DrawViewMulti.onChanged(), TechDraw::DrawViewPart.onChanged(), TechDraw::DrawViewSection.onChanged(), TechDraw::DrawViewSymbol.onChanged(), TechDraw::LandmarkDimension.onChanged(), TechDrawGui::ViewProviderDrawingView.onChanged(), TechDrawGui::ViewProviderGeomHatch.onChanged(), TechDrawGui::ViewProviderHatch.onChanged(), TechDrawGui::ViewProviderPage.onChanged(), TechDrawGui::ViewProviderTemplate.onChanged(), App::PropertyContainer.onChanged(), App::ExtensionContainer.onChanged(), App::FeatureCustomT< FeatureT >.onChanged(), App::FeaturePythonImp.onChanged(), App::MeasureDistance.onChanged(), App::TextDocument.onChanged(), App::Document.onChanged(), App::DocumentObject.onChanged(), App::FeaturePythonT< FeatureT >.onChanged(), draftobjects.bezcurve.BezCurve.onChanged(), draftobjects.bspline.BSpline.onChanged(), OpenSCADFeatures.Resize.onChanged(), OpenSCADFeatures.MatrixTransform.onChanged(), OpenSCADFeatures.ImportObject.onChanged(), OpenSCADFeatures.RefineShape.onChanged(), OpenSCADFeatures.IncreaseTolerance.onChanged(), OpenSCADFeatures.GetWire.onChanged(), OpenSCADFeatures.Frustum.onChanged(), OpenSCADFeatures.Twist.onChanged(), OpenSCADFeatures.PrismaticToroid.onChanged(), OpenSCADFeatures.OffsetShape.onChanged(), Mod.PartDesign.FeatureHole.FeatureHole.Hole.onChanged(), Mod.PartDesign.Scripts.DistanceBolt.DistanceBolt.onChanged(), Mod.PartDesign.Scripts.Epitrochoid.Epitrochoid.onChanged(), Mod.PartDesign.Scripts.Parallelepiped.Parallelepiped.onChanged(), Mod.PartDesign.Scripts.Parallelepiped.BoxCylinder.onChanged(), Mod.PartDesign.Scripts.Spring.MySpring.onChanged(), PathScripts.PathDressupZCorrect.ObjectDressup.onChanged(), FeaturePython.Box.onChanged(), FeaturePython.PointFeature.onChanged(), FeaturePython.MeshFeature.onChanged(), FeaturePython.DistanceBolt.onChanged(), Texture.Texture.onChanged(), ArchAxis._Axis.onChanged(), ArchAxisSystem._AxisSystem.onChanged(), ArchBuildingPart.BuildingPart.onChanged(), ArchComponent.Component.onChanged(), ArchCurtainWall.CurtainWall.onChanged(), ArchEquipment._Equipment.onChanged(), ArchFloor._Floor.onChanged(), ArchIFC.IfcRoot.onChanged(), ArchMaterial._ArchMaterial.onChanged(), ArchPanel.PanelView.onChanged(), ArchRebar._Rebar.onChanged(), ArchReference.ArchReference.onChanged(), ArchSchedule._ArchSchedule.onChanged(), ArchSectionPlane._SectionPlane.onChanged(), ArchSite._Site.onChanged(), ArchSpace._Space.onChanged(), ArchStructure._Structure.onChanged(), ArchTruss.Truss.onChanged(), ArchWall._Wall.onChanged(), ArchWindow._Window.onChanged(), draftobjects.array.Array.onChanged(), draftobjects.base.DraftObject.onChanged(), draftobjects.dimension.LinearDimension.onChanged(), draftobjects.dimension.AngularDimension.onChanged(), draftobjects.draft_annotation.DraftAnnotation.onChanged(), draftobjects.draftlink.DraftLink.onChanged(), draftobjects.fillet.Fillet.onChanged(), draftobjects.label.Label.onChanged(), draftobjects.patharray.PathArray.onChanged(), draftobjects.pathtwistedarray.PathTwistedArray.onChanged(), draftobjects.wire.Wire.onChanged(), draftobjects.wpproxy.WorkingPlaneProxy.onChanged(), PathScripts.PathArray.ObjectArray.onChanged(), PathScripts.PathComment.Comment.onChanged(), PathScripts.PathDressupAxisMap.ObjectDressup.onChanged(), PathScripts.PathDressupRampEntry.ObjectDressup.onChanged(), PathScripts.PathJob.ObjectJob.onChanged(), PathScripts.PathOp.ObjectOp.onChanged(), PathScripts.PathSlot.ObjectSlot.onChanged(), PathScripts.PathStock.StockFromBase.onChanged(), PathScripts.PathStock.StockCreateBox.onChanged(), PathScripts.PathStock.StockCreateCylinder.onChanged(), PathScripts.PathStop.Stop.onChanged(), PathScripts.PathSurface.ObjectSurface.onChanged(), PathScripts.PathToolBit.ToolBit.onChanged(), PathScripts.PathWaterline.ObjectWaterline.onChanged(), Spreadsheet_legacy.SpreadsheetController.onChanged(), Spreadsheet_legacy.SpreadsheetPropertyController.onChanged(), Texture.ViewProviderTexture.onChanged(), DocumentObject.DocumentObject.onChanged(), ArchAxis._ViewProviderAxis.onChanged(), ArchAxisSystem._ViewProviderAxisSystem.onChanged(), ArchBuildingPart.ViewProviderBuildingPart.onChanged(), ArchComponent.ViewProviderComponent.onChanged(), ArchCurtainWall.ViewProviderCurtainWall.onChanged(), ArchFence._ViewProviderFence.onChanged(), ArchMaterial._ViewProviderArchMaterial.onChanged(), ArchPanel.ViewProviderPanelCut.onChanged(), ArchPanel.ViewProviderPanelSheet.onChanged(), ArchRebar._ViewProviderRebar.onChanged(), ArchReference.ViewProviderArchReference.onChanged(), ArchSectionPlane._ViewProviderSectionPlane.onChanged(), ArchSite._ViewProviderSite.onChanged(), ArchSpace._ViewProviderSpace.onChanged(), ArchStructure._ViewProviderStructure.onChanged(), ArchWindow._ViewProviderWindow.onChanged(), draftviewproviders.view_base.ViewProviderDraft.onChanged(), draftviewproviders.view_dimension.ViewProviderDimensionBase.onChanged(), draftviewproviders.view_dimension.ViewProviderLinearDimension.onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension.onChanged(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.onChanged(), draftviewproviders.view_label.ViewProviderLabel.onChanged(), draftviewproviders.view_layer.ViewProviderLayer.onChanged(), draftviewproviders.view_point.ViewProviderPoint.onChanged(), draftviewproviders.view_text.ViewProviderText.onChanged(), draftviewproviders.view_wire.ViewProviderWire.onChanged(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.onChanged(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.onChanged(), PathScripts.PathComment._ViewProviderComment.onChanged(), PathScripts.PathFixture._ViewProviderFixture.onChanged(), PathScripts.PathPlane._ViewProviderPlane.onChanged(), PathScripts.PathStop._ViewProviderStop.onChanged(), PathScripts.PathToolControllerGui.ViewProvider.onChanged(), OpenSCADFeatures.ViewProviderTree.onChanged(), Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.onChanged(), FeaturePython.ViewProviderBox.onChanged(), FeaturePython.ViewProviderOctahedron.onChanged(), FeaturePython.ViewProviderPoints.onChanged(), draftviewproviders.view_base.ViewProviderDraft.texcoords, ifc4.ifcindexedtexturemap.texcoords, draftviewproviders.view_base.ViewProviderDraft.texture, and ImageGui::ViewProviderImagePlane.texture.

◆ claimChildren()

def draftviewproviders.view_base.ViewProviderDraft.claimChildren (   self)
Return objects that will be placed under it in the tree view.

Override this method to return a list with objects
that will appear under this object in the tree view.
That is, this object becomes the `parent`,
and all those under it are the `children`.

By default the returned list is composed of objects from
`Object.Base`, `Object.Objects`, `Object.Components`,
and `Object.Group`, if they exist.

Returns
-------
list
    List of objects.

Reimplemented in draftviewproviders.view_base.ViewProviderDraftAlt, draftviewproviders.view_draftlink.ViewProviderDraftLink, and draftviewproviders.view_wire.ViewProviderWire.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by femviewprovider.view_mesh_gmsh.VPMeshGmsh.onDelete(), femviewprovider.view_result_mechanical.VPResultMechanical.onDelete(), BOPTools.JoinFeatures.ViewProviderConnect.onDelete(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.onDelete(), BOPTools.SplitFeatures.ViewProviderSlice.onDelete(), and BOPTools.SplitFeatures.ViewProviderXOR.onDelete().

◆ execute()

◆ getDefaultDisplayMode()

def draftviewproviders.view_base.ViewProviderDraft.getDefaultDisplayMode (   self)
Return the default mode defined in getDisplayModes.

Override this method to return a string with the default display mode.

By default it returns `'Flat Lines'`.

Returns
-------
str
    `'Flat Lines'`

◆ getDisplayModes()

def draftviewproviders.view_base.ViewProviderDraft.getDisplayModes (   self,
  vobj 
)
Return a list of display modes.

Override this method to return a list of strings with
display mode styles, such as `'Flat Lines'`, `'Shaded'`,
`'Wireframe'`, `'Points'`.

By default it returns an empty list.

Parameters
----------
vobj : the view provider of the scripted object.
    This is `obj.ViewObject`.

Returns
-------
list
    Empty list `[ ]`

◆ getIcon()

def draftviewproviders.view_base.ViewProviderDraft.getIcon (   self)
Return the path to the icon used by the view provider.

The path can be a full path in the system, or a relative path
inside the compiled resource file.
It can also be a string that defines the icon in XPM format.

Override this method to provide a specific icon
for the object in the tree view.

By default it returns the path to the `Draft_Draft.svg` icon.

Returns
-------
str
    `':/icons/Draft_Draft.svg'`

Reimplemented in draftviewproviders.view_array.ViewProviderDraftArray, draftviewproviders.view_base.ViewProviderDraftPart, draftviewproviders.view_circulararray.ViewProviderCircularArray, draftviewproviders.view_draftlink.ViewProviderDraftLink, draftviewproviders.view_facebinder.ViewProviderFacebinder, draftviewproviders.view_orthoarray.ViewProviderOrthoArray, draftviewproviders.view_point.ViewProviderPoint, draftviewproviders.view_polararray.ViewProviderPolarArray, and draftviewproviders.view_shapestring.ViewProviderShapeString.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), and Mod.Test.Document.DocumentBasicCases.Object.

Referenced by ArchAxisSystem.AxisSystemTaskPanel.update(), ArchComponent.ComponentTaskPanel.update(), and ArchSectionPlane.SectionPlaneTaskPanel.update().

◆ onChanged()

def draftviewproviders.view_base.ViewProviderDraft.onChanged (   self,
  vobj,
  prop 
)
Run when a view property is changed.

Override this method to handle the behavior
of the view provider depending on changes that occur to its properties
such as line color, line width, point color, point size,
draw style, shape color, transparency, and others.

This method  updates the texture and pattern if
the properties `TextureImage`, `Pattern`, `DiffuseColor`,
and `PatternSize` change.

Parameters
----------
vobj : the view provider of the scripted object.
    This is `obj.ViewObject`.

prop : str
    Name of the property that was modified.

Reimplemented in draftviewproviders.view_point.ViewProviderPoint, and draftviewproviders.view_wire.ViewProviderWire.

References Base::XMLReader::FileEntry.Object, Base::Writer::FileEntry.Object, Py::Object.Object(), Gui::SelectionChanges.Object, ArchBuildingPart.ViewProviderBuildingPart.Object, ArchComponent.ViewProviderComponent.Object, ArchEquipment._ViewProviderEquipment.Object, ArchFloor._Floor.Object, ArchFloor._ViewProviderFloor.Object, ArchMaterial._ViewProviderArchMaterialContainer.Object, ArchMaterial._ViewProviderArchMaterial.Object, ArchReference.ViewProviderArchReference.Object, ArchRoof._ViewProviderRoof.Object, ArchSchedule._ViewProviderArchSchedule.Object, ArchSectionPlane._ViewProviderSectionPlane.Object, ArchSite._ViewProviderSite.Object, ArchSpace._ViewProviderSpace.Object, ArchStructure.StructureTaskPanel.Object, ArchWall._ViewProviderWall.Object, draftobjects.layer.Layer.Object, draftviewproviders.view_base.ViewProviderDraft.Object, draftviewproviders.view_dimension.ViewProviderDimensionBase.Object, draftviewproviders.view_dimension.ViewProviderLinearDimension.Object, draftviewproviders.view_dimension.ViewProviderAngularDimension.Object, draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.Object, draftviewproviders.view_label.ViewProviderLabel.Object, draftviewproviders.view_layer.ViewProviderLayer.Object, draftviewproviders.view_layer.ViewProviderLayerContainer.Object, draftviewproviders.view_text.ViewProviderText.Object, draftviewproviders.view_wire.ViewProviderWire.Object, draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.Object, femviewprovider.view_base_femconstraint.VPBaseFemConstraint.Object, femviewprovider.view_base_femobject.VPBaseFemObject.Object, femviewprovider.view_mesh_gmsh.VPMeshGmsh.Object, OpenSCADFeatures.ViewProviderTree.Object, BOPTools.JoinFeatures.ViewProviderConnect.Object, BOPTools.JoinFeatures.ViewProviderEmbed.Object, BOPTools.JoinFeatures.ViewProviderCutout.Object, BOPTools.SplitFeatures.ViewProviderBooleanFragments.Object, BOPTools.SplitFeatures.ViewProviderSlice.Object, BOPTools.SplitFeatures.ViewProviderXOR.Object, CompoundTools.CompoundFilter._ViewProviderCompoundFilter.Object, JoinFeatures._ViewProviderPartJoinFeature.Object, Mod.PartDesign.FeatureHole.ViewProviderHole.ViewProviderHole.Object, Mod.PartDesign.InvoluteGearFeature._ViewProviderInvoluteGear.Object, Mod.PartDesign.SprocketFeature.ViewProviderSprocket.Object, PathScripts.PathArray.ViewProviderArray.Object, PathScripts.PathCollision._ViewProviderCollisionSim.Object, PathScripts.PathCopy.ViewProviderPathCopy.Object, PathScripts.PathDressupDragknife.ViewProviderDressup.Object, PathScripts.PathHop.ViewProviderPathHop.Object, PathScripts.PathOpGui.ViewProvider.Object, Mod.Show.Containers.Container.Object, Spreadsheet_legacy.Spreadsheet.Object, Spreadsheet_legacy.ViewProviderSpreadsheet.Object, DocumentObject.ViewProvider.Object(), Mod.Test.Document.DocumentBasicCases.Object, draftviewproviders.view_base.ViewProviderDraft.texcoords, ifc4.ifcindexedtexturemap.texcoords, draftviewproviders.view_base.ViewProviderDraft.texture, and ImageGui::ViewProviderImagePlane.texture.

Referenced by ArchStructure.CommandStructuralSystem.Activated(), draftviewproviders.view_base.ViewProviderDraft.attach(), ArchSite.Compass.buildCoordinates(), draftobjects.wire.Wire.execute(), ArchBuildingPart.ViewProviderBuildingPart.updateData(), ArchPanel.ViewProviderPanelCut.updateData(), ArchPanel.ViewProviderPanelSheet.updateData(), draftviewproviders.view_label.ViewProviderLabel.updateData(), draftviewproviders.view_layer.ViewProviderLayer.updateData(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.updateData().

◆ setDisplayMode()

def draftviewproviders.view_base.ViewProviderDraft.setDisplayMode (   self,
  mode 
)
Map the modes defined in attach with those in getDisplayModes.

This method is optional.

By default since they have the same names nothing needs to be done,
and it just returns the input `mode`.

Parameters
----------
str
    A string defining a display mode such as
    `'Flat Lines'`, `'Shaded'`, `'Wireframe'`, `'Points'`.

◆ setEdit()

def draftviewproviders.view_base.ViewProviderDraft.setEdit (   self,
  vobj,
  mode = 0 
)
Enter edit mode of the object.

Override this method to define a custom command to run when entering
the edit mode of the object in the tree view.
It must return `True` to successfully enter edit mode.
If the conditions to edit are not met, it should return `False`,
in which case the edit mode is not started.

By default it runs the `Draft_Edit` GuiCommand.
::
    Gui.runCommand('Draft_Edit')

Parameters
----------
vobj : the view provider of the scripted object.
    This is `obj.ViewObject`.

mode : int, optional
    It defaults to 0, in which case
    it runs the `Draft_Edit` GuiCommand.
    It indicates the type of edit in the underlying C++ code.

Returns
-------
bool or None
    It is `True` if `mode` is 0, and `Draft_Edit` ran successfully.
    None if mode is not zero.
    It is `False` otherwise.

Reimplemented in draftviewproviders.view_facebinder.ViewProviderFacebinder, and draftviewproviders.view_shapestring.ViewProviderShapeString.

References draftutils.translate.QT_TRANSLATE_NOOP.

Referenced by ArchGrid.ViewProviderArchGrid.doubleClicked(), ArchReference.ViewProviderArchReference.doubleClicked(), draftviewproviders.view_dimension.ViewProviderDimensionBase.doubleClicked(), draftviewproviders.view_hatch.ViewProviderDraftHatch.doubleClicked(), draftviewproviders.view_text.ViewProviderText.doubleClicked(), PathScripts.PathPropertyBagGui.ViewProvider.doubleClicked(), PathScripts.PathSetupSheetGui.ViewProvider.doubleClicked(), PathScripts.PathToolBitGui.ViewProvider.doubleClicked(), Spreadsheet_legacy.ViewProviderSpreadsheet.doubleClicked(), ArchSchedule.CommandArchSchedule.IsActive(), PathScripts.PathIconViewProvider.ViewProvider.setupContextMenu(), PathScripts.PathJobGui.ViewProvider.setupContextMenu(), PathScripts.PathOpGui.ViewProvider.setupContextMenu(), and PathScripts.PathToolControllerGui.ViewProvider.setupContextMenu().

◆ unsetEdit()

def draftviewproviders.view_base.ViewProviderDraft.unsetEdit (   self,
  vobj,
  mode = 0 
)
Terminate the edit mode of the object.

Override this method to define a custom command to run when
terminating the edit mode of the object in the tree view.

It should return `True` to indicate that the method already
cleaned up everything and there is no need to call
the `usetEdit` method of the base class.
It should return `False` to indicate that cleanup
is still required, so the `unsetEdit` method of the base class
is invoked to do the rest.

By default it runs the `finish` method of the active
Draft GuiCommand, and closes the task panel.
::
    App.activeDraftCommand.finish()
    Gui.Control.closeDialog()

Parameters
----------
vobj : the view provider of the scripted object.
    This is `obj.ViewObject`.

mode : int, optional
    It defaults to 0.
    It indicates the type of edit in the underlying C++ code.

Returns
-------
bool
    This method always returns `False` so it passes
    control to the base class to finish the edit mode.

Reimplemented in draftviewproviders.view_facebinder.ViewProviderFacebinder, and draftviewproviders.view_shapestring.ViewProviderShapeString.

Referenced by PathScripts.PathJobGui.ViewProvider.uneditObject().

◆ updateData()

def draftviewproviders.view_base.ViewProviderDraft.updateData (   self,
  obj,
  prop 
)
Run when an object property is changed.

Override this method to handle the behavior of the view provider
depending on changes that occur to the real object's properties.

By default, no property is tested, and it does nothing.

Parameters
----------
obj : the base C++ object
    The scripted document object that is associated
    with this view provider, which commonly may be of types
    `Part::Part2DObjectPython`, `Part::FeaturePython`,
    or `App::FeaturePython`.

prop : str
    Name of the property that was modified.

Reimplemented in draftviewproviders.view_wire.ViewProviderWire.

Referenced by ArchStructure.CommandStructuralSystem.Activated(), PathScripts.PathJobDlg.JobCreate.exec_(), draftviewproviders.view_dimension.ViewProviderLinearDimension.onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension.onChanged(), draftviewproviders.view_wire.ViewProviderWire.onChanged(), PathScripts.PathOpGui.TaskPanelPage.pageUpdateData(), PathScripts.PathPropertyBagGui.TaskPanel.setupUi(), and PathScripts.PathSetupSheetGui.OpTaskPanel.setupUi().

Member Data Documentation

◆ Object

draftviewproviders.view_base.ViewProviderDraft.Object

Referenced by draftviewproviders.view_layer.ViewProviderLayer.activate(), ArchPanel.CommandPanelSheet.Activated(), ArchStructure.CommandStructuralSystem.Activated(), OpenSCADFeatures.ViewProviderTree.attach(), ArchComponent.ViewProviderComponent.attach(), draftviewproviders.view_base.ViewProviderDraft.attach(), draftviewproviders.view_dimension.ViewProviderLinearDimension.attach(), draftviewproviders.view_dimension.ViewProviderAngularDimension.attach(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.attach(), draftviewproviders.view_layer.ViewProviderLayer.attach(), draftviewproviders.view_layer.ViewProviderLayerContainer.attach(), PathScripts.PathArray.ViewProviderArray.attach(), PathScripts.PathCopy.ViewProviderPathCopy.attach(), PathScripts.PathDressupDragknife.ViewProviderDressup.attach(), PathScripts.PathHop.ViewProviderPathHop.attach(), PathScripts.PathOpGui.ViewProvider.attach(), ArchSite.Compass.buildCoordinates(), ArchReference.ViewProviderArchReference.checkChanges(), ArchComponent.ViewProviderComponent.claimChildren(), draftviewproviders.view_base.ViewProviderDraft.claimChildren(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.claimChildren(), draftviewproviders.view_draftlink.ViewProviderDraftLink.claimChildren(), draftviewproviders.view_layer.ViewProviderLayer.claimChildren(), draftviewproviders.view_wire.ViewProviderWire.claimChildren(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.claimChildren(), femviewprovider.view_result_mechanical.VPResultMechanical.claimChildren(), OpenSCADFeatures.ViewProviderTree.claimChildren(), BOPTools.JoinFeatures.ViewProviderConnect.claimChildren(), BOPTools.JoinFeatures.ViewProviderEmbed.claimChildren(), BOPTools.JoinFeatures.ViewProviderCutout.claimChildren(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.claimChildren(), BOPTools.SplitFeatures.ViewProviderSlice.claimChildren(), BOPTools.SplitFeatures.ViewProviderXOR.claimChildren(), PathScripts.PathArray.ViewProviderArray.claimChildren(), PathScripts.PathDressupDragknife.ViewProviderDressup.claimChildren(), Spreadsheet_legacy.ViewProviderSpreadsheet.claimChildren(), PathScripts.PathOpGui.ViewProvider.clearTaskPanel(), ArchBuildingPart.ViewProviderBuildingPart.cloneUp(), ArchStructure.StructureTaskPanel.connectNodes(), ArchBuildingPart.ViewProviderBuildingPart.createGroup(), draftviewproviders.view_text.ViewProviderText.createObject(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.doubleClicked(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.dragObject(), BOPTools.JoinFeatures.ViewProviderConnect.dragObject(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.dragObject(), BOPTools.SplitFeatures.ViewProviderXOR.dragObject(), femviewprovider.view_mesh_gmsh.VPMeshGmsh.dropObject(), BOPTools.JoinFeatures.ViewProviderConnect.dropObject(), BOPTools.SplitFeatures.ViewProviderBooleanFragments.dropObject(), BOPTools.SplitFeatures.ViewProviderXOR.dropObject(), ArchStructure.StructureTaskPanel.extendNodes(), draftviewproviders.view_wire.ViewProviderWire.flatten(), Mod.Show.Containers.Container.getCSChildren(), Mod.Show.Containers.Container.getDynamicChildren(), ArchBuildingPart.ViewProviderBuildingPart.getIcon(), ArchComponent.ViewProviderComponent.getIcon(), draftviewproviders.view_array.ViewProviderDraftArray.getIcon(), draftviewproviders.view_base.ViewProviderDraft.getIcon(), draftviewproviders.view_dimension.ViewProviderDimensionBase.getIcon(), draftviewproviders.view_draftlink.ViewProviderDraftLink.getIcon(), femviewprovider.view_base_femobject.VPBaseFemObject.getIcon(), femviewprovider.view_material_common.VPMaterialCommon.getIcon(), OpenSCADFeatures.ViewProviderTree.getIcon(), PathScripts.PathOpGui.ViewProvider.getIcon(), Mod.Show.Containers.Container.getStaticChildren(), Mod.Show.Containers.Container.getVisGroupChildren(), Mod.Show.Containers.Container.hasObjectRecursive(), draftviewproviders.view_dimension.ViewProviderLinearDimension.is_linked_to_circle(), Mod.Show.Containers.Container.isACS(), ArchSchedule.CommandArchSchedule.IsActive(), Mod.Show.Containers.Container.isAVisGroup(), Mod.Show.Containers.Container.isChildVisible(), draftviewproviders.view_layer.ViewProviderLayerContainer.merge_by_name(), draftviewproviders.view_base.ViewProviderDraft.onChanged(), BOPTools.JoinFeatures.ViewProviderEmbed.onDelete(), BOPTools.JoinFeatures.ViewProviderCutout.onDelete(), ArchReference.ViewProviderArchReference.onOpen(), ArchReference.ViewProviderArchReference.onReload(), ArchBuildingPart.ViewProviderBuildingPart.reorder(), ArchStructure.StructureTaskPanel.resetNodes(), draftviewproviders.view_layer.ViewProviderLayer.select_contents(), Mod.Show.Containers.Container.self_check(), ArchComponent.ViewProviderComponent.setDisplayMode(), ArchComponent.ViewProviderComponent.setEdit(), Mod.PartDesign.SprocketFeature.ViewProviderSprocket.setEdit(), ArchStructure.StructureTaskPanel.setSelectionFromTool(), ArchStructure.StructureTaskPanel.setToolFromSelection(), PathScripts.PathOpGui.ViewProvider.setupTaskPanel(), ArchBuildingPart.ViewProviderBuildingPart.setWorkingPlane(), femviewprovider.view_result_mechanical.VPResultMechanical.unsetEdit(), ArchBuildingPart.ViewProviderBuildingPart.writeCamera(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.writeCamera(), ArchBuildingPart.ViewProviderBuildingPart.writeInventor(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.writeState().

◆ texcoords

◆ texture

draftviewproviders.view_base.ViewProviderDraft.texture

The documentation for this class was generated from the following file: