当前位置: 首页>>代码示例>>Python>>正文


Python Sequence.is_valid_spec方法代码示例

本文整理汇总了Python中conductor.native.lib.sequence.Sequence.is_valid_spec方法的典型用法代码示例。如果您正苦于以下问题:Python Sequence.is_valid_spec方法的具体用法?Python Sequence.is_valid_spec怎么用?Python Sequence.is_valid_spec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在conductor.native.lib.sequence.Sequence的用法示例。


在下文中一共展示了Sequence.is_valid_spec方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: validate_scout_range

# 需要导入模块: from conductor.native.lib.sequence import Sequence [as 别名]
# 或者: from conductor.native.lib.sequence.Sequence import is_valid_spec [as 别名]
def validate_scout_range(node, **_):
    """Set valid tickmark for scout range spec.

    TODO Currently we only validate that the spec produces
    valid frames. We should also validate that at least one
    scout frame exist in the main frame range.
    """
    takes.enable_for_current(node, "scout_valid")
    spec = node.parm("scout_frames").eval()
    valid = Sequence.is_valid_spec(spec)
    node.parm("scout_valid").set(valid)
    update_frame_stats_message(node)
开发者ID:AtomicConductor,项目名称:conductor_client,代码行数:14,代码来源:frame_spec_ui.py

示例2: validate_custom_range

# 需要导入模块: from conductor.native.lib.sequence import Sequence [as 别名]
# 或者: from conductor.native.lib.sequence.Sequence import is_valid_spec [as 别名]
def validate_custom_range(node, **_):
    """Set valid tickmark for custom range spec.

    A custom range is valid when it is a comma separated
    list of arithmetic progressions. These can can be
    formatted as single numbers or ranges with a hyphen and
    optionally a step value delimited by an x. Example,
    1,7,10-20,30-60x3,1001, Spaces and trailing commas are
    allowed, but not letters or other non numeric
    characters.
    """
    takes.enable_for_current(node, "custom_valid")
    spec = node.parm("custom_range").eval()
    valid = Sequence.is_valid_spec(spec)
    node.parm("custom_valid").set(valid)

    update_frame_stats_message(node)
    uistate.update_button_state(node)
开发者ID:AtomicConductor,项目名称:conductor_client,代码行数:20,代码来源:frame_spec_ui.py

示例3: test_is_valid_method_false

# 需要导入模块: from conductor.native.lib.sequence import Sequence [as 别名]
# 或者: from conductor.native.lib.sequence.Sequence import is_valid_spec [as 别名]
 def test_is_valid_method_false(self):
     self.assertFalse(Sequence.is_valid_spec("12-26x3d, 1,7,8,2,4-9"))
     self.assertFalse(Sequence.is_valid_spec(",4x9,2,"))
     self.assertFalse(Sequence.is_valid_spec(" "))
开发者ID:AtomicConductor,项目名称:conductor_client,代码行数:6,代码来源:test_sequence.py

示例4: test_is_valid_method_bad_type

# 需要导入模块: from conductor.native.lib.sequence import Sequence [as 别名]
# 或者: from conductor.native.lib.sequence.Sequence import is_valid_spec [as 别名]
 def test_is_valid_method_bad_type(self):
     with self.assertRaises(TypeError):
         Sequence.is_valid_spec(1)
     with self.assertRaises(TypeError):
         Sequence.is_valid_spec(None)
开发者ID:AtomicConductor,项目名称:conductor_client,代码行数:7,代码来源:test_sequence.py

示例5: test_is_valid_method_true

# 需要导入模块: from conductor.native.lib.sequence import Sequence [as 别名]
# 或者: from conductor.native.lib.sequence.Sequence import is_valid_spec [as 别名]
 def test_is_valid_method_true(self):
     self.assertTrue(Sequence.is_valid_spec("12-26x3, 1,7,8,2,4-9"))
     self.assertTrue(Sequence.is_valid_spec("1"))
     self.assertTrue(Sequence.is_valid_spec(",4-9,2,"))
开发者ID:AtomicConductor,项目名称:conductor_client,代码行数:6,代码来源:test_sequence.py


注:本文中的conductor.native.lib.sequence.Sequence.is_valid_spec方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。