1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
8
Include="Gui/ViewProviderLink.h"
10
FatherInclude="Base/BaseClass.h"
11
FatherNamespace="Base"
15
<Author Licence="LGPL" Name="Zheng, Lei" EMail="realthunder.dev@gmail.com" />
16
<UserDocu>Helper class to link to a view object</UserDocu>
18
<Methode Name="reset">
20
<UserDocu>Reset the link view and clear the links</UserDocu>
23
<Methode Name="setMaterial">
26
setMaterial(Material): set the override material of the entire linked object
28
setMaterial([Material,...]): set the materials for the elements of the link
31
setMaterial({Int:Material,...}): set the material for the elements of the
32
link array/group by index.
34
If material is None, then the material is unset. If the material of an element
35
is unset, it defaults to the override material of the linked object, if there
40
<Methode Name="setType">
43
setType(type, sublink=True): set the link type.
45
type=0: override transformation and visibility
46
type=1: override visibility
48
type=-1: sub-object link with override visibility
49
type=-2: sub-object link with override transformation and visibility
51
sublink: auto delegate to the sub-object references in the link, if there is
56
<Methode Name="setTransform">
59
setTransform(matrix): set transformation of the linked object
61
setTransform([matrix,...]): set transformation for the elements of the link
64
setTransform({index:matrix,...}): set transformation for elements of the link
69
<Methode Name="setChildren">
72
setChildren([obj...],vis=[],type=0)
73
Group a list of children objects. Note, this mode of operation is incompatible
74
with link array. Calling this function will deactivate link array. And calling
75
setSize() will reset all linked children.
77
vis: initial visibility status of the children
79
type: children linking type,
80
0: override transformation and visibility,
81
1: override visibility,
86
<Methode Name="setLink">
89
setLink(object): Set the link
91
setLink(object, subname): Set the link with a sub-object reference
93
setLink(object, [subname,...]): Set the link with a list of sub object references
95
object: The linked document object or its view object
97
subname: a string or tuple/list of strings sub-name references to sub object
98
or sub elements (e.g. Face1, Edge2) belonging to the linked object.
99
The sub-name must end with a '.' if it is referencing an sub-object,
100
or else it is considered a sub-element reference.
104
<Methode Name="getDetailPath">
107
getDetailPath(element): get the 3d path an detail of an element.
109
Return a tuple(path,detail) for the coin3D SoPath and SoDetail of the element
113
<Methode Name="getElementPicked">
115
<UserDocu>getElementPicked(pickPoint): get the element under a 3d pick point. </UserDocu>
118
<Methode Name="getBoundBox">
120
<UserDocu>getBoundBox(vobj=None): get the bounding box. </UserDocu>
123
<Attribute Name="LinkedView" ReadOnly="true">
125
<UserDocu>The linked view object</UserDocu>
127
<Parameter Name="LinkedView" Type="Object" />
129
<Attribute Name="SubNames" ReadOnly="true">
131
<UserDocu>The sub-object reference of the link</UserDocu>
133
<Parameter Name="SubNames" Type="Object" />
135
<Attribute Name="RootNode" ReadOnly="true">
137
<UserDocu>A pivy node holding the cloned representation of the linked view object</UserDocu>
139
<Parameter Name="RootNode" Type="Object" />
141
<Attribute Name="Owner">
143
<UserDocu>The owner view object of this link handle</UserDocu>
145
<Parameter Name="Owner" Type="Object" />
147
<Attribute Name="Visibilities">
149
<UserDocu>Get/set the child element visibility</UserDocu>
151
<Parameter Name="Visibilities" Type="Object" />
153
<Attribute Name="Count">
155
<UserDocu>Set the element size to create an array of linked object</UserDocu>
157
<Parameter Name="Count" Type="Int" />
159
<Methode Name="getChildren" Const="true">
161
<UserDocu>Get children view objects</UserDocu>