segments.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:BlenderRobotDesigner 作者: HBPNeurorobotics 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号