Mon, Nov 25, 2:13 PM CST

Renderosity Forums / Blender



Welcome to the Blender Forum

Forum Moderators: Lobo3433 Forum Coordinators: LuxXeon

Blender F.A.Q (Last Updated: 2024 Nov 24 8:44 pm)

Welcome to the Blender Forum!


   Your place to learn about Blender, ask questions,
   exchange ideas, and interact with the other Blender users!


   Gallery | Freestuff | Tutorials

 

Visit the Renderosity MarketPlace. Your source for digital art content!

 





Subject: hey Lobo


heddheld ( ) posted Sun, 29 December 2013 at 4:31 AM · edited Thu, 14 November 2024 at 6:23 AM

was thinking it would be a good idea to have a sticky of useful addons and maybe a quick tut on setting them up in user preffs ?


RobynsVeil ( ) posted Sun, 29 December 2013 at 4:47 AM

A really useful tutorial would be how to run little scripts in the Blender Python Scripting thingie, and what to do if it all goes pear-shaped... :blink:

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


heddheld ( ) posted Sun, 29 December 2013 at 6:00 AM

hope you will write one RV ?

running a script in anything is a step beyond me!!!!!


EClark1894 ( ) posted Sun, 29 December 2013 at 6:01 AM

In that case an even better post would be where to find all those Python scripts.




RobynsVeil ( ) posted Sun, 29 December 2013 at 6:21 AM · edited Sun, 29 December 2013 at 6:24 AM

Well, there's this script developed by BlenderDiplom that removes all references to image textures which goes a bit like this:

# load a library containing blender-specific classes<br></br>
import bpy<br></br>

# create an empty list named 'img_names' list all textures
in the<br></br>
# .blend, store them in a list named 'textures'<br></br>
img_names = []<br></br>
textures = bpy.data.textures

# for each texture in this list, verify it's a picture<br></br>
# and if so, add it to the list 'img_names'<br></br>
for tex in textures:<br></br>
  if tex.type == 'IMAGE':<br></br>
    img_names.append(tex.image.name)

# list all pictures in the .blend, store them in a list
named 'imgs'<br></br>
imgs = bpy.data.images

# for each picture in this list, verifiy it appears in
'img_names'.<br></br>
# If not, delete it.<br></br>
for image in imgs:<br></br>
  name = image.name<br></br>
  if name not in img_names:<br></br>
    image.user_clear()

However, this crashes, on this line:

img_names.append(tex.image.name)

giving the following error in console:

AttributeError: 'NoneType' object has no attribute 'name'

:blink:

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


heddheld ( ) posted Sun, 29 December 2013 at 11:56 AM

ok guess we need 2 stickies

one for addons (with links lol )

an one for all who want to learn python ;-)

I keep promising myself a crash course on it

but the older I get the lazier I get   rofl


RobynsVeil ( ) posted Sun, 29 December 2013 at 1:39 PM

I know just enough to be dangerous, Hedd. :lol:

I do love Python... Bagginsbill more or less introduced the OOP bit to me with Matmatic. Matmatic (MATerials autoMATICally... doesn't have too much to do with mathematics, really) is a specialised flavour of Poser Python, which simply means there have been methods developed to solve problems for that environment, just like Blender has its own flavour - and methods - which you access with that first line of that script I posted: import bpy (import blender python).

But yeah, you're right... running scripts is definitely not the same as writing them.

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Lobo3433 ( ) posted Sun, 29 December 2013 at 9:40 PM
Forum Moderator

Hello everyone

 

I feel that all that was suggested would be a great idea for a sticky and tutorial on how to activate and add addons and where to find addons where we can contribute links and a sticky of links and places where those interested in learning how to do python scripting for Blender can gather information and learn how to do them. The tutoial for addons I can perhaps put together but it will have to be some time after my surgery which I will be going in for on 1/9/2014.  And will be recouping for bit. I will be having rods and having spine fused. So I will be out of touch for at least several days. But all the suggestions in this thread I would really like to get into place as well as perhaps finding a way for this forum to also maybe help in starting to pick an Artist of the Month and such I have seen some really fantastic stuff being uploaded in the Galleries that were rendered and made in Blender and I think some of those need to recognized as much as other artist here at renderosity

Lobo3433

Blender Maya & 3D Forum Moderator 

Renderosity Store

My Free Stuff

Facebook

Twitter

Renderosity Blender 3D Facebook Page



EClark1894 ( ) posted Sun, 29 December 2013 at 10:42 PM

Good luck with your surgery, Lobo.




RobynsVeil ( ) posted Mon, 30 December 2013 at 5:50 AM

Wow, what a way to start off the new year, Lobo... good luck with that!! Take good care of yourself...

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


heddheld ( ) posted Mon, 30 December 2013 at 6:01 AM

good luck with surgery

just do as the docs tell yer and stay safe


Lobo3433 ( ) posted Mon, 30 December 2013 at 9:48 PM
Forum Moderator

Thank you all

Lobo3433

Blender Maya & 3D Forum Moderator 

Renderosity Store

My Free Stuff

Facebook

Twitter

Renderosity Blender 3D Facebook Page



Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.