Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Etienne Schmitt
CGoGN
Commits
fc33bdaf
Commit
fc33bdaf
authored
Mar 06, 2013
by
Pierre Kraemer
Browse files
add fromUI refresh filter in surface deformation plugin
parent
b5555790
Changes
3
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/surfaceDeformation/include/surfaceDeformation.h
View file @
fc33bdaf
...
...
@@ -128,9 +128,9 @@ public slots:
void
mapLinked
(
MapHandlerGen
*
m
);
void
mapUnlinked
(
MapHandlerGen
*
m
);
void
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
);
void
changePositionAttribute
(
View
*
view
,
MapHandlerGen
*
map
,
VertexAttribute
<
PFP2
::
VEC3
>
attribute
);
void
changeVerticesSelectionMode
(
View
*
view
,
MapHandlerGen
*
map
,
SelectionMode
m
);
void
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
,
bool
fromUI
=
false
);
void
changePositionAttribute
(
View
*
view
,
MapHandlerGen
*
map
,
VertexAttribute
<
PFP2
::
VEC3
>
attribute
,
bool
fromUI
=
false
);
void
changeVerticesSelectionMode
(
View
*
view
,
MapHandlerGen
*
map
,
SelectionMode
m
,
bool
fromUI
=
false
);
void
matchDiffCoord
(
View
*
view
,
MapHandlerGen
*
map
);
void
asRigidAsPossible
(
View
*
view
,
MapHandlerGen
*
map
);
...
...
SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformation.cpp
View file @
fc33bdaf
...
...
@@ -441,7 +441,7 @@ void SurfaceDeformationPlugin::mapUnlinked(MapHandlerGen* m)
m_dockTab
->
refreshUI
(
params
);
}
void
SurfaceDeformationPlugin
::
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
)
void
SurfaceDeformationPlugin
::
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
,
bool
fromUI
)
{
ParameterSet
*
params
=
h_viewParams
[
view
];
...
...
@@ -458,11 +458,12 @@ void SurfaceDeformationPlugin::changeSelectedMap(View* view, MapHandlerGen* map)
selectionRadius
=
map
->
getBBdiagSize
()
/
50.0
;
}
m_dockTab
->
refreshUI
(
params
);
if
(
!
fromUI
)
m_dockTab
->
refreshUI
(
params
);
}
}
void
SurfaceDeformationPlugin
::
changePositionAttribute
(
View
*
view
,
MapHandlerGen
*
map
,
VertexAttribute
<
PFP2
::
VEC3
>
attribute
)
void
SurfaceDeformationPlugin
::
changePositionAttribute
(
View
*
view
,
MapHandlerGen
*
map
,
VertexAttribute
<
PFP2
::
VEC3
>
attribute
,
bool
fromUI
)
{
ParameterSet
*
params
=
h_viewParams
[
view
];
PerMapParameterSet
*
perMap
=
params
->
perMap
[
map
->
getName
()];
...
...
@@ -470,16 +471,22 @@ void SurfaceDeformationPlugin::changePositionAttribute(View* view, MapHandlerGen
perMap
->
initParameters
();
if
(
view
->
isCurrentView
())
m_dockTab
->
refreshUI
(
params
);
{
if
(
!
fromUI
)
m_dockTab
->
refreshUI
(
params
);
}
}
void
SurfaceDeformationPlugin
::
changeVerticesSelectionMode
(
View
*
view
,
MapHandlerGen
*
map
,
SelectionMode
m
)
void
SurfaceDeformationPlugin
::
changeVerticesSelectionMode
(
View
*
view
,
MapHandlerGen
*
map
,
SelectionMode
m
,
bool
fromUI
)
{
ParameterSet
*
params
=
h_viewParams
[
view
];
params
->
perMap
[
map
->
getName
()]
->
verticesSelectionMode
=
m
;
if
(
view
->
isCurrentView
())
m_dockTab
->
refreshUI
(
params
);
{
if
(
!
fromUI
)
m_dockTab
->
refreshUI
(
params
);
}
}
void
SurfaceDeformationPlugin
::
matchDiffCoord
(
View
*
view
,
MapHandlerGen
*
mh
)
...
...
SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp
View file @
fc33bdaf
...
...
@@ -75,7 +75,7 @@ void SurfaceDeformationDockTab::selectedMapChanged()
{
QList
<
QListWidgetItem
*>
currentItems
=
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
m_plugin
->
changeSelectedMap
(
m_window
->
getCurrentView
(),
m_window
->
getMap
(
currentItems
[
0
]
->
text
()));
m_plugin
->
changeSelectedMap
(
m_window
->
getCurrentView
(),
m_window
->
getMap
(
currentItems
[
0
]
->
text
())
,
true
);
}
}
...
...
@@ -85,7 +85,7 @@ void SurfaceDeformationDockTab::positionAttributeChanged(int index)
{
View
*
view
=
m_window
->
getCurrentView
();
MapHandlerGen
*
map
=
m_currentParams
->
selectedMap
;
m_plugin
->
changePositionAttribute
(
view
,
map
,
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
()));
m_plugin
->
changePositionAttribute
(
view
,
map
,
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
())
,
true
);
}
}
...
...
@@ -95,7 +95,7 @@ void SurfaceDeformationDockTab::selectLockedVertices(bool b)
{
View
*
view
=
m_window
->
getCurrentView
();
MapHandlerGen
*
map
=
m_currentParams
->
selectedMap
;
m_plugin
->
changeVerticesSelectionMode
(
view
,
map
,
LOCKED
);
m_plugin
->
changeVerticesSelectionMode
(
view
,
map
,
LOCKED
,
true
);
}
}
...
...
@@ -105,7 +105,7 @@ void SurfaceDeformationDockTab::selectHandleVertices(bool b)
{
View
*
view
=
m_window
->
getCurrentView
();
MapHandlerGen
*
map
=
m_currentParams
->
selectedMap
;
m_plugin
->
changeVerticesSelectionMode
(
view
,
map
,
HANDLE
);
m_plugin
->
changeVerticesSelectionMode
(
view
,
map
,
HANDLE
,
true
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment