charpicker package¶
Submodules¶
charpicker.controlbutton module¶
Bases:
sphinx.ext.autodoc.importer._MockObject
Custom signals for control button class
Used by autodoc_mock_imports.
Used by autodoc_mock_imports.
Used by autodoc_mock_imports.
Used by autodoc_mock_imports.
Used by autodoc_mock_imports.
Sends delete signal when deletion is triggered.
Deselects all nodes associated with this button.
Handles mouse press on button, depending on mode and modifiers, sends process to helper functions. Only accepts left mouse button for all actions.
Selects all of the nodes and sets the transform view if any. Emits this object as well as the keyboard modifier used to trigger it. This is used to handle multiple selection / deselection by ‘tabview’
Handles triggers from the default behavior sub menu. Checks against the cpglobals._PYS strings and sets the values to cpglobals._JSON strings.
Opens up the Qt color picker dialog and sets the style sheet to the returned hex color. The Qt dialog will return pure black if the user hits cancel, if that is the case revert the stylesheet to default
Set the button’s attributes based on the map read in from the JSON file. The attribute names are specified as globals with the prefix cpglobals._JSON.
Open dialog to input button label text
Opens the houdini node dialog, sets myNode, and breaks up the returned node name to set myCharPath and myControlPath set_from_update will be
Simple update method, used to reload the button’s node. should be called when charpath or controlpath is changed.
charpicker.controlslider module¶
-
class
charpicker.controlslider.
ControlSlider
(parent, is_horizontal, myId)¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Custom signals for control button class
-
csDeleteSignal
¶ Used by autodoc_mock_imports.
-
csTriggeredSignal
¶ Used by autodoc_mock_imports.
-
delete
()¶
-
mouseMoveEvent
(event)¶ Handles drag and drop for repositioning the button with absolute positioning. Only accepts right mouse button
-
mousePressEvent
(event)¶ Handles mouse press on button, depending on mode and modifiers, sends process to helper functions. Only accepts left mouse button for all actions. Needs to emit a tuple for the tabview to handle correctly. This is because controlbutton will use modifiers.
-
setLabel
()¶ “Sets the text of the label widget. If it is currently invisible, shows it.
-
setParameter
(set_from_update=False)¶ Opens the tree menu to select the parameter to link to. Optionally sets the parameter from update which will not open the menu and will use myParmPath as the parameter. This is useful when myParmPath is changed outside of this widget. Updates the tooltip display text.
-
setRange
()¶ Opens an input dialog and sets the range of the slider values.
-
setSliderFromMap
(input_map)¶ Sets the slider’s parameters based on the map loaded from a file or HDA.
-
updateValueFromSlider
(value)¶ Updates the value of the spinbox based on the value of the slider. Since sliders can only have integer values, divides the slider’s value.
-
updateValueFromSpinbox
(value, from_playbar_update=False)¶ Updates the value of the parameter.
-
charpicker.cpglobals module¶
Used by autodoc_mock_imports.
charpicker.mainwidget module¶
Used by autodoc_mock_imports.
charpicker.tabview module¶
-
class
charpicker.tabview.
TabView
(parent, parent_tab_name, _id, splitter_index, character_path, init_edit_mode)¶ Bases:
sphinx.ext.autodoc.importer._MockObject
-
addNewButton
(called_from_read=False)¶ Creates a new control button, adds it to the dictionary, and attaches the appropriate signals. Adds all of the groups in this tab to the button with their state set to False.
-
addNewSlider
(is_horizontal=True, called_from_read=False)¶
-
deleteButton
(id_number)¶ Removes the button from the dictionary, makes it invisible (possibly not necessary), and deletes it
-
deleteSlider
(id_number)¶
-
dragMoveEvent
(event)¶ Repositions the current button based on the current mouse position.
-
hasUnsavedChanges
()¶
-
mousePressEvent
(event)¶ Handles clicks on the image/backgound. If the user clicks the backgound the selection is reset and all highlights are removed. If the user shift clicks the background, all of the buttons are selected.
-
myEditMode
= False¶
-
refreshSelection
()¶ Reselects all the currently selected nodes. This method should be used when node paths are updated.
-
removeAllButtonCallbacks
()¶
-
resetSelectionHighlights
(multiple_selection)¶ Resets the style sheet of the buttons in this view if the user is not selecting multiple buttons or using control groups.
This function resets the highlights of all of the nodes and will reapply them to selected controls. This is activated when the user ctrl clicks a node and removes it from the selection.
-
resizeView
(resize_value, change_buttons=True)¶ Resizes the bacgkround image based on the scaling value and repositions the buttons based on their relative positions If reading from file, change_buttons will be False because the button positions are directly written out to the save file.
-
setBackgroundAction
(action)¶ Handles the actions from the Set Background menu.
-
setBackgroundImage
(b64_array)¶ Updates the background image data and redraws the image. If any of the buttons are outside the view of the image, they will be moved.
-
setChanged
(has_changed)¶
-
setCurrentWidget
(widget_mod_tuple)¶ Slot for setting the current widget. This is necessary for moving the widgets around inside of the tabview.
-
setImageFromFile
()¶ Opens houdini file browser, reads in the file as a base64 array and sets the background.
-
setImageURL
()¶ Sets the background given the input URL. ADD CHECKS FOR INVALID URL
-
setImageViewport
()¶ Finds the open viewport and saves out a temporary file. Reads in that file and converts to a base64 array. Passes that file to set background and deletes the written out image.
Highlights all of the other control buttons that share a node with current_button’s node selection.
-
tvTriggeredSignal
¶ Used by autodoc_mock_imports.
-
tvUnsavedChangesSignal
¶ Used by autodoc_mock_imports.
-
charpicker.tabwindow module¶
This widget is the parent widget for all of the TabViews. It manages the current tab, deleting tabs, and adding tabs. When the JSON file is read in by the Main widget, this module will handle creating the tabs within the QTabWidget
-
class
charpicker.tabwindow.
TabWindow
(init_edit_mode, quick_save_callback)¶ Bases:
sphinx.ext.autodoc.importer._MockObject
-
addNewTab
(is_single_view, new_tab_name=None, file_read_map=None, sizes=[])¶ Adds a new tab to the tab window. If file_read_map is none, then the tab is being added by the user, otherwise it will be the map read in from the JSON file.
-
cleanUpUponClose
()¶
-
deleteTab
(index)¶ Deletes the currently opened tab. This method is called when the close button on the tab widget is clicked.
-
getTabViewList
()¶
-
handleContextMenu
(action)¶
-
hasUnsavedChanges
()¶
-
mousePressEvent
(event)¶
-
setAllTabViewsChanged
(has_changed)¶
-
setChanged
(has_changed)¶
-
setCurrentIndex
(index)¶
-
setCurrentView
(current_view)¶ This slot sets the current tab view when the tab is clicked. This is used when a tabwindow has multiple children TabViews in split view widgets.
-
setEditMode
(edit_mode)¶
-
showContextMenu
(point)¶
-
tabChanged
()¶ Sets myCurrentTabView to the first child TabView widget of the currently open tab.
-