碧血红天的HomePage

Maya插件教程 — 4.10 操作BlendShape

形变器可以把相同的拓扑的模型融合到一起,里面有可以分为三种类型。我们这里使用代码获取形变器中的数据。比如获取当前有哪些BlendShape对象,每个BlendShape对象有哪些目标,每个目标又有多少InBetween对象。

4.10.1 获取BlendShape对象

现在我们在形变器中添加一个简单的BlendShape对象。

我们能够使用ls函数直接过滤我们需要的对象类型,方法如下:

import pymel.core as pm
bs = pm.ls(type="blendShape")
print(bs) #[nt.BlendShape(u'blendShape1')]

ls函数获取出的对象都是数组结构,我们可以看见现在数组中有一个值,就是blendShape1,跟我们上图中的第一个层级节点名字一样。每个blendShape节点下面又能添加很多的目标,就是上面的pSphere2这个节点,我们通过BS节点的listAliases方法获取。

print(bs[0].listAliases())
#[(u'pSphere2', Attribute(u'blendShape1.weight[0]'))]

我们可以看见次方法返回的是一个元组,第一个参数代表这个target的名字,第二个参数是这个target其实就是BS节点的一个属性,我们可以用下面的方法直接获取这个Target的值:

import pymel.core as pm
c = pm.getAttr('blendShape1.weight[0]')
print(c) #0.476
pm.setAttr('blendShape1.weight[0]',0.9)

我们可以看见BS节点也存在一个值,目前图像中是1,这个值我们也能获取和设置,方法如下:

import pymel.core as pm
c = pm.getAttr('blendShape1.envelope')
print(c) #1.0
pm.setAttr('blendShape1.envelope',0.8)

在每个Target下面还能添加Inbetween节点,次节点获取稍微麻烦一点,我们可以使用BS的ibig获取当前编辑器中存在多少InBetween组:

import pymel.core as pm
c = pm.ls(type="blendShape")
print(c[0].ibig)
for k in c[0].ibig:
    print(k)
    print(k.index)
#blendShape1.inbetweenInfoGroup[0]

组的索引就是BS节点的索引,我们能够通过index 获取这个值,现在我们得到这个InBetween的目标,现在我们就获取它的名字:

import pymel.core as pm
import re
c = pm.ls(type="blendShape")
e = c[0].ibig[0].ibi
for k in e:
    print(k.attrName())
    matchObj = re.search('(?<=inbetweenInfo\[5)\d+(?=\])', k.__str__())
    value= float(matchObj.group())/1000

39 评论

  1. Great post. I was checking continuously this blog and I am impressed! Very useful info specifically the last part 🙂 I care for such info much. I was seeking this particular information for a long time. Thank you and good luck.

  2. Regards for helping out, great information.

  3. buy stromectol online no prescription No matter the explanation, Superdrol does increase endurance significantly

  4. To jeszcze nic, za chwilę dochodzę do weneckiego Canale Grande. Ze śpiewem na ustach pływają po nim gondolierzy. Taka przyjemność kosztuje 10 dolarów. To prawdziwa kwintesencja Las Vegas- przecież pod tym wszystkim znajduje się kasyno. Pomysł by kanały umieścić na piętrze mógł się urodzić tylko tu. Czym dalej zapuszczam się w uliczki amerykańskiej Wenecji, tym bardziej robi się ciemno. Czysty Matrix – pora dnia nie zależy od rzeczywistości tylko od miejsca, do którego doszłam. Na placu zamykającym pasaż przez cały dzień panuje atmosfera weneckiego wieczoru. Goście popijają wino w kawiarnianych ogródkach, występują uliczne trupy- bajeczna wirtualna rzeczywistość. Hotel/kasyno Wynn 8. Kolejny projekt Jay’a Sarno dokonał historii. Kasyno “Circus Circus”, otwarty w 1968 roku, był jednym z pierwszych zakładów hazardowych w mieście, koncentruje się przede wszystkim na rodzinne wakacje.. https://jeffreyqhxm531087.anchor-blog.com/15004160/ruletka-skinów Po zakończeniu tego procesu następuje wyłożenie kart. Każdy z pokerzystów może użyć dowolnych 5 kart z 7 dostępnych (5 kart wspólnych i 2 indywidualne otrzymane od rozdającego na początku gry), aby ułożyć jak najsilniejszą kombinację. Większość kasyn oferujących Casino Hold’em pozwala także na postawienie dodatkowej, pobocznej stawki, nazywanej AA+ albo „Para asów plus”. Jest on niezależny od głównej stawki i jest wyliczany według osobnej tabeli. Należy w niej zdobyć co najmniej parę asów, albo mocniejszą kombinację kart. Na ogół premia wypłacana jest według następujących stawek: Jak w każdej odmianie pokera tak i w Texas Hold’em głównym celem jest wygrywanie żetonów należących do pozostałych graczy poprzez skompletowanie najsilniejszego układu kart lub zmuszenie pozostałych graczy do spasowania i pozostanie jedynym graczem w rozdaniu. Jedną rozgrywkę – rozdanie, możemy podzielić na fazy: pre-flop, flop, turn, river, showdown.

  5. Some people believe that the cyanide from eating apricot seeds can kill cancer cells cialis prescription

  6. This is a topic close to my heart cheers, where are your contact details though?

  7. 5 the reads were pseudo aligned to reference transcriptome Homo_sapiens drugs to avoid while taking tamoxifen

  8. I got what you mean , thankyou for putting up.Woh I am thankful to find this website through google.

  9. There is noticeably a bundle to know about this. I assume you made certain nice points in features also.

  10. I see something truly interesting about your website so I saved to bookmarks.

  11. You are my inhalation, I have few blogs and very sporadically run out from to post .

  12. A lot of thanks for all of the effort on this site. Debby takes pleasure in getting into internet research and it is simple to grasp why. Almost all notice all about the compelling ways you create reliable tips and tricks on your web site and even encourage response from the others about this content so our favorite child is really becoming educated a lot. Take advantage of the remaining portion of the new year. You’re performing a tremendous job.

  13. Finally, we performed MetaXcan and prioritized 130 genes Bonferroni s test, P best price propecia in uk Greater than 95 of patients with chylomicronemia have MFCS rather than FCS

  14. Hi, just required you to know I he added your site to my Google bookmarks due to your layout. But seriously, I believe your internet site has 1 in the freshest theme I??ve came across. It extremely helps make reading your blog significantly easier.

  15. An attention-grabbing dialogue is value comment. I believe that it’s best to write extra on this topic, it won’t be a taboo topic however generally persons are not enough to speak on such topics. To the next. Cheers

  16. Thank you, I’ve just been searching for information about this subject for ages and yours is the best I have discovered till now. But, what about the bottom line? Are you sure about the source?

  17. Yay google is my king assisted me to find this outstanding site! .

  18. Hi, i think that i saw you visited my web site so i came to “return the favor”.I am trying to find things to improve my site!I suppose its ok to use a few of your ideas!!

  19. hello there and thanks for your info – I’ve definitely picked up something new from right here. I did on the other hand experience a few technical points the usage of this site, since I skilled to reload the site a lot of times prior to I may get it to load properly. I had been wondering in case your hosting is OK? Not that I am complaining, however slow loading instances occasions will often have an effect on your placement in google and can damage your high quality rating if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I am including this RSS to my email and could look out for a lot extra of your respective interesting content. Ensure that you update this again very soon..

  20. Some genuinely interesting info , well written and loosely user pleasant.

  21. Definitely, what a magnificent blog and instructive posts, I will bookmark your blog.Have an awsome day!

  22. I’m not sure where you’re getting your info, but great topic. I needs to spend some time learning more or understanding more. Thanks for excellent info I was looking for this information for my mission.

  23. Can I just say what a reduction to search out someone who truly is aware of what theyre speaking about on the internet. You positively know easy methods to bring a difficulty to mild and make it important. Extra people need to read this and understand this aspect of the story. I cant consider youre not more standard because you definitely have the gift.

  24. Great – I should certainly pronounce, impressed with your site. I had no trouble navigating through all the tabs as well as related information ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, website theme . a tones way for your client to communicate. Nice task.

  25. My brother recommended I might like this blog. He was entirely right. This post actually made my day. You cann’t imagine simply how much time I had spent for this info! Thanks!

  26. Howdy! I could have sworn I’ve been to this website before but after browsing through some of the post I realized it’s new to me. Anyhow, I’m definitely happy I found it and I’ll be book-marking and checking back often!

  27. I have been checking out a few of your stories and i can claim clever stuff. I will definitely bookmark your blog.

  28. I have recently started a web site, the information you offer on this web site has helped me greatly. Thanks for all of your time & work.

  29. Hi, I think your site might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, fantastic blog!

  30. hello!,I really like your writing so much! share we be in contact extra approximately your post on AOL? I require an expert in this area to solve my problem. May be that’s you! Having a look forward to peer you.

  31. Menopause or pregnancy can also cause sleep disturbances based on hormonal changes valtrex via internet

  32. 7 mM, respectively who sells viagra over the counter Modes of an increased exposure to get the health organization model is a urine

  33. I will just add it to the list of doctor visits already scheduled priligy united states

  34. com 20 E2 AD 90 20Naturalna 20Viagra 20Forum 20 20What 20Helps 20Viagra 20Work 20Better naturalna viagra forum U best price 1mg finasteride

  35. Покерът е може би най-популярната игра на карти в света. Това е игра, която съчетава късмет и стратегия, което на практика означава, че за да може да я играе, играчът трябва да знае поне основните ѝ видове и правила. Казино Win Bet, като едно от най-добрите и популярни казино вериги в България, притежава огромна игрална зала, поместена в Хотел България в Бургас. Като своя мисия, казиното е поставило да предлага на клиентите си приятна и изискана атмосфера, както и широк спектър от игри и забавления. https://padupcreations.com/community/profile/kpfeleanor30506/|0 Следват 5 вълнуващи седмици в казино Sesame. Всяка седмица в периода от 29.08.2022 до 02.10.2022 г. ви очакват не един, а цели два турнира – един за Казино и един за Спорт. И може да участвате и в двата едновременно. Всяка седмица екипа на казиното ще раздава 650 награди под формата на бонус средства с общ награден фонд от 40 000 лв. в казино и спорт турнирите. Разбира се платформата за залози има и сезам мобилна версия съвместима с всички мобилни устройства и таблети. За сега Sesame все още няма официално пуснато мобилно приложение но ако от бранда желаят да спазват новите тенденции и да бъдат конкуренти ще бъде необходимо да пуснат и апликация за андройд и айфоун.

发表评论