From a2a7316d92082230b292e91a6fb579eef9d7c8d4 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 5 Aug 2016 22:21:43 +0900 Subject: Fix T48366: Freestyle will unnecessary exclude some linked objects. Group membership testing for including/excluding feature lines was not accounting for object names possibly further qualified by library file paths. Also fixed a few potential (but unlikely) references of uninitialized variables. A big thank to Bastien Montagne for the insight on the cause of the problem and how to fix it. --- source/blender/freestyle/intern/scene_graph/Rep.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/blender/freestyle/intern/scene_graph') diff --git a/source/blender/freestyle/intern/scene_graph/Rep.h b/source/blender/freestyle/intern/scene_graph/Rep.h index ce30dc92ff8..773eb2d3278 100644 --- a/source/blender/freestyle/intern/scene_graph/Rep.h +++ b/source/blender/freestyle/intern/scene_graph/Rep.h @@ -48,6 +48,8 @@ public: inline Rep() : BaseObject() { _Id = 0; + _Name = 0; + _LibraryPath = 0; _FrsMaterial = 0; } @@ -55,6 +57,7 @@ public: { _Id = iBrother._Id; _Name = iBrother._Name; + _LibraryPath = iBrother._LibraryPath; if (0 == iBrother._FrsMaterial) _FrsMaterial = 0; else @@ -68,6 +71,7 @@ public: std::swap(_BBox, ioOther._BBox); std::swap(_Id, ioOther._Id); std::swap(_Name, ioOther._Name); + std::swap(_LibraryPath, ioOther._LibraryPath); std::swap(_FrsMaterial, ioOther._FrsMaterial); } @@ -76,6 +80,7 @@ public: if (&iBrother != this) { _Id = iBrother._Id; _Name = iBrother._Name; + _LibraryPath = iBrother._LibraryPath; if (0 == iBrother._FrsMaterial) { _FrsMaterial = 0; } @@ -132,6 +137,11 @@ public: return _Name; } + inline const char *getLibraryPath() const + { + return _LibraryPath; + } + inline const FrsMaterial *frs_material() const { return _FrsMaterial; @@ -153,6 +163,11 @@ public: _Name = name; } + inline void setLibraryPath(const char *path) + { + _LibraryPath = path; + } + inline void setFrsMaterial(const FrsMaterial& iMaterial) { _FrsMaterial = new FrsMaterial(iMaterial); @@ -162,6 +177,7 @@ private: BBox _BBox; Id _Id; const char *_Name; + const char *_LibraryPath; FrsMaterial *_FrsMaterial; }; -- cgit v1.2.3