• Daz 3D
  • Shop
  • 3D Software
    • Daz Studio Premier
    • Daz Studio
    • Install Manager
    • Partnerships
    • AI Training data
    • Exporters
    • Daz to Roblox
    • Daz to Maya
    • Daz to Blender
    • Daz to Unreal
    • Daz to Unity
    • Daz to 3ds Max
    • Daz to Cinema 4D
  • 3D Models
    • Genesis 9
    • Genesis 8.1
    • Free 3D Models
  • Community
    • Gallery
    • Forums
    • Blog
    • Press
    • Help
  • Memberships
    • Daz Premier
    • Daz Plus
    • Daz Base
    • Compare
  • Download Studio
ADVANCED SEARCH
  • Menu
  • Daz 3D
ADVANCED SEARCH
Add image
  • Shop
  • 3d Software
    • Daz Studio Premier
    • Daz Studio
    • Install Manager
    • Partnerships
    • AI Training data
    • Exporters
    • Daz to Roblox
    • Daz to Maya
    • Daz to Blender
    • Daz to Unreal
    • Daz to Unity
    • Daz to 3ds Max
    • Daz to Cinema 4D
  • 3D Models
    • Genesis 9
    • Genesis 8.1
    • Free 3D Models
  • Community
    • Our Community
    • Gallery
    • Forums
    • Blog
    • Press
    • Help
  • Memberships
    • Daz Premier
    • Daz Plus
    • Daz Base
    • Compare

Notifications

You currently have no notifications.

Loading...
    • Categories
    • Recent Discussions
Daz 3D Forums > 3rd Party Software > Blender Discussion

Diffeomorphic How to import via script?

huntergeenhuntergeen Posts: 40
September 2024 edited September 2024 in Blender Discussion

I'm going to make it automatically import blender after it detects an export from daz.

Post edited by Richard Haseltine on September 2024

Comments

  • PadonePadone Posts: 4,002
    September 2024

    Sorry I have no idea I don't use the script api.

  • ThomasLarssonThomasLarsson Posts: 97
    September 2024

    I don't script the plugin either, but there are some examples in this repo:

    https://bitbucket.org/Diffeomorphic/daz-importer-scripts

    In particular, the file easy_import.py contains an example on how to use easy import from a script. It works in Blender versions up to 4.1, presumably also in Blender 4.2 if the addon is a legacy addon. However, if you installed the addon from a  downloaded zip file, it becomes an extension, which is a new (mis-)feature of Blender 4.2. The script doesn't work then, because the import_daz module is not located in one of the python paths,. I'm not sure what to do with this.

    Anyway, here is the easy_import script that works in Blender 4.1.:

    #
    #   Easy import Aiko using a script, and then pose her and set an expression.
    #   Updated for version 1.7.0
    #
    import os
    import bpy
    import import_daz
    
    relpath = "/scenes/aiko-basic-wear.duf"
    abspaths = import_daz.get_absolute_paths([relpath])
    print("Absolute paths: %s" % abspaths)
    import_daz.set_selection(abspaths)
    
    # Turn on silent mode
    import_daz.set_silent_mode(True)
    
    bpy.ops.daz.easy_import_daz(
       useExpressions = True,
       useJcms = True,
       clothesColor = (0,0,1,1.000),
       useTransferClothes = True,
       useMakePosable = True,
    )
    print("Loaded %s" % import_daz.get_selection())
    
    # Load a pose
    relpath = "/people/genesis 8 female/poses/base poses/base pose kneeling b.duf"
    abspaths = import_daz.get_absolute_paths([relpath])
    import_daz.set_selection(abspaths)
    bpy.ops.daz.import_pose()
    print("Loaded %s" % import_daz.get_selection())
    
    # Set a morph
    rig = bpy.context.object
    rig["eCTRLTriumph"] = 0.8
    # Need an update
    import_daz.update_drivers(rig)
    
    # Turn silent mode off again
    import_daz.set_silent_mode(False)
    
    

     

  • ThomasLarssonThomasLarsson Posts: 97
    September 2024

    The import_daz operators and functions are documented here:

    • DAZ Importer Functions
    • DAZ Importer Operators

    These documents were generated some months ago, so there might be a slight difference with the current development version. But this is very minor.

  • huntergeenhuntergeen Posts: 40
    September 2024

    @ThomasLarsson thanks Dev

  • ThomasLarssonThomasLarsson Posts: 97
    October 2024 edited October 2024

    It turned out that the combination of scripting and the newly introduced Blender extensions led to new challenges, but finally I think I figured out how to deal with it.

    http://diffeomorphic.blogspot.com/2024/10/addon-scripting-and-blender-extensions.html

    Post edited by ThomasLarsson on October 2024
  • brainmuffinbrainmuffin Posts: 1,267
    October 2024

    Is it still installed the same way in Blender 4.2?

  • PadonePadone Posts: 4,002
    October 2024

    No, in 4.2 it installs as extension.

Sign In or Register to comment.
Adding to Cart…

Daz 3D is part of Tafi

Connect

DAZ Productions, Inc.
7533 S Center View Ct #4664
West Jordan, UT 84084

HELP

Contact Us

Tutorials

Help Center

Sell Your 3D Content

Affiliate Program

Documentation Center

Open Source

Consent Preferences

JOIN DAZ

Memberships

Blog

About Us

Press

Careers

Bridges

Community

In the Studio

Gallery

Forum

DAZ STORE

Shop

Freebies

Published Artists

Licensing Agreement | Terms of Service | Privacy Policy | EULA

© 2025 Daz Productions Inc. All Rights Reserved.