Forum

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Py4D - the official page » Py4D Developer Forum » Bug reports » InExcludeData bugs or i doing something wrong

Pages: [1]
This is the forum for the free Py4D plugin in CINEMA 4D R11.5.
Please visit the forum on PluginCafe to get support for Python in CINEMA 4D R12.
Author Topic: InExcludeData bugs or i doing something wrong
Nitroman
Member
Posts: 72
Post InExcludeData bugs or i doing something wrong
on: July 26, 2010, 15:07
Quote

hi i try use InExcludeData
but i don’t understand if i doing something wrong or is bug here

i test all function and only work

InExcludeData.GetObjectCount() -> give correct count
InExcludeData.DeleteObject(index) -> this work but remove all item not the index

go please see this
first make a null object
and add userdata -> InExcludeData
make a cone object this is item i want to add to list

exectute to see the problems here

from c4d import *
from c4d.documents import *
from c4d.utils import *
from c4d import symbols as sy
from c4d import utils
from math import *

CallCommand(1024314)#Clear console
doc = documents.GetActiveDocument()
op=doc.GetActiveObject()

op1=doc.SearchObject("Cone")
bl=op[sy.ID_USERDATA,1]
print "Count : "+str(bl.GetObjectCount())#Work fine return Count of object
print "Flag: " + str(bl.GetFlags(1))# i am not sure if this work
bl.DeleteObject(0)#doesn't work good remove all items not the index
bl.InsertObject(op1,0)#doesn't work no add any item
bl.ObjectFromIndex(doc,1)# return error
#TypeError: ObjectFromIndex() takes no arguments (2 given)
#but i see here use 2 arguments doc and object InExcludeData.ObjectFromIndex(doc, index)
op[sy.ID_USERDATA,1]=bl
EventAdd()

Thanks

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.3
Page loaded in: 0.033 seconds.
>