aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rwxr-xr-xlinden/indra/llprimitive/llprimitive.cpp96
-rw-r--r--linden/indra/newview/CMakeLists.txt1
-rw-r--r--linden/indra/newview/llpanellandmedia.cpp51
3 files changed, 1 insertions, 147 deletions
diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp
index 7546764..0ad9f79 100755
--- a/linden/indra/llprimitive/llprimitive.cpp
+++ b/linden/indra/llprimitive/llprimitive.cpp
@@ -247,50 +247,22 @@ void LLPrimitive::setTE(const U8 index, const LLTextureEntry& te)
247 247
248S32 LLPrimitive::setTETexture(const U8 index, const LLUUID &id) 248S32 LLPrimitive::setTETexture(const U8 index, const LLUUID &id)
249{ 249{
250 // if we're asking for a non-existent face, return null
251 if (te >= mNumTEs)
252 {
253 llwarns << "setting non-existent te " << te << llendl;
254 return 0;
255 }
256
257 return mTextureList.setID(index, id); 250 return mTextureList.setID(index, id);
258} 251}
259 252
260S32 LLPrimitive::setTEColor(const U8 index, const LLColor4 &color) 253S32 LLPrimitive::setTEColor(const U8 index, const LLColor4 &color)
261{ 254{
262 // if we're asking for a non-existent face, return null
263 if (te >= mNumTEs)
264 {
265 llwarns << "setting non-existent te " << te << llendl;
266 return 0;
267 }
268
269 255
270 return mTextureList.setColor(index, color); 256 return mTextureList.setColor(index, color);
271} 257}
272 258
273S32 LLPrimitive::setTEColor(const U8 index, const LLColor3 &color) 259S32 LLPrimitive::setTEColor(const U8 index, const LLColor3 &color)
274{ 260{
275 // if we're asking for a non-existent face, return null
276 if (te >= mNumTEs)
277 {
278 llwarns << "setting non-existent te " << te << llendl;
279 return 0;
280 }
281
282 return mTextureList.setColor(index, color); 261 return mTextureList.setColor(index, color);
283} 262}
284 263
285S32 LLPrimitive::setTEAlpha(const U8 index, const F32 alpha) 264S32 LLPrimitive::setTEAlpha(const U8 index, const F32 alpha)
286{ 265{
287 // if we're asking for a non-existent face, return null
288 if (te >= mNumTEs)
289 {
290 llwarns << "setting non-existent te " << te << llendl;
291 return 0;
292 }
293
294 return mTextureList.setAlpha(index, alpha); 266 return mTextureList.setAlpha(index, alpha);
295} 267}
296 268
@@ -350,111 +322,46 @@ S32 LLPrimitive::setTERotation(const U8 index, const F32 r)
350//=============================================================== 322//===============================================================
351S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump) 323S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
352{ 324{
353 // if we're asking for a non-existent face, return null 325 return mTextureList.setBumpShinyFullbright(index, bump);
354 if (te >= mNumTEs)
355 {
356 llwarns << "setting non-existent te " << te << llendl;
357 return 0;
358 }
359
360 return mTextureList.setBumpShinyFullbright(index, bump);
361} 326}
362 327
363S32 LLPrimitive::setTEMediaTexGen(const U8 index, const U8 media) 328S32 LLPrimitive::setTEMediaTexGen(const U8 index, const U8 media)
364{ 329{
365 // if we're asking for a non-existent face, return null
366 if (te >= mNumTEs)
367 {
368 llwarns << "setting non-existent te " << te << llendl;
369 return 0;
370 }
371
372 return mTextureList.setMediaTexGen(index, media); 330 return mTextureList.setMediaTexGen(index, media);
373} 331}
374 332
375S32 LLPrimitive::setTEBumpmap(const U8 index, const U8 bump) 333S32 LLPrimitive::setTEBumpmap(const U8 index, const U8 bump)
376{ 334{
377 // if we're asking for a non-existent face, return null
378 if (te >= mNumTEs)
379 {
380 llwarns << "setting non-existent te " << te << llendl;
381 return 0;
382 }
383
384 return mTextureList.setBumpMap(index, bump); 335 return mTextureList.setBumpMap(index, bump);
385} 336}
386 337
387S32 LLPrimitive::setTEBumpShiny(const U8 index, const U8 bump_shiny) 338S32 LLPrimitive::setTEBumpShiny(const U8 index, const U8 bump_shiny)
388{ 339{
389 // if we're asking for a non-existent face, return null
390 if (te >= mNumTEs)
391 {
392 llwarns << "setting non-existent te " << te << llendl;
393 return 0;
394 }
395
396 return mTextureList.setBumpShiny(index, bump_shiny); 340 return mTextureList.setBumpShiny(index, bump_shiny);
397} 341}
398 342
399S32 LLPrimitive::setTETexGen(const U8 index, const U8 texgen) 343S32 LLPrimitive::setTETexGen(const U8 index, const U8 texgen)
400{ 344{
401 // if we're asking for a non-existent face, return null
402 if (te >= mNumTEs)
403 {
404 llwarns << "setting non-existent te " << te << llendl;
405 return 0;
406 }
407
408 return mTextureList.setTexGen(index, texgen); 345 return mTextureList.setTexGen(index, texgen);
409} 346}
410 347
411S32 LLPrimitive::setTEShiny(const U8 index, const U8 shiny) 348S32 LLPrimitive::setTEShiny(const U8 index, const U8 shiny)
412{ 349{
413 // if we're asking for a non-existent face, return null
414 if (te >= mNumTEs)
415 {
416 llwarns << "setting non-existent te " << te << llendl;
417 return 0;
418 }
419
420
421 return mTextureList.setShiny(index, shiny); 350 return mTextureList.setShiny(index, shiny);
422} 351}
423 352
424S32 LLPrimitive::setTEFullbright(const U8 index, const U8 fullbright) 353S32 LLPrimitive::setTEFullbright(const U8 index, const U8 fullbright)
425{ 354{
426
427 // if we're asking for a non-existent face, return null
428 if (te >= mNumTEs)
429 {
430 llwarns << "setting non-existent te " << te << llendl;
431 return 0;
432 }
433
434 return mTextureList.setFullbright(index, fullbright); 355 return mTextureList.setFullbright(index, fullbright);
435} 356}
436 357
437S32 LLPrimitive::setTEMediaFlags(const U8 index, const U8 media_flags) 358S32 LLPrimitive::setTEMediaFlags(const U8 index, const U8 media_flags)
438{ 359{
439 // if we're asking for a non-existent face, return null
440 if (te >= mNumTEs)
441 {
442 llwarns << "setting non-existent te " << te << llendl;
443 return 0;
444 }
445
446 return mTextureList.setMediaFlags(index, media_flags); 360 return mTextureList.setMediaFlags(index, media_flags);
447} 361}
448 362
449S32 LLPrimitive::setTEGlow(const U8 index, const F32 glow) 363S32 LLPrimitive::setTEGlow(const U8 index, const F32 glow)
450{ 364{
451 // if we're asking for a non-existent face, return null
452 if (te >= mNumTEs)
453 {
454 llwarns << "setting non-existent te " << te << llendl;
455 return 0;
456 }
457
458 return mTextureList.setGlow(index, glow); 365 return mTextureList.setGlow(index, glow);
459} 366}
460 367
@@ -1029,7 +936,6 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
1029 setTE(te_num, *(old_tes.getTexture(face_mapping[face_bit]))); 936 setTE(te_num, *(old_tes.getTexture(face_mapping[face_bit])));
1030 } 937 }
1031 } 938 }
1032>>>>>>> 5faaca1... port llprimitive from SG2.0
1033 return TRUE; 939 return TRUE;
1034} 940}
1035 941
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index b576ccd..75ba977 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -1174,7 +1174,6 @@ set(viewer_APPSETTINGS_FILES
1174 ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg 1174 ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
1175 ) 1175 )
1176 1176
1177
1178source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES}) 1177source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})
1179 1178
1180set_source_files_properties(${viewer_APPSETTINGS_FILES} 1179set_source_files_properties(${viewer_APPSETTINGS_FILES}
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp
index fc84bb5..db68c42 100644
--- a/linden/indra/newview/llpanellandmedia.cpp
+++ b/linden/indra/newview/llpanellandmedia.cpp
@@ -172,57 +172,6 @@ void LLPanelLandMedia::refresh()
172 BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); 172 BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
173 173
174 mCheckSoundLocal->set( parcel->getSoundLocal() ); 174 mCheckSoundLocal->set( parcel->getSoundLocal() );
175 mCheckSoundLocal->setEnabled( can_change_media );
176
177 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
178 if (!region)
179 {
180 // never seen this happen, but log it
181 llwarns << "Couldn't get selected region." << llendl;
182 }
183
184 // We need to do this differently for OpenSim because it doesn't include
185 // REGION_FLAGS_ALLOW_VOICE in the "RegionInfo" message as of 0.6.9 PF -- MC
186 bool allow_voice = parcel->getParcelFlagAllowVoice();
187 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
188 {
189 if (region && region->isVoiceEnabled()) // estate-wide voice-disable overrides all
190 {
191 mCheckEnableVoiceChatIsEstateDisabled->setVisible(false);
192
193 mCheckEnableVoiceChat->setVisible(true);
194 mCheckEnableVoiceChat->setEnabled( can_change_media );
195 mCheckEnableVoiceChat->set(allow_voice);
196
197 mCheckEnableVoiceChatParcel->setEnabled( can_change_media && allow_voice );
198 }
199 else // disabled at region level
200 {
201 mCheckEnableVoiceChatIsEstateDisabled->setVisible(true); // always disabled
202 mCheckEnableVoiceChat->setVisible(false);
203 mCheckEnableVoiceChat->setEnabled(false);
204 mCheckEnableVoiceChat->set(false);
205
206 mCheckEnableVoiceChatParcel->setEnabled(false);
207 }
208 }
209 else
210 {
211 mCheckEnableVoiceChatIsEstateDisabled->setVisible(true);
212
213 mCheckEnableVoiceChat->setVisible(true);
214 mCheckEnableVoiceChat->setEnabled( can_change_media );
215 mCheckEnableVoiceChat->set(allow_voice);
216
217 mCheckEnableVoiceChatParcel->setEnabled( can_change_media && allow_voice );
218 }
219
220 mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel());
221
222 mMusicURLEdit->setText(parcel->getMusicURL());
223 mMusicURLEdit->setEnabled( can_change_media );
224
225
226 175
227 childSetText("current_url", parcel->getMediaCurrentURL()); 176 childSetText("current_url", parcel->getMediaCurrentURL());
228 177