Basic PyGenerator plugin Please



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

    On 14/10/2011 at 17:18, xxxxxxxx wrote:

    Oh, the reason why I'm trying the Object Plugin way
    is that the setup is running using the Python Generator Object
    and it has the same issue that a returned spline is not seen
    by Cloners, AlignToSpline etc.



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

    On 15/10/2011 at 10:20, xxxxxxxx wrote:

    is it?
    put in PyGenerator and make editable

      
    import c4d  
    #Welcome to the world of Python  
      
    def main() :  
      spl = c4d.SplineObject(2,0)  
      spl.SetPoint(0,c4d.Vector(0.0))  
      spl.SetPoint(1,c4d.Vector(0.0,1000.0,0.0,))  
      spl.Message(c4d.MSG_UPDATE)  
      return spl  
    


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

    On 15/10/2011 at 14:52, xxxxxxxx wrote:

    Hi Ilya.
    I need to have the PyGenerator seen as a spline by a Cloner etc.
    -without- making it editable the same way as a cube generated
    in the PyGenerator is seen by a Cloner.

    The PyDoubleCircle example manage that and I can't figure out why.



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

    On 15/10/2011 at 16:22, xxxxxxxx wrote:

    In C++. We need to use the " virtual SplineObject* GetContour() " method. As part of the class.
    If it's left out. The spline does not even draw.
    This does not seem to be the case in python.

    Per the C++ SDK. GetContour() is used for generating splines.
    AFAIK. It's not needed to generate other types of objects.

    This is just a wild guess.
    But it looks like the way the python version is ported from C++ is allowing us to generate splines in python without using GetContour(). Which might be a bad practice.
    My guess is that this is not the  "proper"  way to build a spline generator.  And will cause things like the Align-to-Spline tag not to work with it.

    This is just a wild guess based on my experience with it in C++.

    -ScottA



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

    On 16/10/2011 at 02:56, xxxxxxxx wrote:

    Hello Lennart
    I try to put spl-pygen object, clonner draw it normally, without returning of base object(make editable) as described.

    At more complex code, pyGen was failed at drawing of object if it is in clonner/or mo-object.

    Also try Nux95's DrawApi helpers, thanks a'lot to Niklas!
    Niklas, can you make sample with DrawLines if it-s possible, i some ago apply at sample project...but lost it....



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

    On 16/10/2011 at 09:43, xxxxxxxx wrote:

    Maybe I need to be even more clear :)

    Make a PyGenerator generating a spline.
    ie return c4d.BaseObject(c4d.Osplinecircle)

    Then put the PyGenerator in a Cloner as Object source
    does not allow me to clone stuff on the PyGenerator
    as the Cloner does not see the PyGenerator as a spline.

    Put the PyDoubleCircle in the Cloner instead as Object source
    and I can clone.

    The issue really comes down to that I can't see what in
    the PyDoubleCircle example that makes it work.
    (Other than it's using GetContour() )



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

    On 16/10/2011 at 10:22, xxxxxxxx wrote:

    seems it's not possible, if only add optionally new functions as presenting of PyGen like splineObj...like checkbox with GetContour dependecy



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

    On 16/10/2011 at 18:42, xxxxxxxx wrote:

    Update. I've actually got it working (as a plugin), stripping down the
    PyDoubleCircle example bit by bit..
    I'll post the barebone working code this week with a new question
    as it became a new issue how handle updating it.
    My guess it's about GetCache(), Get/SetDirty(), all new
    territory for me.

    Thanks till later!
    Lennart



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

    On 24/10/2011 at 07:59, xxxxxxxx wrote:

    Hello
    There is interesting and unstable(need to glue to matrix of obj) test

    http://imageshack.us/photo/my-images/153/cstotest.jpg/



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

    On 24/10/2011 at 09:04, xxxxxxxx wrote:

    That's a good twist, adding the Cloner link via the script, nice.
    Don't need to do the CSTO either really.

    Cheers
    Lennart



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

    On 24/10/2011 at 09:18, xxxxxxxx wrote:

    Don't need to do the CSTO either really.

    You're right! Thanks a'lot.

    I played with M.Zabiegly's pointcloud's sample(big thanks to his xpresso tutorials), trying to get cache from procedural objects(Lennart, i make same 3d fashion sample as you did) and try to apply same CSTO.

    For CSTO and additional py-snippets i want to say Thanks to Sebastien, Niklas, Scott...



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

    On 26/10/2011 at 08:40, xxxxxxxx wrote:

    I have question is this function replicate GetContour() - BaseObject.GetRealSpline ?



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

    On 26/10/2011 at 11:14, xxxxxxxx wrote:

    Not really I'm afraid.
    But I've come a long way linking Cloners, MoSplines etc
    from within the plugin as per the example you show earlier.
    This way basically any virtual object within the generator
    can be picked.



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

    On 18/11/2011 at 09:20, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Also try Nux95's DrawApi helpers, thanks a'lot to Niklas!
    Niklas, can you make sample with DrawLines if it-s possible, i some ago apply at sample project...but lost it....

    I'm sorry, haven't ever read this post before. 😊
    Can you explain more what 'ya need ?

    PS: My latest achievement in the DrawApi module. (Animations) 😉
    http://www.screenr.com/mQLs



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

    On 19/11/2011 at 23:44, xxxxxxxx wrote:

    Hallo

    Can you explain more what 'ya need ?

    I mean your previous work as Python Draw Helper(sample with bd, draw polygon triangle with coloring)

    your GUI development is wonderful!!!!



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

    On 20/11/2011 at 02:20, xxxxxxxx wrote:

    Ah I thought you were talking about 2d GUI, thats why I postet the video. 😂
    Thanks !

    And what was your problem, now ? ^^



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

    On 21/11/2011 at 10:51, xxxxxxxx wrote:

    thanks, i have not any, pass it ;) or return TRUE



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

    On 22/11/2011 at 03:59, xxxxxxxx wrote:

    Why not try the Py-DoubleCircle example from the Python SDK?



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

    On 22/11/2011 at 05:42, xxxxxxxx wrote:

    Hi Jack. That's what I did. But the issue turned out to be the cache.
    As it only refresh itself internally and not from changes of external input.
    I started another thread about that but it's not totally solved other than the workarounds mentioned there (link from within the script/code)

    https://plugincafe.maxon.net/topic/6070/6249_getcontour-refresh-or-uncache-how

    Cheers
    Lennart



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

    On 22/11/2011 at 18:33, xxxxxxxx wrote:

    Oh, sorry. I just see in your initial posting that you did that.
    I should read more carefully.


Log in to reply