I need a Python script for Blender



  • Yeah, I know that sounds funny asking for a python script for Blender in a Poser forum, but hear me out. Preferably, I'd like to have a script that works in either Blender OR Poser, I don't care much which one, that would adjust the scale of a model MADE in Blender to the scale of a model USED in Poser. Usually, I have to scale down the size of a model in Blender pretty much.

    I'm thinking that the easiest way to do it would be to write an import-export option in poserpython for Poser that would let me adjust a model for use in Blender and back again. including ticking all the Blender boxes automagically for things like keeping vertex order for working with morphs.

    Does anyone know if there is such an animal or, failing that, how I might learn to do this myself? So far, my forays into Poserpython haven't even gotten off the ground.


  • Poser Team

    I have all of that set up in the import/export options right in Blender.

    The way I do it is to scale anything I bring in from Poser up 10 times, then export at .1.
    All of that can be set up right in the export options as a preset. No script required.


  • Poser Ambassadors

    Size is . . . . . Tja, what is SIZE?

    V4 is close to 2 meters tall?

    A vertex is infinite small divided by eternity. LOL. (I would add that this is only on blue Wednesdays in uneven weeks) LOL. The rest od the days it is smaller. LOL.
    Size is... well; I am male, 57 years, and 52kg and 1.68 cm short.

    Ok, the fun game over, Blender can be set to meters, inches, and all relevant measurements.

    Unfortunately a the lengt of a "meter" seems different between the apps.

    i looked at this a while ago, and forgot the factor to scale up or down to get "a meter" to be "a meter" in both apps.

    But right now? Between Poser and Blender?
    And working digital?
    Only the Almighty might know who is right and who is wrong.

    When I want to build something? I import a figure, get the baseline, and build from there.

    i do not even look at measurements any more. it's everybody's guess who might be right or wrong here. Just build and enjoy the hobby.
    Best regards, Tony


  • Poser Ambassadors

    Wanna hear a Joke?
    As I wrote above, I am rather "light".

    Too light for the ejection seat of the fighters we flew.
    So I had to be made "heavy" before flying.... LOL.

    Oh, for the chute too. The minimum weight for the chute was 60kg. (In case I had to leave in a hurry LOL) (Never had) oef.... Or I would have been even shorter too... NO LOL.

    Ach, many-many moons ago.
    Best regards, Tony


  • Poser Ambassadors

    Hey, not behind the PC right now but.....

    In Blender: Set units to meters.
    Built a cube exactly 1 meter by 1 meter by 1 meter and export.

    Import in Poser, and check the size with the measurement tool.

    And you have your factor to scale things up and down between both apps.
    Simple math.



  • Guys, all I asked for was a script to do all the things you 're suggesting now. I can delete all the lights in a Poser scene now or turn IK off and on. I didn't ask someone to write a script for it, but someone did. This time, I'm asking. Why are you taking pot shots at the idea?



  • Because it's un-necessary. The time it takes to activate a python script is more key strokes than the methods offered above. Not dissing your idea as such, just offering an explanation as to why nobody has bothered making such a script. Now if it was a script to import scenes into Blender, I might be interested... and no, teleblend doesn't work that well. A Poser fusion for Blender is something I asked for on that survey that came out recently.


  • Poser Team

    What I mentioned was using Blender at ten times the scale of Poser. I do that for a reason.
    Blender only offers Clamp on scale at import, I don't think I have seen a OBJ import scale script or addon.
    When I import something from Poser, I scale it up from 1 to 10 on the 3 axes.
    I do basically the same thing in other programs then setup the export to do all the work for me in a preset.
    The biggest difference is OBJ handling, and I never export an obj from Poser to use it in Blender or any other app.
    The only exception to that is morph targets to be used in another app.

    Everything I model for Poser in Blender is 10 times the scale Poser uses, all the export presets for Poser are set to a scale of .1 which makes it the right size in Poser in a few simple clicks.
    In the OBJ export menu I have many presets already set up at the top under Operator Presets, you can add as many presets as you want too. I have more than a few just in the OBJ Export for use in Poser.

    As far as scripts and plugins, there are tons of them already widely available for Blender.
    Finding them can be an issue and Blender stopped maintaining the lists for that a long time ago.
    Fortunately, someone else took up doing some of it here.
    Only problem is that it isn't a very complete list either.
    But well worth bookmarking for other addons and scripts.
    You can find a lot more at the game engine forums as well, people are always streamlining exporting to a game engine.

    To me, the whole point of scale matching between apps is do do it as simply as possible.
    Using a ten x multiplier system Blender is simple and effective.
    If you use a system like this, you don't need to do much at all when upgrading to a newer version of Blender either.

    Most of my Blender scenes have links to other scenes in them, and many scripts will only run on local part of the scene.
    You usually have to switch to that file save to manipulate those parts at their scene level.
    I link in characters that are already scaled up 10 times, etc.
    Then I can just make whatever I am going to do and export it out.
    I only have to scale the figure up once, and save it as a scene file.
    Exporting for Poser is a few clicks and type in a name.

    The main reason I offered this suggestion was not to turn you off from scripts or offend you.
    It was to get you into a workflow that doesn't rely on scripts that only work for certain scenes in the first place.


  • Poser Ambassadors

    Building a 1, by1, by1 meter box in Blender?
    It comes in Poser as a 2.61 by 2.61 by 2.61 meter box.

    So when building in Blender in meters? (or metrical system)

    Export at scale 0.383114176 and you would be very-very close when you are working in meters in Poser.

    0_1471776503000_Scale-Blender-Poser.jpg

    The pink and green box are 1 by 1 by 1 meter in Blender.
    In Poser they load as 2.61 meters tall.

    The BLUE box was exported from Blender at 0.383114175 scale.
    And imported as exactly 1 meter box in Poser.

    So?
    2.61 Blender meters are 1 Poser meter.

    Best regards, Tony


  • Poser Ambassadors

    The script you ask for is build directly into the Blender object file export options.
    Simply set export scale to 0.38314176 (if you are building in meters)
    0_1471780694085_Blender-export.jpg

    And import in Poser at 100% (the default scale)

    1 Poser meter is 0.38314175 Blender meter
    1 Blender meter is 2.61 Poser meters.



  • @piersyf You should read the title of the thread again. I didn't ask if anyone needed the script. I said I did. Me, nobody else. I didn't ask anyone to build it for me. I asked if anyone knew if one existed. And finally, I asked if anyone might help me build one for myself. Now if no one else wants to use the script after it's built, fine, I'll keep it to myself, which, judging from the response I'm getting, if someone did make it already, they probably decided to do the same thing.



  • @vilters Thanks Tony. Uh, how do you know that's where to set the scale, or what measurement to use?


  • Poser Ambassadors

    In Blender it is here. => Scene-Scene => Seer the Upper red arrow.
    0_1471782560966_Blender-setting units.jpg

    Then check lower for the Units, and select the units you want to use. = > i set mine here to meters.

    In Poser, you can set the Units in General preferences => Interface => Display => Units => Select meters..


  • Poser Ambassadors

    Size and position info => Click the "n" button and get the size and position information.
    0_1471783184791_Blender-size and position info.jpg



  • @eclark1849
    I did read the heading. I know you wanted it. I was suggesting why such a script didn't exist. Poser has an export scale option. Blender has an export scale option. If you know the numbers that's all there is to it.
    I will say that I have a slightly different number to Tony's... I use 38.148 when exporting from Blender (metres) into Poser. Seems accurate to me.



  • @vilters
    That image suggests it won't stay that size when exported... the scale fields (above box dimensions) all read 0.5. It was source of frustration when I first started playing with Blender to box model something, export it to Poser, and have it open as a collection of actual boxes (cubes).


  • Poser Ambassadors

    Yes, this can be frustrating.

    When opening Blender, the default cube loads.
    Then set units to meters, and you get a 2, by2, by2, meter cube.
    Then set dimensions to 1, by1,by1 meter.
    That is .05 in all directions of the default cube. LOL.

    Then reset XYZ Euler to 1 all, and the cube changes again... LOL.


Log in to reply
 

Looks like your connection to Graphics Forum was lost, please wait while we try to reconnect.