本文整理汇总了Python中freestyle.utils.ContextFunctions.get_selected_fedge方法的典型用法代码示例。如果您正苦于以下问题:Python ContextFunctions.get_selected_fedge方法的具体用法?Python ContextFunctions.get_selected_fedge怎么用?Python ContextFunctions.get_selected_fedge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类freestyle.utils.ContextFunctions
的用法示例。
在下文中一共展示了ContextFunctions.get_selected_fedge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: shade
# 需要导入模块: from freestyle.utils import ContextFunctions [as 别名]
# 或者: from freestyle.utils.ContextFunctions import get_selected_fedge [as 别名]
def shade(self, stroke):
fe = CF.get_selected_fedge()
id1 = fe.first_svertex.id
id2 = fe.second_svertex.id
#print(id1.first, id1.second)
#print(id2.first, id2.second)
it = stroke.stroke_vertices_begin()
found = True
foundfirst = True
foundsecond = False
while not it.is_end:
cp = it.object
if cp.first_svertex.id == id1 or cp.second_svertex.id == id1:
foundfirst = True
if cp.first_svertex.id == id2 or cp.second_svertex.id == id2:
foundsecond = True
if foundfirst and foundsecond:
found = True
break
it.increment()
if found:
print("The selected Stroke id is: ", stroke.id.first, stroke.id.second)