Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. .del
    .
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    .del

    @.del

    2
    Reputation
    17
    Posts
    84
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    .del Follow

    Posts made by .del

    • RE: OBJ Export Options

      Thanks for looking at it Manuel. Sounds like your getting the same behavior I'm seeing.

      I'll add something to my script to parse it out.

      Thanks Manuel and Cairyn for taking time to help.

      .del

      posted in Cinema 4D Development
      .
      .del
    • RE: OBJ Export Options

      I was able to get it working once I knew that I was supposed to be passing text and you were right that once I re-laucnhed R23 it cleared up the problem with the export working from the main menu. I wish I knew about the GitHub file sooner as it would have saved me some time. My script is an adaptation of an fbx exporter I had been using. At the time I created I couldn't find much on .obj exporting. These things are two years old and I'm just circling back to them as I start using R23.

      Unfortunately I've come to find that the new exporter uses a file path in the .mtl file for the image whereas the previous versions did not. I'm not sure why the change was made but having a file path in there is throwing off the software that imports the .obj files. I don't see a way for me to set set a preference for it. I find myself falling back to R21 again until I can dig into the possibility of writing something to alter the .mtl file.

      posted in Cinema 4D Development
      .
      .del
    • RE: OBJ Export Options

      Well it looks like exporting an .obj isn't working for me at the moment anyway. The full scripts exports everything except the obj and when I try to use C4D's menu to export an .obj nothing happens either. No error message....nothing....no file...no lockup......nothing. I've submitted a support ticket. I'm not sure if it's script related or just a bug in R23. I'll have to fall back to R21 again so I can keep working.

      posted in Cinema 4D Development
      .
      .del
    • RE: OBJ Export Options

      Thanks for your help, that worked. I swear that the documentation and what the SDK expects changes every couple of years. Several years ago I'd try words and I'd be told to use numbers and now it seams as if numbers work for some things but words are required for others. It can be a bit confusing for me at times but at least I have a working script again.

      Just to clarify, I always thought when the documentation showed 'Parameter Type: int' that it meant a number and the number was representative of the numerical position in the list. You mentioned "numeric value of the five options shows that they are between 4092 and 4096". Where did you find those numbers? I don't see that in the Python documentation.

      thanks,
      .del

      posted in Cinema 4D Development
      .
      .del
    • RE: OBJ Export Options

      I'm using a 1 because it's the second value in the list much like I'm using for for Scale and Material where the numbers represent their positions in the list.

      I'll give it a try with the value instead.

      posted in Cinema 4D Development
      .
      .del
    • OBJ Export Options

      I just switched to R23 and am fixing some my python scripts. I'm running into an issue setting an OBJ Export Option. In particular it's something that I think is new - OBJEXPORTOPTIONS_EXPORT_UVS. In the documentation it looks like I should be setting it to a number.

      Parameter: UVs

      Parameter ID: c4d.OBJEXPORTOPTIONS_EXPORT_UVS
      
      Parameter Type: int
      
      Cycle Values:
      
              None (c4d.OBJEXPORTOPTIONS_UV_NONE)
      
              Original (c4d.OBJEXPORTOPTIONS_UV_ORIGINAL)
      
              Flip U (c4d.OBJEXPORTOPTIONS_FLIP_U)
      
              Flip V (c4d.OBJEXPORTOPTIONS_FLIP_V)
      
              Flip UV (c4d.OBJEXPORTOPTIONS_FLIP_UV)
      

      Based on the documentation I think I should have something like this - objExport[c4d.OBJEXPORTOPTIONS_EXPORT_UVS] = 1 but it's throwing an error in the console 'AttributeError: parameter set failed'

      Here's my block of code for this -

          #set up obj exporter
      
          plug = plugins.FindPlugin(1030178, c4d.PLUGINTYPE_SCENESAVER)
          if plug is None:
              print ("noPlug")
      
          op = {} # create dictionary to store key
          # Send MSG_RETRIEVEPRIVATEDATA to fbx export plugin
          if plug.Message(c4d.MSG_RETRIEVEPRIVATEDATA, op):
              # BaseList2D object stored in "imexporter" key hold the settings
              objExport = op["imexporter"]
              # Define the settings
              objExport[c4d.OBJEXPORTOPTIONS_SCALE] = 1
              objExport[c4d.OBJEXPORTOPTIONS_MATERIAL] =  2
              objExport[c4d.OBJEXPORTOPTIONS_INVERT_TRANSPARENCY] = False
              objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_FLIPX] = False
              objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_FLIPY] = False
              objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_FLIPZ] = True
              objExport[c4d.OBJEXPORTOPTIONS_FLIPFACES] = False
              objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_SWAPXY] = False
              objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_SWAPXZ] = False
              objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_SWAPYZ] = False
              objExport[c4d.OBJEXPORTOPTIONS_EXPORT_UVS] = 1
              objExport[c4d.OBJEXPORTOPTIONS_OBJECTS_AS_GROUPS] = False
              objExport[c4d.OBJEXPORTOPTIONS_TRIANGULATE_NGONS] = True
      

      Is anybody else running into this or am I missing something on how to set the UV parameter of the export?

      Any help is appreciated.

      posted in Cinema 4D Development
      .
      .del
    • RE: Calling Bevel tool and setting parametrs

      found it!!! I had to float('0.5')

      posted in Cinema 4D Development
      .
      .del
    • RE: Calling Bevel tool and setting parametrs

      Does anybody know what format I'm supposed to use to send a number to the Bevel tool for the radius? I'm currently only able to get it to work with whole numbers like 1 or 2. I'd like to set it to .5.

      I've tried float(.5) and int(.5) but both end up giving me no bevel. I can't find any documentation for this.

      thanks,
      .del

      posted in Cinema 4D Development
      .
      .del
    • RE: Calling Bevel tool and setting parametrs

      Restarting c4d fixed it! Now I just have to get the hidden polys produced by the bevel to appear. I'm pretty sure I need a message update or something like that as they appear once I move the model.

      Thanks for your help.
      .del

      posted in Cinema 4D Development
      .
      .del
    • RE: Calling Bevel tool and setting parametrs

      C4D might have been 'messed up' based on my prior attempts. I've restarted it and may be making progress.

      posted in Cinema 4D Development
      .
      .del