6 posts / 0 new
Last post
ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
Scripting: Changing Mesh Selection

This message was originally posted by Nobody/Anonymous on 08/30/2006 22:00:16
Can I set the mesh_selection property in TranslatePoints nodes to ’Select All’ with script?
I attempted the following code:
#python
import k3d
node = Document.get_node(\"TranslatePoints Node\")
# The node was created manually by GUI
# and set the ’Mesh Selection’ property to ’Select All’.
k3d.ui.message(repr(node.mesh_selection))
# Displays ’None’.
# End of code.
Thank you,
Shoichi Nishihara

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
Scripting: Changing Mesh Selection

This message was originally posted by Nobody/Anonymous on 08/30/2006 23:03:30
I temporarily use the following code:
#python
import k3d
doc = Document
property_node = doc.get_node(\"Select All\")
# The node is a TranslatePoints node and
# contains a mesh_selection that is set to
# ’Select All’ manually by GUI.
node = doc.new_node(\"TranslatePoints\")
doc.set_dependency(node.get_property(\"mesh_selection\"), property_node.get_property(\"mesh_selection\"))
# End of code.
Thank you,
Shoichi Nishihara

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
Scripting: Changing Mesh Selection

This message was originally posted by Timothy M. Shead on 08/30/2006 23:08:11
Shoichi:
Currently, the Python object model doesn’t support conversion of the mesh selection type into something that can be manipulated in Python code. I’ve added an item in the bug tracker and will look into it as soon as I fix some high-priority bugs.
It’s good to see someone pushing the scripting capabilities!
Many thanks,
Tim

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
Scripting: Changing Mesh Selection

This message was originally posted by Timothy M. Shead on 08/30/2006 23:09:26
As followup on this, I’ve confirmed the problem with the file you sent and am trying to narrow it down to one of several plugins. There is an item in the bug tracker for this issue.
Many thanks for the report,
Tim

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
Scripting: Changing Mesh Selection

This message was originally posted by Timothy M. Shead on 09/04/2006 17:16:05
As followup: this issue turned-out to be a problem with the BevelPoints filter, and is fixed in K-3D 0.6.1.0, released 20060904.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
Scripting: Changing Mesh Selection

This message was originally posted by Timothy M. Shead on 09/04/2006 17:17:37
As followup: Python API support for mesh selections was added in K-3D 0.6.1.0, released 20060904.
See scripts/bevel_points_with_selection.py for a simple example.
Regards,
Tim

Log in or register to post comments