MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / drawRows

Method drawRows

Gui/DopeSheetView.cpp:1001–1072  ·  view source on GitHub ↗

* @brief DopeSheetViewPrivate::drawRows * * * * These rows have the same height as an item from the hierarchy view. */

Source from the content-addressed store, hash-verified

999 * These rows have the same height as an item from the hierarchy view.
1000 */
1001void
1002DopeSheetViewPrivate::drawRows() const
1003{
1004 running_in_main_thread_and_context(q_ptr);
1005
1006 DSTreeItemNodeMap treeItemsAndDSNodes = model->getItemNodeMap();
1007
1008 // Perform drawing
1009 {
1010 GLProtectAttrib a(GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT);
1011
1012 for (DSTreeItemNodeMap::const_iterator it = treeItemsAndDSNodes.begin();
1013 it != treeItemsAndDSNodes.end();
1014 ++it) {
1015 QTreeWidgetItem *treeItem = (*it).first;
1016
1017 if ( treeItem->isHidden() ) {
1018 continue;
1019 }
1020
1021 if ( QTreeWidgetItem * parentItem = treeItem->parent() ) {
1022 if ( !parentItem->isExpanded() ) {
1023 continue;
1024 }
1025 }
1026
1027 glEnable(GL_BLEND);
1028 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1029
1030 DSNodePtr dsNode = (*it).second;
1031
1032 drawNodeRow(dsNode);
1033
1034 const DSTreeItemKnobMap& knobItems = dsNode->getItemKnobMap();
1035 for (DSTreeItemKnobMap::const_iterator it2 = knobItems.begin();
1036 it2 != knobItems.end();
1037 ++it2) {
1038 DSKnobPtr dsKnob = (*it2).second;
1039
1040 drawKnobRow(dsKnob);
1041 }
1042
1043 {
1044 DSNodePtr group = model->getGroupDSNode( dsNode.get() );
1045 if (group) {
1046 drawGroupOverlay(dsNode, group);
1047 }
1048 }
1049
1050 DopeSheetItemType nodeType = dsNode->getItemType();
1051
1052 if ( dsNode->isRangeDrawingEnabled() ) {
1053 drawRange(dsNode);
1054 }
1055
1056 if (nodeType != eDopeSheetItemTypeGroup) {
1057 drawKeyframes(dsNode);
1058 }

Callers 1

paintGLMethod · 0.80

Calls 10

getItemNodeMapMethod · 0.80
parentMethod · 0.80
getGroupDSNodeMethod · 0.80
getItemTypeMethod · 0.80
isRangeDrawingEnabledMethod · 0.80
getTreeItemMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected