Make all edges selected in generator

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

On 03/03/2012 at 12:21, xxxxxxxx wrote:

Trying to work out how to get all edges on a poly object selected 
when dropping into a Python Generator

i.e. nothing selected before dropping on to generator (so it becomes a child of the generator - with all edges selected)

tried all manner of things - put me out of my misery please

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

On 06/03/2012 at 03:40, xxxxxxxx wrote:

Anyone?

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

On 06/03/2012 at 08:22, xxxxxxxx wrote:

Here's one way to do it:

import c4d  
from c4d import utils  
def main() :  
  
  obj = doc.SearchObject("Polygon")#The polygon object  
  if obj.GetUp() is None: return False  
  
  if obj.GetUp().GetName() == "Python Generator":  
      obj.Edit()              #Make the object active  
      doc.SetMode(c4d.Medges) #Change to edges mode  
      utils.SendModelingCommand(c4d.MCOMMAND_SELECTALL, list = [obj], mode = c4d.MODELINGCOMMANDMODE_EDGESELECTION, bc = c4d.BaseContainer(), doc = doc)  
        
      c4d.EventAdd()          #Update C4D  
  
if __name__=='__main__':  
  main()

-ScottA

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

On 06/03/2012 at 13:08, xxxxxxxx wrote:

Hi Scott

I'm doing this from the generator itself
but I think the edit and set mode code you've posted are the key 
just have to find a way to stop the poly objects from constantly selecting itself

appreciate  feedback

atb

Paul