← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2454: 1. Do not return Attr::hidden attributes in dict(); that makes them invisible in the UI as well.

 

------------------------------------------------------------
revno: 2454
committer: Chiara Modenese <chia@engs-018373>
branch nick: yade
timestamp: Thu 2010-09-30 20:30:57 +0100
message:
  1. Do not return Attr::hidden attributes in dict(); that makes them invisible in the UI as well.
modified:
  lib/serialization/Serializable.hpp
  pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'lib/serialization/Serializable.hpp'
--- lib/serialization/Serializable.hpp	2010-09-23 09:17:40 +0000
+++ lib/serialization/Serializable.hpp	2010-09-30 19:30:57 +0000
@@ -138,7 +138,7 @@
 #define _PYSET_ATTR(x,y,z) if(key==_ATTR_NAM_STR(z)) { _ATTR_NAM(z)=boost::python::extract<typeof(_ATTR_NAM(z))>(value); return; }
 #define _PYKEYS_ATTR(x,y,z) ret.append(_ATTR_NAM_STR(z));
 #define _PYHASKEY_ATTR(x,y,z) if(key==_ATTR_NAM_STR(z)) return true;
-#define _PYDICT_ATTR(x,y,z) ret[_ATTR_NAM_STR(z)]=boost::python::object(_ATTR_NAM(z));
+#define _PYDICT_ATTR(x,y,z) if(!(_ATTR_FLG(z) & yade::Attr::hidden)) ret[_ATTR_NAM_STR(z)]=boost::python::object(_ATTR_NAM(z));
 #define _REGISTER_BOOST_ATTRIBUTES_REPEAT(x,y,z) if((_ATTR_FLG(z) & yade::Attr::noSave)==0) { ar & BOOST_SERIALIZATION_NVP(_ATTR_NAM(z)); }
 #define _REGISTER_BOOST_ATTRIBUTES(baseClass,attrs) \
 	friend class boost::serialization::access; \

=== modified file 'pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp'
--- pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp	2010-09-30 18:00:41 +0000
+++ pkg/dem/Engine/GlobalEngine/DomainLimiter.hpp	2010-09-30 19:30:57 +0000
@@ -29,7 +29,7 @@
 		((vector<int>,pathSteps,((void)"(constant step)",vector<int>(1,1)),Attr::triggerPostLoad,"Step number for corresponding values in :yref:`path<LawTester.path>`; if shorter than path, distance between last 2 values is used for the rest."))
 		((vector<int>,_pathT,,(Attr::readonly|Attr::noSave),"Time value corresponding to points on path, computed from *pathSteps*. Length is always the same as path."))
 		((vector<Vector3r>,_pathV,,(Attr::readonly|Attr::noSave),"Path values, computed from *path* by appending zero initial value."))
-		((shared_ptr<Interaction>,I,,,"Interaction object being tracked."))
+		((shared_ptr<Interaction>,I,,(Attr::hidden),"Interaction object being tracked."))
 		((Vector3r,axX,,,"Local x-axis in global coordinates (normal of the contact) |yupdate|"))
 		((Vector3r,axY,,,"Local y-axis in global coordinates; perpendicular to axX; initialized arbitrarily, but tracked to be consistent. |yupdate|"))
 		((Vector3r,axZ,,Attr::noSave,"Local z-axis in global coordinates; computed from axX and axY. |yupdate|"))