Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-05-23 21:11:44 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-05-23 21:11:44 +0400
commit96e79172a010cba6bc826f570832ef4b355ea0cd (patch)
tree5e7bee49170faff126fa52d8fd389642876e4021 /source/blender/freestyle/intern/view_map/ViewMap.h
parent2212564f1804e3cc866003b226eac89575d53ade (diff)
Made object names accessible from within style modules.
ViewShape objects in the view map, as well as SShape objects that can be retrieved with ViewShape::sshape(), now have a getName() method that returns the name of the object from which each shape is created. For instance, visible feature edges of specific mesh objects (e.g., Cube.001 and Cube.002) can be selected using custom predicate ObjectNamesUP1D as follows: class ObjectNamesUP1D(UnaryPredicate1D): def __init__(self, names): UnaryPredicate1D.__init__(self) self._names = names def getName(self): return "ObjectNamesUP1D" def __call__(self, viewEdge): return viewEdge.viewShape().getName() in self._names upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ObjectNamesUP1D(["Cube.001", "Cube.002"])) Operators.select(upred)
Diffstat (limited to 'source/blender/freestyle/intern/view_map/ViewMap.h')
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index 5a9d8f3b57b..623348b61a7 100755
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -1252,6 +1252,8 @@ public:
inline vector<ViewEdge*>& edges() {return _Edges;}
/*! Returns the ViewShape id. */
inline Id getId() const {return _SShape->getId();}
+ /*! Returns the ViewShape id. */
+ inline const string& getName() const {return _SShape->getName();}
/* modifiers */
/*! Sets the SShape on top of which the ViewShape is built. */