Maya crashes when duplicate special - crash

I try to make instance copies of my character using Duplicate Special. But unfortunately it crashes every time I try.
For this I select my character's group "rig_group", then go to Edit → Duplicate Special ⊡
And I want to use these settings:
And it crashes Maya when I hit "Apply" or "Duplicate Special".
Note that it works on this character on a fresh file.
Test file - M01_WalkNeutral.0080.mb

Remember that duplicate special doesn't work properly on rig's. You can use duplicate special for polygons, curves or etc.
Ps. If you wanted to duplicate special a high-poly mesh I would say that to reduce the vertex then run that but about rig_group I'm not sure.
I hope to help that to you.

Related

VIM equivalent of IntelliJ's expand/shrink selection?

How would one achieve the same result. I believe the keybinding for macOS Intellij is op+up/down and on windows it is alt+w/d.
Essentially the function highlights the current word, then, with successive presses, expands out to the full string/line/area in-between parenthesis/further out to the next set of parenthesis. Very useful for developing in LISP.
The closest I've gotten is this: https://vi.stackexchange.com/a/19028
Try this plug in: https://github.com/terryma/vim-expand-region
It expands selections based on Vim’s text objects.
Well this may seem comfortable but does not correspondent with the internal logic of vim itself.
See, in vim everything you enter is like a sentence. va{ for example: there is a verb v -> visually select and an object (or movement) { -> paragraph. In this case there is also a modifier a around. You can exchange stuff in this sentence and it will still work vaw, dil, cB and so on. The power of vim is greatly based on that concept.
Of course you can write a function that does vaw first, then S-v and lastly va{ but that will only work with visual selection. It will not work with c or d or anything. So I will recommend to get used to use different keys for different actions.
The visual selection is mostly not needed anyway. Change a paragraph? directly use ca} and so on.
I have found that VI/VA + WOBO (as many times as you need to expand) works similarly. Not as fast but its the same concept and you can even expand/shrink asymmetrically based on your WO's and BO's (Or OW's and OB's depending on how you look at it)

How to determine Thousands Separator using Format in VBA

I would like to determine the Thousand Separator used while running a VBA Code on a target machine without resolving to calling system built-in functions such as (Separator = Application.ThousandsSeparator).
I am using the following simple code using 'Format':
ThousandSeparator = Mid(Format(1000, "#,#"), 2, 1)
The above seems to work fine, and would like to confirm if this is a safe method of doing it without resorting to system calls.
I would expect the result to be a single char string in the form of , or . or ' or a Space as applicable to the locale on the machine.
Please note that I want to only use a language statement such as Format or similar (no sys calls). Also this relates to Thousands Separator not Decimal Separator. This article Using VBA to detect which decimal sign the computer is using does not help or answer my question. Thanks
Thanks in advance.
The strict answer to whether it is safe to use Format to get the thousands separator is No.
E.g. on Windows, it is possible to enter up to three characters into the Thousands Separator field in the regional settings in the control panel.
Suppose you enter asd and click OK.
If you now call Format(1000, "#,#") it will give you 1a000. That is only the first letter of your thousands separator. You have failed to retrieve it correctly.
Reading the registry:
? CreateObject("WScript.Shell").RegRead("HKCU\Control Panel\International\sThousand")
you get back asd in full.
To be fair, the Excel international properties do not seem to be of much help either. Application.International(xlThousandsSeparator) in this situation will return the separator originally defined in your computer's locale, not the value you've overridden it to.
Having that said, the practical answer is Yes, because it would appear (and if you happen to know for sure, please post an answer here) that there is no culture with multi-char thousand separator (even in China where scary things like 1億2345万6789 or 1億2345萬6789 exist, they happen to be represented with just one UTF-16 character), and you probably are happy to ignore the people who decided to play with their locale settings in that fashion.

Find unused cases of an enum (Objective-C / Swift)

We’ve just migrated a couple of thousand localised strings in an iOS project from an old struct to an enum. We’d now like to find any which are unused.
I’m looking for a way to find any cases of an enum which are not used anywhere within my project, short of searching the project for them one by one.
We have the strings in Objective-C and Swift versions, so either will work.
Any ideas?
About your only option is to comment out each enum value and see which ones result in an error. The ones that don't aren't being used.
If you have a lot of enum values, comment them out in batches of 10 or 15. Do a compile. Scan the errors and uncomment out the values reported in an error. This leaves the unused enum values commented out.
There is a way to automate this, recently I was asked to search for unused endpoints in a large project, to make this semi-automatic:
1- run this grep command, to search for used endpoints
grep -r --include='*.swift' "EndpointEnum"
2- use a text editor (I used sublime), to sort, make unique and save into used.txt
3- add all the enum values in all.txt
4- diff between the two files, and keep the lines starting with a "-"
this will give you the unused enum values.

CMD specifying columns to save?

I looked at a code by someone previously and saw them do code that went like:
set Today=%DATE:~0,3%
And if the variable (%DATE%) was executed (echo %DATE%) it would come out with the first 3 letters of the date it was, this worked for other commands such as %TIME%, etc... But I was wondering if it was possible to specify what it takes instead of a first section, the reason I want this is cause I am attempting to make a logging system that logs with the times and date, though the %time% variable consists of colons, which can't be put as folder names,
Some attempts:
set Today=%TIME:~0,2 ~4,5%
set Today=%TIME:~0,2:4,5%
The list goes on, so to specify in more detail what I want, it is simply a way to take only the numbers of the %time% variable, or to remove the colons with a filtering method, if either are possible or you have a suggestion, please go ahead and tell me.
Thanks for reading. :)
You can't specify multiple regions from the variable but it is very easy to accomplish what you want:
set Today=%TIME:~0,2%%TIME:~3,2%
I assume you see the pattern...
Remember that DATE and TIME might look different on different locals so this may work fine on your local system but not if you go to a different system or change your local settings!
Reference: set /?

Controlling Doxygen's LaTeX output for making PDF documentation

I'm using Doxygen to generate documentation for my code. I need to make a PDF version of this and using Doxygen's LaTeX output appears to be the way to do it.
However I've run into a number of annoying problems, and not knowing anything about LaTeX previously haven't really got much of an idea on how to approach them, and the countless references for LaTeX related things are not much help...
I worked out how to create a custom style thing in a sty file and how to get Doxygen to use it. After a lot of searching I found out how to set the page margins etc. through this, and I'm guessing the perhaps this is the file I want for doing the other things I want, but I cant seem to find any commands for doign what I want :(
The table of contents at the start of the document contains a lot of items Id rather it didn't as it makes the contents very long. Is there some way to limit this contents to just say the first two levels, rather than having entries for every single individual function, variable, etc.? Id quite like to keep all the bookmarks however. I did try the "COMPACT_LATEX" option but as well as removing items on the contents pages, it removed the bookmarks and the member lists at the start of each section, which I do really want to keep.
Is there a way to change the order of things, like putting the full class description at the start of the section, rather than after all the members and attributes?
Wow, that's kind of evil of Doxygen.
Okay, to get around the tocdepth counter problem, add the following line to your .sty file:
\AtBeginDocument{\setcounter{tocdepth}{2}}% or whatever level you want
You can set the PDF bookmarks depth to a separate value:
% requires you \usepackage{hyperref} first
\hypersetup{
bookmarksdepth = section, % of whatever level you want
}
Also note that if you have a list of figures/tables, the tocdepth must be at least 2 for them to show up.
I don't see any way of rearranging those items within the LaTeX files---Doxygen just barfs them out there, so we can't do much. You'll have to poke around the Doxygen documentation to see if there's any way to specify the order I guess. (Here's hoping!)
You're so close.
Googling on "latex contents level" brought me to LaTeX - customizing the depth of the table of contents for different parts of the thesis which suggests
\setcounter{tocdepth}{n}
where n starts at zero for only the highest level division. This is presumable defined in all the default styles, but is worth a try in doxygen.
You could write a Perl/Awk script to simply delete the unwanted lines from the table of contents. For the file burble.tex, Latex will generate the file burble.toc, which will contain lines such as:
\contentsline {subsection}{Class F rewrites}{38}
\contentsline {subsection}{Class M rewrites}{39}
\contentsline {section}{\numberline {7}Definition and properties of the translation}{44}
\contentsline {paragraph}{Well-formedness}{54}
Simple regexes will identify which levels each line belongs to, and you can filter the file based on that. Once you have the table of contents the way you want it, insert \nofiles in the appropriate place (the style sheet?), which means that Latex will read the auxiliary files but not overwrite them.