Python Rop: Part 4 — Cleanup

While the Parameter Interface in the works, we have very little of use, as the Python Sop will error out without an input. We actually don’t need it, all the ‘heavy lifting’ will be done in the land of Rops. We need to clean up and then flesh out something that can actually cook in Rops.

As mentioned there’s no actual need the python sop. We took a copy of it’s Python Code Field and now no longer need it. Go inside the subnet, select the sopnet  previously created and DELETE it. Now we can turn attentions back to the Type Properties Dialog.

Type Properties Editor on Python Rop Showing Menu Tab and Fields to Cleanup.

In the Middle Existing Parameter column, select Python Code Parameter. On the right Parameter Description Column select the Channels Tab. The highlighted fields shown need to be changed.

First make sure the 2nd icon for linking is not depressed, then delete the entry in Linked Channels  sub-columns. This is garbage pointing to the now nonexistent python sop.

This can be edited directly or if you have a text editor set up, click inside the field and ALT+E to open it. On Windows this defaults to notepad.

Note Pad Showing Not Functional DEfault For Python Code Field Left by Py Sop

On the left the is a default. This default is from the Python Sop and no longer appropriate as Rops does not have geometry to deal with directly.

Notepad Showing Python Rop Python Code Field New Default Comment

In my case I didn’t want any boiler plate code.. so simply deleted it all and replace with

# Clever Python Code Goes Here…

Save and closed notepad and the results populated the Field.

Notepad Showing Python Rop Python Code Field Menu Cleanup

Again on the far right Parameter Description column, select the Menu Tab. This area can be populated similarly with our text editor or directly in the field. The purpose is essentially Presets.’ The left field is a python snippet and the right field a Label. The small pull-down to the right of the Python Code field, displays the label and when selected, populates the Python Code with the snippet. You can add your own commonly used Python Snippets here later. However, the current preset is for a Sop and not of use, so simply delete the contents of both sub-columns.

On Type Properties Dialog, Press Accept.
Allow the dialog to close.

Most of the work in the next section will be in the Parmameter Editor Pane.