You can either take the approach of calling into Maya directly, and letting
your model respond to callbacks from Maya when things change, in order to
update, which then triggers updates in your views. Or you can take the
approach of only interacting with your model, which will then make change
in Maya after updating its own items.

Your view can watch for selection changes, of your view items, and provide
different visible buttons, or different enabled actions in a context menu.
One action could be a rename operation. Another could be a delete
operation.

On Fri, Dec 18, 2015 at 9:58 AM Padraig Ó Cuínn <
[email protected]> wrote:

> Hi Justin,
>
> I haven't added any renaming code yet to the script because I am not sure
> where to begin with it. My original thought was that I could use the
> selection as a base and use that though out the main code for everything
> but its proven hard to even find the right start to that end. What I wanted
> was to be able to grab the listItem and rename it in the model and then the
> changes update in mayas selected object.
>
> To Question 1 : Yes just as ive done with the selection change with the
> status bar i thought it would be nice to get a feedback message saying, I
> renames this to this.
>
> to Question 2:  If i make a selection of the objects (instead of renaming
> inside the model) would it be possible to have the button change state and
> rename the objects instead of refreshing (once the objects in the model are
> selected). having just said that i realise that the lineEdit would have to
> be used to setText
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/b4ef798e-2b62-4b87-bbd4-81e0611a8ea2%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/b4ef798e-2b62-4b87-bbd4-81e0611a8ea2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA01Mm1X%2B5hpYGC1iVmJFk%3D7%2B%2BFM%2B2AOJXa5MzzqndLFbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to