[los-cocos] r1216 committed - fix #184, BatchNode now honors the visible flag, patch by corentinglon...

6 views
Skip to first unread message

codesite...@google.com

unread,
Aug 12, 2012, 12:26:40 AM8/12/12
to cocos-...@googlegroups.com
Revision: 1216
Author: ccanepacc
Date: Sat Aug 11 21:26:26 2012
Log: fix #184, BatchNode now honors the visible flag, patch by
corent...@gmail.com
http://code.google.com/p/los-cocos/source/detail?r=1216

Modified:
/trunk/CHANGELOG
/trunk/cocos/batch.py
/trunk/cocos/cocosnode.py

=======================================
--- /trunk/CHANGELOG Wed Jul 11 05:28:00 2012
+++ /trunk/CHANGELOG Sat Aug 11 21:26:26 2012
@@ -1,4 +1,5 @@
v0.6dev
+ - fix issue 184, BatchNode not honoring the visible flag, patch by
corent...@gmail.com
- particles work even if gl point sprites not available, issue 178
- fix issue 162, grid transitions ending with wrong projection /
modelview matrices
- fix issue 164, ZoomTransition misbehaves with some hardware
=======================================
--- /trunk/cocos/batch.py Mon Jun 11 04:39:24 2012
+++ /trunk/cocos/batch.py Sat Aug 11 21:26:26 2012
@@ -55,7 +55,7 @@

def ensure_batcheable(node):
if not isinstance(node, BatchableNode):
- raise Exception("Children node of a batch must be have the batch
mixin")
+ raise Exception("Children node of a batch must be of class
BatchableNode")
for c in node.get_children():
ensure_batcheable(c)

@@ -72,6 +72,8 @@

def visit(self):
""" All children are placed in to self.batch, so nothing to
visit """
+ if not self.visible:
+ return
glPushMatrix()
self.transform()
self.batch.draw()
=======================================
--- /trunk/cocos/cocosnode.py Mon Jun 11 04:39:24 2012
+++ /trunk/cocos/cocosnode.py Sat Aug 11 21:26:26 2012
@@ -122,7 +122,7 @@
#: Default: 0
self.transform_anchor_y = 0

- #: whether of not the object is visible.
+ #: whether of not the object and his childrens are visible.
#: Default: True
self.visible = True

Reply all
Reply to author
Forward
0 new messages