SelectAll Doc example max range



  • On 19/08/2017 at 06:56, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R18 
    Platform:   Windows  ;   
    Language(s) :       PYTHON  ;

    ---------
    Hello,

    About the SelectAll() method of the BaseSelect class, the "max" value is "the last element in the range to select".

    So to select all polygons, for example, it will logically be :

    SelectAll(op.GetPolygonCount() - 1)
    

    But in the Python documentation, the example for the edges show :

    edges.SelectAll(nbr.GetEdgeCount()) # Select all edges in the range [0, nbr.GetEdgeCount()]
    

    Is it not nbr.GetEdgeCount() - 1, instead ?

    https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d/BaseSelect/index.html?highlight=selectall#BaseSelect.SelectAll



  • On 21/08/2017 at 03:23, xxxxxxxx wrote:

    Hi,

    You are right. The code snippet for BaseSelect.SelectAll() should pass nbr.GetEdgeCount()-1 instead of just nbr.GetEdgeCount(). The parameters max and min as refer to an element index.
    This issue in the example will be fixed.


Log in to reply