12 #ifndef __CH_Manager_h__
13 #define __CH_Manager_h__
64 class CH_ScriptAccessManager;
68 class CH_UndoScopeChannels;
95 virtual
void changed() = 0;
119 bool scopeChannelInternal(
const CH_Channel *chp,
bool on_off);
120 bool scopeChannelInternal(
const CH_ChannelRef &chref,
bool on_off);
122 void scopeChannel(
const char *full_chan_path,
bool on_off);
123 void unscopeChannelsWithNodeId(
int node_id,
bool force=
false);
126 void scopeChanged(
unsigned flags,
bool propagate=
true );
127 void scopeChanged(
unsigned flags,
bool propagate,
132 bool isChannelScoped(
const char *full_chan_path)
const;
138 bool isChannelDisplayed(
CH_Channel *chp)
const;
140 bool isChannelDisplayed(
const char *full_chan_path )
const;
141 void clearDisplayedChannels(
bool propagate =
true );
142 void displayAllScopedChannels(
bool propagate =
true );
143 void displaySelectedScopedChannels(
bool propagate =
true );
146 bool propagate =
true );
147 void displayChannel(
const char *full_chan_path,
148 bool propagate =
true );
150 bool propagate =
true );
151 void undisplayChannel(
const char *full_chan_path,
152 bool propagate =
true );
153 void undisplayChannelsWithNodeId(
int node_id,
bool force=
false);
158 bool isChannelSelected(
const char *full_chan_path )
const;
159 void clearSelectedChannels(
bool propagate =
true );
160 void selectAllScopedChannels(
bool propagate =
true );
163 bool propagate =
true );
164 void selectChannel(
const char *full_chan_path,
165 bool propagate =
true );
167 bool propagate =
true );
168 void deselectChannel(
const char *full_chan_path,
169 bool propagate =
true );
174 void togglePinAllScopedChannels();
176 void pinAllScopedChannels(
bool propagate =
true );
177 void unpinAllScopedChannels(
bool propagate =
true );
178 void pinSelectedChannels(
bool propagate =
true,
180 void unpinSelectedChannels(
bool propagate =
true,
183 bool propagate =
true );
185 bool propagate =
true );
187 bool propagate =
true );
189 bool propagate =
true );
190 void unpinChannelsWithNodeId(
int node_id,
bool force=
false);
191 void clearPinnedChannels(
bool propagate =
true );
196 void clearLayerScope();
198 bool isLayerScoped(
const char *full_chan_path)
const;
201 void scopeLayer(
const char *full_chan_path,
bool on_off);
202 bool scopeLayerInternal(
CH_Channel *chp,
bool on_off);
203 bool scopeLayerInternal(
const CH_ChannelRef &chref,
bool on_off);
209 bool isLayerSelected(
const char *full_chan_path)
const;
210 void clearSelectedLayers(
bool propagate =
true);
211 void selectAllScopedLayers(
bool propagate =
true);
213 void selectLayer(
const CH_ChannelRef &chref,
bool propagate=
true);
214 void selectLayer(
const char *full_chan_path,
bool propagate=
true);
215 void deselectLayer(
const CH_ChannelRef &chref,
bool propagate=
true);
216 void deselectLayer(
const char *full_chan_path,
bool propagate=
true);
221 void togglePinAllScopedLayers();
223 void pinAllScopedLayers(
bool propagate =
true );
224 void unpinAllScopedLayers(
bool propagate =
true );
225 void pinSelectedLayers(
bool propagate =
true,
227 void unpinSelectedLayers(
bool propagate =
true,
230 bool propagate =
true );
232 bool propagate =
true );
234 bool propagate =
true );
236 bool propagate =
true );
237 void clearPinnedLayers(
bool propagate =
true );
243 bool isLayerDisplayed(
const char *full_chan_path )
const;
244 void clearDisplayedLayers(
bool propagate =
true );
245 void displayAllScopedLayers(
bool propagate =
true );
246 void displaySelectedScopedLayers(
bool propagate =
true );
249 bool propagate =
true );
250 void displayLayer(
const char *full_chan_path,
251 bool propagate =
true );
253 bool propagate =
true );
254 void undisplayLayer(
const char *full_chan_path,
255 bool propagate =
true );
260 bool isGraphSelected(
const char *full_chan_path )
const;
261 void clearGraphSelected(
bool propagate =
true );
263 bool propagate =
true );
264 void selectGraph(
const char *full_chan_path,
265 bool propagate =
true );
267 bool propagate =
true );
268 void deselectGraph(
const char *full_chan_path,
269 bool propagate =
true );
279 bool propagate =
true );
284 bool propagate =
true );
287 unsigned getChannelFlags(
const CH_ChannelRef &chref )
const;
292 void clearChannelScope(
bool clear_all_tables=
false);
298 int getNumScopedChanRefs();
301 int getNumScopedChanRefs(
bool filtered);
308 bool sorted=
false)
const;
312 void getScopedChannelsKeyFrames(
UT_IntArray &frames,
313 int minframe,
int maxframe);
315 bool hasScopedChannels();
318 {
return myKeepChannelSelection; }
320 { myKeepChannelSelection =
b;}
325 FilterAnimationLayers = 1,
333 { myEnableFilter[filter_type] =
b; }
335 {
return myEnableFilter[filter_type]; }
338 { myFilter[filter_type] =
f;}
340 {
return myFilter[filter_type]; }
343 { myFilterTranlates =
b;}
345 {
return myFilterTranlates; }
348 { myFilterRotates =
b;}
350 {
return myFilterRotates; }
353 { myFilterScales =
b;}
355 {
return myFilterScales; }
358 { myFilterParmLabels[filter_type] =
b;}
360 {
return myFilterParmLabels[filter_type]; }
363 { myFilterFullNames[filter_type] =
b;}
365 {
return myFilterFullNames[filter_type]; }
372 bool hasFilter()
const;
374 void clearInvalidChannels();
395 bool myKeepChannelSelection;
396 mutable int myNumScopedChannels;
397 mutable int myTotalScopedChannels;
403 struct ChannelListWrap
409 ChannelListWrap myFiltered[NumFilterType];
411 bool myEnableFilter[NumFilterType];
412 bool myFilterParmLabels[NumFilterType];
413 bool myFilterFullNames[NumFilterType];
414 bool myIsFiltered[NumFilterType];
415 bool myFilterTranlates;
416 bool myFilterRotates;
432 bool myAllowExternal;
453 , myIsGlobal(src.myIsGlobal)
473 myIsGlobal = src.myIsGlobal;
484 void removeInterest();
498 CH_ON_COLLISION_ASSERT
499 } CollisionBehaviour;
502 CH_EXPANSION_TYPE_EXPRESSION = 1,
503 CH_EXPANSION_TYPE_VARIABLE = 1 << 1,
504 CH_EXPANSION_TYPE_TILDE = 1 << 2,
505 CH_EXPANSION_TYPE_NO_COMMENTS = 1 << 3,
506 CH_EXPANSION_TYPE_NO_RAWSTRINGS = 1 << 4,
507 CH_EXPANSION_TYPE_DEFAULT = CH_EXPANSION_TYPE_EXPRESSION |
508 CH_EXPANSION_TYPE_VARIABLE |
509 CH_EXPANSION_TYPE_TILDE,
518 static constexpr
int CH_SCOPE_REPLACED = 0;
519 static constexpr
int CH_SCOPE_FILTERED = 1;
524 CH_Manager(
bool init_the_expression_library =
true);
525 virtual ~CH_Manager();
531 virtual
void aboutToDelete();
534 static CH_Manager *getContext()
540 virtual void setContext();
544 void resetPlayback();
546 void resetChannelOptions(
bool notify =
true);
547 bool loadChannelOptions(
const char *
filename );
548 bool saveChannelOptions(
const char *
filename );
550 void setDefaultExpression(
const char *
s,
bool notify =
false);
553 {
return (
const char *)myDefaultExpression; }
555 {
return myShouldShowFakeAccelHandles; }
559 myDefaultRotationExpression.harden(s);
562 {
return (
const char *)myDefaultRotationExpression;}
566 {
return myAutoSlope; }
568 { myDefaultSlope = slope; }
570 {
return myDefaultSlope; }
571 void setAutoSplit(
bool onoff);
573 {
return myAutoSplit; }
574 void setDefaultSplitExpression(
const char *expr);
577 {
return (
const char *)myDefaultSplitExpression; }
580 { myHoldLastKey = onoff; }
582 {
return myHoldLastKey; }
584 {
return (
const char *)myChanCreateKeyExpression; }
586 { myChanCreateKeyExpression.harden(s ? s :
""); }
588 {
return myAlwaysCommitKey; }
590 { myAlwaysCommitKey = onoff; }
600 void clearChannelScope();
608 int getNumScopedChanRefs()
609 {
return myScopedChannels.getNumScopedChanRefs(); }
617 bool sorted=false) const;
627 void getScopedChannelsKeyFrames(
UT_IntArray &frames,
628 int minframe,
int maxframe);
632 void blockModifyScope(
int on_off);
640 void scopeChannel(const
char *full_chan_path,
bool on_off);
642 bool scopeChannelInternal(const
CH_Channel *chp,
bool on_off);
644 bool scopeChannelInternal(const
CH_ChannelRef &chref,
bool on_off);
646 virtual
void getChannelsWithNodeId(
CH_ChannelList &chans,
int node_id) const;
650 void scopeChanged(
unsigned flags,
bool propagate=true );
656 bool isChannelScoped(const
char *full_chan_path) const;
663 void clearPendingChannels();
665 bool hasPendingChannels() const;
675 bool isChannelDisplayed(
CH_Channel *chp) const;
679 bool isChannelDisplayed( const
char *full_chan_path ) const;
681 void clearDisplayedChannels(
bool propagate = true );
683 void displayAllScopedChannels(
bool propagate = true );
685 void displaySelectedScopedChannels(
bool propagate = true );
689 bool propagate = true );
691 void displayChannel( const
char *full_chan_path,
692 bool propagate = true );
695 bool propagate = true );
697 void undisplayChannel( const
char *full_chan_path,
698 bool propagate = true );
706 bool isChannelSelected( const
char *full_chan_path ) const;
708 void clearSelectedChannels(
bool propagate = true );
710 void selectAllScopedChannels(
bool propagate = true );
714 bool propagate = true );
716 void selectChannel( const
char *full_chan_path,
717 bool propagate = true );
720 bool propagate = true );
722 void deselectChannel( const
char *full_chan_path,
723 bool propagate = true );
729 void togglePinAllScopedChannels();
733 void pinAllScopedChannels(
bool propagate = true );
735 void unpinAllScopedChannels(
bool propagate = true );
737 void pinSelectedChannels(
bool propagate = true,
738 int operate_on = CH_SELECTED );
740 void unpinSelectedChannels(
bool propagate = true,
741 int operate_on = CH_SELECTED );
744 bool propagate = true );
747 bool propagate = true );
752 void clearLayerScope();
756 bool isLayerScoped(const
char *full_chan_path) const;
762 void scopeLayer(const
char *full_chan_path,
bool on_off);
764 bool scopeLayerInternal(
CH_Channel *chp,
bool on_off);
766 bool scopeLayerInternal(const
CH_ChannelRef &chref,
bool on_off);
774 bool isLayerSelected( const
char *full_chan_path ) const;
776 void clearSelectedLayers(
bool propagate = true );
778 void selectAllScopedLayers(
bool propagate = true );
781 void selectLayer( const
CH_ChannelRef &chref,
bool propagate = true );
783 void selectLayer( const
char *full_chan_path,
bool propagate = true );
785 void deselectLayer( const
CH_ChannelRef &chref,
bool propagate = true );
787 void deselectLayer( const
char *full_chan_path,
bool propagate = true );
793 void togglePinAllScopedLayers();
797 void pinAllScopedLayers(
bool propagate = true );
799 void unpinAllScopedLayers(
bool propagate = true );
801 void pinSelectedLayers(
bool propagate = true,
int operate_on =
CH_LAYER_SELECTED );
803 void unpinSelectedLayers(
bool propagate = true,
int operate_on = CH_LAYER_SELECTED );
816 bool isLayerDisplayed( const
char *full_chan_path ) const;
818 void clearDisplayedLayers(
bool propagate = true );
820 void displayAllScopedLayers(
bool propagate = true );
822 void displaySelectedScopedLayers(
bool propagate = true );
826 bool propagate = true );
828 void displayLayer( const
char *full_chan_path,
829 bool propagate = true );
832 bool propagate = true );
834 void undisplayLayer( const
char *full_chan_path,
835 bool propagate = true );
841 bool propagate = true );
843 unsigned getChannelFlags( const
CH_ChannelRef &chref ) const;
851 int expandString(const
char *
string,
UT_String &expanded,
854 int expansion_type = CH_EXPANSION_TYPE_DEFAULT,
856 context_options_stack =
nullptr,
860 void buildStringOpDependencies( const
char *str,
void *ref_id,
867 bool scanForVariableInString(const
char *variable,
868 const
char *
string) const;
870 const
char *new_fullpath,
871 const
char *old_fullpath,
873 const
char *chan_name,
874 const
char *old_chan_name,
885 context_options_stack =
nullptr,
886 DEP_ContextOptionsReadHandle context_options =
887 DEP_ContextOptionsReadHandle());
893 context_options_stack =
nullptr,
894 DEP_ContextOptionsReadHandle context_options =
895 DEP_ContextOptionsReadHandle());
899 static
void evaluationError(
int err,
int thread, const
char *
path);
910 bool getIsSettingGlobalParam()
const
911 {
return (mySettingGlobalParam > 0); }
912 void getGlobalParamF(
const char *token,
CH_Collection *scope,
914 bool add_dependencies );
915 void getGlobalParamS(
const char *token,
CH_Collection *scope,
917 int thread,
bool add_dependencies );
922 void getGlobalParamAnyScopeF(
const char *token,
CH_Collection *scope,
924 bool add_dependencies );
925 void getGlobalParamAnyScopeS(
const char *token,
CH_Collection *scope,
927 int thread,
bool add_dependencies );
929 int setGlobalFloatParam(
const char *token,
932 int setGlobalStringParam(
const char *token,
937 void dumpGlobalParams(std::ostream &out)
const;
941 void dirtyOrphanGlobalParamDependents(
const char *token,
949 {
return (mySettingGuideParam > 0); }
957 CH_Group *findGroup(
const char *const_path,
bool create =
false,
960 const char *
pattern,
bool minimal );
972 bool propagate =
true);
973 void updateGroupSelectionFromScoped(
void *by,
974 bool propagate =
true);
975 void updateCurrentGroup(
CH_Group *group,
977 bool propagate =
true);
978 void enforceLeafOnlyChannels(
CH_Group *group,
979 const char *
name=
"new_group");
982 CH_Group *createGroup(
const char *const_path,
983 bool do_rename =
true,
985 void renameGroup(
CH_Group *group,
const char *newname);
989 void extractGroup(
CH_Group *group, CollisionBehaviour cb );
992 void collapseChildren(
CH_Group *parent );
998 CollisionBehaviour cb,
999 const char *new_name =
nullptr );
1001 CollisionBehaviour cb,
1002 const char *new_name =
nullptr );
1004 CollisionBehaviour cb );
1006 CollisionBehaviour cb );
1011 void channelCreated(
const CH_Channel *chp );
1012 void channelDeleted(
const CH_Channel *chp );
1019 bool include_temporary=
false);
1023 bool remove_existing =
true);
1029 static bool couldExpandString(
const char *str);
1033 {
return myDefaultExprLanguage; }
1035 { myDefaultExprLanguage = language; }
1039 {
return p == &myScopedChannels; }
1043 {
return myScopedChannels; }
1045 {
return myScopedChannels; }
1047 bool hasExternalCollection(
const CH_Collection *collection)
const;
1050 void scopeExternalCollection(
CH_Collection *collection,
bool on_off =
true);
1058 CH_Channel *getExternalChannel(
const char *collection,
1059 const char *
name)
const;
1070 exint globExternalChannels(
1076 {
return myExternalCollections; }
1079 void timeGroupsChanged();
1081 bool do_rename=
true,
1084 void destroyTimeGroup(
int i);
1086 const char *newname,
1093 int getTimeGroupIdx(
const char *
name )
const;
1097 void bookmarksChanged(
1102 {
return myBookmarksMicroNode; }
1106 bool create =
true);
1115 bool notify =
true);
1117 void destroyBookmark(
int index,
bool create_undo =
true,
1118 bool notify =
true);
1119 void destroyBookmarks(
1121 bool create_undo =
true,
1122 bool notify =
true);
1125 bool create_undo =
true,
1126 bool notify =
true);
1131 void frameBookmark(
int index,
1132 bool store_previous_range =
true);
1135 bool store_previous_range =
true);
1137 void clearBookmarks();
1143 void setMostRecentBookmark(
CH_Bookmark *bookmark);
1146 void setLeastRecentBookmark(
CH_Bookmark *bookmark);
1152 int getFramedBookmarkIndex()
const;
1159 {
return myBookmarks(i).get(); }
1170 {
return myRecentBookmarks; }
1175 static inline fpreal niceNumber(
fpreal num,
int digits=6);
1180 int niceFrameSeparation(
fpreal initial_sep,
1181 int minimum_sep = 1)
const;
1196 static fpreal getDefaultFPS();
1199 static int getDefaultChopMotionSamples();
1202 void setRawNumSamples(
int n,
bool notify =
true);
1204 void setSamplesPerSec(
fpreal fps,
bool notify =
true);
1206 void setRawSamplesPerSec(
fpreal fps,
bool notify =
true);
1208 void setChopMotionSamples(
int n,
bool notify =
true);
1213 {
return getFrame( myStart ); }
1215 {
return getFrame( myEnd ); }
1220 void setGlobalStart(
fpreal start,
bool notify =
true);
1231 return ((sample-1.0)/myFPS);
1241 return niceNumber(getSampleRaw(t));
1246 return (
int)
SYSfloor(getSampleRaw(t+getTolerance()));
1251 return sample_delta/myFPS;
1256 return time_delta*myFPS;
1261 return getTime(
SYSrint( getSampleRaw(t) ) );
1267 return getTime(getSnapSubsample(getSampleRaw(t)));
1282 return SYSrint((frame - getGlobalStartFrame())
1283 * (1.0 / mySampleStep))
1284 * mySampleStep + getGlobalStartFrame();
1298 snaptime = getSnapToFrameTime( t );
1299 return SYSisEqual(t, snaptime, getTolerance());
1311 void setIntegerFrameFlag(
int flag,
bool notify =
true);
1314 void setRestrictRangeFlag(
int flag,
bool notify =
true);
1317 void setShowRangeFlag(
int flag,
bool notify =
true);
1320 void setShowTicksFlag(
int flag,
bool notify =
true);
1323 void setShowAudioFlag(
int flag,
bool notify =
true);
1326 void setShowKeysFlag(
int flag,
bool notify =
true);
1329 void setShowBookmarksFlag(
int flag,
bool notify =
true);
1332 void setShowSimCacheFlag(
int flag,
bool notify =
true);
1335 void setShowAnimBarFlag(
int flag,
bool notify =
true);
1344 void parseUnitsString(
const char *
units,
1347 fpreal scaleToMKS(
const char *fromunits)
const;
1348 fpreal scaleFromMKS(
const char *tounits)
const;
1351 void setRealTimeFlag(
int flag,
bool notify =
true);
1353 void setRealTimeFactor(
fpreal f,
bool notify =
true);
1355 void setRealTimeDisableSkip(
bool b,
bool notify =
true);
1357 void setSampleStep(
fpreal s,
bool notify =
true);
1361 start = myRangeStart;
1370 int saveChannels(
const char *
filename,
bool binary,
bool compiled,
1372 bool displayed =
false)
const;
1373 int loadChannels(
const char *
filename,
1374 const char *src_pattern,
1375 const char *dest_pattern,
1380 bool delete_keys =
false,
1382 static bool readCHNFileHeader(
UT_IStream &is,
bool quiet,
1386 static bool skipCHNFileHeaderForCollection(
UT_IStream &is,
bool &is_fp64);
1387 static bool getFileType(
const char *
filename,
int &raw,
int &
binary );
1388 static bool printFileInfo(std::ostream &os,
const char *
filename,
1390 bool print_segments=
true );
1411 evalContext(thread).myCollection =
g;
1413 evalContext(thread).myChannel =
nullptr;
1414 evalContext(thread).mySegment =
nullptr;
1415 evalContext(thread).myChannelName =
nullptr;
1426 return evalContext(thread).myCollection;
1433 { myRootCollection = root; }
1435 {
return myRootCollection; }
1442 {
return myEvalContext.getValueForThread(thread); }
1446 {
return myEvalContext.getValueForThread(thread); }
1449 {
return evalContext(thread).myChannel; }
1451 {
return evalContext(thread).mySegment; }
1453 {
return evalContext(thread).myChannelName; }
1456 {
return evalContext(thread).myContextOptionsStack; }
1459 {
return evalContext(thread).myContextOptions; }
1464 {
return evalContext(thread).time(); }
1466 { evalContext(thread).setTime(time); }
1468 { evalContext(thread).setFlicks(fl); }
1484 bool getVariableValue(
UT_String &str,
int i,
1486 bool getVariableValue(
fpreal &
val,
int i,
1490 bool getVariableValue(
int &
val,
int i,
int thread)
const;
1493 virtual bool getVariableString(
const char *
name,
1506 static void lookupVariableNoThread(
const char *
name,
1510 static void lookupExpressionNoThread(
const char *
name,
1531 const char *
path)
const;
1552 bool use_alias=
false)
const;
1554 virtual bool isChanRefValid(
const CH_ChannelRef &chref)
const;
1556 void changeReferencesToNodeId(
int old_id,
int new_id);
1562 void removeReferencesToNodeId(
int node_id);
1564 void displayScope()
const;
1578 {
return myAutoKeyTuples; }
1580 { myAutoKeyTuples=
b; }
1585 {
return mySetAutoScopeOnChannelCreate; }
1587 { mySetAutoScopeOnChannelCreate=
b; }
1592 {
return myAutoScopeIncludeAnimated; }
1594 { myAutoScopeIncludeAnimated=
b; }
1598 {
return myFollowScopedChannelReferences; }
1600 { myFollowScopedChannelReferences=
b; }
1613 fpreal evalCycleOffsetFunc(
1615 fpreal evalCycleOffsettFunc(
1642 {
return myAutoScopeIncludeChild; }
1644 { myAutoScopeIncludeChild=
b; }
1649 {
return myAutoScopeIncludeConstraints; }
1651 { myAutoScopeIncludeConstraints=
b; }
1659 {
return myDefaultContextOptions; }
1662 void setDefaultContextOption(
1666 void setDefaultContextOption(
1672 void setDefaultContextOptionUiConfig(
1675 void removeDefaultContextOption(
1678 void clearDefaultContextOptions(
bool create_undo);
1679 bool saveDefaultContextOptions(std::ostream &os)
const;
1680 bool loadDefaultContextOptions(
UT_IStream &is);
1681 int addDefaultContextOptionCallback(
1683 void removeDefaultContextOptionCallback(
int id);
1684 bool isAutomaticContextOption(
1686 bool isAutomaticContextOptionOverridden(
1688 void pushRopCookContextOptions();
1689 void pushRopCookContextOptions(
bool ropcook,
1695 void resetRopCookContextOptions();
1696 void updateRopCookContextOptions(
bool ropcook,
1702 void popRopCookContextOptions();
1707 void setChannelChanged( CH_ChannelChanged *mgr );
1708 CH_ChannelChanged *getChannelChanged();
1709 void triggerChannelChanged();
1722 {
return myIgnoreUpdateScopeFlag; }
1724 { myIgnoreUpdateScopeFlag = onoff; }
1726 static int getSimpleSegmentTypeFromExpression(
const char *expr);
1738 void setTolerance(
fpreal tol);
1740 void initExpressionLibrary();
1744 void initLibraryGlue();
1753 void destroyExternalCollection(
1760 void internalScopeChanged(
unsigned flags,
1761 bool propagate=
true,
1762 const int &reason = CH_SCOPE_REPLACED);
1764 void playbackChanged();
1766 void handleGroupCollision(
CH_Group *new_group,
1768 CollisionBehaviour cb );
1770 void destroyContents();
1771 int internalSetGlobalParam(
const char *token,
1774 int setSingleGlobalParam(
const char *token,
1777 void internalDirtyOrphanGlobalParamDependents(
1782 void propagateDefaultContextOptionDirtied(
1785 static char *chExprExpander(
const char *str,
int thread);
1791 bool operator==(
const chParamKey &key)
const;
1803 {
return key.hash(); }
1852 chParamData *findGlobalParam(
const char *token,
1854 chParamData *findOrCreateGlobalParam(
1856 fpreal fval,
const char *sval);
1858 chParamData *myLastGlobalParam;
1859 int mySettingGlobalParam;
1861 int mySettingGuideParam;
1863 int myChopMotionSamples;
1865 unsigned myGroupsSorted:1,
1868 myRealTimeDisableSkip:1,
1879 mySetAutoScopeOnChannelCreate:1,
1880 myAutoScopeIncludeAnimated:1,
1881 myFollowScopedChannelReferences:1,
1882 myAutoScopeIncludeChild:1,
1883 myAutoScopeIncludeConstraints:1;
1885 short myRawInterpFlag;
1888 bool myShouldShowFakeAccelHandles;
1892 SlopeMode myAutoSlope;
1896 bool myAlwaysCommitKey;
1909 int myBlockModifyScope;
1910 unsigned myPendingScopeChange;
1911 bool myPendingChannelChanged;
1914 CH_ChannelChanged *myChannelChanged;
1919 myDefaultContextOptionCallbacks;
1920 int myNextDefaultContextOptionCallbackId;
1922 bool myIgnoreUpdateScopeFlag;
1924 mutable UT_Lock myPendingChannelsLock;
1926 static CH_Manager *theManager;
1931 static constexpr
exint CH_SAMPLES_PER_FRAME = 1000;
1935 friend class CH_UndoScopeChannels;
1950 : myContext(chman.evalContext(thread))
1951 , myCollection(nullptr)
1952 , myPopCollection(false)
1953 , myPopContextOptions(false)
1955 #if defined(CH_USE_FLICKS)
1956 myFlicks = myContext.flicks();
1958 mySeconds = myContext.time();
1960 myContext.setTime(time);
1963 myPopCollection =
true;
1964 myCollection = myContext.myCollection;
1965 myContext.myCollection = ch;
1967 if (!context_options.isNull())
1969 myPopContextOptions =
true;
1970 myContextOptionsStack = myContext.myContextOptionsStack;
1971 myContext.myContextOptionsStack = context_options_stack;
1972 myContextOptions = myContext.myContextOptions;
1973 myContext.myContextOptions = context_options;
1979 #if defined(CH_USE_FLICKS)
1980 myContext.setFlicks(myFlicks);
1982 myContext.setTime(mySeconds);
1984 if (myPopCollection)
1985 myContext.myCollection = myCollection;
1986 if (myPopContextOptions)
1988 myContext.myContextOptionsStack = myContextOptionsStack;
1989 myContext.myContextOptions = myContextOptions;
2000 #if defined(CH_USE_FLICKS)
2005 bool myPopCollection;
2006 bool myPopContextOptions;
2017 : myContext(
CH_Manager::getContext()->evalContext(thread))
2019 myCollection = myContext.myCollection;
2021 myContext.myCollection = collection;
2025 return myContext.myCollection;
2030 myContext.myCollection = collection;
2034 myContext.myCollection = myCollection;
2051 CH_ActiveLayerContrib();
2052 ~CH_ActiveLayerContrib();
2084 : myOwner(owner), myChanRef(ref), myFlags(flags)
2120 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)
#define checkPtr(ptr, msg)
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
SYS_FORCE_INLINE UT_StringHolder getToken(Add enum_value)
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
LeafData & operator=(const LeafData &)=delete
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