Modifieng a generator Object

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 30/06/2011 at 08:14, xxxxxxxx wrote:

Hi,

I want to modify a generator object, a cube for instance.
I can modify It's cache, this will work in the editor, but not in in the renderer.
Also, using a cube and modifieng the cube's points, it seem's like the cubes cache isn't rebuilt before I modify it, so I modify the cubes already modifed points.

This is the code i was giving a try on a Python generator:

import      c4d  
from        random      import random  
  
  
def main() :  
  dwn     = op.GetDown()  
  if not dwn:  
      return  
  
  dwn     = dwn.GetCache()  
  if not dwn:  
      return  
  
  for i in xrange(dwn.GetPointCount()) :  
      dwn.SetPoint(i, dwn.GetPoint(i) * 2)  
  
  dwn.Message(c4d.MSG_UPDATE)  
  dwn.Touch()

*squint to Sebastion :smile:* ..
Can anyone tell me how to do what I'm trying to achive ?

Thanks very much !
Niklas

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 30/06/2011 at 12:10, xxxxxxxx wrote:

hey nux, your script seems to work every time i click "force update" button within the c4d python gen. which is wierd because it seems like you have update commands in there. weird.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 30/06/2011 at 13:27, xxxxxxxx wrote:

Hm, what's weird ?
It's weird that it grows every time ! And that it does not take effect when rendering. :(

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 01/07/2011 at 00:53, xxxxxxxx wrote:

maybe try to base your script on the frame number so it updates during rendering as well.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 01/07/2011 at 08:03, xxxxxxxx wrote:

that is not the problem.
I want to know how to modify the cache while rendering.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 01/07/2011 at 15:37, xxxxxxxx wrote:

oh, i thought your problem was that you couldnt acess the cache while rendering because it was not updating. I was saying try to base your script so that it utilizes the frame number in some way, so that way it has to update every time there is a frame change. maybe this will not help you though.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 02/07/2011 at 00:00, xxxxxxxx wrote:

Thanks anyway
Yes, it is updating, but I can't access the Cache. :(
(if it wasn't updating, wouldn't it be completely useless ?)

Thanks,
Niklas

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 07/07/2011 at 06:58, xxxxxxxx wrote:

push