def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self)
# class CreateNewSegment(bpy.types.Operator):
# """
# :term:`operator` for creating a new segment in the robot model.
#
#
# """
# bl_idname = config.OPERATOR_PREFIX + "createbone"
# bl_label = "Create new Bone"
#
# boneName = StringProperty(name="Enter new bone name:")
#
# def execute(self, context):
# try:
# parentBoneName = context.active_bone.name
# except:
# parentBoneName = None
#
# if not context.active_object.type == 'ARMATURE':
# raise Exception("BoneCreationException")
# # return{'FINISHED'}
# armatureName = context.active_object.name
# armatures.createBone(armatureName, self.boneName, parentBoneName)
#
# designer.ops.select_segment(boneName=self.boneName)
# armatures.updateKinematics(armatureName, self.boneName)
#
# # TODO: set parentMode according to own parent
# return {'FINISHED'}
#
# def invoke(self, context, event):
# return context.window_manager.invoke_props_dialog(self)
评论列表
文章目录