Can the "open editor" of tyflow be moved to the toolbar?
#1
HI, Tyso!

Can the "open editor" of tyflow be moved to the toolbar? This will open the editor faster and more directly. 


       Thank you
  Reply
#2
Hey cgdvs,

You can open the editor of any tyFlow object using the MAXScript command:

Code:
$.editor_open()

Using that code, you can create a macroscript that allows you to open it from any button or menu item that you wish.
  Reply
#3
Thank you. It's really a good idea.
The only regret may need to select "tyflow" in the case.


If the tyflow object name in the scene is custom. In this case, "select $tyflow 001" is used. There will be a problem. No matter how the tyflow name changes, you can still select the tyflow object in the scene or open editing through code execution. Is this possible?
  Reply
#4
Well, the bigger issue is that if there are more than one tyFlow objects in the scene, how to decide which one to open? The user who implements a macroscript for this would need to decide on their own heuristic.

You can iterate through all tyFlows in the scene - regardless of name - by calling:

Code:
arr = getClassInstances tyFlow
for t in arr do
(
  --do something
)

--or

if (arr.count > 0) then arr[1].editor_open()
  Reply
#5
Wow, I may think this is the perfect solution!
I don't know how to describe my mood. In short, thank you very much.
  Reply


Forum Jump: