Distributing class instance indices
On 01/05/2015 at 05:41, xxxxxxxx wrote:
Just for the sake of clarity another thread...
Is it possible to set a range of hexadecimal indices for class instances and distribute respectively overwrite the content myself?
Thanks for any help in advance
On 04/05/2015 at 01:39, xxxxxxxx wrote:
I'm afraid you need to give us some more info. Even after discussing with Sebastian, we have no idea, what you are after. Sorry.
On 04/05/2015 at 03:05, xxxxxxxx wrote:
I´m not quite sure if I understand the class-index concept the right way.
Cinema4d builds an index for every object instance and I thought about accessing these instances through this index.
For example, when my plugin becomes active, it occupies a set of indices in c4d which I can assign to several types of subclasses. For example, every conifer type subclass instance has an index with a 4000 in it, every broadleaf with 400 and so on.
Later on I want to access the types by calling indices.
On 04/05/2015 at 17:23, xxxxxxxx wrote:
Andreas is away at FMX this week, so I'm filling in on this topic. I have a rough idea what you're asking about, but could you please post some example code that accesses the data you're discussing? It would probably give me a clue as to where to search in the code to give you a solid answer.
SDK Support Engineer
On 05/05/2015 at 03:11, xxxxxxxx wrote:
thanks for your help!
To keep it simple, I wrote a small pseudo code.
At the validation point inside the Plant class c4d assigns a hexadecimal index to the instances.
I want to assign those indices by myself according to their position in space, age and other attributes,
in order to store them in a hyperfile.
Later on I want to access the hyperfile and modify the Instances.
For example bend them if the wind is blowing from the west, that the "west plants" are more influenced.
Hope you can catch the drift?
Please let me know if you need more information.
Thanks in advance
Pseudocode plant distribution:
def init: with plant specific attributes(e.g. index, is valid, place to be, next possible places[npp])
def TestSpace() :
return if plant is placed or not valid
testing the next possible places to live in
for next possible places:
if place is valid:
place actual plant
built Plantclass instances for next possible places
instance.TestSpace() #recursively call
placedplants = 
def init: with calling TestSpace from a certain start point plant.
with calling Collect(start point plant)
def Collect(self,spp) :
if plant is placed:
for n in spp.npp:
if n != None:
On 11/05/2015 at 09:06, xxxxxxxx wrote:
this makes me feel bad... I (or actually we, as we discussed this in our team) still don't get it. For example I'm not sure, where Plantclass gets derived from and who's calling init... I'm not aware of a situation, where C4D assigns any indeces. But this may be due to a lack of knowledge on my side.
If it makes it easier in any way, you may also contact e via PM in German. We can then wrap this up for the forum community in the end.
On 11/05/2015 at 12:48, xxxxxxxx wrote:
thanks for caring.
I´ll send a PM after my holidays.