Skip to content

Commit 8b9ff60

Browse files
committed
Allow toRigify after loading
1 parent 6360d6f commit 8b9ff60

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

Blender/appdata_common/Blender Foundation/Blender/BLENDER_VERSION/scripts/addons/DTB/DtbOperators.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,20 @@ def invoke(self, context, event):
496496
return context.window_manager.invoke_confirm(self, event)
497497
return self.execute(context)
498498

499+
@classmethod
500+
def poll(cls, context):
501+
return Global.amIAmtr(context.object)
502+
499503
def execute(self, context):
500504
clear_pose()
501505
Util.active_object_to_current_collection()
506+
if Global.getHomeTown() == "":
507+
collection = context.object.get('Collection', '0')
508+
home_town = os.path.join(Global.getRootPath(), "FIG", "FIG" + collection[-1])
509+
if not os.path.exists(home_town):
510+
self.report({"ERROR"}, "Daz figure is not selected")
511+
return {"CANCELLED"}
512+
Global.setHomeTown(home_town)
502513
dtu = DataBase.DtuLoader()
503514
trf = ToRigify.ToRigify(dtu)
504515
db = DataBase.DB()

Blender/appdata_common/Blender Foundation/Blender/BLENDER_VERSION/scripts/addons/DTB/ToRigify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def toRigify(self, db, main):
101101
return
102102
Global.convert_vgroups() # Updates VertexGroups
103103
if len(Global.get_bone_limit()) == 0: # Seems not Necessary
104-
Global.bone_limit_modify()
104+
Global.bone_limit_modify(self.dtu.get_bone_limits_dict())
105105
wm.progress_update(5)
106106
dobj = Global.getAmtr()
107107
Versions.select(dobj, True)

0 commit comments

Comments
 (0)