Tasks/RemoveSuffixFromNameOfSceneElements.py
9 from pyfbsdk
import FBSystem, FBMessageBoxGetUserValue, FBPopupInputType
12 (lRes, lSuffix ) =
FBMessageBoxGetUserValue(
"Enter suffix",
"Enter suffix to remove: ",
"_1", FBPopupInputType.kFBPopupString,
"OK",
"Cancel" )
16 if lSuffix
and lRes == 1:
22 for lComponent
in lScene.Components:
29 if not lComponent.Name ==
None:
30 if lComponent.Name.endswith( lSuffix ):
33 lComponent.Name = lComponent.Name.replace( lSuffix,
"" )
48 del( FBSystem, FBMessageBoxGetUserValue, FBPopupInputType )