Home Technical Talk

Need help : Sub object to face Script

polycounter lvl 14
Offline / Send Message
Cathodeus polycounter lvl 14
Hello,

I would like to create a script that will convert any sub object selected to faces.

So if vertex than convert to face

if edge convert to faces

if element convert to faces

Can anyone tell me what are the script lign for that.

Thanks in advance.
Massimo

Replies

  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    Actually i have

    (
    $.EditablePoly.ConvertSelection #edge #Face
    subobjectLevel = 4
    )

    And i don't know how can i tell "use current selection than convert to face"

    Is there a way to do that ? i would like to have just on shortcut key that will convert whatever to faces ... Actually with my script i have 3 shortcuts used for this ...
  • miauu
    Options
    Offline / Send Message
    miauu polycounter lvl 14
    Cathodeus wrote: »
    Actually i have

    (
    $.EditablePoly.ConvertSelection #edge #Face
    subobjectLevel = 4
    )

    And i don't know how can i tell "use current selection than convert to face"

    Is there a way to do that ? i would like to have just on shortcut key that will convert whatever to faces ... Actually with my script i have 3 shortcuts used for this ...
    (
        if selection.count == 1 and classOf (curO = selection[1]) == Editable_Poly do
        (
            case subobjectlevel of
            (
                1: (curO.EditablePoly.ConvertSelection #Vertex #Face)
                2: (curO.EditablePoly.ConvertSelection #Edge #Face)
                3: (curO.EditablePoly.ConvertSelection #Edge #Face)
            )
            subobjectLevel = 4
        )
    )
    
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    You know you can just shift click the subobject level button in the edit poly modifier to convert your current selection to that sub object type, no?
  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    @Miauu Thanks a Ton ! You are actually improving a lot my workflow.

    @Vaillias : Yes i know. My goal is to work in expert mode so i'm creating a lot of smart functions with script and assigning them to my keyboard. In order to don't use anymore the UI.
  • Neox
    Options
    Offline / Send Message
    Neox veteran polycounter
    customize > customize user interface > keyboard

    go to all commands

    search for

    convert to XXX (poly)

    XXX = face, edge or vertex
  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    Thanks Neox. I really was searching for the script ligns as the smart function i'm currently creating do a lot of other things.
  • Neox
    Options
    Offline / Send Message
    Neox veteran polycounter
    Cathodeus wrote: »
    Thanks Neox. I really was searching for the script ligns as the smart function i'm currently creating do a lot of other things.

    what else do you want to do? your description was convert subobjectX to faces, this is exactly what it does.
Sign In or Register to comment.