Remove hardcoded armature name
This commit is contained in:
parent
9ac8a43f9e
commit
29e21774f1
1 changed files with 7 additions and 1 deletions
|
@ -77,7 +77,7 @@ class AvatarPrepOp(bpy.types.Operator):
|
|||
perform_quest_optimizations: bpy.props.BoolProperty()
|
||||
|
||||
def execute(self, context):
|
||||
arm_ob = recurLayerCollection(bpy.context.view_layer.layer_collection, 'Master').collection.objects['Armature.002']
|
||||
arm_ob = recurLayerCollection(bpy.context.view_layer.layer_collection, 'Master').collection.objects[context.scene.rat_armature]
|
||||
|
||||
# we are going to prep the hair for export first, and then add it into the collection
|
||||
bpy.context.view_layer.active_layer_collection = recurLayerCollection(bpy.context.view_layer.layer_collection, 'original hair')
|
||||
|
@ -303,6 +303,11 @@ class ExportPanel(ToolPanel, bpy.types.Panel):
|
|||
# bpy.data,
|
||||
# "collections")
|
||||
|
||||
self.layout.prop_search(context.scene,
|
||||
"rat_armature",
|
||||
bpy.data,
|
||||
"objects")
|
||||
|
||||
self.layout.operator(AvatarPrepOp.bl_idname)
|
||||
self.layout.operator(AvatarBakeOp.bl_idname)
|
||||
self.layout.operator(AvatarBakeQuestOp.bl_idname)
|
||||
|
@ -310,6 +315,7 @@ class ExportPanel(ToolPanel, bpy.types.Panel):
|
|||
def register():
|
||||
bpy.utils.register_class(RATAddonPreferences)
|
||||
|
||||
bpy.types.Scene.rat_armature = StringProperty(default="None")
|
||||
bpy.types.Scene.master_collection = StringProperty(default="None")
|
||||
bpy.types.Scene.hair_collection = StringProperty(default="None")
|
||||
|
||||
|
|
Reference in a new issue