本文整理汇总了Python中sverchok.data_structure.updateNode函数的典型用法代码示例。如果您正苦于以下问题:Python updateNode函数的具体用法?Python updateNode怎么用?Python updateNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updateNode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: updatePreset
def updatePreset(self, context):
if self.preset != "0":
# if preset, set preset
if self.previousSetting != self.preset:
using = self.p[self.preset]
self.source = using[0]
self.vTrunc = using[1]
self.eTrunc = using[2]
self.dual = using[3]
self.snub = using[4]
else:
using = self.p[self.preset]
result0 = self.source == using[0]
result1 = abs(self.vTrunc - using[1]) < 0.004
result2 = abs(self.eTrunc - using[2]) < 0.0015
result4 = using[4] == self.snub or ((using[4] == "Left") and
self.snub in ["Left", "Right"])
if (result0 and result1 and result2 and result4):
if self.p[self.previousSetting][3] != self.dual:
if self.preset[0] == "d":
self.preset = self.preset[1:]
else:
self.preset = "d" + self.preset
else:
self.preset = "0"
updateNode(self, context)
开发者ID:nortikin,项目名称:sverchok,代码行数:26,代码来源:regular_solid.py
示例2: update_angles
def update_angles(self, context):
""" Convert angle values to selected angle units """
if self.last_angle_units == "RAD":
if self.angle_units == "RAD":
au = 1.0 # RAD -> RAD
elif self.angle_units == "DEG":
au = 180.0 / pi # RAD -> DEG
elif self.angle_units == "UNI":
au = 0.5 / pi # RAD -> UNI
elif self.last_angle_units == "DEG":
if self.angle_units == "RAD":
au = pi / 180 # DEG -> RAD
elif self.angle_units == "DEG":
au = 1.0 # DEG -> DEG
elif self.angle_units == "UNI":
au = 1.0 / 360 # DEG -> UNI
elif self.last_angle_units == "UNI":
if self.angle_units == "RAD":
au = 2 * pi # UNI -> RAD
elif self.angle_units == "DEG":
au = 360 # UNI -> DEG
elif self.angle_units == "UNI":
au = 1.0 # UNI -> UNI
self.last_angle_units = self.angle_units
self.updating = True # inhibit update calls
self.twist = au * self.twist # convert to current angle units
self.phase = au * self.phase # convert to current angle units
self.updating = False
updateNode(self, context)
开发者ID:nortikin,项目名称:sverchok,代码行数:35,代码来源:cylinder_mk2.py
示例3: mode_change
def mode_change(self, context):
# just because click doesn't mean we need to change mode
mode = self.mode
if mode == self.current_mode:
return
if mode == 'VERTEX':
n = 2 if "Vert A" in self.inputs else 1
while len(self.inputs) > n:
self.inputs.remove(self.inputs[-1])
if n == 1:
self.inputs.new('VerticesSocket', "Vert A", "Vert A")
if mode == 'AXIS':
n = 2 if "Vert A" in self.inputs else 1
if n == 2:
while len(self.inputs) > n:
self.inputs.remove(self.inputs[-1])
self.inputs.new('VerticesSocket', "Vert B", "Vert B")
else:
while len(self.inputs) > n:
self.inputs.remove(self.inputs[-1])
self.inputs.new('VerticesSocket', "Vert A", "Vert A")
self.inputs.new('VerticesSocket', "Vert B", "Vert B")
if mode == 'PLANE':
while len(self.inputs) > 1:
self.inputs.remove(self.inputs[-1])
self.inputs.new('MatrixSocket', "Plane", "Plane")
self.current_mode = mode
updateNode(self, context)
开发者ID:BitByte01,项目名称:myblendercontrib,代码行数:32,代码来源:mirror.py
示例4: update_mode
def update_mode(self, context):
self.inputs['Radius'].hide_safe = (self.mode not in ['BySphere', 'ByPlane', 'ByCylinder', 'BBox'])
self.inputs['Center'].hide_safe = (self.mode not in ['BySphere', 'ByPlane', 'ByCylinder', 'Outside', 'BBox'])
self.inputs['Percent'].hide_safe = (self.mode not in ['BySide', 'ByNormal', 'EdgeDir', 'Outside'])
self.inputs['Direction'].hide_safe = (self.mode not in ['BySide', 'ByNormal', 'ByPlane', 'ByCylinder', 'EdgeDir'])
updateNode(self, context)
开发者ID:johnyc90,项目名称:sverchok,代码行数:7,代码来源:mesh_select.py
示例5: mode_change
def mode_change(self, context):
if not (self.items_ == self.current_op):
self.label = self.items_
self.update_outputs_and_inputs()
self.current_op = self.items_
updateNode(self, context)
开发者ID:BitByte01,项目名称:myblendercontrib,代码行数:7,代码来源:math.py
示例6: mode_change
def mode_change(self, context):
if not (self.selected_hyper == self.current_hyper):
self.label = self.selected_hyper
self.update_outputs_and_inputs()
self.current_hyper = self.selected_hyper
updateNode(self, context)
开发者ID:BitByte01,项目名称:myblendercontrib,代码行数:7,代码来源:eval_knieval.py
示例7: update_mode
def update_mode(self, context):
if self.mode == self.last_mode:
return
self.last_mode = self.mode
self.update_sockets(context)
updateNode(self, context)
开发者ID:nortikin,项目名称:sverchok,代码行数:7,代码来源:polygon_sort.py
示例8: update_mode
def update_mode(self, context):
self.outputs['NewVertices'].hide_safe = not self.show_new
self.outputs['NewEdges'].hide_safe = not self.show_new
self.outputs['NewFaces'].hide_safe = not self.show_new
self.outputs['OldVertices'].hide_safe = not self.show_old
self.outputs['OldEdges'].hide_safe = not self.show_old
self.outputs['OldFaces'].hide_safe = not self.show_old
updateNode(self, context)
开发者ID:nortikin,项目名称:sverchok,代码行数:8,代码来源:subdivide_lite.py
示例9: property_change
def property_change(node, context, origin):
if origin == 'input_mode_one':
node.inputs[0].prop_name = {'Float': 'x_', 'Int': 'xi_'}.get(getattr(node, origin))
elif origin == 'input_mode_two' and len(node.inputs) == 2:
node.inputs[1].prop_name = {'Float': 'y_', 'Int': 'yi_'}.get(getattr(node, origin))
else:
pass
updateNode(node, context)
开发者ID:elfnor,项目名称:sverchok,代码行数:8,代码来源:scalar_mk2.py
示例10: update_value
def update_value(self, context):
if self.int_ < self.minim:
self.int_ = self.minim
return
if self.int_ > self.maxim:
self.int_ = self.maxim
return
updateNode(self, context)
开发者ID:BitByte01,项目名称:myblendercontrib,代码行数:8,代码来源:integer.py
示例11: update_mode
def update_mode(self, context):
self.inputs['Verts A'].hide_safe = self.nest_objs
self.inputs['Polys A'].hide_safe = self.nest_objs
self.inputs['Verts B'].hide_safe = self.nest_objs
self.inputs['Polys B'].hide_safe = self.nest_objs
self.inputs['Verts Nested'].hide_safe = not self.nest_objs
self.inputs['Polys Nested'].hide_safe = not self.nest_objs
updateNode(self, context)
开发者ID:johnyc90,项目名称:sverchok,代码行数:8,代码来源:csg_booleanMK2.py
示例12: update_mode
def update_mode(self, context):
self.inputs['Matrices'].hide_safe = (self.transform_mode != "Matrix")
self.inputs['Height'].hide_safe = (self.transform_mode != "Normal")
self.inputs['Scale'].hide_safe = (self.transform_mode != "Normal")
if self.transform_mode == "Normal":
self.multiple = True
updateNode(self, context)
开发者ID:nortikin,项目名称:sverchok,代码行数:8,代码来源:extrude_region.py
示例13: update_mode
def update_mode(self, context):
# switch radii input sockets (R,r) <=> (eR,iR)
if self.mode == 'EXT_INT':
self.inputs['R'].prop_name = "ring_eR"
self.inputs['r'].prop_name = "ring_iR"
else:
self.inputs['R'].prop_name = "ring_R"
self.inputs['r'].prop_name = "ring_r"
updateNode(self, context)
开发者ID:elfnor,项目名称:sverchok,代码行数:9,代码来源:ring.py
示例14: update_mode
def update_mode(self, context):
if self.mode == 'EXT_INT':
self.inputs['R'].prop_name = "torus_eR"
self.inputs['r'].prop_name = "torus_iR"
else:
self.inputs['R'].prop_name = "torus_R"
self.inputs['r'].prop_name = "torus_r"
updateNode(self, context)
开发者ID:elfnor,项目名称:sverchok,代码行数:9,代码来源:torusKnot.py
示例15: update_type
def update_type(self, context):
if self.numType == 'INT':
self.inputs['v1'].prop_name = "value_int1"
self.inputs['v2'].prop_name = "value_int2"
else: # float type
self.inputs['v1'].prop_name = "value_float1"
self.inputs['v2'].prop_name = "value_float2"
updateNode(self, context)
开发者ID:elfnor,项目名称:sverchok,代码行数:9,代码来源:mix_numbers.py
示例16: on_update_dims
def on_update_dims(self, context):
if self.dimensions < 4:
self.formula4 = ""
if self.dimensions < 3:
self.formula3 = ""
if self.dimensions < 2:
self.formula2 = ""
self.adjust_sockets()
updateNode(self, context)
开发者ID:nortikin,项目名称:sverchok,代码行数:10,代码来源:formula3.py
示例17: set_child_quota
def set_child_quota(self, context):
updateNode(self, context)
# post update check
if self.auto_release:
parent = self.name_node_generated_parent
if parent:
for obj in bpy.data.objects[parent].children:
if not obj.name == self.name_child:
obj.parent = None
开发者ID:TakamitsuNobe,项目名称:myblendercontrib,代码行数:10,代码来源:dupli_instances.py
示例18: reload
def reload(self):
if self.textmode == "CSV":
self.reload_csv()
elif self.textmode == "SV":
self.reload_sv()
elif self.textmode == "JSON":
self.reload_json()
# if we turn on reload on update we need a safety check for this
# too work.
updateNode(self, None)
开发者ID:gsp40213,项目名称:sverchok,代码行数:10,代码来源:text.py
示例19: mode_change
def mode_change(self, context):
# just because click doesn't mean we need to change mode
mode = self.mode
if mode == self.current_mode:
return
self.inputs[-1].prop_name = {'LAZYRANGE': 'stop_'}.get(mode, 'count_')
self.current_mode = mode
updateNode(self, context)
开发者ID:BitByte01,项目名称:myblendercontrib,代码行数:11,代码来源:range_int.py
示例20: update_mode
def update_mode(self, context):
cls = globals()[self.mode]
while len(self.outputs) > 0:
self.outputs.remove(self.outputs[0])
for ocls, oname in cls.outputs:
self.outputs.new(ocls, oname)
if hasattr(cls, "default_submode"):
self.submode = cls.default_submode
else:
self.submode = None
updateNode(self, context)
开发者ID:johnyc90,项目名称:sverchok,代码行数:11,代码来源:mesh_filter.py
注:本文中的sverchok.data_structure.updateNode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论