GetVirtualObjects - do not recreate objects



  • On 24/01/2013 at 07:57, xxxxxxxx wrote:

    Any chance to get a copy of the whole project? If you don't want to make the complete source code
    public, you could send a PM to with a download link and I'll try to catch out the issue.

    -Nik



  • On 24/01/2013 at 08:08, xxxxxxxx wrote:

    funny undo/ gui behaviour can be caused by a corrupted symbolcache. just delete the file and
    restart c4d. the file is located in the prefs folder.



  • On 24/01/2013 at 08:13, xxxxxxxx wrote:

    Niklas, no problem.
    [link removed]
    oh by the way, there are few sliders in GUI, but only one of them is hooked, it's SCALE slider. Just ignore other ones :)

    and thanks for taking a look at it.

    littledevil, that's interesting idea, will check it out. What should I be looking for in prefs folder?



  • On 24/01/2013 at 08:15, xxxxxxxx wrote:

    @Ferdinand: Huh, really? Never experience such an issue. May be due to the fact that I haven't run
    accross the symbolcache-issue often. :)

    Did you mean me with "cpt. capslock"? xD Dunno why the font is so big in my first post, seems to be
    some kind of bug in the chrome browser for android in combination with the rich-text editor...

    Best,
    -Nik



  • On 24/01/2013 at 08:18, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    littledevil, that's interesting idea, will check it out. What should I be looking for in prefs folder?

    well, a file called symbolcache :)



  • On 24/01/2013 at 08:25, xxxxxxxx wrote:

    never heard of symbolcache before:) But there's always a first time:)

    Any ways, I tried on different mac, and still getting save behavior. So my guess is it's not symbolcache related:) There's just some weird bug in my code (maybe) :)



  • On 24/01/2013 at 08:59, xxxxxxxx wrote:

    Hi Tomas,

    first, you can get the document your object is in using op.GetDocument(). It is possible that GVO
    is called, where the object it is called for, is not in the document currently being active (eg. when
    rendering).

    As for your "bug": I just realized it is not a bug. When you change the same attribute multiple
    times without any other action in between, an undo will reset it to the value it started with
    before you began modifieng it. Try it with some other object.

    I never really realized this behavior, maybe because it feels more "natural". This behavior is
    the same in R12 (just checked it), possibly even before this release.

    Best,
    Niklas



  • On 24/01/2013 at 09:09, xxxxxxxx wrote:

    interesting.
    I just noticed that if I have my undos the way I have them right now (see above), INIT function is called twice, but if I don't have StartUndo, AddUndo, EndUndo - then INIT is called only once.

    Does that make any sence?

    However, I am not really sure what you mean with your first statement:) (sorry, dummy here). You say it's better to use op.GetDocument() instead of doc = c4d.documents.GetActiveDocument(), right? I just want to be sure:)

    By the way, R12 and R13 does act the same. I just tested it aswell.



  • On 24/01/2013 at 09:21, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    I just noticed that if I have my undos the way I have them right now (see above), INIT function is called twice, but if I don't have StartUndo, AddUndo, EndUndo - then INIT is called only once.

    This is intended. When you create an undo for your object, Cinema creates a copy of it. And the copy
    must be initialized in some way, too, hm? :)

    Yes, using doc=op.GetDocument() is the correct way, the other is semantically wrong.

    -Niklas



  • On 24/01/2013 at 10:07, xxxxxxxx wrote:

    doc=op.GetDocument()
    

    check:)

    I want to stress undo weirdness once again. I just check hyper mega advanced plugin Py-DoubleCircle. While you move handles in viewport and change radius this way - undo works just fine. BUT is you enter numeric values to Radius in Object tab, then undo don't work (let's say it works but in a weir way)

    So maybe Niklas you ARE right. Maybe that's suppose to be like.

    Any ways, appreciate your input. I learned a lot today. Thank you.


Log in to reply