Comments (3)
I've read this a few times but am not understanding. Please give a concrete example.
from cyclesmineways.
@erich666 It's not important from the Mineways side of things, only from the CyclesMineways. If there's another material that exists for some other reason (like being added by the user), even if it shouldn't be modified by CyclesMineways, due to the current programming, it's possible that it gets modified anyways.
from cyclesmineways.
Have you tried this out? the code:
if (material.active_texture and len(material.active_texture.name)>=2 and material.active_texture.name[0:2]=="Kd"):
is the protection I put in a while ago.
It works by first checking if "material.active_texture" exists, so the rest of the code doesn't error out. Then it checks to see if the name is >= to 2 length, then if checks if it starts with "Kd". Mineways materials all seem to have "Kd." as their active texture.
Normal Blender users won't use this as it's more of a blender internal engine thing (it is also what controls the "texture view" in blender). For a user to accidentally have their material changed by the script, they would either need to set their own active_texture to something that starts with "Kd"(which is very hard to do accidentally) or copy and paste a Mineways object (untested).
from cyclesmineways.
Related Issues (13)
- Blender crashes when using script in certain circumstances. HOT 7
- Minecraft 1.10/Mineways 5.01 support HOT 1
- Solid block (type 0) water shader doesn't work HOT 2
- Improvements to be made to the GUI HOT 16
- Quick fixes needed before release of another version of the script HOT 35
- Mineways v5.09 Support HOT 9
- Object-based block property migration HOT 1
- Cycles script is outdated or defunct? HOT 2
- CyclesMineways does not work with the new 2.80 version of Blender HOT 6
- Minecraft 1.9 Support HOT 2
- Lighting Issue(s) HOT 12
- Emission Shader and Transparent Emission Shader are Different HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyclesmineways.