12 #ifndef __CH_Manager_h__
13 #define __CH_Manager_h__
63 class CH_ScriptAccessManager;
67 class CH_UndoScopeChannels;
94 virtual
void changed() = 0;
118 bool scopeChannelInternal(
const CH_Channel *chp,
bool on_off);
119 bool scopeChannelInternal(
const CH_ChannelRef &chref,
bool on_off);
121 void scopeChannel(
const char *full_chan_path,
bool on_off);
122 void unscopeChannelsWithNodeId(
int node_id,
bool force=
false);
125 void scopeChanged(
unsigned flags,
bool propagate=
true );
126 void scopeChanged(
unsigned flags,
bool propagate,
131 bool isChannelScoped(
const char *full_chan_path)
const;
137 bool isChannelDisplayed(
CH_Channel *chp)
const;
139 bool isChannelDisplayed(
const char *full_chan_path )
const;
140 void clearDisplayedChannels(
bool propagate =
true );
141 void displayAllScopedChannels(
bool propagate =
true );
142 void displaySelectedScopedChannels(
bool propagate =
true );
145 bool propagate =
true );
146 void displayChannel(
const char *full_chan_path,
147 bool propagate =
true );
149 bool propagate =
true );
150 void undisplayChannel(
const char *full_chan_path,
151 bool propagate =
true );
152 void undisplayChannelsWithNodeId(
int node_id,
bool force=
false);
157 bool isChannelSelected(
const char *full_chan_path )
const;
158 void clearSelectedChannels(
bool propagate =
true );
159 void selectAllScopedChannels(
bool propagate =
true );
162 bool propagate =
true );
163 void selectChannel(
const char *full_chan_path,
164 bool propagate =
true );
166 bool propagate =
true );
167 void deselectChannel(
const char *full_chan_path,
168 bool propagate =
true );
173 void togglePinAllScopedChannels();
175 void pinAllScopedChannels(
bool propagate =
true );
176 void unpinAllScopedChannels(
bool propagate =
true );
177 void pinSelectedChannels(
bool propagate =
true,
179 void unpinSelectedChannels(
bool propagate =
true,
182 bool propagate =
true );
184 bool propagate =
true );
186 bool propagate =
true );
188 bool propagate =
true );
189 void unpinChannelsWithNodeId(
int node_id,
bool force=
false);
190 void clearPinnedChannels(
bool propagate =
true );
195 void clearLayerScope();
197 bool isLayerScoped(
const char *full_chan_path)
const;
200 void scopeLayer(
const char *full_chan_path,
bool on_off);
201 bool scopeLayerInternal(
CH_Channel *chp,
bool on_off);
202 bool scopeLayerInternal(
const CH_ChannelRef &chref,
bool on_off);
208 bool isLayerSelected(
const char *full_chan_path)
const;
209 void clearSelectedLayers(
bool propagate =
true);
210 void selectAllScopedLayers(
bool propagate =
true);
212 void selectLayer(
const CH_ChannelRef &chref,
bool propagate=
true);
213 void selectLayer(
const char *full_chan_path,
bool propagate=
true);
214 void deselectLayer(
const CH_ChannelRef &chref,
bool propagate=
true);
215 void deselectLayer(
const char *full_chan_path,
bool propagate=
true);
220 void togglePinAllScopedLayers();
222 void pinAllScopedLayers(
bool propagate =
true );
223 void unpinAllScopedLayers(
bool propagate =
true );
224 void pinSelectedLayers(
bool propagate =
true,
226 void unpinSelectedLayers(
bool propagate =
true,
229 bool propagate =
true );
231 bool propagate =
true );
233 bool propagate =
true );
235 bool propagate =
true );
236 void clearPinnedLayers(
bool propagate =
true );
242 bool isLayerDisplayed(
const char *full_chan_path )
const;
243 void clearDisplayedLayers(
bool propagate =
true );
244 void displayAllScopedLayers(
bool propagate =
true );
245 void displaySelectedScopedLayers(
bool propagate =
true );
248 bool propagate =
true );
249 void displayLayer(
const char *full_chan_path,
250 bool propagate =
true );
252 bool propagate =
true );
253 void undisplayLayer(
const char *full_chan_path,
254 bool propagate =
true );
259 bool isGraphSelected(
const char *full_chan_path )
const;
260 void clearGraphSelected(
bool propagate =
true );
262 bool propagate =
true );
263 void selectGraph(
const char *full_chan_path,
264 bool propagate =
true );
266 bool propagate =
true );
267 void deselectGraph(
const char *full_chan_path,
268 bool propagate =
true );
278 bool propagate =
true );
283 bool propagate =
true );
286 unsigned getChannelFlags(
const CH_ChannelRef &chref )
const;
291 void clearChannelScope(
bool clear_all_tables=
false);
297 int getNumScopedChanRefs();
300 int getNumScopedChanRefs(
bool filtered);
307 bool sorted=
false)
const;
311 void getScopedChannelsKeyFrames(
UT_IntArray &frames,
312 int minframe,
int maxframe);
314 bool hasScopedChannels();
317 {
return myKeepChannelSelection; }
319 { myKeepChannelSelection =
b;}
324 FilterAnimationLayers = 1,
332 { myEnableFilter[filter_type] =
b; }
334 {
return myEnableFilter[filter_type]; }
337 { myFilter[filter_type] =
f;}
339 {
return myFilter[filter_type]; }
342 { myFilterTranlates =
b;}
344 {
return myFilterTranlates; }
347 { myFilterRotates =
b;}
349 {
return myFilterRotates; }
352 { myFilterScales =
b;}
354 {
return myFilterScales; }
357 { myFilterParmLabels[filter_type] =
b;}
359 {
return myFilterParmLabels[filter_type]; }
362 { myFilterFullNames[filter_type] =
b;}
364 {
return myFilterFullNames[filter_type]; }
371 bool hasFilter()
const;
373 void clearInvalidChannels();
394 bool myKeepChannelSelection;
395 mutable int myNumScopedChannels;
396 mutable int myTotalScopedChannels;
401 bool myEnableFilter[NumFilterType];
402 bool myFilterParmLabels[NumFilterType];
403 bool myFilterFullNames[NumFilterType];
404 bool myIsFiltered[NumFilterType];
405 bool myFilterTranlates;
406 bool myFilterRotates;
422 bool myAllowExternal;
443 , myIsGlobal(src.myIsGlobal)
462 this->CH_ScopedChannelsBase::operator=(src);
463 myIsGlobal = src.myIsGlobal;
474 void removeInterest();
488 CH_ON_COLLISION_ASSERT
489 } CollisionBehaviour;
492 CH_EXPANSION_TYPE_EXPRESSION = 1,
493 CH_EXPANSION_TYPE_VARIABLE = 1 << 1,
494 CH_EXPANSION_TYPE_TILDE = 1 << 2,
495 CH_EXPANSION_TYPE_NO_COMMENTS = 1 << 3,
496 CH_EXPANSION_TYPE_NO_RAWSTRINGS = 1 << 4,
497 CH_EXPANSION_TYPE_DEFAULT = CH_EXPANSION_TYPE_EXPRESSION |
498 CH_EXPANSION_TYPE_VARIABLE |
499 CH_EXPANSION_TYPE_TILDE,
508 static constexpr
int CH_SCOPE_REPLACED = 0;
509 static constexpr
int CH_SCOPE_FILTERED = 1;
514 CH_Manager(
bool init_the_expression_library =
true);
515 virtual ~CH_Manager();
521 virtual
void aboutToDelete();
524 static CH_Manager *getContext()
530 virtual void setContext();
534 void resetPlayback();
536 void resetChannelOptions(
bool notify =
true);
537 bool loadChannelOptions(
const char *
filename );
538 bool saveChannelOptions(
const char *
filename );
540 void setDefaultExpression(
const char *
s,
bool notify =
false);
543 {
return (
const char *)myDefaultExpression; }
545 {
return myShouldShowFakeAccelHandles; }
549 myDefaultRotationExpression.harden(s);
552 {
return (
const char *)myDefaultRotationExpression;}
556 {
return myAutoSlope; }
558 { myDefaultSlope = slope; }
560 {
return myDefaultSlope; }
561 void setAutoSplit(
bool onoff);
563 {
return myAutoSplit; }
564 void setDefaultSplitExpression(
const char *expr);
567 {
return (
const char *)myDefaultSplitExpression; }
570 { myHoldLastKey = onoff; }
572 {
return myHoldLastKey; }
574 {
return (
const char *)myChanCreateKeyExpression; }
576 { myChanCreateKeyExpression.harden(s ? s :
""); }
578 {
return myAlwaysCommitKey; }
580 { myAlwaysCommitKey = onoff; }
590 void clearChannelScope();
598 int getNumScopedChanRefs()
599 {
return myScopedChannels.getNumScopedChanRefs(); }
607 bool sorted=false)
const;
617 void getScopedChannelsKeyFrames(
UT_IntArray &frames,
618 int minframe,
int maxframe);
622 void blockModifyScope(
int on_off);
630 void scopeChannel(const
char *full_chan_path,
bool on_off);
632 bool scopeChannelInternal(const
CH_Channel *chp,
bool on_off);
634 bool scopeChannelInternal(const
CH_ChannelRef &chref,
bool on_off);
636 virtual
void getChannelsWithNodeId(
CH_ChannelList &chans,
int node_id) const;
640 void scopeChanged(
unsigned flags,
bool propagate=true );
646 bool isChannelScoped(const
char *full_chan_path) const;
653 void clearPendingChannels();
655 bool hasPendingChannels() const;
665 bool isChannelDisplayed(
CH_Channel *chp) const;
669 bool isChannelDisplayed( const
char *full_chan_path ) const;
671 void clearDisplayedChannels(
bool propagate = true );
673 void displayAllScopedChannels(
bool propagate = true );
675 void displaySelectedScopedChannels(
bool propagate = true );
679 bool propagate = true );
681 void displayChannel( const
char *full_chan_path,
682 bool propagate = true );
685 bool propagate = true );
687 void undisplayChannel( const
char *full_chan_path,
688 bool propagate = true );
696 bool isChannelSelected( const
char *full_chan_path ) const;
698 void clearSelectedChannels(
bool propagate = true );
700 void selectAllScopedChannels(
bool propagate = true );
704 bool propagate = true );
706 void selectChannel( const
char *full_chan_path,
707 bool propagate = true );
710 bool propagate = true );
712 void deselectChannel( const
char *full_chan_path,
713 bool propagate = true );
719 void togglePinAllScopedChannels();
723 void pinAllScopedChannels(
bool propagate = true );
725 void unpinAllScopedChannels(
bool propagate = true );
727 void pinSelectedChannels(
bool propagate = true,
728 int operate_on = CH_SELECTED );
730 void unpinSelectedChannels(
bool propagate = true,
731 int operate_on = CH_SELECTED );
734 bool propagate = true );
737 bool propagate = true );
742 void clearLayerScope();
746 bool isLayerScoped(const
char *full_chan_path) const;
752 void scopeLayer(const
char *full_chan_path,
bool on_off);
754 bool scopeLayerInternal(
CH_Channel *chp,
bool on_off);
756 bool scopeLayerInternal(const
CH_ChannelRef &chref,
bool on_off);
764 bool isLayerSelected( const
char *full_chan_path ) const;
766 void clearSelectedLayers(
bool propagate = true );
768 void selectAllScopedLayers(
bool propagate = true );
771 void selectLayer( const
CH_ChannelRef &chref,
bool propagate = true );
773 void selectLayer( const
char *full_chan_path,
bool propagate = true );
775 void deselectLayer( const
CH_ChannelRef &chref,
bool propagate = true );
777 void deselectLayer( const
char *full_chan_path,
bool propagate = true );
783 void togglePinAllScopedLayers();
787 void pinAllScopedLayers(
bool propagate = true );
789 void unpinAllScopedLayers(
bool propagate = true );
791 void pinSelectedLayers(
bool propagate = true,
int operate_on =
CH_LAYER_SELECTED );
793 void unpinSelectedLayers(
bool propagate = true,
int operate_on = CH_LAYER_SELECTED );
806 bool isLayerDisplayed( const
char *full_chan_path ) const;
808 void clearDisplayedLayers(
bool propagate = true );
810 void displayAllScopedLayers(
bool propagate = true );
812 void displaySelectedScopedLayers(
bool propagate = true );
816 bool propagate = true );
818 void displayLayer( const
char *full_chan_path,
819 bool propagate = true );
822 bool propagate = true );
824 void undisplayLayer( const
char *full_chan_path,
825 bool propagate = true );
831 bool propagate = true );
833 unsigned getChannelFlags( const
CH_ChannelRef &chref ) const;
841 int expandString(const
char *
string,
UT_String &expanded,
844 int expansion_type = CH_EXPANSION_TYPE_DEFAULT,
846 context_options_stack =
nullptr,
850 void buildStringOpDependencies( const
char *str,
void *ref_id,
857 bool scanForVariableInString(const
char *variable,
858 const
char *
string) const;
860 const
char *new_fullpath,
861 const
char *old_fullpath,
863 const
char *chan_name,
864 const
char *old_chan_name,
875 context_options_stack =
nullptr,
876 DEP_ContextOptionsReadHandle context_options =
877 DEP_ContextOptionsReadHandle());
883 context_options_stack =
nullptr,
884 DEP_ContextOptionsReadHandle context_options =
885 DEP_ContextOptionsReadHandle());
889 static
void evaluationError(
int err,
int thread, const
char *
path);
900 bool getIsSettingGlobalParam()
const
901 {
return (mySettingGlobalParam > 0); }
902 void getGlobalParamF(
const char *token,
CH_Collection *scope,
904 bool add_dependencies );
905 void getGlobalParamS(
const char *token,
CH_Collection *scope,
907 int thread,
bool add_dependencies );
912 void getGlobalParamAnyScopeF(
const char *token,
CH_Collection *scope,
914 bool add_dependencies );
915 void getGlobalParamAnyScopeS(
const char *token,
CH_Collection *scope,
917 int thread,
bool add_dependencies );
919 int setGlobalFloatParam(
const char *token,
922 int setGlobalStringParam(
const char *token,
927 void dumpGlobalParams(std::ostream &out)
const;
931 void dirtyOrphanGlobalParamDependents(
const char *token,
939 {
return (mySettingGuideParam > 0); }
947 CH_Group *findGroup(
const char *const_path,
bool create =
false,
950 const char *
pattern,
bool minimal );
962 bool propagate =
true);
963 void updateGroupSelectionFromScoped(
void *by,
964 bool propagate =
true);
965 void updateCurrentGroup(
CH_Group *group,
967 bool propagate =
true);
968 void enforceLeafOnlyChannels(
CH_Group *group,
969 const char *
name=
"new_group");
972 CH_Group *createGroup(
const char *const_path,
973 bool do_rename =
true,
975 void renameGroup(
CH_Group *group,
const char *newname);
979 void extractGroup(
CH_Group *group, CollisionBehaviour cb );
982 void collapseChildren(
CH_Group *parent );
988 CollisionBehaviour cb,
989 const char *new_name =
nullptr );
991 CollisionBehaviour cb,
992 const char *new_name =
nullptr );
994 CollisionBehaviour cb );
996 CollisionBehaviour cb );
1001 void channelCreated(
const CH_Channel *chp );
1002 void channelDeleted(
const CH_Channel *chp );
1016 static bool couldExpandString(
const char *str);
1020 {
return myDefaultExprLanguage; }
1022 { myDefaultExprLanguage = language; }
1026 {
return p == &myScopedChannels; }
1030 {
return myScopedChannels; }
1032 {
return myScopedChannels; }
1034 bool hasExternalCollection(
const CH_Collection *collection)
const;
1037 void scopeExternalCollection(
CH_Collection *collection,
bool on_off =
true);
1044 CH_Channel *getExternalChannel(
const char *collection,
1045 const char *
name)
const;
1051 {
return myExternalCollections; }
1054 void timeGroupsChanged();
1056 bool do_rename=
true,
1059 void destroyTimeGroup(
int i);
1061 const char *newname,
1068 int getTimeGroupIdx(
const char *
name )
const;
1072 void bookmarksChanged(
1077 {
return myBookmarksMicroNode; }
1081 bool create =
true);
1090 bool notify =
true);
1092 void destroyBookmark(
int index,
bool create_undo =
true,
1093 bool notify =
true);
1094 void destroyBookmarks(
1096 bool create_undo =
true,
1097 bool notify =
true);
1100 bool create_undo =
true,
1101 bool notify =
true);
1106 void frameBookmark(
int index,
1107 bool store_previous_range =
true);
1110 bool store_previous_range =
true);
1112 void clearBookmarks();
1118 void setMostRecentBookmark(
CH_Bookmark *bookmark);
1121 void setLeastRecentBookmark(
CH_Bookmark *bookmark);
1127 int getFramedBookmarkIndex()
const;
1134 {
return myBookmarks(i).get(); }
1145 {
return myRecentBookmarks; }
1150 static inline fpreal niceNumber(
fpreal num,
int digits=6);
1155 int niceFrameSeparation(
fpreal initial_sep,
1156 int minimum_sep = 1)
const;
1171 static fpreal getDefaultFPS();
1174 static int getDefaultChopMotionSamples();
1177 void setRawNumSamples(
int n,
bool notify =
true);
1179 void setSamplesPerSec(
fpreal fps,
bool notify =
true);
1181 void setRawSamplesPerSec(
fpreal fps,
bool notify =
true);
1183 void setChopMotionSamples(
int n,
bool notify =
true);
1188 {
return getFrame( myStart ); }
1190 {
return getFrame( myEnd ); }
1195 void setGlobalStart(
fpreal start,
bool notify =
true);
1206 return ((sample-1.0)/myFPS);
1216 return niceNumber(getSampleRaw(t));
1221 return (
int)
SYSfloor(getSampleRaw(t+getTolerance()));
1226 return sample_delta/myFPS;
1231 return time_delta*myFPS;
1236 return getTime(
SYSrint( getSampleRaw(t) ) );
1242 return getTime(getSnapSubsample(getSampleRaw(t)));
1255 return SYSrint((frame - getGlobalStartFrame())
1256 * (1.0 / mySampleStep))
1257 * mySampleStep + getGlobalStartFrame();
1271 snaptime = getSnapToFrameTime( t );
1272 return SYSisEqual(t, snaptime, getTolerance());
1284 void setIntegerFrameFlag(
int flag,
bool notify =
true);
1287 void setRestrictRangeFlag(
int flag,
bool notify =
true);
1290 void setShowRangeFlag(
int flag,
bool notify =
true);
1293 void setShowTicksFlag(
int flag,
bool notify =
true);
1296 void setShowAudioFlag(
int flag,
bool notify =
true);
1299 void setShowKeysFlag(
int flag,
bool notify =
true);
1302 void setShowBookmarksFlag(
int flag,
bool notify =
true);
1305 void setShowSimCacheFlag(
int flag,
bool notify =
true);
1308 void setShowAnimBarFlag(
int flag,
bool notify =
true);
1317 void parseUnitsString(
const char *
units,
1320 fpreal scaleToMKS(
const char *fromunits)
const;
1321 fpreal scaleFromMKS(
const char *tounits)
const;
1324 void setRealTimeFlag(
int flag,
bool notify =
true);
1326 void setRealTimeFactor(
fpreal f,
bool notify =
true);
1328 void setRealTimeDisableSkip(
bool b,
bool notify =
true);
1330 void setSampleStep(
fpreal s,
bool notify =
true);
1334 start = myRangeStart;
1343 int saveChannels(
const char *
filename,
bool binary,
bool compiled,
1345 bool displayed =
false)
const;
1346 int loadChannels(
const char *
filename,
1347 const char *src_pattern,
1348 const char *dest_pattern,
1353 bool delete_keys =
false,
1355 static bool readCHNFileHeader(
UT_IStream &is,
bool quiet,
1359 static bool skipCHNFileHeaderForCollection(
UT_IStream &is,
bool &is_fp64);
1360 static bool getFileType(
const char *
filename,
int &raw,
int &
binary );
1361 static bool printFileInfo(std::ostream &os,
const char *
filename,
1363 bool print_segments=
true );
1384 evalContext(thread).myCollection =
g;
1386 evalContext(thread).myChannel =
nullptr;
1387 evalContext(thread).mySegment =
nullptr;
1388 evalContext(thread).myChannelName =
nullptr;
1399 return evalContext(thread).myCollection;
1406 { myRootCollection = root; }
1408 {
return myRootCollection; }
1415 {
return myEvalContext.getValueForThread(thread); }
1419 {
return myEvalContext.getValueForThread(thread); }
1422 {
return evalContext(thread).myChannel; }
1424 {
return evalContext(thread).mySegment; }
1426 {
return evalContext(thread).myChannelName; }
1429 {
return evalContext(thread).myContextOptionsStack; }
1432 {
return evalContext(thread).myContextOptions; }
1437 {
return evalContext(thread).time(); }
1439 { evalContext(thread).setTime(time); }
1441 { evalContext(thread).setFlicks(fl); }
1457 bool getVariableValue(
UT_String &str,
int i,
1459 bool getVariableValue(
fpreal &
val,
int i,
1463 bool getVariableValue(
int &
val,
int i,
int thread)
const;
1466 virtual bool getVariableString(
const char *
name,
1479 static void lookupVariableNoThread(
const char *
name,
1483 static void lookupExpressionNoThread(
const char *
name,
1504 const char *
path)
const;
1525 bool use_alias=
false)
const;
1527 virtual bool isChanRefValid(
const CH_ChannelRef &chref)
const;
1529 void changeReferencesToNodeId(
int old_id,
int new_id);
1535 void removeReferencesToNodeId(
int node_id);
1537 void displayScope()
const;
1551 {
return myAutoKeyTuples; }
1553 { myAutoKeyTuples=
b; }
1558 {
return mySetAutoScopeOnChannelCreate; }
1560 { mySetAutoScopeOnChannelCreate=
b; }
1565 {
return myAutoScopeIncludeAnimated; }
1567 { myAutoScopeIncludeAnimated=
b; }
1571 {
return myFollowScopedChannelReferences; }
1573 { myFollowScopedChannelReferences=
b; }
1586 fpreal evalCycleOffsetFunc(
1588 fpreal evalCycleOffsettFunc(
1615 {
return myAutoScopeIncludeChild; }
1617 { myAutoScopeIncludeChild=
b; }
1622 {
return myAutoScopeIncludeConstraints; }
1624 { myAutoScopeIncludeConstraints=
b; }
1632 {
return myDefaultContextOptions; }
1635 void setDefaultContextOption(
1638 void setDefaultContextOption(
1643 void setDefaultContextOptionUiConfig(
1646 void removeDefaultContextOption(
1648 void clearDefaultContextOptions();
1649 bool saveDefaultContextOptions(std::ostream &os)
const;
1650 bool loadDefaultContextOptions(
UT_IStream &is);
1651 int addDefaultContextOptionCallback(
1653 void removeDefaultContextOptionCallback(
int id);
1654 bool isAutomaticContextOption(
1656 bool isAutomaticContextOptionOverridden(
1658 void pushRopCookContextOptions();
1659 void pushRopCookContextOptions(
bool ropcook,
1665 void resetRopCookContextOptions();
1666 void updateRopCookContextOptions(
bool ropcook,
1672 void popRopCookContextOptions();
1677 void setChannelChanged( CH_ChannelChanged *mgr );
1678 CH_ChannelChanged *getChannelChanged();
1679 void triggerChannelChanged();
1692 {
return myIgnoreUpdateScopeFlag; }
1694 { myIgnoreUpdateScopeFlag = onoff; }
1696 static int getSimpleSegmentTypeFromExpression(
const char *expr);
1708 void setTolerance(
fpreal tol);
1710 void initExpressionLibrary();
1714 void initLibraryGlue();
1723 void destroyExternalCollection(
1730 void internalScopeChanged(
unsigned flags,
1731 bool propagate=
true,
1732 const int &reason = CH_SCOPE_REPLACED);
1734 void playbackChanged();
1736 void handleGroupCollision(
CH_Group *new_group,
1738 CollisionBehaviour cb );
1740 void destroyContents();
1741 int internalSetGlobalParam(
const char *token,
1744 int setSingleGlobalParam(
const char *token,
1747 void internalDirtyOrphanGlobalParamDependents(
1752 void propagateDefaultContextOptionDirtied(
1755 static char *chExprExpander(
const char *str,
int thread);
1761 bool operator==(
const chParamKey &key)
const;
1765 const char *getToken()
const
1773 {
return key.hash(); }
1822 chParamData *findGlobalParam(
const char *token,
1824 chParamData *findOrCreateGlobalParam(
1826 fpreal fval,
const char *sval);
1828 chParamData *myLastGlobalParam;
1829 int mySettingGlobalParam;
1831 int mySettingGuideParam;
1833 int myChopMotionSamples;
1835 unsigned myGroupsSorted:1,
1838 myRealTimeDisableSkip:1,
1849 mySetAutoScopeOnChannelCreate:1,
1850 myAutoScopeIncludeAnimated:1,
1851 myFollowScopedChannelReferences:1,
1852 myAutoScopeIncludeChild:1,
1853 myAutoScopeIncludeConstraints:1;
1855 short myRawInterpFlag;
1858 bool myShouldShowFakeAccelHandles;
1862 SlopeMode myAutoSlope;
1866 bool myAlwaysCommitKey;
1879 int myBlockModifyScope;
1880 unsigned myPendingScopeChange;
1881 bool myPendingChannelChanged;
1884 CH_ChannelChanged *myChannelChanged;
1889 myDefaultContextOptionCallbacks;
1890 int myNextDefaultContextOptionCallbackId;
1892 bool myIgnoreUpdateScopeFlag;
1894 static CH_Manager *theManager;
1899 static constexpr
exint CH_SAMPLES_PER_FRAME = 1000;
1903 friend class CH_UndoScopeChannels;
1918 : myContext(chman.evalContext(thread))
1919 , myCollection(nullptr)
1920 , myPopCollection(false)
1921 , myPopContextOptions(false)
1923 #if defined(CH_USE_FLICKS)
1924 myFlicks = myContext.flicks();
1926 mySeconds = myContext.time();
1928 myContext.setTime(time);
1931 myPopCollection =
true;
1932 myCollection = myContext.myCollection;
1933 myContext.myCollection = ch;
1935 if (!context_options.isNull())
1937 myPopContextOptions =
true;
1938 myContextOptionsStack = myContext.myContextOptionsStack;
1939 myContext.myContextOptionsStack = context_options_stack;
1940 myContextOptions = myContext.myContextOptions;
1941 myContext.myContextOptions = context_options;
1947 #if defined(CH_USE_FLICKS)
1948 myContext.setFlicks(myFlicks);
1950 myContext.setTime(mySeconds);
1952 if (myPopCollection)
1953 myContext.myCollection = myCollection;
1954 if (myPopContextOptions)
1956 myContext.myContextOptionsStack = myContextOptionsStack;
1957 myContext.myContextOptions = myContextOptions;
1968 #if defined(CH_USE_FLICKS)
1973 bool myPopCollection;
1974 bool myPopContextOptions;
1985 : myContext(
CH_Manager::getContext()->evalContext(thread))
1987 myCollection = myContext.myCollection;
1989 myContext.myCollection = collection;
1993 return myContext.myCollection;
1998 myContext.myCollection = collection;
2002 myContext.myCollection = myCollection;
2019 CH_ActiveLayerContrib();
2020 ~CH_ActiveLayerContrib();
2052 : myOwner(owner), myChanRef(ref), myFlags(flags)
2056 bool checkPtr()
const;
2088 return (
SYSrint(num * scale) / scale);
fpreal getSampleDelta(fpreal time_delta) const
CH_ScopedChannelsBase(CH_Manager *mgr)
fpreal getRealTimeFactor() const
void setFilterRotates(bool b)
CH_API void CHsortChannelRefs(CH_ChannelRefList &channels)
GLenum GLuint GLenum GLsizei const GLchar * buf
DEP_ContextOptionsHandle getDefaultContextOptions() const
fpreal getSnapToSubframeTime(fpreal t) const
GT_API const UT_StringHolder filename
bool getAutoScopeIncludeConstraints() const
#define UT_AT_SCOPE_EXIT(...)
const char * getEvalChannelName(int thread) const
fpreal getSnapToFrameTime(fpreal t) const
fpreal getSecsPerSample() const
CH_ScopedChannels(const CH_ScopedChannels &src)
CH_API fpreal CHgetTimeFromFrame(fpreal frame)
bool isGlobalScopedChannels(CH_ScopedChannelsBase *p)
#define SYS_DEPRECATED(__V__)
void setAutoScopeOnChannelCreate(bool b)
CH_API fpreal CHgetSampleFromTime(fpreal time)
SYS_FORCE_INLINE CH_Manager * ourManager() const
virtual ~CH_ChannelColorManager()
void setAutoScopeIncludeChild(bool b)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
const DEP_ContextOptionsStack * getEvalChannelContextOptionsStack(int thread) const
void setEnableFilter(FilterType filter_type, bool b)
void setAutoScopeIncludeConstraints(bool b)
fpreal getUnitLength() const
GT_API const UT_StringHolder time
bool(* CH_StringVarEvalFunc)(UT_String &val, int varid, int thread)
UT_StringArray JOINTS head
void setHoldFlag(int flag)
bool(* CH_IntVarEvalFunc)(int &val, int varid, int thread)
const GLuint GLenum const void * binary
GLsizei const GLchar *const * path
void setFilterParmLabels(FilterType filter_type, bool b)
const UT_StringMap< UT_UniquePtr< CH_Collection > > & getExternalCollections() const
bool getAutoScopeOnChannelCreate() const
fpreal getSampleRaw(fpreal t) const
const CH_TimeGroup * getTimeGroup(int i) const
std::size_t SYS_HashType
Define the type for hash values.
fpreal getSnapSample(fpreal frame) const
void setEvalCollection(CH_Collection *g, int thread)
int getShowSimCacheFlag() const
bool getFilterFullNames(FilterType filter_type) const
JSON reader class which handles parsing of JSON or bJSON files.
CH_API void CHsortChannelPaths(UT_StringArray &channel_paths)
CH_API void CHoutputChannelList(UT_WorkBuffer &info, CH_ChannelList &channels)
bool getKeepChannelListSelection() const
void setFilterScales(bool b)
bool getAutoScopeIncludeChild() const
Selectively extract and filter point data using a custom filter operator.
CH_API void CHbuildRange(int start, int end, UT_SuperIntervalR &r)
Class which writes ASCII or binary JSON streams.
fpreal getTimeDelta(fpreal sample_delta) const
fpreal getTimeCodeOffset(fpreal) const
CH_Tweener * getChannelTweener()
void setFilter(FilterType filter_type, const UT_StringHolder &f)
**But if you need a result
bool getEnableFilter(FilterType filter_type) const
bool getIsSettingGuideParam() const
int getRealTimeFlag() const
CH_ScopeUndo(CH_ScopedChannels *owner, const CH_ChannelRef &ref, unsigned flags)
UT_Function< void(const UT_StringHolder &)> CH_DefaultContextOptionCallback
fpreal getSnapSubsample(fpreal frame) const
bool shouldShowFakeAccelHandles() const
const CH_EvalContext & evalContext(int thread) const
int getHoldLastKey() const
void setAutoScopeIncludeAnimated(bool b)
int getShowKeysFlag() const
virtual void beginChannelChanges()
fpreal getUnitMass() const
static bool getContextExists()
void setUnitMass(fpreal unitmass)
bool getRealTimeDisableSkip() const
SlopeMode getAutoSlope() const
virtual void channelsChanged()
DEP_MicroNode & getBookmarksMicroNode()
void setChanCreateKeyExpression(const char *s)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
void setFollowScopedChannelReferences(bool b)
CH_AutoEvalCollection(int thread, CH_Collection *collection=nullptr)
int getGlobalEndFrame() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
virtual void endChannelChanges()
GA_API const UT_StringHolder scale
bool getFollowScopedChannelReferences() const
int getNTimeGroups() const
CH_Bookmark * getBookmark(int i)
void getSampleRange(fpreal &start, fpreal &end)
int getFrame(fpreal t) const
fpreal getSampleStep() const
CH_API void CHsortLayerRefs(CH_ChannelRefList &channels)
int getShowBookmarksFlag() const
bool getAutoScopeIncludeAnimated() const
int getRawInterpolation()
CH_AutoEvaluateTime(CH_Manager &chman, int thread, fpreal time, CH_Collection *ch=nullptr, const DEP_ContextOptionsStack *context_options_stack=nullptr, DEP_ContextOptionsReadHandle context_options=DEP_ContextOptionsReadHandle())
CH_Manager * CHgetManager()
fpreal getGlobalStart() const
fpreal getSample(fpreal t) const
CH_ScopedChannels & operator=(const CH_ScopedChannels &src)
int getIntegerFrameFlag() const
const CH_Segment * getEvalSegment(int thread) const
bool getAutoKeyTuples() const
Auto-Key all Tuples is a preference to key tuples together.
DEP_ContextOptionsReadHandle getEvalChannelContextOptions(int thread) const
void setRootCollection(CH_Collection *root)
fpreal getSamplesPerSec() const
const CH_Bookmark * getBookmark(int i) const
int getRestrictRangeFlag() const
void setDefaultSlope(fpreal slope)
int getNBookmarks() const
GLsizei GLsizei GLchar * source
void setEvaluateTime(SYS_Flicks fl, int thread)
Functions for obtaining and setting the current evaluation time.
void setAllowExternal(bool allow)
CH_EvalContext & evalContext(int thread)
CH_API void CHchannelsToCollections(CH_ChannelList const &channels, CH_CollectionList &collections)
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
const CH_Channel * getEvalChannel(int thread) const
void setRawInterpolation(int state)
CH_API void CHdisplayFlags(unsigned flags, std::ostream &s)
void setFilterFullNames(FilterType filter_type, bool b)
fpreal getGlobalEnd() const
void setDefaultExprLanguage(CH_ExprLanguage language)
bool getIgnoreUpdateScopeFlag() const
SYS_API fpreal32 SYSfloor(fpreal32 val)
fpreal getAudioLevel() const
GLuint const GLchar * name
CH_Collection * collection() const
CH_API int CHgetFrameFromTime(fpreal time)
void setAudioLevel(fpreal lvl)
CH_ExprLanguage getDefaultExprLanguage()
const UT_StringHolder & getFilter(FilterType filter_type) const
void setAutoSlope(SlopeMode m)
std::function< T > UT_Function
GLboolean GLboolean GLboolean b
bool getAllowExternal() const
fpreal32 SYSrint(fpreal32 val)
fpreal getDefaultSlope() const
static CH_Manager * getContext()
int getShowAnimBarFlag() const
int getShowAudioFlag() const
bool getIsAtFrame(fpreal t) const
int getShowRangeFlag() const
const char * getDefaultExpression() const
GT_API const UT_StringHolder version
void setDefaultRotationExpression(const char *s)
const CH_ScopedChannels & getGlobalScopedChannels() const
CH_ScopedChannels * myOwner
fpreal getEvaluateTime(int thread) const
Functions for obtaining and setting the current evaluation time.
CH_Collection * getEvalCollection(int thread) const
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
void setUnitLength(fpreal unitlength)
bool getFilterTranslates() const
UT_COWReadHandle< DEP_ContextOptions > DEP_ContextOptionsReadHandle
static fpreal niceNumber(fpreal num, int digits=6)
void setAutoKeyTuples(bool b)
Push & restore the evaluation time (and optionally a channel collection)
int getChopMotionSamples() const
CH_ScopedChannels & getGlobalScopedChannels()
SIM_API const UT_StringHolder force
const char * getDefaultRotationExpression() const
void setKeepChannelListSelection(bool b)
virtual ~CH_ChannelChanged()
SYS_HashType operator()(const chParamKey &key) const
void setAlwaysCommitKeyChange(bool onoff)
bool getAutoSplit() const
void setHoldLastKey(bool onoff)
bool getFilterRotates() const
fpreal getNumSamples() const
virtual CH_ScriptAccessManager * getAccessManager(int)
void setTimeCodeOffset(fpreal t)
bool getAlwaysCommitKeyChange() const
void set(CH_Collection *collection)
virtual bool channelsBeingChanged()
virtual bool getChannelAutoSelect(const CH_ChannelRef &chref) const
CH_TimeGroup * getTimeGroup(int i)
CH_Collection * getRootCollection() const
GLubyte GLubyte GLubyte GLubyte w
bool getFilterParmLabels(FilterType filter_type) const
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
fpreal getFrameTolerance() const
bool getFilterScales() const
const UT_Array< exint > & getBookmarksOrderByRecentUsage()
bool SYSisEqual(const UT_Vector2T< T > &a, const UT_Vector2T< T > &b, S tol=SYS_FTOLERANCE)
Componentwise equality.
const char * getDefaultSplitExpression() const
void setIgnoreUpdateScopeFlag(bool onoff)
bool(* CH_FloatVarEvalFunc)(fpreal &val, int varid, int thread)
void setEvaluateTime(fpreal time, int thread)
Functions for obtaining and setting the current evaluation time.
int getGlobalStartFrame() const
fpreal getTolerance() const
fpreal getTime(fpreal sample) const
void setFilterTranslates(bool b)
int getShowTicksFlag() const
CH_API void CHsortChannels(CH_ChannelList &channels)
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)
CH_ScopedChannels & CHgetScopedChannels()
const char * getChanCreateKeyExpression() const