Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialise all layers on file load. #28

Closed
wants to merge 1 commit into from

Conversation

alekamca
Copy link
Contributor

This pull request is to resolve this issue: #26

Copy link
Contributor

@dbaz dbaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Aleka,
Thanks for the PR!

If you could add a unit test to validate your change that would be great, AL_USDMaya/src/plugin/AL_USDMayaTestPlugin/AL/usdmaya/nodes/test_Layer.cpp seems like a good place

Thanks again

// initialise self
MPlug plug = layer.nameOnLoadPlug();
MString path = plug.asString();
if(path.length() && path.substring(0, 3) != "anon")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed we had this substring check before. Maybe we can do it better this time, try use SdfLayer::IsAnonymousLayerIdentifier to determine if it's anonymous

@@ -61,7 +61,36 @@ static void preFileOpen(void*)
{
TF_DEBUG(ALUSDMAYA_EVENTS).Msg("preFileOpen\n");
}
//----------------------------------------------------------------------------------------------------------------------
static void initialiseChildAndSublayers(nodes::Layer& layer, nodes::ProxyShape* proxy)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move initialiseChildAndSublayers function to be in Layer.h/cpp

{
layer->init(proxy, stage->GetSessionLayer());

// initialise and fixup each child and sublayer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stick these sublayer and childlayer loops into a member function into Layer.h/cpp and call if from here

@alekamca
Copy link
Contributor Author

alekamca commented Nov 3, 2017

Thank you for reviewing--all of the comments make sense. I will try to address them soon.

@dbaz
Copy link
Contributor

dbaz commented Jan 2, 2018

Hey @alekamca as you already know, #53 changes how we are dealing with layers in AL_USDMaya and affects this PR.

What is the way forward for this code review? can that change be made compatible with how you are using the layers at your studio?

I'm really digging for more information on how exactly you guys are using the Layers in AL_USDMaya, and what you are trying to do.

Let us know.

@alekamca
Copy link
Contributor Author

alekamca commented Jan 2, 2018

@dbaz I think it's safe to close this PR and try to figure out how to make our uresolved path stuff work with the new layer manager. Looking more into how the Tf error notification works, I think that is probably the better path forward anyways.

@alekamca alekamca closed this Jan 2, 2018
seando-adsk added a commit to autodesk-forks/AL_USDMaya that referenced this pull request Nov 19, 2018
…nimalLogic#28)

* Some minor fixes related to merging discovered when trying to merge
  our 'dev-adsk' branch into 'develop'.
seando-adsk pushed a commit to autodesk-forks/AL_USDMaya that referenced this pull request Nov 27, 2018
1. glext.h is not in the devkit anymore, switching files

2. Adding chrono for windows only

3. Adding python libraries to fix link issue

4. MAYA-xxxx Integrating UFE into AL_USDMaya plugin
- Integration of the UFE libraries include cmake lookup and cmake on/off
  variables to enable and disable compilation with UFE
- Integration of a runtime variable to switch on/off UFE selection with
  the plugin
- Integrate UFE selection and disabling creation of proxy nodes for usd
   prim selections

5. Updating runtime id, separator of USD, and adding an added header in the want ufe build ompile

6. Missing header file

7. Merging 0.28.5 into dev-adsk (AnimalLogic#9)

8. Windows build fixes: (AnimalLogic#10)
* Remove treat warnings as errors (/WX)
* Multiline (with \) the C++ options

9. Show the UFE selection in the viewport (AnimalLogic#11)

* Show the UFE selection in the viewport

* When drawing the override, if the env var MAYA_WANT_UFE_SELECTION is
  set get the UFE selection and for the USD items draw them in wireframe
  with the Maya selection color.

* Code review: adding code comments

* Fix spelling mistake

10. Changing PATHS to HINTS in cmake file

11. Windows build fixes (AnimalLogic#13)

* MAYA-93327 - Integrate USD in Maya

* Install the Windows .pdb files.

* Add UFE build define when cmake flag is set.

* Fix relative library path for plugInfo.json files.

* Build schemas/plugInfo.json in binary folder (not source).
  So git status is not dirtied.

* Use UFE_VERSION (instead of hard-coded value) which is set above this
  repo when building.

* When building with UFE, we must have the UFE version defined.

* Code review comments - build ufe major/minor vars in the parent rather
  than child (FindUFE.cmake). This way they are accessible to others.

12. MAYA-93327 - Integrate USD in Maya (AnimalLogic#14)

* RPATH has been deprecated in favor or RUNPATH which is same except
  that it is searched after LD_LIBRARY_PATH. This gives users the ability
  to override the shared libraries.

13. Use local UFE and versioning fix.

14. Convert FindUFE.cmake to LF line endings.

15. Improved USD selection highlighting.

16. MAYA-88299 - Versioning for UFE and API (AnimalLogic#16)

* UFE lib/dll/so/dylib with major only version (no minor).

17. Merging master (0.29.1) into dev-adsk (AnimalLogic#17)

18. MAYA-94776 - Update USD plugin to latest AL branch (AnimalLogic#18)

* Adding missing pdb file for new plugin file.

19. MAYA-94776 - Update 'dev-adsk' to latest 'develop' to get VP2 Selection code (AnimalLogic#19)

20. MAYA-95136 consistent behavior with legacy VP1 selection (AnimalLogic#20)

21. MAYA-94667 deselect USD objs by clicking void area (AnimalLogic#21)

* MAYA-94667 deselect USD objs by clicking void area

* MAYA-94667 code review suggestions

* MAYA-94667 code review suggestion

22. MAYA-95136 selection under complex transform nodes (AnimalLogic#22)

23. MAYA-95391 revert regression change (AnimalLogic#23)

24. MAYA-95391 RMB click shouldn't trigger selection (AnimalLogic#24)

Port the VP1 implementation in ProxyShapeUI::select().

25. MAYA-95322 update bounding box of AL_MayaUSD proxy shape (AnimalLogic#25)

* MAYA-95322 update bounding box of AL_MayaUSD proxy shape

* MAYA-95322 code review feedback

26. Temporary restore alwaysDirty ProxyDrawOrride

(cherry picked from commit 6060036)

MAYA-95165 : Crash when duplicating USD objects

   The regression was introduced by the commit https://git.autodesk.com/autodesk-forks/AL_USDMaya/commit/321be29175a43aa270bb9d50387ac335c0d483d0
   To avoid that problem we cherry-picked the correction from the last
   updates in the develop branch.

27. MAYA-95627 - Update to latest AL develop branch v0.29.4 + USD v18.11

Merge branch 'develop' into donnels/merging_in_develop_0.29.4

28. MAYA-95627 - Update to latest AL develop branch v0.29.4 + USD v18.11

* Fixing merge (of develop branch into dev-adsk) error.

29. MAYA-95627 - Update to latest AL develop branch v0.29.4 + USD v18.11 (AnimalLogic#28)

* Some minor fixes related to merging discovered when trying to merge
  our 'dev-adsk' branch into 'develop'.

30. Comment from initial pull request to AL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants